Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please fill in the blanks for the c-code provided the assembly below. _____ proc1(_________ a) { ________ b = 1; if (a > 1) {

Please fill in the blanks for the c-code provided the assembly below.

_____ 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions