// File: /workspace/github_cpp_makefile_star2_O3/protonpopsicle[P]lang/src/compiler/ZoneMgr.cpp
// Function: ZoneMgr::addVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ZoneMgr::addVar(std::string id, std::string type) {
    varTable::iterator iter = zones[inUse].find(id);
    VarData varData;
    
    if (iter == zones[inUse].end()) {
        if (type == "bool") {
            varData.type = BOOL;
            varData.index = boolCount;
            boolCount++;
        }
        else if (type == "int") {
            varData.type = INT;
            varData.index = intCount;
            intCount++;
        }
        else if (type == "string") {
            varData.type = STRING;
            varData.index = stringCount;
            stringCount++;
        }
        zones[inUse].insert(std::make_pair(id, varData));
    }
    else {
        throw Error("'" + id + "' already declared in this scope");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq 0x8(%rbx), %rdi
callq 0x5b00
movslq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rdx, %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x5131
leaq 0x21c2(%rip), %rsi      # 0x721d
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x5092
leaq 0x21c1(%rip), %rsi      # 0x722f
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x50a3
leaq 0x2195(%rip), %rsi      # 0x7216
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x50b7
xorl %r13d, %r13d
jmp 0x50c9
movl 0x50(%rbx), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x50(%rbx)
xorl %r13d, %r13d
jmp 0x50c9
movl 0x54(%rbx), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x54(%rbx)
movl $0x1, %r13d
jmp 0x50c9
movl 0x58(%rbx), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x58(%rbx)
movl $0x2, %r13d
movslq (%rbx), %rax
leaq (%rax,%rax,2), %r15
shlq $0x4, %r15
addq 0x8(%rbx), %r15
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x3306
shlq $0x20, %r12
orq %r13, %r12
movq %r12, 0x20(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5b8a
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x5122
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x215b(%rip), %rsi      # 0x72a0
movq %rsp, %rdi
movq %r14, %rdx
callq 0x5599
leaq 0x214b(%rip), %rsi      # 0x72a2
movq %rsp, %rdi
callq 0x2270
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5180
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x518d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x36ac
xorl %ebp, %ebp
leaq 0x5bf3(%rip), %rsi      # 0xadb0
leaq -0x222c(%rip), %rdx     # 0x2f98
movq %rbx, %rdi
callq 0x2240
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x51e6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5201
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
testb %bpl, %bpl
jne 0x522b
jmp 0x524e
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x522b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x522b
movq %rax, %r14
movq %rbx, %rdi
callq 0x2100
jmp 0x524e
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x524e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
movq %r14, %rdi
callq 0x2250