Question: Using the assembly code below, fill in the blanks in the C code: These are all of the instructions and code that is provided. You

Using the assembly code below, fill in the blanks in the C code:  These are all of the instructions and code that is provided. You can likely set a = 1, but unsure C CODE: int main () { int a = ____; int res = 0; if (_____) { res = ____; } else if (_____) { res = _____; } return _____; }
 Correlating Assembly code for the completed C code (Use this to help fill in the blanks):  main: .LFB0: pushq %rbp movq %rsp, %rbp movl $15, -8(%rbp) movl $0, -4(%rbp) cmpl $14, -8(%rbp) jne .L2 movl $20, -4(%rbp) jmp .L3 .L2: cmpl $14, -8(%rbp) jle .L3 movl $10, -4(%rbp) .L3: movl $0, %eax popq %rbp ret main: .LFB0: pushq %rbp movq %rsp, %rbp movl $15, -8(%rbp) movl $0, -4(%rbp) cmpl $14, -8(%rbp) jne .L2 movl $20, -4(%rbp) jmp .L3 .L2: cmpl $14, -8(%rbp) jle .L3 movl $10, -4(%rbp) .L3: movl $0, %eax popq %rbp ret

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