Question: Reverse Engineer the following machine assembly code into a switch statement in C. Parameter x is passed in register %rdi and n is passed in

Reverse Engineer the following machine assembly code into a switch statement in C. Parameter x is passed in register %rdi and n is passed in %rsi, The jump table is in a different part of the memory. The jump table begins at 0x040065e and end at 0x0400798. x/10x 0x400798 examines the ten 8-byte words of memory in the jump table. Our gdb prints the following >> V C code goes in this long switchState(long x, long n) long resultn: switch(x) /* The code for the cases goes here */ return result; >> gdb print (gdb) x/10x 0x400798 0x400798: 0x4007a8: 0x4007b8: 0x4007c8: 0x4007d8: 0x000000000040066f 0x0000000000400683 0x0000000000400668 0x0000000000400668 0x0000000000400679 0x0000000000400683 0x0000000000400683 0x000000000040067e 0x0000000000400683 0x00646c2520646c25 0x000000000040063c : mov %rsp,%rbp 0x0000000000400640 : mov %rdi,-0x18(%rbp) 0x0000000000400644 : mov %rsi,-0x20 (%rbp) 0x0000000000400648 : mov -0x20(%rbp) ,%rax 0x000000000040064c : mov %rax,-0x8 (%rbp) 0x0000000000400650 sub $0x1f,%rax 0x0000000000400658 : cmp. $0x8,%rax 0x000000000040065c :ja 0x400683 0x000000000040065e :mov 0x400798 (,%rax.8),%ra?x 0x0000000000400666 : jmpa *Arax 0x0000000000400668 : adda $0x2,-0x8(%rbp) 0x000000000040066d : jmp. 0x40068b 0x000000000040066f : mova $0x16,-0x8 (%rbp) 0x0000000000400677 : jmp. 0x40068b 0x0000000000400679 : shla $0x2,-0x8 (%rbp) 0x000000000040067e : mova $0x19,-0x8 (%rbp) 0x000000000040068b :mov -0x8(%rbp),%rax 0x000000000040068f : pop %rbp 0x0000000000400690 :retq push %rbp Reverse Engineer the following machine assembly code into a switch statement in C. Parameter x is passed in register %rdi and n is passed in %rsi, The jump table is in a different part of the memory. The jump table begins at 0x040065e and end at 0x0400798. x/10x 0x400798 examines the ten 8-byte words of memory in the jump table. Our gdb prints the following >> V C code goes in this long switchState(long x, long n) long resultn: switch(x) /* The code for the cases goes here */ return result; >> gdb print (gdb) x/10x 0x400798 0x400798: 0x4007a8: 0x4007b8: 0x4007c8: 0x4007d8: 0x000000000040066f 0x0000000000400683 0x0000000000400668 0x0000000000400668 0x0000000000400679 0x0000000000400683 0x0000000000400683 0x000000000040067e 0x0000000000400683 0x00646c2520646c25 0x000000000040063c : mov %rsp,%rbp 0x0000000000400640 : mov %rdi,-0x18(%rbp) 0x0000000000400644 : mov %rsi,-0x20 (%rbp) 0x0000000000400648 : mov -0x20(%rbp) ,%rax 0x000000000040064c : mov %rax,-0x8 (%rbp) 0x0000000000400650 sub $0x1f,%rax 0x0000000000400658 : cmp. $0x8,%rax 0x000000000040065c :ja 0x400683 0x000000000040065e :mov 0x400798 (,%rax.8),%ra?x 0x0000000000400666 : jmpa *Arax 0x0000000000400668 : adda $0x2,-0x8(%rbp) 0x000000000040066d : jmp. 0x40068b 0x000000000040066f : mova $0x16,-0x8 (%rbp) 0x0000000000400677 : jmp. 0x40068b 0x0000000000400679 : shla $0x2,-0x8 (%rbp) 0x000000000040067e : mova $0x19,-0x8 (%rbp) 0x000000000040068b :mov -0x8(%rbp),%rax 0x000000000040068f : pop %rbp 0x0000000000400690 :retq push %rbp