Answered step by step
Verified Expert Solution
Question
1 Approved Answer
cmpg $8, %rax ja .L2 jmp *.L4 ( , %rax , 8) Based on the assembly code l in the blanks below in its corresponding
cmpg $8, %rax ja .L2 jmp *.L4 ( , %rax , 8) Based on the assembly code l in the blanks below in its corresponding C source code You may only use the source-level C variables x, m, result, and value: don't use register names! void prob3 (long value, long x, long m) .L4: long result switch (m) .quad .quad .quad .quad .quad "quad .quad .quad . L2 .L3 5 2 L2 ,L6 .L5 . L2 . L7 case result breaki case case result break case quad *value = L3 : case leaq (trsi, %rsi, 2), trax leag (trax , trax), %rsi addq (trdi), %rsi jmp .L8 result break default: result = .L5 * value = result; leaq (trsi, %rsi, movqtrdx, trax salg $6, trax addqtrax, trsi jmp .L8 2), trax .L6: leaq 80(%rsi), trax movg trax, (rdi) .L7: movg (8rdi),rax jmp .L8 addg $11, %rsi .L2: "L8 : %rsi, (%rdi) movq ret cmpg $8, %rax ja .L2 jmp *.L4 ( , %rax , 8) Based on the assembly code l in the blanks below in its corresponding C source code You may only use the source-level C variables x, m, result, and value: don't use register names! void prob3 (long value, long x, long m) .L4: long result switch (m) .quad .quad .quad .quad .quad "quad .quad .quad . L2 .L3 5 2 L2 ,L6 .L5 . L2 . L7 case result breaki case case result break case quad *value = L3 : case leaq (trsi, %rsi, 2), trax leag (trax , trax), %rsi addq (trdi), %rsi jmp .L8 result break default: result = .L5 * value = result; leaq (trsi, %rsi, movqtrdx, trax salg $6, trax addqtrax, trsi jmp .L8 2), trax .L6: leaq 80(%rsi), trax movg trax, (rdi) .L7: movg (8rdi),rax jmp .L8 addg $11, %rsi .L2: "L8 : %rsi, (%rdi) movq ret
Step 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