// File: /workspace/github_cpp_makefile_star2_O2/navrajsaini[P]PL_Compiler_design_project/parser.cpp
// Function: Parse::VarDefB()
void Parse::VarDefB()//variable definition for multiple itirations
{where="VDB";check();
   if(LHS=="id")
   {
      valLength[valLenPtr]++;
      VarList();
   }else if(LHS=="array")
   {
      eKind = ARR;
      match();
      
      VarList();
      if(LHS=="[")
      { 
	 match();
	 bool sVal = 1;
	 if(LHS=="num")
	 {
	    checkVal=ln[tokeNum][2];	    
	 }else if(LHS=="id")
	 {	   
	    index2 = ln[tokeNum][1];
	    ent = bTable.find_all_level(index2);
	    bool lVal = bTable.search(index2);
	    sVal=lVal;
	    //cout<<bTable.inScope;
	    en=1;
	 }	 
	 Const();
	 if(!sVal)
	 {
	    scopeError("Error, Variable not declared in scope");    
	 }
	 bTable.inScope = 0;
	 if(en=1)
	 {
	    for(int i = 0; i < listDepth; i++)
	    {
	       size[i] = ent.value;
	    }
	 }else
	 {
	    for(int i = 0; i<listDepth;i++)
	    {
	       size[i] = checkVal;
	    }
	 }
	 size[0] = checkVal;
	 int tmp = checkVal;
	 valLength[valLenPtr] = valLength[valLenPtr] + checkVal;//
	 if(!checkDefList())
	    scopeError("Ambiguous definition of array");
	 levelOfCurrentBlock[currentLevel] = levelOfCurrentBlock[currentLevel] + (tmp - 1);
	 if(LHS=="]")
	 {
	    match();
	 }else
	    errorReport();
      }
   }else
   {
      errorReport();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
addq $0x5098, %rdi           # imm = 0x5098
leaq 0x4d21(%rip), %rsi      # 0xf705
callq 0x2310
movq %rbx, %rdi
callq 0x97e2
leaq 0x5050(%rbx), %r14
leaq 0x497b(%rip), %rsi      # 0xf37a
movq %r14, %rdi
callq 0x7926
testb %al, %al
je 0xaa2d
movslq 0x71ec(%rbx), %rax
incl 0x71c4(%rbx,%rax,4)
movq %rbx, %rdi
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xac60
leaq 0x4d13(%rip), %rsi      # 0xf747
movq %r14, %rdi
callq 0x7926
testb %al, %al
je 0xaaa9
movl $0x2, 0x4dd8(%rbx)
movq %rbx, %rdi
callq 0x9522
movq %rbx, %rdi
callq 0xac60
leaq 0x4bf8(%rip), %rsi      # 0xf659
movq %r14, %rdi
callq 0x7926
testb %al, %al
je 0xac2f
movq %rbx, %rdi
callq 0x9522
leaq 0x4844(%rip), %rsi      # 0xf2c4
movq %r14, %rdi
callq 0x7926
testb %al, %al
je 0xaabd
movslq 0x2028(%rbx), %rax
imulq $0xc, %rax, %rax
movl 0x2038(%rbx,%rax), %eax
movl %eax, 0x4de4(%rbx)
jmp 0xab6b
movq %rbx, %rdi
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9672
leaq 0x48b6(%rip), %rsi      # 0xf37a
movq %r14, %rdi
callq 0x7926
testb %al, %al
je 0xab6b
movslq 0x2028(%rbx), %rax
imulq $0xc, %rax, %rax
movl 0x2034(%rbx,%rax), %edx
movl %edx, 0x4de0(%rbx)
leaq 0x4c38(%rbx), %r15
leaq -0x7c(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xcb82
movups (%r12), %xmm0
movups 0xc(%r12), %xmm1
movups %xmm1, 0x4e1c(%rbx)
movups %xmm0, 0x4e10(%rbx)
movl 0x4de0(%rbx), %esi
movq %r15, %rdi
callq 0xc7d2
movl %eax, %r15d
movb $0x1, 0x4dd1(%rbx)
movq %rbx, %rdi
callq 0xa7d6
testb %r15b, %r15b
jne 0xab73
leaq 0x4bc2(%rip), %rsi      # 0xf709
leaq -0x60(%rbp), %rdi
leaq -0x7c(%rbp), %rdx
callq 0x20a0
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x9890
leaq -0x60(%rbp), %rdi
callq 0x20d0
jmp 0xab73
movq %rbx, %rdi
callq 0xa7d6
movb $0x0, 0x4c38(%rbx)
movb $0x1, 0x4dd1(%rbx)
movslq 0x4d88(%rbx), %rax
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0xaba1
movl 0x4e20(%rbx), %edx
movl %edx, 0x4de8(%rbx,%rcx,4)
incq %rcx
jmp 0xab8a
movl 0x4de4(%rbx), %r15d
movl %r15d, 0x4de8(%rbx)
movslq 0x71ec(%rbx), %rax
addl %r15d, 0x71c4(%rbx,%rax,4)
movq %rbx, %rdi
callq 0x9a7e
testb %al, %al
jne 0xabf3
leaq 0x4b5e(%rip), %rsi      # 0xf72f
leaq -0x40(%rbp), %rdi
leaq -0x7c(%rbp), %rdx
callq 0x20a0
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x9890
leaq -0x40(%rbp), %rdi
callq 0x20d0
movslq 0x7224(%rbx), %rax
movl 0x71fc(%rbx,%rax,4), %ecx
addl %r15d, %ecx
decl %ecx
movl %ecx, 0x71fc(%rbx,%rax,4)
leaq 0x475e(%rip), %rsi      # 0xf372
movq %r14, %rdi
callq 0x7926
movq %rbx, %rdi
testb %al, %al
je 0xac2a
callq 0x9522
jmp 0xac2f
callq 0x9672
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0xac4e
jmp 0xac55
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20d0
jmp 0xac58
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22e0