// File: /workspace/github_cpp_makefile_star2_O1/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, %r13
movq %rdx, %r15
movq %rsi, -0x78(%rbp)
movq %rdi, -0x80(%rbp)
leaq 0x6e69(%rip), %rsi      # 0xb18d
movq %rcx, %rdi
callq 0x20c0
testl %eax, %eax
je 0x4385
movq (%r13), %rax
cmpb $0x23, (%rax)
jne 0x438c
leaq -0x38(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb $0x0, (%rbx)
movq -0x80(%rbp), %r14
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x2390
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
jne 0x4a56
jmp 0x4a5b
xorl %ebx, %ebx
jmp 0x4a5d
movq 0x8(%r13), %rcx
cmpb $0x3a, -0x1(%rax,%rcx)
jne 0x43b8
movq %r13, %rdi
callq 0x2280
movl (%r15), %ebx
leaq 0xae97(%rip), %rdi      # 0xf240
movq %r13, %rsi
callq 0x4e78
movl %ebx, (%rax)
jmp 0x4a5b
leaq 0x6dd3(%rip), %rsi      # 0xb192
movq %r13, %rdi
callq 0x20c0
testl %eax, %eax
je 0x44e9
leaq 0xae3a(%rip), %rdi      # 0xf210
movq %r13, %rsi
callq 0x5cb4
leaq 0xae33(%rip), %rcx      # 0xf218
cmpq %rcx, %rax
je 0x465a
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
leaq 0x6d28(%rip), %rsi      # 0xb12c
movq %r13, %rdi
callq 0x20c0
movl %eax, -0xc4(%rbp)
testl %eax, %eax
je 0x46ad
movq %r15, -0xf0(%rbp)
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
callq 0x5018
leaq -0x38(%rbp), %r15
xorl %ebx, %ebx
leaq -0x48(%rbp), %r14
leaq 0xadd2(%rip), %rdi      # 0xf210
movq %r13, %rsi
callq 0x50a0
cmpl (%rax), %ebx
jge 0x463e
movq %r15, -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 0x44c8
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x110(%rbp), %r12
movq %r12, %rdi
leaq 0x6d4d(%rip), %rsi      # 0xb1e4
leaq 0x6d71(%rip), %rdx      # 0xb20f
callq 0x52c8
movq %r12, %rdi
movl $0x5, %esi
callq 0x6624
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x44c8
callq 0x21f0
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x5018
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x44e2
callq 0x21f0
incl %ebx
jmp 0x4437
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
movl 0x20(%rax,%rcx), %r14d
movb $0x1, %bl
testb $0x5, %r14b
jne 0x4559
leaq -0x180(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x190(%rbp), %rdi
callq 0x40bc
leaq -0x190(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4158
testb %al, %al
je 0x4559
movl -0x70(%rbp), %ebx
shrl $0x1f, %ebx
testb $0x5, %r14b
jne 0x4574
leaq -0x180(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4574
callq 0x21f0
testb %bl, %bl
je 0x45b5
leaq 0x6c18(%rip), %rsi      # 0xb197
leaq -0x1b0(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4ef7
leaq -0x1b0(%rbp), %rdi
movl $0x5, %esi
callq 0x6624
leaq -0x1a0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45b5
callq 0x21f0
movl -0x70(%rbp), %r14d
testl %r14d, %r14d
jle 0x4631
leaq -0xb0(%rbp), %rbx
leaq -0xc0(%rbp), %r15
leaq -0xa0(%rbp), %r12
leaq -0x49(%rbp), %r13
movq %rbx, -0xc0(%rbp)
movq %r15, %rdi
leaq 0x6bab(%rip), %rsi      # 0xb193
leaq 0x6ba7(%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 0x5a8a
movq %r12, %rdi
callq 0x406e
movq -0xc0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x462c
callq 0x21f0
decl %r14d
jne 0x45d7
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
jmp 0x4a51
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x5064
movq -0xf0(%rbp), %rax
addl $0x4, (%rax)
jmp 0x48ff
leaq 0x6b58(%rip), %rsi      # 0xb1b9
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rdx
callq 0x4ef7
leaq 0x6b51(%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 0x47c3
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x47ca
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 0x4730
leaq -0x160(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x6ae9(%rip), %rsi      # 0xb1e4
leaq 0x6b0d(%rip), %rdx      # 0xb20f
leaq -0x170(%rbp), %rdi
callq 0x52c8
leaq -0x170(%rbp), %rdi
movl $0x5, %esi
callq 0x6624
movq -0x170(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4730
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 0x484a
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
callq 0x5018
leaq -0x90(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x6aa0(%rip), %rsi      # 0xb210
leaq 0x6a9c(%rip), %rdx      # 0xb213
leaq -0xa0(%rbp), %rdi
callq 0x52c8
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x5f74
movq -0xa0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x47a4
callq 0x21f0
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5018
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x5064
jmp 0x48cf
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 (%r15), %ecx
movl %ecx, %ebx
shrl $0x2, %ebx
incl %ebx
movl $0x1, %eax
cmpl $0x24, %ecx
jb 0x4921
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebx, %edx
cmpl $0x63, %edx
jbe 0x491a
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x491f
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x4921
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x480a
addl $-0x3, %eax
jmp 0x4921
leaq -0x140(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x150(%rbp), %rdi
callq 0x40bc
leaq -0x150(%rbp), %rdi
callq 0x67e6
movl %eax, %ebx
movq -0x150(%rbp), %rdi
cmpq %r14, %rdi
je 0x4891
callq 0x21f0
testb %bl, %bl
je 0x4a74
leaq -0x70(%rbp), %rdi
movq %r13, %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, (%r15)
movb $0x1, %bl
leaq -0x38(%rbp), %r14
leaq -0xb0(%rbp), %rax
movq -0xc0(%rbp), %rdi
cmpq %rax, %rdi
je 0x48f1
callq 0x21f0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x48ff
callq 0x21f0
leaq -0x70(%rbp), %rdi
callq 0x406e
cmpl $0x0, -0xc4(%rbp)
jne 0x4a5b
jmp 0x4a5d
addl $-0x2, %eax
jmp 0x4921
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, %esi
cmpq %r14, %rcx
je 0x4971
movq -0x38(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x4990
movl $0xf, %esi
cmpq %r15, -0xa0(%rbp)
je 0x498b
movq -0x90(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x49a2
movq -0xa0(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x20d0
jmp 0x49b2
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq -0xd8(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x49dc
movq %rsi, -0xe8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd8(%rbp)
jmp 0x49e2
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0xe0(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0xe8(%rbp), %rdi
movl $0x5, %esi
callq 0x6624
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a27
callq 0x21f0
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a38
callq 0x21f0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x4a46
callq 0x21f0
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a5b
callq 0x21f0
movb $0x1, %bl
andb $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 %r13, %rsi
callq 0x5018
leaq -0x90(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x677e(%rip), %rsi      # 0xb210
leaq 0x677a(%rip), %rdx      # 0xb213
leaq -0xa0(%rbp), %rdi
callq 0x52c8
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x5f74
movq -0xa0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4ac6
callq 0x21f0
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5018
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x5064
addl $0x4, (%r15)
leaq -0x120(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x130(%rbp), %rdi
callq 0x40bc
leaq -0x130(%rbp), %rcx
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %r15, %rdx
callq 0x42fb
movl %eax, %ebx
movq -0x130(%rbp), %rdi
cmpq %r13, %rdi
je 0x48d5
callq 0x21f0
jmp 0x48d5
movq %rax, %r12
movq -0x130(%rbp), %rdi
cmpq %r13, %rdi
jne 0x4b92
jmp 0x4c35
jmp 0x4b6e
jmp 0x4c32
movq %rax, %r12
movq -0x150(%rbp), %rdi
cmpq %r14, %rdi
jne 0x4b92
jmp 0x4c35
movq %rax, %r12
movq -0xa0(%rbp), %rdi
jmp 0x4b89
jmp 0x4c32
movq %rax, %r12
movq -0x170(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4c35
callq 0x21f0
jmp 0x4c35
jmp 0x4c32
movq %rax, %r12
movq -0x190(%rbp), %rdi
cmpq %r15, %rdi
jne 0x4cb5
jmp 0x4cba
movq %rax, %r12
leaq -0x1a0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4cb5
jmp 0x4cba
movq %rax, %r12
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4bf2
callq 0x21f0
jmp 0x4bf2
movq %rax, %r12
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x4c08
callq 0x21f0
jmp 0x4c08
movq %rax, %r12
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x4c1b
callq 0x21f0
jmp 0x4c1b
movq %rax, %r12
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4cc2
jmp 0x4cce
jmp 0x4c90
movq %rax, %r12
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x4c4d
callq 0x21f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
jne 0x4cdf
jmp 0x4ce4
movq %rax, %r12
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
jne 0x4cc7
jmp 0x4ced
movq %rax, %r12
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4cd6
callq 0x21f0
jmp 0x4cd6
jmp 0x4cd3
movq %rax, %r12
jmp 0x4cba
movq %rax, %r12
jmp 0x4ca9
movq %rax, %r12
leaq -0xa0(%rbp), %rdi
callq 0x406e
movq -0xc0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4cba
callq 0x21f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4ced
callq 0x21f0
jmp 0x4ced
movq %rax, %r12
jmp 0x4ce4
movq %rax, %r12
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x4ce4
callq 0x21f0
leaq -0x70(%rbp), %rdi
callq 0x406e
movq %r12, %rdi
callq 0x2370