// File: /workspace/github_cpp_makefile_star2_O3/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 0x424c
movq %r13, %rdi
movq %rbx, %rsi
callq 0x95d2
movl %eax, %r14d
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x98ee
callq 0x21b0
cmpl $-0x1, %r14d
jne 0x9ad7
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x133, 0x18(%r13)      # imm = 0x133
je 0x9ad7
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 0x424c
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 0x996f
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 0x4388
leaq 0x996b(%rip), %rsi      # 0x13301
movq %r15, %rdi
callq 0x2080
movl %eax, %ebx
movq (%r15), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x99b1
callq 0x21b0
testl %ebx, %ebx
je 0x9a61
movq %r13, %r15
decl %r14d
addq $-0x30, %r12
leaq -0x60(%rbp), %r13
movq (%r15), %rax
movl 0x58(%rax,%r12), %esi
movq %r13, %rdi
callq 0x4388
movq %r13, %rdi
leaq 0x9920(%rip), %rsi      # 0x13301
callq 0x2080
movl %eax, %ebx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x99fa
callq 0x21b0
incl %r14d
addq $0x30, %r12
testl %ebx, %ebx
jne 0x99c7
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 0x424c
leaq -0x60(%rbp), %rdi
movl $0x101, %esi            # imm = 0x101
movl %r14d, %edx
movq %rbx, %rcx
callq 0x9b60
movq -0x80(%rbp), %rdi
cmpq %r13, %rdi
je 0x9a49
callq 0x21b0
addq (%r15), %r12
leaq -0x60(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x9bf2
incl 0x18(%r15)
jmp 0x9ac5
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 0x424c
leaq -0x60(%rbp), %rdi
movl $0x101, %esi            # imm = 0x101
movl %r14d, %edx
movq %rbx, %rcx
callq 0x9b60
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x9aae
callq 0x21b0
addq (%r13), %r12
leaq -0x60(%rbp), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x9bf2
incl 0x18(%r13)
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ad7
callq 0x21b0
movl %r14d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9afa
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0x9b24
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x9b29
jmp 0x9b2e
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r13, %rdi
jne 0x9b29
jmp 0x9b2e
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x9b2e
callq 0x21b0
movq %rbx, %rdi
callq 0x2310