// File: /workspace/github_cpp_makefile_star2_O1/Manuel123cool[P]smiley/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        std::cerr << "No command line argument" << std::endl;
        return 1;
    }

    std::ifstream inf{ argv[1] };
 
    if (!inf)
    {
        std::cerr << "Uh oh, Sample.dat could not be opened for reading!\n";
        return 1;
    }
    Instruction instruction;

    while (inf)
    {
        std::string strInput;
        std::getline(inf, strInput);
        
        std::string clearedStr{ strInput };
        while (clearedStr != MyRegex::processComments(clearedStr))
        {
            clearedStr = MyRegex::processComments(clearedStr);
        }
        clearedStr = MyRegex::deleteInessentialSpaces(clearedStr);

        instruction.add(clearedStr);
    } 
    instruction.run();
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
cmpl $0x2, %edi
jne 0x254e
movq 0x8(%rsi), %rsi
leaq 0x110(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x130(%rsp,%rax)
je 0x259a
movl $0x1, %ebx
movq 0xfab8(%rip), %rdi      # 0x11ff0
leaq 0xbade(%rip), %rsi      # 0xe01d
movl $0x33, %edx
callq 0x2190
jmp 0x28ad
movq 0xfa9b(%rip), %rbx      # 0x11ff0
leaq 0xbaa8(%rip), %rsi      # 0xe004
movl $0x18, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movl $0x1, %ebx
jmp 0x28ba
xorps %xmm0, %xmm0
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movq 0x110(%rsp), %rax
movq -0x18(%rax), %rcx
testb $0x5, 0x130(%rsp,%rcx)
jne 0x2875
addq $-0x18, %rax
leaq 0x50(%rsp), %r15
leaq 0x80(%rsp), %r12
leaq 0x40(%rsp), %r13
leaq 0x60(%rsp), %rbp
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
movq (%rax), %rdi
leaq 0x110(%rsp), %rbx
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2280
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x2a3e
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2a3e
movq %r13, %rdi
movq %r12, %rsi
callq 0x8407
movq 0x8(%rsp), %rdx
movb $0x1, %bl
cmpq 0x48(%rsp), %rdx
jne 0x26a1
testq %rdx, %rdx
je 0x269f
movq 0x40(%rsp), %rsi
movq (%rsp), %rdi
callq 0x2180
testl %eax, %eax
setne %bl
jmp 0x26a1
xorl %ebx, %ebx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x26b8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x26dd
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2170
testb %bl, %bl
je 0x2751
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x2a3e
movq %r13, %rdi
movq %rbp, %rsi
callq 0x8407
movq %rsp, %rdi
movq %r13, %rsi
callq 0x21b0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x272c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2648
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2648
leaq 0xd0(%rsp), %rbx
movq %rbx, 0xc0(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %r14
movq %r14, %rdi
callq 0x2a3e
movq %r13, %rdi
movq %r14, %rsi
callq 0x8629
movq %rsp, %rdi
movq %r13, %rsi
callq 0x21b0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x27aa
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x27c7
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0xb0(%rsp), %rbx
movq %rbx, 0xa0(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x2a3e
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0xb26c
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2820
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2170
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x283b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2857
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x110(%rsp), %rax
movq -0x18(%rax), %rcx
addq $-0x18, %rax
testb $0x5, 0x130(%rsp,%rcx)
je 0x25ea
leaq 0xe0(%rsp), %rdi
callq 0xb27e
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
callq 0x29e2
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x28ab
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
xorl %ebx, %ebx
leaq 0x110(%rsp), %rdi
callq 0x2050
movl %ebx, %eax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x299c
movq %rax, %r15
jmp 0x29a9
jmp 0x2938
movq %rax, %r15
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2965
movq 0xd0(%rsp), %rsi
jmp 0x295d
jmp 0x2938
movq %rax, %r15
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2965
movq 0xb0(%rsp), %rsi
jmp 0x295d
jmp 0x2918
movq %rax, %r15
jmp 0x2980
movq %rax, %r15
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2965
movq 0x70(%rsp), %rsi
jmp 0x295d
jmp 0x2938
movq %rax, %r15
jmp 0x2965
movq %rax, %r15
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2965
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2170
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2980
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x299c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0xe0(%rsp), %rdi
callq 0x29be
leaq 0x110(%rsp), %rdi
callq 0x2050
movq %r15, %rdi
callq 0x2250