Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help with assembly multiple choice We have Function callee is called by c

ID: 3587566 • Letter: P

Question

Please help with assembly multiple choice

We have Function callee is called by caller as below left and there assembly code on the right caller: push %rbp mov %rsp , %rbp sub $0x18,%rsp mov %edi,-0x14 (%rbp) mov %esi,-0x18 (%rbp) mov -0x18 (%rbp), %edx mov -0x14 (%rbp), %eax mov edx, esi mov %eax, %edi call 0x4004d6 mov %eax,-0x4 (%rbp) shll $0x2,-0x4 (%rbp) nop Leaveq retq void caller(int x, int y) int z = z; callee ( x, y); return; int callee(int x, int y) if (x>y) callee: push %rbp mov %rsp, %rbp mov %edi,-0x4 (%rbp) mov %esi,-0x8 (%rbp) Mov cmp-0x8 (%rbp), %eax jle x4004ed mov -0x4 (%rbp), %eax jmp x4004f0 mov -0x8 (%rbp), %eax pop retq return X; else return y: -0x4 (%rbp), %eax %rbp When caller starts executing (before push %rbp), we have %rsp: Oxbffff18c %rbp: Oxbffff1a8 What is the value of %rbp after the 2nd instruction in the callee? Select one a. Oxbffff14c o b. 0xbffff17c c. Oxbffff16c d. Oxbfifff15c

Explanation / Answer

choose the correct one

The value of %rbp after the 2nd stage is

0xbfff18c

oxbfff1a8

optiona:

0xbfff14c

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote