Question: Here are the assembly dumps of the function phase_2, and its sub-function it calls read_six_numbers. At the end of it all, what 6 numbers does

Here are the assembly dumps of the function "phase_2", and its sub-function it calls "read_six_numbers". At the end of it all, what 6 numbers does phase_2 return?

Here are the assembly dumps of the function "phase_2", and its sub-function

Dump of assembler code for function phase 2: push %rb push %rbx sub $0x28,%rsp 0x000000000040102b 0x000000000040102C 0x0000000000401030 : 0x0000000000401033 : 8x0000000000401038 : cmDL $0x8,(%rsp) 8x000000000040103c18: jns 0x401043 0x000000000040103e 8x000000000040104325> : Lea Ox4(Xtsp),Krbx 0x0000000000401048 : mov $0x1,%ebp 0x000000000040104d 0x000000000040104f : add-0x4(%rbx),%eax 8x00000000004010524e> : cmp %eax,(%rbx) 0x0000000000401054 :je 0x0000000000401056 0x000000000040105b : 0x0000000000401062 : cmp $0x6 , %ebp 8x000000000040106559s: jne 0x40104d 0x0000000000401067 0x000000000040106b 0x000000000040106C 0x000000000040106d+67 %rsp,Krst calla 0x4013d5 callq 0x40139f mov %ebp , %eax 0x40105b callq 0x40139f add $6x1,%ebp add $0x4,%rbx dd Sox 139 add $0x28,%rsp 0 0 Xtbp retq End of assembler dump. (gdb) b explode_bonb Breakpoint 2 at 0x40139f (gdb) disas read_six_numbers Dump of assembler code for function read_six_numbers: sub $0x18,%rsp 0x00000000004013d5 0x00000000004013d9 0x00000000004013dc : mov %rax,(Krsp) 0x00000000004013f1 : lea oxc(%rsi),r9 0x00000000004013f5 : lea 0x8(%rsi),r8 caug c p jg callq 0x40139f add $0x18,%rsp retq soc99 sscanf@pit 6x400ac8 : 0x0000000000401408: 6x000000000040140b54>: 0x000000000040140d 0x0000000000401412 0x0000000000401416 End of assembler dump. Dump of assembler code for function phase 2: push %rb push %rbx sub $0x28,%rsp 0x000000000040102b 0x000000000040102C 0x0000000000401030 : 0x0000000000401033 : 8x0000000000401038 : cmDL $0x8,(%rsp) 8x000000000040103c18: jns 0x401043 0x000000000040103e 8x000000000040104325> : Lea Ox4(Xtsp),Krbx 0x0000000000401048 : mov $0x1,%ebp 0x000000000040104d 0x000000000040104f : add-0x4(%rbx),%eax 8x00000000004010524e> : cmp %eax,(%rbx) 0x0000000000401054 :je 0x0000000000401056 0x000000000040105b : 0x0000000000401062 : cmp $0x6 , %ebp 8x000000000040106559s: jne 0x40104d 0x0000000000401067 0x000000000040106b 0x000000000040106C 0x000000000040106d+67 %rsp,Krst calla 0x4013d5 callq 0x40139f mov %ebp , %eax 0x40105b callq 0x40139f add $6x1,%ebp add $0x4,%rbx dd Sox 139 add $0x28,%rsp 0 0 Xtbp retq End of assembler dump. (gdb) b explode_bonb Breakpoint 2 at 0x40139f (gdb) disas read_six_numbers Dump of assembler code for function read_six_numbers: sub $0x18,%rsp 0x00000000004013d5 0x00000000004013d9 0x00000000004013dc : mov %rax,(Krsp) 0x00000000004013f1 : lea oxc(%rsi),r9 0x00000000004013f5 : lea 0x8(%rsi),r8 caug c p jg callq 0x40139f add $0x18,%rsp retq soc99 sscanf@pit 6x400ac8 : 0x0000000000401408: 6x000000000040140b54>: 0x000000000040140d 0x0000000000401412 0x0000000000401416 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 Databases Questions!