Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fill in the blanks with the proper C code given by the following assembly: the C code function prototype is below. Fill in the blanks

Fill in the blanks with the proper C code given by the following assembly: the C code function prototype is below. Fill in the blanks of the C function.

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions