// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x6acc
jmp 0x6aeb
leaq 0x3eeb(%rip), %rdi      # 0xa9be
leaq 0x3ef1(%rip), %rsi      # 0xa9cb
movl $0x5a, %edx
leaq 0x3eee(%rip), %rcx      # 0xa9d4
callq 0x10e0
cmpq $0x0, -0x18(%rbp)
je 0x6af4
jmp 0x6b13
leaq 0x3f05(%rip), %rdi      # 0xaa00
leaq 0x3ec9(%rip), %rsi      # 0xa9cb
movl $0x5b, %edx
leaq 0x3ec6(%rip), %rcx      # 0xa9d4
callq 0x10e0
movq -0x8(%rbp), %rdi
callq 0x6d20
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x1b116(%rip), %rax     # 0x21c40
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x29(%rbp)
je 0x6b6b
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
xorl %eax, %eax
cmpl 0x76d3(%rip), %ecx      # 0xe220
movb %al, -0x29(%rbp)
jne 0x6b6b
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0x1110
cmpl $0x0, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x6b74
jmp 0x6b82
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x6b32
cmpq $0x0, -0x28(%rbp)
je 0x6b98
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
cmpl 0x768a(%rip), %eax      # 0xe220
jge 0x6b9a
jmp 0x6bb9
leaq 0x3e72(%rip), %rdi      # 0xaa13
leaq 0x3e23(%rip), %rsi      # 0xa9cb
movl $0x64, %edx
leaq 0x3e20(%rip), %rcx      # 0xa9d4
callq 0x10e0
jmp 0x6bbb
movl $0x30, %edi
callq 0x1160
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6c1a
leaq 0x7639(%rip), %rax      # 0xe210
movq (%rax), %rdi
leaq 0x27e0(%rip), %rsi      # 0x93c1
leaq 0x3de3(%rip), %rdx      # 0xa9cb
movl $0x66, %ecx
leaq 0x3e4d(%rip), %r8       # 0xaa41
movb $0x0, %al
callq 0x1120
leaq 0x27f9(%rip), %rdi      # 0x93fb
leaq 0x3dc2(%rip), %rsi      # 0xa9cb
movl $0x66, %edx
leaq 0x3dbf(%rip), %rcx      # 0xa9d4
callq 0x10e0
jmp 0x6c1c
movq -0x8(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x10, %edi
callq 0x1160
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x6c91
leaq 0x75c2(%rip), %rax      # 0xe210
movq (%rax), %rdi
leaq 0x2769(%rip), %rsi      # 0x93c1
leaq 0x3d6c(%rip), %rdx      # 0xa9cb
movl $0x68, %ecx
leaq 0x3dd6(%rip), %r8       # 0xaa41
movb $0x0, %al
callq 0x1120
leaq 0x2782(%rip), %rdi      # 0x93fb
leaq 0x3d4b(%rip), %rsi      # 0xa9cb
movl $0x68, %edx
leaq 0x3d48(%rip), %rcx      # 0xa9d4
callq 0x10e0
jmp 0x6c93
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x8(%rax)
movslq -0x1c(%rbp), %rcx
leaq 0x1af79(%rip), %rax     # 0x21c40
movq (%rax,%rcx,8), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movl 0x7547(%rip), %ecx      # 0xe220
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x1c(%rbp), %edx
movl 0x753b(%rip), %eax      # 0xe224
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x7530(%rip)      # 0xe224
movslq %eax, %rcx
leaq 0x76c2(%rip), %rax      # 0xe3c0
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rdx
movslq -0x1c(%rbp), %rcx
leaq 0x1af30(%rip), %rax     # 0x21c40
movq %rdx, (%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)