Question: Hi, I have to convert the following assembly code to C code: e1: e1_reference.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 : 0: 8d
Hi, I have to convert the following assembly code to C code:
e1:
e1_reference.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000
:
0: 8d 47 ff
3: c3
lea -0x1(%rdi),%eax
retq
e2:
e2_reference.o: file format elf64-x86-64
Disassembly of section .text:
00000000000000 :
0: 89 f8
2: ba 00 00 00 00
7: eb 06
9: 83 c0 01
c: 83 c2 01
f: 83 fa 09
12: 7e f5
14: f3 c3
mov %edi,%eax
mov $0x0,%edx
jmp f 
add $0x1,%eax
add $0x1,%edx
cmp $0x9,%edx
jle 9 
repz retq
Specifically, there should be two functions of the following type:
int e1(int a) {}
int e2(int a) {}
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
