// File: protonpopsicle[P]lang/src/compiler/ByteCoder.cpp
// Function: ByteCoder::assignVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
char ByteCoder::assignVar(std::string id, char rhs) {
    char type = zoneMgr->getVarType(id);
    if (type == rhs) {
        switch (type) {
            case BOOL:
                addOp(OP_ASSIGN_BOOL, zoneMgr->getVarIndex(id));
                return type;
            case INT:
                addOp(OP_ASSIGN_INT, zoneMgr->getVarIndex(id));
                return type;
            case STRING:
                addOp(OP_ASSIGN_STRING, zoneMgr->getVarIndex(id));
                return type;
        }
    }
    throw Error("type mismatch in variable assignment");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rsi, -0xf8(%rbp)
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq 0x68(%rax), %rax
movq %rax, -0xe8(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x2100
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0xa1f0
movb %al, -0xd3(%rbp)
jmp 0x29d0
leaq -0x40(%rbp), %rdi
callq 0x2160
movb -0xd3(%rbp), %al
movb %al, -0x1a(%rbp)
movsbl -0x1a(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x2bf6
movsbl -0x1a(%rbp), %eax
movl %eax, -0xfc(%rbp)
testl %eax, %eax
je 0x2a41
jmp 0x2a02
movl -0xfc(%rbp), %eax
subl $0x1, %eax
je 0x2acc
jmp 0x2a13
movl -0xfc(%rbp), %eax
subl $0x2, %eax
je 0x2b60
jmp 0x2bf4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2160
jmp 0x2ccc
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x110(%rbp)
leaq -0x70(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x2100
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0xa370
movl %eax, -0x100(%rbp)
jmp 0x2a85
movl -0x100(%rbp), %edx
movq -0xf0(%rbp), %rdi
movl $0x4, %esi
callq 0x2550
jmp 0x2a9e
leaq -0x70(%rbp), %rdi
callq 0x2160
movb -0x1a(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x2cc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2160
jmp 0x2ccc
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x128(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x2100
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0xa370
movl %eax, -0x114(%rbp)
jmp 0x2b13
movl -0x114(%rbp), %edx
movq -0xf0(%rbp), %rdi
movl $0x5, %esi
callq 0x2550
jmp 0x2b2c
leaq -0x90(%rbp), %rdi
callq 0x2160
movb -0x1a(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x2cc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2160
jmp 0x2ccc
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x140(%rbp)
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x2100
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0xa370
movl %eax, -0x12c(%rbp)
jmp 0x2ba7
movl -0x12c(%rbp), %edx
movq -0xf0(%rbp), %rdi
movl $0x6, %esi
callq 0x2550
jmp 0x2bc0
leaq -0xb0(%rbp), %rdi
callq 0x2160
movb -0x1a(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x2cc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x2160
jmp 0x2ccc
jmp 0x2bf6
movb $0x1, -0xd2(%rbp)
movl $0x20, %edi
callq 0x2120
movq %rax, -0x150(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x23a0
movq -0x148(%rbp), %rdx
leaq 0xb3ed(%rip), %rsi      # 0xe01c
leaq -0xd0(%rbp), %rdi
callq 0x3880
jmp 0x2c3d
movq -0x150(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x6400
jmp 0x2c52
movq -0x150(%rbp), %rdi
movb $0x0, -0xd2(%rbp)
leaq 0x12149(%rip), %rsi     # 0x14db0
leaq 0xcc2(%rip), %rdx       # 0x3930
callq 0x2370
jmp 0x2cd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x2c9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2160
leaq -0xd1(%rbp), %rdi
callq 0x2270
testb $0x1, -0xd2(%rbp)
jne 0x2cb2
jmp 0x2cbe
movq -0x150(%rbp), %rdi
callq 0x21b0
jmp 0x2ccc
movb -0x1(%rbp), %al
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x2390
nopw %cs:(%rax,%rax)