Question 5 1 Pts Consider Following Partial Function Definition C Int Ifstmt Int Int B Int Q43833717

Question 5 1 pts Consider the following partial function definition in C: int ifstmt(int a, int b) { int x = 0; if(a – b) { x = 2 * a; x += b; else { x = b – 12; x -= a; return x; The complete C code has been translated to this fragment of x86 assembly code (with comments): # %edi contains a, %esi contains b cmpl %esi, %edi # Compare a-b jge .L2 leal (%esi, %edi,2), %eax # x ret .L2: leal -12%esi), %eax subl %edi, %eax ret Fill in the blank below with exact C code (with no extra spaces) to complete the function definition above so that it matches the x86 code. Blank: Show transcribed image text Question 5 1 pts Consider the following partial function definition in C: int ifstmt(int a, int b) { int x = 0; if(a – b) { x = 2 * a; x += b; else { x = b – 12; x -= a; return x; The complete C code has been translated to this fragment of x86 assembly code (with comments): # %edi contains a, %esi contains b cmpl %esi, %edi # Compare a-b jge .L2 leal (%esi, %edi,2), %eax # x ret .L2: leal -12%esi), %eax subl %edi, %eax ret Fill in the blank below with exact C code (with no extra spaces) to complete the function definition above so that it matches the x86 code. Blank:
Expert Answer
Answer to Question 5 1 pts Consider the following partial function definition in C: int ifstmt(int a, int b) { int x = 0; if(a – b…
OR