Question: Consider the following C functions and assembly code: int fun2(int *ap, int *bp) { int a = *ap; *ap += *bp; return a; } int

Consider the following C functions and assembly code:

int fun2(int *ap, int *bp) { int a = *ap; *ap += *bp; return a; }

int fun3(int *ap, int *bp) { int a = bp; *bp += *ap; return a; }

int fun4(int *ap, int *bp) { int a = *ap; int b = *bp; return a+b; }

int fun5(int *ap, int *bp) { int b = *bp; *bp += *ap; return b; } int fun6(int *ap, int *bp) { int a = *ap; *bp += *ap; return a; } pushl %ebp movl %esp,%ebp movl 8(%ebp),%edx movl 12(%ebp),%eax movl %ebp,%esp movl (%edx),%edx addl %edx,(%eax) movl %edx,%eax popl %ebp ret

Which of the functions compiled into the assembly code shown above?

Group of answer choices

fun2

fun4

fun5

fun3

fun6

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!