what is this assembly code of C is doing, can anyone explain? 0x00000000004014dc <+0>: sub $0x8,%rsp 0x00000000004014e0 <+4>: cmpb $0x41,(%rdi) 0x00000000004014e3 <+7>: jne 0x40151c 0x00000000004014e5 <+9>: cmpb $0x2e,0x1(%rdi) 0x00000000004014e9 <+13>: jne 0x40151c 0x00000000004014eb <+15>: cmpb $0x71,0x3(%rdi) 0x00000000004014ef <+19>: jne 0x40151c 0x00000000004014f1 <+21>: cmpb $0x4b,0x4(%rdi) 0x00000000004014f5 <+25>: jne 0x40151c 0x00000000004014f7 <+27>: cmpb $0x63,0x2(%rdi) 0x00000000004014fb <+31>: je 0x40152a 0x00000000004014fd <+33>: cmp %cl,0x1f(%rdi) 0x0000000000401500 <+36>: jne 0x40151c 0x0000000000401502 <+38>: movzbl 0x28(%rdi),%ecx 0x0000000000401506 <+42>: movzbl 0x16(%rdi),%eax 0x000000000040150a <+46>: cmp %al,%cl 0x000000000040150c <+48>: je 0x40151c 0x000000000040150e <+50>: or $0xe,%eax 0x0000000000401511 <+53>: mov %eax,%edx 0x0000000000401513 <+55>: mov $0x1,%eax 0x0000000000401518 <+60>: cmp %dl,%cl 0x000000000040151a <+62>: je 0x40152f 0x000000000040151c <+64>: callq 0x401e54 0x0000000000401521 <+69>: mov $0xfffffffffe7ed1e5,%rax 0x0000000000401528 <+76>: jmp 0x40152f 0x000000000040152a <+78>: mov $0x0,%eax 0x000000000040152f <+83>: add $0x8,%rsp 0x0000000000401533 <+87>: retq
what is this assembly code of C is doing, can anyone explain?
0x00000000004014dc <+0>: sub $0x8,%rsp
0x00000000004014e0 <+4>: cmpb $0x41,(%rdi)
0x00000000004014e3 <+7>: jne 0x40151c <bombphase_1+64>
0x00000000004014e5 <+9>: cmpb $0x2e,0x1(%rdi)
0x00000000004014e9 <+13>: jne 0x40151c <bombphase_1+64>
0x00000000004014eb <+15>: cmpb $0x71,0x3(%rdi)
0x00000000004014ef <+19>: jne 0x40151c <bombphase_1+64>
0x00000000004014f1 <+21>: cmpb $0x4b,0x4(%rdi)
0x00000000004014f5 <+25>: jne 0x40151c <bombphase_1+64>
0x00000000004014f7 <+27>: cmpb $0x63,0x2(%rdi)
0x00000000004014fb <+31>: je 0x40152a <bombphase_1+78>
0x00000000004014fd <+33>: cmp %cl,0x1f(%rdi)
0x0000000000401500 <+36>: jne 0x40151c <bombphase_1+64>
0x0000000000401502 <+38>: movzbl 0x28(%rdi),%ecx
0x0000000000401506 <+42>: movzbl 0x16(%rdi),%eax
0x000000000040150a <+46>: cmp %al,%cl
0x000000000040150c <+48>: je 0x40151c <bombphase_1+64>
0x000000000040150e <+50>: or $0xe,%eax
0x0000000000401511 <+53>: mov %eax,%edx
0x0000000000401513 <+55>: mov $0x1,%eax
0x0000000000401518 <+60>: cmp %dl,%cl
0x000000000040151a <+62>: je 0x40152f <bombphase_1+83>
0x000000000040151c <+64>: callq 0x401e54 <explosion_begins>
0x0000000000401521 <+69>: mov $0xfffffffffe7ed1e5,%rax
0x0000000000401528 <+76>: jmp 0x40152f <bombphase_1+83>
0x000000000040152a <+78>: mov $0x0,%eax
0x000000000040152f <+83>: add $0x8,%rsp
0x0000000000401533 <+87>: retq
Step by step
Solved in 3 steps