// File: navrajsaini[P]PL_Compiler_design_project/BlockTable.cpp
// Function: BlockTable::find(int, bool&)
TableEntry BlockTable::find (int index, bool &error)
{
   TableEntry a;
   for (int i = 0; i < table[blockLevel].size(); i++)
   {
      if (table[blockLevel][i].idindex == index)
      {
	 error = true;
	 inScope = true;
	 a.idindex = table[blockLevel][i].idindex;
	 a.kind = table[blockLevel][i].kind;
	 a.type = table[blockLevel][i].type;
	 a.size = table[blockLevel][i].size;
	 a.value = table[blockLevel][i].value;
	 a.disp = table[blockLevel][i].disp;
	 a.procLabel = table[blockLevel][i].procLabel;
	 return a;
      }
   }
   error = false;
   inScope = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x1acd0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x1a418
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x1a408
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x1, (%rcx)
movb $0x1, (%rax)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl (%rdx), %edx
movl %edx, (%rcx)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl 0x4(%rdx), %edx
movl %edx, 0x4(%rcx)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl 0x8(%rdx), %edx
movl %edx, 0x8(%rcx)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl 0xc(%rdx), %edx
movl %edx, 0xc(%rcx)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl 0x10(%rdx), %edx
movl %edx, 0x10(%rcx)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl 0x14(%rdx), %edx
movl %edx, 0x14(%rcx)
movq %rax, %rdi
addq $0x8, %rdi
movslq 0xf8(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x1ad00
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
movl 0x18(%rdx), %edx
movl %edx, 0x18(%rcx)
addq $0x40, %rsp
popq %rbp
retq
jmp 0x1a40a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1a24a
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rcx)
movb $0x0, (%rax)
ud2
nopl (%rax,%rax)