// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
movl %esi, 0x8(%rsp)
leaq 0x10738(%rip), %rax     # 0x1b920
movq (%rax), %r15
movq 0x8(%rax), %r13
movq %rdi, 0x10(%rsp)
cmpq %r13, %r15
je 0xb235
movl %ecx, 0xc(%rsp)
movq %rbx, %r14
movl %edx, %ebx
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x42c6
movzbl %al, %eax
addq %rax, %rbp
addq $0x20, %r15
cmpq %r13, %r15
jne 0xb209
testq %rbp, %rbp
movl %ebx, %edx
movq %r14, %rbx
movl 0xc(%rsp), %ecx
jne 0xb349
movl %ecx, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0xb295
cmpl $-0x1, %edx
je 0xb313
movl 0x8(%rsp), %esi
cmpl $-0x1, %esi
je 0xb349
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xb7f2
movl 0x10758(%rip), %eax     # 0x1b9c0
incl %eax
movl %eax, 0x10750(%rip)     # 0x1b9c0
movl %eax, 0x20(%r15)
leaq 0x10715(%rip), %rdi     # 0x1b990
movq %rbx, %rsi
callq 0xb776
movq %rax, %rbx
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0xb94e
jmp 0xb2ea
cmpl $0x1, %ecx
jne 0xb349
cmpl $-0x1, %edx
je 0xb313
movl 0x8(%rsp), %esi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x1, %ecx
callq 0xb7f2
movl 0x10701(%rip), %eax     # 0x1b9c0
incl %eax
movl %eax, 0x106f9(%rip)     # 0x1b9c0
movl %eax, 0x20(%r14)
leaq 0x106be(%rip), %rdi     # 0x1b990
movq %rbx, %rsi
callq 0xb776
movq %rax, %rbx
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0xb94e
movl 0x30(%rsp), %eax
movl %eax, 0x20(%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb349
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
jmp 0xb349
leaq 0x10676(%rip), %rdi     # 0x1b990
movq %rbx, %rsi
callq 0xb776
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0xb33c
movl 0x8(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0xb349
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
callq 0xbcc4
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb35a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb374
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2310