// File: /workspace/github_c_makefile_star2_O3/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 0x4b72
testq %rdx, %rdx
je 0x4b91
movq %rdi, %r15
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movb (%rdi), %dl
testb %dl, %dl
je 0x4a7e
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 0x4a4d
jmp 0x4a80
xorl %eax, %eax
movslq %eax, %r13
leaq 0x1a1a6(%rip), %rax     # 0x1ec30
movq (%rax,%r13,8), %rbx
testq %rbx, %rbx
je 0x4ac7
movl 0x6776(%rip), %r12d     # 0xb210
movq %rbx, %r14
cmpl %r12d, 0x20(%r14)
jne 0x4ac1
movq (%r14), %rsi
movq %r15, %rdi
callq 0x1110
testl %eax, %eax
je 0x4b53
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x4a9d
jmp 0x4ac7
jge 0x4b53
movl $0x30, %edi
callq 0x1160
testq %rax, %rax
je 0x4bb0
movq %rax, %r12
movq %r15, (%rax)
movl $0x10, %edi
callq 0x1160
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x4bf9
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x18(%r12)
movq $0x0, 0x8(%rax)
movq %rbx, 0x28(%r12)
movl 0x66f7(%rip), %eax      # 0xb210
movl %eax, 0x20(%r12)
movslq 0x66ef(%rip), %rax      # 0xb214
leal 0x1(%rax), %ecx
movl %ecx, 0x66e6(%rip)      # 0xb214
leaq 0x687b(%rip), %rcx      # 0xb3b0
movl %r13d, (%rcx,%rax,4)
leaq 0x1a0f0(%rip), %rax     # 0x1ec30
movq %r12, (%rax,%r13,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2dc8(%rip), %rdi      # 0x7922
leaq 0x2d79(%rip), %rsi      # 0x78da
leaq 0x2d7b(%rip), %rcx      # 0x78e3
movl $0x64, %edx
callq 0x10e0
leaq 0x2d54(%rip), %rdi      # 0x78cd
leaq 0x2d5a(%rip), %rsi      # 0x78da
leaq 0x2d5c(%rip), %rcx      # 0x78e3
movl $0x5a, %edx
callq 0x10e0
leaq 0x2d77(%rip), %rdi      # 0x790f
leaq 0x2d3b(%rip), %rsi      # 0x78da
leaq 0x2d3d(%rip), %rcx      # 0x78e3
movl $0x5b, %edx
callq 0x10e0
leaq 0x6649(%rip), %rax      # 0xb200
movq (%rax), %rdi
leaq 0x17f0(%rip), %rsi      # 0x63b1
leaq 0x2d12(%rip), %rbx      # 0x78da
leaq 0x2d81(%rip), %r8       # 0x7950
movq %rbx, %rdx
movl $0x66, %ecx
xorl %eax, %eax
callq 0x1120
leaq 0x17fb(%rip), %rdi      # 0x63e0
leaq 0x2cf7(%rip), %rcx      # 0x78e3
movq %rbx, %rsi
movl $0x66, %edx
callq 0x10e0
leaq 0x6600(%rip), %rax      # 0xb200
movq (%rax), %rdi
leaq 0x17a7(%rip), %rsi      # 0x63b1
leaq 0x2cc9(%rip), %rbx      # 0x78da
leaq 0x2d38(%rip), %r8       # 0x7950
movq %rbx, %rdx
movl $0x68, %ecx
xorl %eax, %eax
callq 0x1120
leaq 0x17b2(%rip), %rdi      # 0x63e0
leaq 0x2cae(%rip), %rcx      # 0x78e3
movq %rbx, %rsi
movl $0x68, %edx
callq 0x10e0