Question: 3. The disassembled code for two functions first and last is shown below, along with the code for a call of first by function main


3. The disassembled code for two functions first and last is shown below, along with the code for a call of first by function main (page 243) Disassembly of last(long u, long v)-u in %rdi, v in %rsi 0000000000400540 mov %rdi, %rax 400540: 48 89 f8 400543: 48 0f af c6 400547: c3 L1: u L2: u"v L3: Return reta Disassembly of first( long x)-x in %rdi 0000000000400548: 400548: 48 8d 77 02 40054c: 48 83 ef 03 400550: e8 eb ff ff ff 400555: f3 c3 lea 0x2(%rd). % rsi sub $0x3, %rdi callg 400540 reaz retg F1: x+2 F2: x-3 F3: Call last(x-3,x+2) F4: Return Disassembly of main (void) M1: Call first(10) M2: Return 400560: e8 e3 ff ff ff callg 400548 400565: 48 89 c2 mov %rax, %rdx Each of these instructions is given a label, similar to those in Figure 3.27(a). Starting with the calling of first (10) by main () function , fill in the following table to trace instruction execution through to the point where the program returns back to main Attention: 0.5 points for each (please use blue color to filling the blanks) Instruction State Values(at beginning) Label PC Instruction l %rdi | 96rsi | %rax | 96rsp 1%rsp 3. The disassembled code for two functions first and last is shown below, along with the code for a call of first by function main (page 243) Disassembly of last(long u, long v)-u in %rdi, v in %rsi 0000000000400540 mov %rdi, %rax 400540: 48 89 f8 400543: 48 0f af c6 400547: c3 L1: u L2: u"v L3: Return reta Disassembly of first( long x)-x in %rdi 0000000000400548: 400548: 48 8d 77 02 40054c: 48 83 ef 03 400550: e8 eb ff ff ff 400555: f3 c3 lea 0x2(%rd). % rsi sub $0x3, %rdi callg 400540 reaz retg F1: x+2 F2: x-3 F3: Call last(x-3,x+2) F4: Return Disassembly of main (void) M1: Call first(10) M2: Return 400560: e8 e3 ff ff ff callg 400548 400565: 48 89 c2 mov %rax, %rdx Each of these instructions is given a label, similar to those in Figure 3.27(a). Starting with the calling of first (10) by main () function , fill in the following table to trace instruction execution through to the point where the program returns back to main Attention: 0.5 points for each (please use blue color to filling the blanks) Instruction State Values(at beginning) Label PC Instruction l %rdi | 96rsi | %rax | 96rsp 1%rsp