// File: /workspace/github_c_makefile_star2_O1/taeguk[P]Compiler-Proj-Cminus/src/symtab.c
// Function: st_register
void st_register(char * name, int lineno, SymbolInfo * symbolInfo)
{
  assert(name != NULL);
  assert(symbolInfo != NULL);

  int h = hash(name);
  BucketList l =  hashTable[h];

  while (l != NULL && l->scope_level == cur_scope_level && 
         strcmp(name,l->name) != 0)
    l = l->next;

  assert(l == NULL || l->scope_level < cur_scope_level);

  MALLOC(l, sizeof(struct BucketListRec));
  l->name = name;
  MALLOC(l->lines, sizeof(struct LineListRec));
  l->lines->lineno = lineno;
  l->symbolInfo = symbolInfo;
  l->lines->next = NULL;
  l->next = hashTable[h];
  l->scope_level = cur_scope_level;
  valid_hash_arr[valid_hash_arr_cnt++] = h;
  hashTable[h] = l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x4d16
testq %rdx, %rdx
je 0x4d35
movq %rdi, %r15
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movb (%rdi), %dl
testb %dl, %dl
je 0x4c3b
leaq 0x1(%r15), %rcx
xorl %eax, %eax
movsbl %dl, %edx
shll $0x4, %eax
addl %edx, %eax
cltq
imulq $0x4da637d, %rax, %rdx  # imm = 0x4DA637D
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
imull $0xd3, %edx, %edx
subl %edx, %eax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x4c0a
jmp 0x4c3d
xorl %eax, %eax
movslq %eax, %r13
leaq 0x19fe9(%rip), %rax     # 0x1ec30
movq (%rax,%r13,8), %r12
testq %r12, %r12
je 0x4c86
movl 0x65b9(%rip), %r14d     # 0xb210
movl 0x20(%r12), %ebx
cmpl %r14d, %ebx
jne 0x4c7d
movq (%r12), %rsi
movq %r15, %rdi
callq 0x1110
testl %eax, %eax
je 0x4c7d
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x4c57
jmp 0x4c86
cmpl %r14d, %ebx
jge 0x4de6
movl $0x30, %edi
callq 0x1160
testq %rax, %rax
je 0x4d54
movq %rax, %r12
movq %r15, (%rax)
movl $0x10, %edi
callq 0x1160
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x4d9d
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x18(%r12)
movq $0x0, 0x8(%rax)
leaq 0x19f5c(%rip), %rdx     # 0x1ec30
movq (%rdx,%r13,8), %rax
movq %rax, 0x28(%r12)
movl 0x652d(%rip), %eax      # 0xb210
movl %eax, 0x20(%r12)
movslq 0x6525(%rip), %rax      # 0xb214
leal 0x1(%rax), %ecx
movl %ecx, 0x651c(%rip)      # 0xb214
leaq 0x66b1(%rip), %rcx      # 0xb3b0
movl %r13d, (%rcx,%rax,4)
movq %r12, (%rdx,%r13,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2bb0(%rip), %rdi      # 0x78cd
leaq 0x2bb6(%rip), %rsi      # 0x78da
leaq 0x2bb8(%rip), %rcx      # 0x78e3
movl $0x5a, %edx
callq 0x10e0
leaq 0x2bd3(%rip), %rdi      # 0x790f
leaq 0x2b97(%rip), %rsi      # 0x78da
leaq 0x2b99(%rip), %rcx      # 0x78e3
movl $0x5b, %edx
callq 0x10e0
leaq 0x64a5(%rip), %rax      # 0xb200
movq (%rax), %rdi
leaq 0x164c(%rip), %rsi      # 0x63b1
leaq 0x2b6e(%rip), %rbx      # 0x78da
leaq 0x2bdd(%rip), %r8       # 0x7950
movq %rbx, %rdx
movl $0x66, %ecx
xorl %eax, %eax
callq 0x1120
leaq 0x1657(%rip), %rdi      # 0x63e0
leaq 0x2b53(%rip), %rcx      # 0x78e3
movq %rbx, %rsi
movl $0x66, %edx
callq 0x10e0
leaq 0x645c(%rip), %rax      # 0xb200
movq (%rax), %rdi
leaq 0x1603(%rip), %rsi      # 0x63b1
leaq 0x2b25(%rip), %rbx      # 0x78da
leaq 0x2b94(%rip), %r8       # 0x7950
movq %rbx, %rdx
movl $0x68, %ecx
xorl %eax, %eax
callq 0x1120
leaq 0x160e(%rip), %rdi      # 0x63e0
leaq 0x2b0a(%rip), %rcx      # 0x78e3
movq %rbx, %rsi
movl $0x68, %edx
callq 0x10e0
leaq 0x2b35(%rip), %rdi      # 0x7922
leaq 0x2ae6(%rip), %rsi      # 0x78da
leaq 0x2ae8(%rip), %rcx      # 0x78e3
movl $0x64, %edx
callq 0x10e0