list.c
each line beside the first of its instructions
disassembly
reverse
20
while
(
head
)
{
10019
10
test
rdi, rdi
10019
13
je
1001935
10019
15
push
rbp
10019
16
mov
rbp, rsp
10019
19
xor
eax, eax
10019
1b
nop
[rax + rax]
10019
20
mov
rcx, rax
10019
23
mov
rax, rdi
21
struct
node
*
next
=
head
-
>
next
;
10019
26
mov
rdi, [rdi + 8]
1004098
1004070
9
22
head
-
>
next
=
prev
;
10019
2a
mov
[rax + 8], rcx
20
while (head) {
10019
2e
test
rdi, rdi
10019
31
jne
1001920
10019
33
pop
rbp
26
return
prev
;
10019
34
ret
10019
35
xor
eax, eax
10019
37
ret
_init · no line
10019
38
endbr64
10019
3c
sub
rsp, 8
10019
40
mov
rax, [rip + 0x1231]
10019
47
test
rax, rax
10019
4a
je
100194e
10019
4c
call
rax
10019
4e
add
rsp, 8
10019
52
ret
_fini · no line
10019
54
endbr64
10019
58
sub
rsp, 8
10019
5c
add
rsp, 8
10019
60
ret
strtol@plt-0x10 · no line
10019
70
push
[rip + 0x1222]
10019
76
jmp
[rip + 0x1224]
Line 20, while (head), has two runs: its test before the body
and again after it. Lines 23 to 25 have no code of their own.