// File: /workspace/github_cpp_makefile_star2_O3/JameyWoo[P]csmile/symtab.cpp
// Function: st_insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, int)
void st_insert(string name, int lineno, int loc, int rank) {
    if (count(fun_names.begin(), fun_names.end(), name) != 0) return;
    if (rank == 2 || rank == 3) {
        // symtabOut << "insert: " << name << endl;
        if (loc == -1) {  // 当这个变量存在在符号表中时
            symtabs[name].line.push_back(lineno);
        } else if (lineno != -1) {  // 不在符号表
            SymtabOne s(lineno, loc, rank);
            s.addr = ++address;
            symtabs[name] = s;
        } else if (lineno != -1) {  // 不在符号表, 只建立key, 不在vector中插入
            SymtabOne s(loc);
            s.addr = ++address;
            symtabs[name] = s;
        }
    } else if (rank == 1) {
        // symtabOut << "insert: " << name << endl;
        if (loc == -1) {  // 当这个变量存在在符号表中时
            symtabs[name].line.push_back(lineno);
        } else {  // 不在符号表
            SymtabOne s(lineno, loc, rank);
            s.addr = ++address;
            symtabs[name] = s;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
leaq 0x107bd(%rip), %rax     # 0x1b920
movq (%rax), %r12
movq 0x8(%rax), %rbp
movq %rdi, 0x10(%rsp)
cmpq %rbp, %r12
je 0xb1b4
movl %ecx, 0x8(%rsp)
movl %edx, 0xc(%rsp)
movq %rbx, %r15
xorl %ebx, %ebx
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x4250
movzbl %al, %eax
addq %rax, %rbx
addq $0x20, %r12
cmpq %rbp, %r12
jne 0xb186
testq %rbx, %rbx
movq %r15, %rbx
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
jne 0xb2c8
movl %ecx, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0xb215
cmpl $-0x1, %edx
je 0xb292
cmpl $-0x1, %r14d
je 0xb2c8
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl %r14d, %esi
callq 0xb776
movl 0x107d9(%rip), %eax     # 0x1b9c0
incl %eax
movl %eax, 0x107d1(%rip)     # 0x1b9c0
movl %eax, 0x20(%r12)
leaq 0x10795(%rip), %rdi     # 0x1b990
movq %rbx, %rsi
callq 0xb6fa
movq %rax, %rbx
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0xb8bc
jmp 0xb269
cmpl $0x1, %ecx
jne 0xb2c8
cmpl $-0x1, %edx
je 0xb292
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl $0x1, %ecx
callq 0xb776
movl 0x10782(%rip), %eax     # 0x1b9c0
incl %eax
movl %eax, 0x1077a(%rip)     # 0x1b9c0
movl %eax, 0x20(%r15)
leaq 0x1073f(%rip), %rdi     # 0x1b990
movq %rbx, %rsi
callq 0xb6fa
movq %rax, %rbx
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0xb8bc
movl 0x30(%rsp), %eax
movl %eax, 0x20(%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb2c8
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
jmp 0xb2c8
leaq 0x106f7(%rip), %rdi     # 0x1b990
movq %rbx, %rsi
callq 0xb6fa
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0xb2bb
movl 0x4(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0xb2c8
leaq 0x4(%rsp), %rdx
movq %rax, %rdi
callq 0xbc40
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb2d9
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb2f3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2310