Question: ( gdb ) disas phase _ 5 Dump of assembler code for function phase _ 5 : 0 x 0 0 0 0 0 0

(gdb) disas phase_5
Dump of assembler code for function phase_5:
0x0000000000401101<+0>: sub $0x18,%rsp
0x0000000000401105<+4>: lea 0x8(%rsp),%rcx
0x000000000040110a <+9>: lea 0xc(%rsp),%rdx
0x000000000040110f <+14>: mov $0x4028cd,%esi
0x0000000000401114<+19>: mov $0x0,%eax
0x0000000000401119<+24>: callq 0x400c90<__isoc99_sscanf@plt>
0x000000000040111e <+29>: cmp $0x1,%eax
0x0000000000401121<+32>: jle 0x401155
0x0000000000401123<+34>: mov 0xc(%rsp),%eax
0x0000000000401127<+38>: and $0xf,%eax
0x000000000040112a <+41>: mov %eax,0xc(%rsp)
0x000000000040112e <+45>: mov $0x0,%ecx
0x0000000000401133<+50>: mov $0x0,%edx
0x0000000000401138<+55>: mov 0xc(%rsp),%eax
0x000000000040113c <+59>: cmp $0xf,%eax
0x000000000040113f <+62>: je 0x40115c
0x0000000000401141<+64>: add $0x1,%edx
0x0000000000401144<+67>: cltq
0x0000000000401146<+69>: mov 0x402640(,%rax,4),%eax
0x000000000040114d <+76>: mov %eax,0xc(%rsp)
0x0000000000401151<+80>: add %eax,%ecx
0x0000000000401153<+82>: jmp 0x401138
0x0000000000401155<+84>: callq 0x4015c4
0x000000000040115a <+89>: jmp 0x401123
0x000000000040115c <+91>: cmp $0xf,%edx
0x000000000040115f <+94>: jne 0x401167
0x0000000000401161<+96>: cmp %ecx,0x8(%rsp)
0x0000000000401165<+100>: je 0x40116c
0x0000000000401167<+102>: callq 0x4015c4
0x000000000040116c <+107>: add $0x18,%rsp
0x0000000000401170<+111>: retq
End of assembler dump.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!