// File: /workspace/github_cpp_makefile_star2_O3/olly-larkin[P]mips-parser/src/parser.cpp
// Function: addVec(std::istream&, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&, unsigned int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool addVec(std::istream& inStream, std::vector< std::vector<std::string> >& commVector, unsigned int& count, std::string func) {
    if (func == "exit")
        return false;
    else if (func[0] == '#') {
        std::string throwAway;
        getline(inStream, throwAway);
    } else if (func.back() == ':') {
        func.pop_back();
        labelMap[func] = count;
    } else if (func == "mnop") {
        std::string numStr;
        int32_t nopNum;
        if (!(inStream >> numStr) || !validIntStr(numStr, nopNum) || nopNum < 0)
            exitError("Invalid argument passed to mnop: " + numStr, 5);
        for(int i = 0; i < nopNum; ++i) {
            commVector.push_back(std::vector<std::string>(1, "nop"));
        }
    } else if (commMap.find(func) == commMap.end())
        exitError("Invalid command \"" + func + "\" on instruction number " + std::to_string((count - 0x10000000)/4 + 1), 5);
    else {
        std::vector<std::string> inVec;
        if (func == "jalr") {
            std::string arg1, arg2;
            if (!(inStream >> arg1))
                exitError("Not enough arguments for final instruction.", 5);
            if (!(inStream >> arg2)) {
                inVec.push_back(func);
                inVec.push_back("$31");
                inVec.push_back(arg1);
                commVector.push_back(inVec);
                count += 4;
                return true;
            }
            if (indRegCheck(arg2)) {
                inVec.push_back(func);
                inVec.push_back(arg1);
                inVec.push_back(arg2);
                commVector.push_back(inVec);
                count += 4;
                return true;
            } else {
                inVec.push_back(func);
                inVec.push_back("$31");
                inVec.push_back(arg1);
                commVector.push_back(inVec);
                count += 4;
                return addVec(inStream, commVector, count, arg2);
            }
        } else {
            inVec.push_back(func);
            for(int i = 0; i < commMap[func].numArgs; ++i) {
                std::string arg;
                if (!(inStream >> arg))
                    exitError("Not enough arguments for final instruction.", 5);
                inVec.push_back(arg);
            }
            commVector.push_back(inVec);
            count += 4;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, -0x78(%rbp)
movq %rdi, -0x80(%rbp)
leaq 0x6e74(%rip), %rsi      # 0xb18d
movq %rcx, %rdi
callq 0x20c0
testl %eax, %eax
je 0x437b
movq (%r12), %rax
cmpb $0x23, (%rax)
jne 0x4382
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq -0x80(%rbp), %rbx
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x2390
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x4a5b
jmp 0x4a60
xorl %ebx, %ebx
jmp 0x4a62
movq 0x8(%r12), %rcx
cmpb $0x3a, -0x1(%rax,%rcx)
jne 0x43b0
movq %r12, %rdi
callq 0x2280
movl (%r13), %ebx
leaq 0xae9f(%rip), %rdi      # 0xf240
movq %r12, %rsi
callq 0x4e78
movl %ebx, (%rax)
jmp 0x4a60
leaq 0x6ddb(%rip), %rsi      # 0xb192
movq %r12, %rdi
callq 0x20c0
testl %eax, %eax
je 0x44db
leaq 0xae42(%rip), %rdi      # 0xf210
movq %r12, %rsi
callq 0x5ca4
leaq 0xae3b(%rip), %rcx      # 0xf218
cmpq %rcx, %rax
je 0x45f5
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
leaq 0x6d30(%rip), %rsi      # 0xb12c
movq %r12, %rdi
callq 0x20c0
testl %eax, %eax
je 0x4648
movq %r13, -0xe8(%rbp)
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0x5018
leaq -0x38(%rbp), %r13
xorl %ebx, %ebx
leaq -0x48(%rbp), %r14
leaq 0xade0(%rip), %rdi      # 0xf210
movq %r12, %rsi
callq 0x50a0
cmpl (%rax), %ebx
jge 0x45d0
movq %r13, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq -0x80(%rbp), %rdi
movq %r14, %rsi
callq 0x22a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x44ba
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %r15
movq %r15, %rdi
leaq 0x6d5b(%rip), %rsi      # 0xb1e4
leaq 0x6d7f(%rip), %rdx      # 0xb20f
callq 0x52c8
movq %r15, %rdi
movl $0x5, %esi
callq 0x65e4
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x44ba
callq 0x21f0
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x5018
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x44d4
callq 0x21f0
incl %ebx
jmp 0x4429
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x48(%rbp), %rsi
movq -0x80(%rbp), %rdi
callq 0x22a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x475e
leaq 0x6c83(%rip), %rsi      # 0xb197
leaq -0x1a8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4ef7
leaq -0x1a8(%rbp), %rdi
movl $0x5, %esi
callq 0x65e4
leaq -0x198(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x454a
callq 0x21f0
movl -0x70(%rbp), %ebx
testl %ebx, %ebx
jle 0x45c3
leaq -0xb0(%rbp), %r14
leaq -0xc0(%rbp), %r15
leaq -0xa0(%rbp), %r12
leaq -0x49(%rbp), %r13
movq %r14, -0xc0(%rbp)
movq %r15, %rdi
leaq 0x6c18(%rip), %rsi      # 0xb193
leaq 0x6c14(%rip), %rdx      # 0xb196
callq 0x52c8
movl $0x1, %esi
movq %r12, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x4f82
movq -0x78(%rbp), %rdi
movq %r12, %rsi
callq 0x5a7a
movq %r12, %rdi
callq 0x4072
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
je 0x45bf
callq 0x21f0
decl %ebx
jne 0x456a
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
jmp 0x4a56
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x5064
movq -0xe8(%rbp), %rax
addl $0x4, (%rax)
leaq -0x70(%rbp), %rdi
callq 0x4072
jmp 0x4a60
leaq 0x6bbd(%rip), %rsi      # 0xb1b9
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rdx
callq 0x4ef7
leaq 0x6bb6(%rip), %rsi      # 0xb1cb
movq %rbx, %rdi
callq 0x23b0
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x47bd
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x47c4
leaq -0x38(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xb0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x48(%rbp), %rsi
movq -0x80(%rbp), %rdi
callq 0x22a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x46cb
leaq -0x178(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x6b4e(%rip), %rsi      # 0xb1e4
leaq 0x6b72(%rip), %rdx      # 0xb20f
leaq -0x188(%rbp), %rdi
callq 0x52c8
leaq -0x188(%rbp), %rdi
movl $0x5, %esi
callq 0x65e4
movq -0x188(%rbp), %rdi
cmpq %r14, %rdi
je 0x46cb
callq 0x21f0
leaq -0xc0(%rbp), %rsi
movq -0x80(%rbp), %rdi
callq 0x22a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x485f
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0x5018
leaq -0x90(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x6b05(%rip), %rsi      # 0xb210
leaq 0x6b01(%rip), %rdx      # 0xb213
leaq -0xa0(%rbp), %rdi
callq 0x52c8
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x5f32
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x473f
callq 0x21f0
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5018
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x5064
jmp 0x48e4
leaq -0x118(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x40ca
leaq -0x128(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4168
testb %al, %al
je 0x4845
movl -0x70(%rbp), %ebx
movq -0x128(%rbp), %rdi
cmpq %r14, %rdi
je 0x4b43
callq 0x21f0
testl %ebx, %ebx
jns 0x454a
jmp 0x450d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0xf0000000, %ecx       # imm = 0xF0000000
addl (%r13), %ecx
movl %ecx, %ebx
shrl $0x2, %ebx
incl %ebx
movl $0x1, %eax
cmpl $0x24, %ecx
jb 0x492a
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebx, %edx
cmpl $0x63, %edx
jbe 0x4923
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x4928
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x492a
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x4805
addl $-0x3, %eax
jmp 0x492a
movq -0x128(%rbp), %rdi
cmpq %r14, %rdi
je 0x450d
callq 0x21f0
jmp 0x450d
leaq -0x158(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x40ca
leaq -0x168(%rbp), %rdi
callq 0x67aa
movl %eax, %ebx
movq -0x168(%rbp), %rdi
cmpq %r14, %rdi
je 0x48a6
callq 0x21f0
testb %bl, %bl
je 0x4a76
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0x5018
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5018
leaq -0x70(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x5018
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x5064
addl $0x4, (%r13)
movb $0x1, %bl
leaq -0x38(%rbp), %r14
leaq -0xb0(%rbp), %rax
movq -0xc0(%rbp), %rdi
cmpq %rax, %rdi
je 0x4907
callq 0x21f0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x4915
callq 0x21f0
leaq -0x70(%rbp), %rdi
callq 0x4072
jmp 0x4a62
addl $-0x2, %eax
jmp 0x492a
decl %eax
movl %eax, %esi
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
leaq -0xa0(%rbp), %rdi
xorl %edx, %edx
callq 0x2260
movq -0xa0(%rbp), %rdi
movl -0x98(%rbp), %esi
movl %ebx, %edx
callq 0x5255
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x98(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0x497a
movq -0x38(%rbp), %rdi
movq -0xa0(%rbp), %rsi
cmpq %rdi, %rax
jbe 0x499c
movl $0xf, %edi
cmpq %r15, %rsi
je 0x4997
movq -0x90(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x49a7
leaq -0x48(%rbp), %rdi
callq 0x20d0
jmp 0x49b7
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq -0xd0(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x49e1
movq %rsi, -0xe0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd0(%rbp)
jmp 0x49e7
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0xd8(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0xe0(%rbp), %rdi
movl $0x5, %esi
callq 0x65e4
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a2c
callq 0x21f0
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a3d
callq 0x21f0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x4a4b
callq 0x21f0
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a60
callq 0x21f0
movb $0x1, %bl
movl %ebx, %eax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0x5018
leaq -0x90(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x677c(%rip), %rsi      # 0xb210
leaq 0x6778(%rip), %rdx      # 0xb213
leaq -0xa0(%rbp), %rdi
callq 0x52c8
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x5f32
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x4ac8
callq 0x21f0
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5018
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x5064
addl $0x4, (%r13)
leaq -0x138(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %rdi
callq 0x40ca
leaq -0x148(%rbp), %rcx
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %r13, %rdx
callq 0x42f0
movl %eax, %ebx
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x48eb
callq 0x21f0
jmp 0x48eb
testl %ebx, %ebx
jns 0x454d
jmp 0x450d
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
jne 0x4b9b
jmp 0x4c33
jmp 0x4b77
jmp 0x4c30
movq %rax, %rbx
movq -0x168(%rbp), %rdi
jmp 0x4b92
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0x4b92
jmp 0x4c30
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r14, %rdi
je 0x4c33
callq 0x21f0
jmp 0x4c33
jmp 0x4c30
movq %rax, %rbx
movq -0x128(%rbp), %rdi
jmp 0x4cb0
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4bd6
callq 0x21f0
jmp 0x4bd6
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x4bec
callq 0x21f0
jmp 0x4bec
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x4bff
callq 0x21f0
jmp 0x4bff
movq %rax, %rbx
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4cc2
movq %rax, %rbx
leaq -0x198(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4cb5
jmp 0x4cba
jmp 0x4cce
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x4c4b
callq 0x21f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
jne 0x4cdf
jmp 0x4ce4
jmp 0x4c90
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x4cc7
jmp 0x4ced
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x4cd6
callq 0x21f0
jmp 0x4cd6
jmp 0x4cd3
movq %rax, %rbx
jmp 0x4cba
movq %rax, %rbx
jmp 0x4ca9
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x4072
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
je 0x4cba
callq 0x21f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4ced
callq 0x21f0
jmp 0x4ced
movq %rax, %rbx
jmp 0x4ce4
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4ce4
callq 0x21f0
leaq -0x70(%rbp), %rdi
callq 0x4072
movq %rbx, %rdi
callq 0x2370