Question: 4. (40 pts) The disassembled code for two functions first and last is shown below, along with the code for a call of first

4. (40 pts) The disassembled code for two functions first and last 

4. (40 pts) The disassembled code for two functions first and last is shown below, along with the code for a call of first by function main: 1234 569879 10 11 Disassembly of last (long u, long v) u in rdi, v in irsi 0000000000400540 : 1,x+1) 400540: 48 89 8 400543: 48 Of af c6 400547: c3 L2 L3 F4 M2 0000000000400548 : 400548 48 8d 77 01 40054c: 48 83 ef 01 400550: e8 eb ff ff ff 400555: 3 c3 mov imul retq Disassembly of first (long x) x in Srdi lea sub trdi, trax rsi, rax 0xl (rdi), rsi $0x1, trdi callq 400540 repz retq 400560: e8 e3 ff ff ff callq 400548 400565: 48 89 c2 mov trax, rdx L1: u L2: utv L3: Return Instruction Label PC (Srip) Instruction Srdi Arsi Brax M1 0x400560 callq 10 F1 F2 F3 L1 F1: x+1 F2: x-1 F3: Call last (x- F4: Return Starting with the calling of first (10) by main, fill in the following table of trace instruction execution through to the point where the program returns back to main. MI: Call first (10) M2: Resume State values (at beginning) 8rsp 0x7fffffffe820 8rsp Description Call first (10)

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!