# wtf.c:46: child(shared);
mov rax, QWORD PTR -40[rbp] # tmp100, shared
mov rdi, rax #, tmp100
call child #
# wtf.c:47: break;
jmp .L5 #
.L4:
# wtf.c:43: for(int i = 0; i < NUM_CHILDS; i++) {
add DWORD PTR -24[rbp], 1 # i,
.L3:
# wtf.c:43: for(int i = 0; i < NUM_CHILDS; i++) {
cmp DWORD PTR -24[rbp], 3 # i,
jle .L6 #,
.L5:
# wtf.c:51: if(forked == 0) {
cmp DWORD PTR -20[rbp], 0 # forked,
jne .L7 #,
gcc -S -masm=intel wtf.c -fverbose-asm -o test.asm
this is what i get with gcc
i mean they were nice enough to explain every line