// File: /workspace/github_cpp_makefile_star2_O3/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, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq 0x68(%rdi), %r12
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x3306
movq %r12, %rdi
movq %r13, %rsi
callq 0x5256
movl %eax, %ebp
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x278a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
cmpb %bl, %bpl
jne 0x28aa
movsbl %bl, %eax
testl %eax, %eax
je 0x2839
cmpl $0x1, %eax
je 0x27f4
cmpl $0x2, %eax
jne 0x28aa
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 0x3306
movq %r12, %rdi
movq %r15, %rsi
callq 0x53be
movq %r14, %rdi
movl $0x6, %esi
movl %eax, %edx
callq 0x24b2
movq 0x48(%rsp), %rdi
jmp 0x2885
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 0x3306
movq %r12, %rdi
movq %r15, %rsi
callq 0x53be
movq %r14, %rdi
movl $0x5, %esi
movl %eax, %edx
callq 0x24b2
movq 0x68(%rsp), %rdi
jmp 0x2885
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 0x3306
movq %r12, %rdi
movq %r15, %rsi
callq 0x53be
movq %r14, %rdi
movl $0x4, %esi
movl %eax, %edx
callq 0x24b2
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x2896
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 0x4759(%rip), %rsi      # 0x7020
leaq 0x4776(%rip), %rdx      # 0x7044
leaq 0x28(%rsp), %rdi
callq 0x339c
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x36ac
xorl %ebp, %ebp
leaq 0x84bf(%rip), %rsi      # 0xadb0
leaq 0x6a0(%rip), %rdx       # 0x2f98
movq %r14, %rdi
callq 0x2240
movq %rax, %r12
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x2993
movq 0x58(%rsp), %rsi
jmp 0x298b
movq %rax, %r12
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x2993
movq 0x98(%rsp), %rsi
jmp 0x298b
movq %rax, %r12
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x2993
movq 0x78(%rsp), %rsi
jmp 0x298b
movq %rax, %r12
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x2960
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2160
testb %bpl, %bpl
jne 0x296a
jmp 0x2993
movq %rax, %r12
movq %r14, %rdi
callq 0x2100
jmp 0x2993
movq %rax, %r12
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2993
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
movq %r12, %rdi
callq 0x2250
nop