Question: Dump of assembler code for function phase_4: => 0x0000000000400f75 : sub $0x18,%rsp 0x0000000000400f79 : lea 0x8(%rsp),%rcx 0x0000000000400f7e : lea 0xc(%rsp),%rdx 0x0000000000400f83 : mov $0x40244f,%esi 0x0000000000400f88
Dump of assembler code for function phase_4: => 0x0000000000400f75 <+0>: sub $0x18,%rsp 0x0000000000400f79 <+4>: lea 0x8(%rsp),%rcx 0x0000000000400f7e <+9>: lea 0xc(%rsp),%rdx 0x0000000000400f83 <+14>: mov $0x40244f,%esi 0x0000000000400f88 <+19>: mov $0x0,%eax 0x0000000000400f8d <+24>: callq 0x400ba0 <__isoc99_sscanf@plt> 0x0000000000400f92 <+29>: cmp $0x2,%eax 0x0000000000400f95 <+32>: jne 0x400f9e
Dump of assembler code for function func4: 0x0000000000400f42 <+0>: push %rbx 0x0000000000400f43 <+1>: mov %edx,%eax 0x0000000000400f45 <+3>: sub %esi,%eax 0x0000000000400f47 <+5>: mov %eax,%ebx 0x0000000000400f49 <+7>: shr $0x1f,%ebx 0x0000000000400f4c <+10>: add %ebx,%eax 0x0000000000400f4e <+12>: sar %eax 0x0000000000400f50 <+14>: lea (%rax,%rsi,1),%ebx 0x0000000000400f53 <+17>: cmp %edi,%ebx 0x0000000000400f55 <+19>: jle 0x400f63
This is what I know. The input is suppose to be "%d %d". The first value has to be less then 14, and that func4 is recursive. I am having trouble understanding exactly what func4 is doing though.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
