Question: Problem 1 (While Loop) (20 points) Consider the following assembly code for a function with a while loop Prob1: jmp .L2 .L5: dil is the

Problem 1 (While Loop) (20 points) Consider the following assembly code for a function with a while loop Prob1: jmp .L2 .L5: dil is the lower 8 bits of %rdi testb $1, %dil je .L3 leal 7 (% rdi, %rdi, 8) , addl $6, %esi %eax mp.L2 L3 : 1(,%rsi, $3, %esi $2, %edi 2), %eax leal addl sh11 .L2: cmpl %edi, %esi jb .L5 ret Based on the assembly code above, fill in the blanks below in its corresponding C source code You may only use the source-level C variable names such as n, m and result. Don't use register names! unsigned prob2 (unsigned n, unsigned m) unsigned result; while( if ( result = else( result return result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
