Question: Consider the following assembly code loop_func: pushl %ebp movi %esp, %ebp subl $16, esp movl $0, -4 (Sebp jmp .12 movl 8 (Sebp), Seax addi


Consider the following assembly code loop_func: pushl %ebp movi %esp, %ebp subl $16, esp movl $0, -4 (Sebp jmp .12 movl 8 (Sebp), Seax addi %eax, -4 (%ebp) ???? 2, 8 (%ebp) jg.L3 movi -4 (tebp), %eax leave ret If-4 (%ebp) corresponds to local variable sum and 8 (%ebp) corresponds to function argument n, which one of the choices below is the correct C equivalent of the assembly code above? int func (int n){ int sum0 while (n>2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
