// File: /workspace/github_cpp_makefile_star2_O1/salihbektas[P]Simple-CPU-emulator/computer.cpp
// Function: Computer::execute()
void Computer::execute()
{
    while(!myCPU.halted())
    {

        string instruction = myCpuProgram.getLine(myCPU.getPC()-1);

        myCPU.execute(instruction, myMemory);
        //Register debug mode part
        if(debug > 0)
        {
            cout <<"R1 = "<<myCPU.getR1()<<' '<<"R2 = "<<myCPU.getR2()<<' '
                 <<"R3 = "<<myCPU.getR3()<<' '<<"R4 = "<<myCPU.getR4()<<' '
                 <<"R5 = "<<myCPU.getR5()<<endl;

        }
        //Memory debug mode part
        if(debug == 2)
        {

            for(int i = 0; i < 50; i += 5){
                cout << "memory" << i+1 << " : " << myMemory.getMem(i)
                     << " memory" << i+2 << " : " << myMemory.getMem(i+1)
                     << " memory" << i+3 << " : " << myMemory.getMem(i+2)
                     << " memory" << i+4 << " : " << myMemory.getMem(i+3)
                     << " memory" << i+5 << " : " << myMemory.getMem(i+4)
                     <<endl;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
callq 0x6e4e
testb %al, %al
jne 0x877b
leaq 0x20(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x50(%rbx), %r15
leaq 0xef6(%rip), %r13       # 0x92c2
leaq 0xef3(%rip), %r14       # 0x92c6
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
callq 0x2852
leal -0x1(%rax), %edx
leaq -0x80(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x74a0
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x6e5e
movq -0x38(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq %r15, %rdx
callq 0x2ad0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x842d
callq 0x2110
movq -0x38(%rbp), %rax
cmpl $0x0, 0x118(%rax)
jle 0x8593
movl $0x5, %edx
movq 0x3b86(%rip), %rdi      # 0xbfd0
leaq 0xd76(%rip), %rsi       # 0x91c7
callq 0x2130
movq -0x38(%rbp), %rdi
callq 0x2822
movq 0x3b6a(%rip), %rdi      # 0xbfd0
movl %eax, %esi
callq 0x21b0
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x2130
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0xd39(%rip), %rsi       # 0x91cd
callq 0x2130
movq -0x38(%rbp), %rdi
callq 0x282a
movq %rbx, %rdi
movl %eax, %esi
callq 0x21b0
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x2130
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0xd00(%rip), %rsi       # 0x91d3
callq 0x2130
movq -0x38(%rbp), %rdi
callq 0x2834
movq %rbx, %rdi
movl %eax, %esi
callq 0x21b0
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x2130
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0xcc7(%rip), %rsi       # 0x91d9
callq 0x2130
movq -0x38(%rbp), %rdi
callq 0x283e
movq %rbx, %rdi
movl %eax, %esi
callq 0x21b0
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x2130
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0xc8e(%rip), %rsi       # 0x91df
callq 0x2130
movq -0x38(%rbp), %rdi
callq 0x2848
movq %rbx, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20c0
movq -0x38(%rbp), %rax
cmpl $0x2, 0x118(%rax)
jne 0x8755
xorl %ebx, %ebx
cmpl $0x31, %ebx
ja 0x8755
movl $0x6, %edx
movq 0x3a15(%rip), %rdi      # 0xbfd0
leaq 0xd05(%rip), %rsi       # 0x92c7
callq 0x2130
incl %ebx
movq 0x3a00(%rip), %rdi      # 0xbfd0
movl %ebx, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
decl %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x2690
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movl $0x7, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2130
addl $0x2, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
decl %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x2690
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movl $0x7, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2130
addl $0x2, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
decl %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x2690
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movl $0x7, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2130
addl $0x2, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
decl %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x2690
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movl $0x7, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2130
addl $0x2, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
decl %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x2690
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
incl %ebx
movq %rax, %rdi
callq 0x20c0
jmp 0x85a6
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x8767
callq 0x2110
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x6e4e
testb %al, %al
je 0x83d7
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x87a6
callq 0x2110
jmp 0x87a6
jmp 0x87a3
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x87b8
callq 0x2110
movq %rbx, %rdi
callq 0x21c0