Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

. Translate this C++ program to assembly language and upload your .pep file here

ID: 3556511 • Letter: #

Question

. Translate this C++ program to assembly language and upload your .pep file here. The change from the original is noted. The .cpp source file is included if you want to download and run it. Be sure to include comments!

#include <iostream>
using namespace std;

int main() {
    int cop = 0;               // Local rather than global variables
    int driver = 40;
    do{
        cop += 25;
        driver += 20;
    }
    while (cop < driver);
    cout << cop;
    return 0;
}

Pep file please!

Explanation / Answer

GNU GCC C .Ltext0: .section .rodata.str1.1,"aMS",@progbits,1 .LC0: 0000 54686520 .string "The Result is: %d " 52657375 6C742069 733A2025 640A00 .text .globl main main: .LFB13: .cfi_startproc 0000 4883EC08 subq $8, %rsp .cfi_def_cfa_offset 16 .LVL0: .LBB4: .LBB5: 0004 BAC80000 movl $200, %edx 00 0009 BE000000 movl $.LC0, %esi 00 000e BF010000 movl $1, %edi 00 0013 B8000000 movl $0, %eax 00 0018 E8000000 call __printf_chk 00 .LVL1: .LBE5: .LBE4: 001d B8000000 movl $0, %eax 00 0022 4883C408 addq $8, %rsp .cfi_def_cfa_offset 8 0026 C3 ret .cfi_endproc .LFE13: .Letext0: