Question: For foo1-foo5, fill in the corresponding c code baed on the given x86_64 assembly code, try to simplify the c code as much as possible.
For foo1-foo5, fill in the corresponding c code baed on the given x86_64 assembly code, try to simplify the c code as much as possible. Show work and explain.
For foo6, fill in the corresponding x86_64 assembly code

fool: long fool ( x) mova sala adda sala adda salg retq %rdi, %rax $2,%rax %rdi, %rax $1,%rax %rdi ,trax $1,%rax return foo2: int foo2 ( x) I movl %edi, %eax test1 %eax, %eax ge .L1 addl $15,%eax returrn .L1: $4, %eax sarl retq foo3: long foo3 ( mova Salaj subq retq %rdi, %rax $3, Brax %rdi, %rax return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
