// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq 0x68(%rdi), %rbx
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x3344
movq %rbx, %rdi
movq %r12, %rsi
callq 0x527e
movl %eax, %ebx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2785
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
cmpb %bpl, %bl
jne 0x28a5
testb %bl, %bl
je 0x2834
movzbl %bl, %eax
cmpl $0x1, %eax
je 0x27ef
cmpl $0x2, %eax
jne 0x28a5
movq 0x68(%r14), %r12
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x3344
movq %r12, %rdi
movq %r15, %rsi
callq 0x53f0
movq %r14, %rdi
movl $0x6, %esi
movl %eax, %edx
callq 0x24b2
movq 0x48(%rsp), %rdi
jmp 0x2880
movq 0x68(%r14), %r12
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x3344
movq %r12, %rdi
movq %r15, %rsi
callq 0x53f0
movq %r14, %rdi
movl $0x5, %esi
movl %eax, %edx
callq 0x24b2
movq 0x68(%rsp), %rdi
jmp 0x2880
movq 0x68(%r14), %r12
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r15
movq %r15, %rdi
callq 0x3344
movq %r12, %rdi
movq %r15, %rsi
callq 0x53f0
movq %r14, %rdi
movl $0x4, %esi
movl %eax, %edx
callq 0x24b2
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x2891
movq (%r13), %rsi
incq %rsi
callq 0x2160
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x20c0
movq %rax, %r14
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x475e(%rip), %rsi      # 0x7020
leaq 0x477b(%rip), %rdx      # 0x7044
leaq 0x28(%rsp), %rdi
callq 0x33d4
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x36dc
xorl %ebp, %ebp
leaq 0x84c4(%rip), %rsi      # 0xadb0
leaq 0x6ab(%rip), %rdx       # 0x2f9e
movq %r14, %rdi
callq 0x2240
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x298c
movq 0x58(%rsp), %rsi
jmp 0x2984
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x298c
movq 0x98(%rsp), %rsi
jmp 0x2984
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x298c
movq 0x78(%rsp), %rsi
jmp 0x2984
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x2963
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x2963
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x298c
movq %r14, %rdi
callq 0x2100
jmp 0x298c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x298c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2250