Question: step by step process on how to convert this into a c function Write a C function func that performs the actions of the following
step by step process on how to convert this into a c function

Write a C function func that performs the actions of the following assembly code: func: cmpl %edx, %edi jge .L5 movslq %edi, %rax leag (%rcx,%rax,2), %rax movswl (%rax), %ecx cmpl %ecx, %esi jge .L3 jmp .L5 .L4: adda movswl 2(%rax), %ecx $2,%rax cmpl Kesi, %ecx jg .L5 13: : addl cmpl jne $1, %edi %edi, %edx .L4 .L5: movi $-1, %eax ret For example: Test Result test(1, target1); OK1 Write a C function func that performs the actions of the following assembly code: func: cmpl %edx, %edi jge .L5 movslq %edi, %rax leag (%rcx,%rax,2), %rax movswl (%rax), %ecx cmpl %ecx, %esi jge .L3 jmp .L5 .L4: adda movswl 2(%rax), %ecx $2,%rax cmpl Kesi, %ecx jg .L5 13: : addl cmpl jne $1, %edi %edi, %edx .L4 .L5: movi $-1, %eax ret For example: Test Result test(1, target1); OK1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
