Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Translate the following Assembly code into the C function prototype: Consider the following assembly code push mov movl %rbp %rsp,%rbp $0x46,-0x4 (Srbp) : movl $0x1,-0x8

Translate the following Assembly code into the C function prototype:

image text in transcribed

Consider the following assembly code push mov movl %rbp %rsp,%rbp $0x46,-0x4 (Srbp) : movl $0x1,-0x8 ( %rbp) : movl $0x0,-0xc(%rbp) : cmpl $0x1,-0x8 (%rbp) : jle 0x4004f8 : cmp! $0x4f,-0x4 ( %rbp) jle 0x4004e2
: cmpl $0x3b,-0x4 ( %rbp) movl $0x2,-0xc(rbp) jmp 0x400506
: movl $0x0,-0xc(rbp) : mov $0x0,%eax jmp 0x400506
: pop %rbp retq This code came from skeleton C file below after optimizing with O0. This means gcc -00 -S command was used to convert C File into assembly file. Complete the C code given below using the provided assembly code #include int main) int score70; int attendance1; int pass-the-course = 0; if (attendance if (score if ( if (score score Jelsel return 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago

Question

Effective Delivery Effective

Answered: 1 week ago