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 For foo1-foo5, fill in the corresponding c code baed on thegiven x86_64 assembly code, try to simplify the c code as much

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

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!