// File: /workspace/github_cpp_makefile_star2_O1/navrajsaini[P]PL_Compiler_design_project/symboltable.cpp
// Function: Symtable::insertNum(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Symtable::insertNum(string s)
{
   int hashval;
   int val = Symtable::search(s);//check if the word is in the table already
   //if not and the table is not full insert it based on if the word is a
   //keyword or special char or a user input ID
   if (val == -1 && Symtable::full() != true)
   {
      hashval = hashfn(s);
      //if and else if statements to create the token for the
      //keywords or the special chars which are then inserted.
      if (spellS (htable[hashval].getSymbol()) == "NONAME")//if the location is empty
      {
	 Token NUM(Symbol::NUM, hashval, s);
	 htable.insert (htable.begin()+hashval, NUM);
	 occupied++;
	 return hashval;
      }
      else//increment the hashval and insert the token into a free loc
      {
	 while ( spellS(htable[hashval].getSymbol()) != "NONAME")
	    //keep looking for a free location
	 {
	    hashval += 1;
	 }
	 Token NUM(Symbol::NUM, hashval, s);
	 htable.insert (htable.begin()+hashval, NUM);
	 occupied++;
	 return hashval;
      }
   }
   else if (val != -1)
   {
      return val;
   }
   else
      return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r12
movq %rdi, %r13
leaq -0xb0(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
callq 0x4242
movq %r13, %rdi
movq %rbx, %rsi
callq 0x95d0
movl %eax, %r14d
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x9906
callq 0x21b0
cmpl $-0x1, %r14d
jne 0x9aef
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x133, 0x18(%r13)      # imm = 0x133
je 0x9aef
leaq -0xd0(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r12), %rsi
movq %r12, -0x30(%rbp)
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0xe0(%rbp), %rbx
movq %rbx, %rdi
callq 0x4242
imull $0x137, 0x18(%r13), %eax # imm = 0x137
movslq %eax, %r14
imulq $-0x29d47f29, %r14, %rax # imm = 0xD62B80D7
shrq $0x20, %rax
addl %r14d, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x8, %eax
addl %ecx, %eax
imull $0x132, %eax, %eax      # imm = 0x132
subl %eax, %r14d
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x9987
callq 0x21b0
movslq %r14d, %rax
movq (%r13), %rcx
leaq (%rax,%rax,2), %r12
shlq $0x4, %r12
movl 0x28(%rcx,%r12), %esi
leaq -0x60(%rbp), %r15
movq %r15, %rdi
callq 0x4378
leaq 0x9953(%rip), %rsi      # 0x13301
movq %r15, %rdi
callq 0x2080
movl %eax, %ebx
movq (%r15), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x99c9
callq 0x21b0
testl %ebx, %ebx
je 0x9a79
movq %r13, %r15
addq $-0x30, %r12
decl %r14d
leaq -0x60(%rbp), %r13
movq (%r15), %rax
movl 0x58(%rax,%r12), %esi
movq %r13, %rdi
callq 0x4378
movq %r13, %rdi
leaq 0x9908(%rip), %rsi      # 0x13301
callq 0x2080
movl %eax, %ebx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x9a12
callq 0x21b0
addq $0x30, %r12
incl %r14d
testl %ebx, %ebx
jne 0x99df
leaq -0x70(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
callq 0x4242
leaq -0x60(%rbp), %rdi
movl $0x101, %esi            # imm = 0x101
movl %r14d, %edx
movq %rbx, %rcx
callq 0x9b78
movq -0x80(%rbp), %rdi
cmpq %r13, %rdi
je 0x9a61
callq 0x21b0
addq (%r15), %r12
leaq -0x60(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x9c0a
incl 0x18(%r15)
jmp 0x9add
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x4242
leaq -0x60(%rbp), %rdi
movl $0x101, %esi            # imm = 0x101
movl %r14d, %edx
movq %rbx, %rcx
callq 0x9b78
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x9ac6
callq 0x21b0
addq (%r13), %r12
leaq -0x60(%rbp), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x9c0a
incl 0x18(%r13)
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9aef
callq 0x21b0
movl %r14d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9b12
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0x9b3c
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x9b41
jmp 0x9b46
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r13, %rdi
jne 0x9b41
jmp 0x9b46
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x9b46
callq 0x21b0
movq %rbx, %rdi
callq 0x2310