Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following assembly code for a function with a while loop: Based on the assembly code above, fill in the blanks below in its
Consider the following assembly code for a function with a while loop:
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. Dont use register names!
Prob1: L5: #%d! is the lower 8 bits of %rdi testb $1, %dil je .L3 leal 7 (%rdi, %rdi, 8) , addl $6, %esi %eax jmp .L2 .L3: 1(, %rsi, $3, %esi $2, %edi 2), %eax leal addl sh11 L2: cmp1 %edi, %esi jb .L5 ret Prob1: L5: #%d! is the lower 8 bits of %rdi testb $1, %dil je .L3 leal 7 (%rdi, %rdi, 8) , addl $6, %esi %eax jmp .L2 .L3: 1(, %rsi, $3, %esi $2, %edi 2), %eax leal addl sh11 L2: cmp1 %edi, %esi jb .L5 retStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started