// File: olly-larkin[P]mips-parser/src/instructionList.cpp
// Function: jal(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>>>>&, int)
uint32_t jal(std::vector<std::string>& argVec, int i) {
    uint32_t returnNum = ((3 << 26) & 0xFC000000);
    int32_t addr;
    if(!labelReturn(argVec[1], addr)) {
        if (!validIntStr(argVec[1], addr))
            exitError("Invalid address \"" + giveStr(argVec) + "\" on instruction number " + std::to_string(i+1), 5);
    }
    return returnNum | (((addr) >> 2) & 0x3FFFFFF);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0xc000000, -0x10(%rbp) # imm = 0xC000000
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x7c20
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3120
movq -0x130(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x6ee0
movb %al, -0x121(%rbp)
jmp 0x108d2
movb -0x121(%rbp), %al
xorb $-0x1, %al
movb %al, -0x131(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31a0
movb -0x131(%rbp), %al
testb $0x1, %al
jne 0x108f8
jmp 0x10b1f
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x7c20
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x3120
movq -0x140(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x5fb0
movb %al, -0x132(%rbp)
jmp 0x10931
movb -0x132(%rbp), %al
xorb $-0x1, %al
movb %al, -0x141(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x31a0
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x10957
jmp 0x10b1d
movq -0x8(%rbp), %rsi
leaq -0x100(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0xc070
movq -0x150(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0xca30
jmp 0x10983
leaq 0x2b37(%rip), %rsi      # 0x134c1
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rdx
callq 0x10f70
jmp 0x1099f
leaq 0x2861(%rip), %rdx      # 0x13207
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x5a30
jmp 0x109bb
movl -0xc(%rbp), %esi
incl %esi
leaq -0x120(%rbp), %rdi
callq 0x10fc0
jmp 0x109ce
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x7810
jmp 0x109ea
leaq -0x88(%rbp), %rdi
movl $0x5, %esi
callq 0xc9e0
jmp 0x109fd
leaq -0x88(%rbp), %rdi
callq 0x31a0
leaq -0x120(%rbp), %rdi
callq 0x31a0
leaq -0xa8(%rbp), %rdi
callq 0x31a0
leaq -0xc8(%rbp), %rdi
callq 0x31a0
leaq -0xe8(%rbp), %rdi
callq 0x31a0
leaq -0x100(%rbp), %rdi
callq 0x5c60
jmp 0x10b1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31a0
jmp 0x10b39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x31a0
jmp 0x10b39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10b0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10b03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10af7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10aeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10adf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x31a0
leaq -0x120(%rbp), %rdi
callq 0x31a0
leaq -0xa8(%rbp), %rdi
callq 0x31a0
leaq -0xc8(%rbp), %rdi
callq 0x31a0
leaq -0xe8(%rbp), %rdi
callq 0x31a0
leaq -0x100(%rbp), %rdi
callq 0x5c60
jmp 0x10b39
jmp 0x10b1f
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
sarl $0x2, %ecx
andl $0x3ffffff, %ecx        # imm = 0x3FFFFFF
orl %ecx, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)