Question: Please help me. I have the assembly code needed to complete this C code. Use the given Assembly code to fill in the lines of

Please help me. I have the assembly code needed to complete this C code. Use the given Assembly code to fill in the lines of C code:

_____ proc1(_________ a) { ________ b = 1; if (a > 1) { b = proc1(_____); b ____ a; } return ____; }

proc1: .LFB0: pushq %rbp movq %rsp, %rbp subq $32, %rsp movl %edi, %eax movw %ax, -20(%rbp) movw $1, -2(%rbp) cmpw $1, -20(%rbp) jbe .L2 movzwl -20(%rbp), %eax subl $1, %eax movzwl %ax, %eax movl %eax, %edi call proc1 movw %ax, -2(%rbp) movzwl -2(%rbp), %eax imulw -20(%rbp), %ax movw %ax, -2(%rbp) .L2: movzwl -2(%rbp), %eax leave .cfi_def_cfa 7, 8 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!