// File: /workspace/github_cpp_makefile_star2_O1/navrajsaini[P]PL_Compiler_design_project/parser.cpp
// Function: Parse::Program()
void Parse::Program()
{where="P";check();
   if(LHS=="begin")     
   {      
      //create a new block for scope/type
      if(!bTable.newBlock())
	 scopeError("Exceded Block limit");
      //---
      varLabel = newLabel();
      startLabel = newLabel();
      gen.emit3("PROG", varLabel, startLabel);
      //***   
      //call Block    
      Block();     
      //pop block
      printPop();
      bTable.endBlock();
      //---
      if(LHS==".")
      {
	 where="P";check();
	 cout<<"YOU SUCCESSFULY PARSED, CONGRATS!!!!"<<endl;
	 valLength[valLenPtr] = 0;
	 
      }else
	 errorReport();
      //
      gen.emit1("ENDPROG");     
      //***

   }else
      errorReport();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x5098(%rdi), %r14
movq 0x50a0(%rdi), %rdx
leaq 0x69fb(%rip), %rcx      # 0x136bc
movl $0x1, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x22b0
movq %rbx, %rdi
callq 0xc41a
leaq 0x5050(%rbx), %r12
leaq 0x6641(%rip), %rsi      # 0x13328
movq %r12, %rdi
callq 0x2080
testl %eax, %eax
je 0xcd09
movq %rbx, %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc1be
leaq 0x4c38(%rbx), %r13
movq %r13, %rdi
callq 0x10618
testb %al, %al
jne 0xcd5b
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x6940(%rip), %rsi      # 0x1366b
leaq 0x694c(%rip), %rdx      # 0x1367e
leaq -0x78(%rbp), %r15
movq %r15, %rdi
callq 0x42dc
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc53c
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0xcd5b
callq 0x21b0
movq %r13, -0x30(%rbp)
movl 0x71b0(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x71bc(%rbx)
addl $0x2, %eax
movl %eax, 0x71b0(%rbx)
movl %eax, 0x71c0(%rbx)
leaq 0x50c0(%rbx), %r13
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x6914(%rip), %rsi      # 0x136a7
leaq 0x6911(%rip), %rdx      # 0x136ab
leaq -0x58(%rbp), %r15
movq %r15, %rdi
callq 0x42dc
movl 0x71bc(%rbx), %edx
movl 0x71c0(%rbx), %ecx
movq %r13, -0x38(%rbp)
movq %r13, %rdi
movq %r15, %rsi
callq 0xabb8
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0xcdd3
callq 0x21b0
movq %rbx, %rdi
callq 0xcf32
cmpb $0x1, 0x202d(%rbx)
movq -0x30(%rbp), %r15
jne 0xcdf0
movq %r15, %rdi
callq 0x10688
movq %r15, %rdi
callq 0x10638
leaq 0x6c10(%rip), %rsi      # 0x13a0f
movq %r12, %rdi
callq 0x2080
testl %eax, %eax
je 0xce15
movq %rbx, %rdi
callq 0xc1be
jmp 0xce8f
movq 0x50a0(%rbx), %rdx
leaq 0x6899(%rip), %rcx      # 0x136bc
movl $0x1, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x22b0
movq %rbx, %rdi
callq 0xc41a
movq 0xc186(%rip), %r14      # 0x18fc8
leaq 0x6836(%rip), %rsi      # 0x1367f
movl $0x24, %edx
movq %r14, %rdi
callq 0x2210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movslq 0x71ec(%rbx), %rax
movl $0x0, 0x71c4(%rbx,%rax,4)
leaq -0x88(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x6803(%rip), %rsi      # 0x136a4
leaq 0x6803(%rip), %rdx      # 0x136ab
leaq -0x98(%rbp), %rbx
movq %rbx, %rdi
callq 0x42dc
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0xaa88
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0xced4
callq 0x21b0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
jmp 0xcf0c
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
jne 0xcf11
jmp 0xcf16
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0xcf16
callq 0x21b0
movq %rbx, %rdi
callq 0x2310