Question: Following is the C code that was recovered for funci: int funci( int x, int y) { int t1 = func3( &x); printf(ti is: %d

 Following is the C code that was recovered for funci: int

Following is the C code that was recovered for funci: int funci( int x, int y) { int t1 = func3( &x); printf("ti is: %d ", t1); int t2 = func3( &y); printf("t2 is: %d ", t2); if ( tl > t2 ) { return tl; } return t2; } %rbp # SETUP ####### # # # And here is the assembly code for func3 Dump of assembler code for function func3: Ox0000000000400666 push Ox0000000000400667 : mov (%rsp), %rbp => 0x000000000040066a : sub $0x20, %rsp Ox000000000040066e : mov %rdi, -Ox18(%rbp) Ox0000000000400672 : movl $0x1, -0x4(%rbp) Ox0000000000400679 : mov -Ox18, (%rbp), %rax Ox000000000040067d : mov (%rax),%eax Ox000000000040067f : $0x4, %eax x400682 : jle 0x4006a7 Ox0000000000400684 : mov -Ox18, (%rbp), %rax Ox0000000000400688 : mov (%rax), %eax Ox000000000040068a : sar $0x2, %eax @x000000000040068d : mov %eax, %edx Ox000000000040068f : mov -Ox18(%rbp), %rax Ox0000000000400693 : mov %edx, (%rax) x400695 : mov -Ox18(%rbp), %rax Ox0000000000400699 : mov frax, %rdi Ox000000000040069c : calla Ox400666 Ox00000000004006al : add $0x1, %eax Ox00000000004006a4 : mov %eax,-0x4(%rbp) Ox00000000004006a7 : mov -Ox4(%rbp), %eax Ox00000000004006aa : leave Ox00000000004006ab : reta End of assembler dump. # # # # # # # # # # # # CLEAN-UP # Q2) (3 points) Assuming the fist parameter is called x. What is the halting condition for the recursive function func3? betta er all dmo pessari spurningu Open original

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!