Question: 3 . In the following assembly code, identify the control structure that is present. Mark all that you find. function: pushq % rbp movq %

3. In the following assembly code, identify the control structure that is present. Mark all that you find.
function:
pushq %rbp
movq%rsp,%rbp
subq $24,%rsp
movl%edi, -20(%rbp)
movl%esi, -24(%rbp)
movl $10,-4(%rbp)
jmp .L2
.L5:
movl-20(%rbp),%eax
cmpl-24(%rbp),%eax
jge .L3
movl-24(%rbp),%eax
addl%eax, -20(%rbp)
jmp .L4
.L3:
movl-20(%rbp),%eax
addl%eax, -24(%rbp)
.L4:
movl-24(%rbp),%edx
movl-20(%rbp),%eax
addl%edx, %eax
movl%eax, -4(%rbp)
.L2:
cmpl $99,-20(%rbp)
jle .L5
movl-4(%rbp),%eax
leave
ret
a. if statement
b. if-else statement
c. while loop
d. do-while loop

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 Programming Questions!