Question: Fill in the blanks translating the assembly (x86-64) code to C Consider the following assembly code main: movl $0, %edx movabsq $-2679396940471402103, %rsi movl $7,%r10d

Fill in the blanks translating the assembly (x86-64) code to C

Fill in the blanks translating the assembly (x86-64) code to C Consider

the following assembly code main: movl $0, %edx movabsq $-2679396940471402103, %rsi movl

Consider the following assembly code main: movl $0, %edx movabsq $-2679396940471402103, %rsi movl $7,%r10d movl $255, %rSd L2: leal 0(%rdx,8), %rBd movl %r10d, %edi subl %edx, %edi sall $3, %edi movq %r9, %rax movl %edi, %ecx salq %edi, %rax notq %rax andq %rsi, %rax movq %rS, %r11 movi %rBd. %ecx sall $3, %ecx salq %ecx, % 11 andq %r11,%rsi sarq%ecx, %rsi andq %r11,%rsi movl %edi, %ecx salq %edi, %rsi orq addi $1, %edx cmpl $4, %edx jne L2 %rax, %rsi This code came from skeleton C file below after optimizing with O1. This means gcc-01-S command was used to convert C File into assembly file Complete the C code given below using the provided assembly code Step 1 might be to ignore the skeleton file and create a equivalent C code from the assembly code, and then rewrite the code to fit the skeleton file #include int main long int x- long int mask Oxff, int i,n,m; for(i=0;K n=i; long int n8 nn8) & long int left_over- x= left over

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!