// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
addq $0x5098, %rdi           # imm = 0x5098
movq 0x50a0(%rbx), %rdx
leaq 0x5a84(%rip), %rcx      # 0x13715
movl $0x3, %r8d
xorl %esi, %esi
callq 0x22b0
movq %rbx, %rdi
callq 0xc3e8
leaq 0x5050(%rbx), %r14
leaq 0x554b(%rip), %rsi      # 0x131ff
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0xdce9
leaq 0x5a90(%rip), %rsi      # 0x13757
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0xdd0d
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc18c
movslq 0x71ec(%rbx), %rax
incl 0x71c4(%rbx,%rax,4)
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdfb6
movl $0x2, 0x4dd8(%rbx)
leaq 0x5070(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
movslq 0x2028(%rbx), %rsi
shlq $0x5, %rsi
addq %rbx, %rsi
movq %r14, %rdi
callq 0x2100
incl 0x2028(%rbx)
movq %rbx, %rdi
callq 0xdfb6
leaq 0x5915(%rip), %rsi      # 0x13669
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0xdf7b
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
movslq 0x2028(%rbx), %rsi
shlq $0x5, %rsi
addq %rbx, %rsi
movq %r14, %rdi
callq 0x2100
incl 0x2028(%rbx)
leaq 0x552e(%rip), %rsi      # 0x132c0
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0xde64
leaq 0x5456(%rip), %rsi      # 0x131ff
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0xde7c
movslq 0x2028(%rbx), %rax
leaq (%rax,%rax,2), %rax
movl 0x2034(%rbx,%rax,4), %edx
movl %edx, 0x4de0(%rbx)
leaq 0x4c38(%rbx), %r12
leaq -0x84(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x10a12
movups (%r13), %xmm0
movups 0xc(%r13), %xmm1
movups %xmm1, 0x4e1c(%rbx)
movups %xmm0, 0x4e10(%rbx)
movl 0x4de0(%rbx), %esi
movq %r12, %rdi
callq 0x104e8
movl %eax, %r12d
movb $0x1, 0x4dd1(%rbx)
movq %rbx, %rdi
callq 0xda14
testb %r12b, %r12b
jne 0xde84
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x58e3(%rip), %rsi      # 0x13719
leaq 0x5901(%rip), %rdx      # 0x1373e
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x42ea
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc50a
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0xde84
callq 0x21b0
jmp 0xde84
movslq 0x2028(%rbx), %rax
leaq (%rax,%rax,2), %rax
movl 0x2038(%rbx,%rax,4), %eax
movl %eax, 0x4de4(%rbx)
movq %rbx, %rdi
callq 0xda14
movb $0x0, 0x4c38(%rbx)
movb $0x1, 0x4dd1(%rbx)
movslq 0x4d88(%rbx), %rax
testq %rax, %rax
jle 0xdeb5
movl 0x4e20(%rbx), %ecx
xorl %edx, %edx
movl %ecx, 0x4de8(%rbx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0xdea6
movl 0x4de4(%rbx), %r13d
movl %r13d, 0x4de8(%rbx)
movslq 0x71ec(%rbx), %rax
addl %r13d, 0x71c4(%rbx,%rax,4)
movq %rbx, %rdi
callq 0xc742
testb %al, %al
jne 0xdf1d
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x5852(%rip), %rsi      # 0x1373f
leaq 0x5868(%rip), %rdx      # 0x1375c
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x42ea
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc50a
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xdf1d
callq 0x21b0
movslq 0x7224(%rbx), %rax
movl 0x71fc(%rbx,%rax,4), %ecx
addl %r13d, %ecx
decl %ecx
movl %ecx, 0x71fc(%rbx,%rax,4)
leaq 0x543d(%rip), %rsi      # 0x1337b
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0xdf54
movq %rbx, %rdi
callq 0xc18c
jmp 0xdf7b
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
movslq 0x2028(%rbx), %rsi
shlq $0x5, %rsi
addq %rbx, %rsi
movq %r14, %rdi
callq 0x2100
incl 0x2028(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
jne 0xdfa8
jmp 0xdfad
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xdfad
callq 0x21b0
movq %rbx, %rdi
callq 0x2310
nop