Question: Look at the 64-bit x86, 64 assembly code below for the functions: main, p. q. and r. Use it to answer the following questions: a)

 Look at the 64-bit x86, 64 assembly code below for thefunctions: main, p. q. and r. Use it to answer the following

Look at the 64-bit x86, 64 assembly code below for the functions: main, p. q. and r. Use it to answer the following questions: a) What is the offset of the instruction in the main0 function that sets up the argument for the call to instance if the answer is the line "0x400539 sto-ipush%rbp" then you should function p0? Please use the line number and NOT the hex address. For type o as the answer. b) How many input arguments does the function r) have? c) What is the stack frame size for function p() ? The stackframe includes the saved %rsp and any %rbp that is saved d) What is the furthest offset/distance in bytes reached by the stack top pointer-throughout the program from its original position at the beginning of maino? e) What is the value in the register %eax at line 27 in the maino function? main 0x400539 : push %rbp 0x40053a : mov %rsp,%rbp 0x40053d : movqS0x20,0x8(%rbp) 0x400549: mov -Ox8(%rbp),%rax 0x40054d: mov %eax.%edi 0x40054f 0x400554 : nop 0x400558+31: leaveq 0x400559 : retq p: 0x40050a 0x40050b : push %rbp %rsp.%rbp : mov 0x40050e : sub s0x18,%rsp 0x400512 : 0x4005 18 : mov mov -0x14(%rbp),%eax %eax,%edi 0x40051a : mov %eax.-0x4(%rbp) 0x400522 : mov -0x14(%rbp),%eax 0x400525: mov %eax.%edi 0x400527 : callq 0x4004d6 : mov %eax,0x8(%rbp) 0x40052f : mov -0x4(%rbp),%edx 0x400532: mov -0x8(%rbp),%eax 0x400535: add %edx.%eax 0x400537 : leaveq 0x400538 : retq Look at the 64-bit x86, 64 assembly code below for the functions: main, p. q. and r. Use it to answer the following questions: a) What is the offset of the instruction in the main0 function that sets up the argument for the call to instance if the answer is the line "0x400539 sto-ipush%rbp" then you should function p0? Please use the line number and NOT the hex address. For type o as the answer. b) How many input arguments does the function r) have? c) What is the stack frame size for function p() ? The stackframe includes the saved %rsp and any %rbp that is saved d) What is the furthest offset/distance in bytes reached by the stack top pointer-throughout the program from its original position at the beginning of maino? e) What is the value in the register %eax at line 27 in the maino function? main 0x400539 : push %rbp 0x40053a : mov %rsp,%rbp 0x40053d : movqS0x20,0x8(%rbp) 0x400549: mov -Ox8(%rbp),%rax 0x40054d: mov %eax.%edi 0x40054f 0x400554 : nop 0x400558+31: leaveq 0x400559 : retq p: 0x40050a 0x40050b : push %rbp %rsp.%rbp : mov 0x40050e : sub s0x18,%rsp 0x400512 : 0x4005 18 : mov mov -0x14(%rbp),%eax %eax,%edi 0x40051a : mov %eax.-0x4(%rbp) 0x400522 : mov -0x14(%rbp),%eax 0x400525: mov %eax.%edi 0x400527 : callq 0x4004d6 : mov %eax,0x8(%rbp) 0x40052f : mov -0x4(%rbp),%edx 0x400532: mov -0x8(%rbp),%eax 0x400535: add %edx.%eax 0x400537 : leaveq 0x400538 : ret

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!