// File: /workspace/github_cpp_makefile_star2_O1/olly-larkin[P]mips-parser/src/instructionList.cpp
// Function: R_TYPE(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::vector<OP_TYPE, std::allocator<OP_TYPE>> const&, int, int)
uint32_t R_TYPE(std::vector<std::string>& argVec, const std::vector<OP_TYPE>& opcodes, int fn, int pc) {
    uint32_t returnNum = fn;
    std::vector<int> index;
    for(int i = 0; i < opcodes.size(); ++i) {
        if (opcodes[i] == $s || opcodes[i] == $t || opcodes[i] == $d)
            index.push_back(i+1);
    }
    if (!regCheck(argVec, index))
        exitError("Invalid register input \"" + giveStr(argVec) + "\" on instruction number " + std::to_string(pc+1), 5);
    for(int i = 0; i < opcodes.size(); ++i) {
        switch(opcodes[i]) {
            case shAmt:
                int32_t shAmtNum;
                if (!validIntStr(argVec[i+1], shAmtNum))
                    exitError("Invalid instruction argument \"" + giveStr(argVec) + "\" on instruction number " + std::to_string(pc+1), 5);
                returnNum = returnNum | ((shAmtNum & 0x1F) << 6);
                break;
            case $d:
                returnNum = returnNum | ((regMap[argVec[i+1]] & 0x1F) << 11);
                break;
            case $t:
                returnNum = returnNum | ((regMap[argVec[i+1]] & 0x1F) << 16);
                break;
            case $s:
                returnNum = returnNum | ((regMap[argVec[i+1]] & 0x1F) << 21);
                break;
            default:
                break;
        }
    }
    return returnNum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rcx, -0xa8(%rbp)
movl %edx, -0x2c(%rbp)
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movq $0x0, -0x90(%rbp)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x68cd
xorl %r15d, %r15d
leaq -0xa0(%rbp), %rbx
leaq -0x58(%rbp), %r13
cmpl $0x2, (%rax,%r15,4)
ja 0x68b5
leal 0x1(%r15), %eax
movl %eax, -0x58(%rbp)
movq -0x98(%rbp), %rsi
cmpq -0x90(%rbp), %rsi
je 0x68aa
leal 0x1(%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x98(%rbp)
jmp 0x68b5
movq %rbx, %rdi
movq %r13, %rdx
callq 0xa0c8
incq %r15
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
ja 0x6879
leaq -0xa0(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x6749
testb %al, %al
je 0x6a99
movq (%r12), %rax
cmpq %rax, 0x8(%r12)
je 0x6a10
movl $0x20, %r13d
xorl %r15d, %r15d
leaq -0x128(%rbp), %rbx
movl (%rax,%r15,4), %eax
cmpq $0x3, %rax
ja 0x69f0
leaq 0x4a23(%rip), %rcx      # 0xb33c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
movq (%rax), %rsi
addq %r13, %rsi
leaq 0x8945(%rip), %rdi      # 0xf278
callq 0x4e78
movl (%rax), %eax
andl $0x1f, %eax
shll $0x15, %eax
jmp 0x69ed
movq -0x38(%rbp), %rax
movq (%rax), %rsi
addq %r13, %rsi
leaq 0x8922(%rip), %rdi      # 0xf278
callq 0x4e78
movl (%rax), %eax
shll $0xb, %eax
movzwl %ax, %eax
jmp 0x69ed
movq -0x38(%rbp), %rax
movq (%rax), %rax
leaq -0x118(%rbp), %rcx
movq %rcx, -0x128(%rbp)
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x40bc
movq %rbx, %r14
movq %rbx, %rdi
leaq -0x7c(%rbp), %rsi
callq 0x4158
movl %eax, %ebx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x69ba
callq 0x21f0
testb %bl, %bl
je 0x6a36
movl -0x7c(%rbp), %eax
andl $0x1f, %eax
shll $0x6, %eax
orl %eax, -0x2c(%rbp)
movq %r14, %rbx
jmp 0x69f0
movq -0x38(%rbp), %rax
movq (%rax), %rsi
addq %r13, %rsi
leaq 0x8898(%rip), %rdi      # 0xf278
callq 0x4e78
movl (%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, -0x2c(%rbp)
incq %r15
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
addq $0x20, %r13
cmpq %r15, %rcx
ja 0x6904
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x6a21
callq 0x21f0
movl -0x2c(%rbp), %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x160(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x6308
leaq -0x148(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x6652
leaq 0x49f4(%rip), %rcx      # 0xb454
leaq -0x148(%rbp), %rdi
movl $0x1e, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq -0xd8(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6b03
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x6b14
leaq -0x178(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x6308
leaq -0x148(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x6652
leaq 0x4978(%rip), %rcx      # 0xb43b
leaq -0x148(%rbp), %rdi
movl $0x18, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq -0xd8(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6bf1
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x6c02
movq %rdx, -0xe8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd8(%rbp)
movq 0x8(%rax), %rdx
leaq -0xe8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4692(%rip), %rsi      # 0xb1cb
callq 0x23b0
leaq -0x48(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6b61
movups (%rcx), %xmm0
leaq -0x48(%rbp), %rdx
movups %xmm0, (%rdx)
jmp 0x6b6c
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0xa8(%rbp), %rax
incl %eax
movl %eax, %ebx
negl %ebx
movq %rax, %rsi
cmovsl %eax, %ebx
movl $0x1, %r14d
cmpl $0xa, %ebx
jb 0x6c5f
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebx, %ecx
cmpl $0x63, %ecx
jbe 0x6c56
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x6c5c
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6c5f
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x6bb2
addl $-0x3, %r14d
jmp 0x6c5f
movq %rdx, -0xe8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd8(%rbp)
movq 0x8(%rax), %rdx
leaq -0xe8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x45a4(%rip), %rsi      # 0xb1cb
callq 0x23b0
leaq -0x48(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6d46
movups (%rcx), %xmm0
leaq -0x48(%rbp), %rdx
movups %xmm0, (%rdx)
jmp 0x6d51
addl $-0x2, %r14d
jmp 0x6c5f
decl %r14d
shrl $0x1f, %esi
movq %rsi, %r12
addl %r14d, %esi
leaq -0x68(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x78(%rbp), %rdi
movl $0x2d, %edx
callq 0x2260
movl %r12d, %edi
addq -0x78(%rbp), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x5255
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x70(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq -0x48(%rbp), %rdi
cmpq %rdi, %rcx
je 0x6cb1
movq -0x48(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x6cca
movl $0xf, %esi
cmpq %r13, -0x78(%rbp)
je 0x6cc5
movq -0x68(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x6cd9
movq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x20d0
jmp 0x6ce6
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq -0xb8(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x6d05
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x6d16
movq %rsi, -0xc8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xb8(%rbp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0xc0(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0xc8(%rbp), %rdi
movl $0x5, %esi
callq 0x6624
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0xa8(%rbp), %rax
incl %eax
movl %eax, %ebx
negl %ebx
movq %rax, %rsi
cmovsl %eax, %ebx
movl $0x1, %r14d
cmpl $0xa, %ebx
jb 0x6dcf
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebx, %ecx
cmpl $0x63, %ecx
jbe 0x6dc6
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x6dcc
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6dcf
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x6d93
addl $-0x3, %r14d
jmp 0x6dcf
addl $-0x2, %r14d
jmp 0x6dcf
decl %r14d
shrl $0x1f, %esi
movq %rsi, %r12
addl %r14d, %esi
leaq -0x68(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x78(%rbp), %rdi
movl $0x2d, %edx
callq 0x2260
movl %r12d, %edi
addq -0x78(%rbp), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x5255
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x70(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq -0x48(%rbp), %rdi
cmpq %rdi, %rcx
je 0x6e21
movq -0x48(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x6e3a
movl $0xf, %esi
cmpq %r13, -0x78(%rbp)
je 0x6e35
movq -0x68(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x6e49
movq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x20d0
jmp 0x6e56
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq -0xf8(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x6e75
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x6e86
movq %rsi, -0x108(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xf8(%rbp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x100(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x108(%rbp), %rdi
movl $0x5, %esi
callq 0x6624
movq %rax, %rbx
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ed3
callq 0x21f0
jmp 0x6ed3
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0x6ee6
callq 0x21f0
jmp 0x6ee6
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x6efd
callq 0x21f0
jmp 0x6efd
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
je 0x6f40
callq 0x21f0
jmp 0x6f40
movq %rax, %rbx
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f2d
callq 0x21f0
jmp 0x6f2d
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0x6f5a
callq 0x21f0
jmp 0x6f5a
movq %rax, %rbx
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f71
callq 0x21f0
jmp 0x6f71
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x6f7d
callq 0x21f0
jmp 0x6f7d
movq %rax, %rbx
leaq -0x178(%rbp), %rdi
jmp 0x6fb8
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
je 0x6f95
callq 0x21f0
jmp 0x6f95
jmp 0x6fe0
movq %rax, %rbx
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6fb1
callq 0x21f0
jmp 0x6fb1
jmp 0x6fe0
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0x406e
jmp 0x6fe3
jmp 0x6fe0
jmp 0x6fe0
movq %rax, %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x6fe3
callq 0x21f0
jmp 0x6fe3
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x6ff4
callq 0x21f0
movq %rbx, %rdi
callq 0x2370