// File: salihbektas[P]Simple-CPU-emulator/CPUProgramDyn.cpp
// Function: CPUProgramDyn::operator+=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
const CPUProgramDyn CPUProgramDyn::operator+=(string instraction)
{
    if( instraction != ""){
        CPUProgramDyn temp;
        temp = *this;
        delete [] fileString;
        fileString = new string[numberOfLines+1];
        for(int i = 0; i < numberOfLines; ++i)
        {
            fileString[i] = temp.fileString[i];
        }
        fileString[numberOfLines] = instraction;
        ++numberOfLines;
        return *this;
    }

    else{
        cout << "Error: Empty string try to add object." << endl
             << "+= not proceed." << endl;

        CPUProgramDyn emptyObj;
        return emptyObj;
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdx, -0xe0(%rbp)
movq %rdi, %rax
movq -0xe0(%rbp), %rdi
movq %rax, -0xd8(%rbp)
movq %rax, %rcx
movq %rcx, -0xd0(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq 0x21f0(%rip), %rsi      # 0xd29b
callq 0xbc40
testb $0x1, %al
jne 0xb0b9
jmp 0xb336
leaq -0x48(%rbp), %rdi
callq 0x9ff0
movq -0xc8(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0xa1f0
jmp 0xb0d7
leaq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0xac30
jmp 0xb0ed
leaq -0x78(%rbp), %rdi
callq 0xa6d0
leaq -0xa8(%rbp), %rdi
callq 0xa6d0
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe8(%rbp)
cmpq $0x0, %rax
je 0xb186
movq -0xe8(%rbp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0xf8(%rbp)
movq -0x8(%rcx), %rdx
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0xf0(%rbp)
je 0xb17a
movq -0xf0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x100(%rbp)
callq 0x20a0
movq -0xe8(%rbp), %rcx
movq -0x100(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xf0(%rbp)
jne 0xb149
movq -0xf8(%rbp), %rdi
callq 0x2160
movq -0xc8(%rbp), %rax
movl (%rax), %eax
incl %eax
cltq
movq %rax, -0x110(%rbp)
movl $0x20, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
movq $-0x1, %rax
cmovbq %rax, %rdi
testb %cl, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, -0x108(%rbp)
jmp 0xb1cb
movq -0x110(%rbp), %rax
movq -0x108(%rbp), %rcx
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x118(%rbp)
cmpq $0x0, %rax
je 0xb244
movq -0x118(%rbp), %rax
movq -0x110(%rbp), %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x128(%rbp)
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x2190
movq -0x130(%rbp), %rax
movq -0x128(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x120(%rbp)
jne 0xb213
movq -0xc8(%rbp), %rax
movq -0x118(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0xb8(%rbp)
movq -0xc8(%rbp), %rcx
movl -0xb8(%rbp), %eax
cmpl (%rcx), %eax
jge 0xb2df
movq -0xc8(%rbp), %rcx
movq -0x40(%rbp), %rsi
movslq -0xb8(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
movq 0x8(%rcx), %rdi
addq %rax, %rdi
callq 0x2040
jmp 0xb298
jmp 0xb29a
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0xb260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xb328
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xa6d0
jmp 0xb328
movq -0xe0(%rbp), %rsi
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rdi
movslq (%rax), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x2040
jmp 0xb302
movq -0xc8(%rbp), %rsi
movq -0xd8(%rbp), %rdi
movl (%rsi), %eax
incl %eax
movl %eax, (%rsi)
callq 0xa1f0
jmp 0xb31d
leaq -0x48(%rbp), %rdi
callq 0xa6d0
jmp 0xb3a7
leaq -0x48(%rbp), %rdi
callq 0xa6d0
jmp 0xb3b7
movq 0x4c93(%rip), %rdi      # 0xffd0
leaq 0x1f1d(%rip), %rsi      # 0xd261
callq 0x20f0
movq %rax, %rdi
movq 0x4c6d(%rip), %rsi      # 0xffc0
callq 0x2100
movq %rax, %rdi
leaq 0x1f26(%rip), %rsi      # 0xd288
callq 0x20f0
movq %rax, %rdi
movq 0x4c4f(%rip), %rsi      # 0xffc0
callq 0x2100
movq -0xd8(%rbp), %rdi
movb $0x0, -0xb9(%rbp)
callq 0x9ff0
movb $0x1, -0xb9(%rbp)
testb $0x1, -0xb9(%rbp)
jne 0xb3a5
movq -0xd8(%rbp), %rdi
callq 0xa6d0
jmp 0xb3a7
movq -0xd0(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x21d0
nopw %cs:(%rax,%rax)