// File: 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
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x98(%rbp)
addq $0x5098, %rdi           # imm = 0x5098
leaq 0x9cd7(%rip), %rsi      # 0x1f80f
callq 0x2280
movq -0x98(%rbp), %rdi
callq 0x15310
movq -0x98(%rbp), %rdi
addq $0x5050, %rdi           # imm = 0x5050
leaq 0x97ce(%rip), %rsi      # 0x1f32c
callq 0x10ea0
testb $0x1, %al
jne 0x15b6c
jmp 0x15e35
movq -0x98(%rbp), %rdi
addq $0x4c38, %rdi           # imm = 0x4C38
callq 0x1a430
testb $0x1, %al
jne 0x15c07
leaq -0x29(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x2350
movq -0xa0(%rbp), %rdx
leaq 0x9c19(%rip), %rsi      # 0x1f7be
leaq -0x28(%rbp), %rdi
callq 0x2290
jmp 0x15bb0
movq -0x98(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x15400
jmp 0x15bc2
leaq -0x28(%rbp), %rdi
callq 0x2130
leaq -0x29(%rbp), %rdi
callq 0x21e0
jmp 0x15c07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15bf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2130
leaq -0x29(%rbp), %rdi
callq 0x21e0
jmp 0x15e4a
movq -0x98(%rbp), %rdi
callq 0x15e60
movq -0x98(%rbp), %rdi
movl %eax, 0x71bc(%rdi)
callq 0x15e60
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x71c0(%rax)
addq $0x50c0, %rax           # imm = 0x50C0
movq %rax, -0xb0(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x2350
movq -0xa8(%rbp), %rdx
leaq 0x9b9b(%rip), %rsi      # 0x1f7fa
leaq -0x60(%rbp), %rdi
callq 0x2290
jmp 0x15c6a
movq -0xb0(%rbp), %rdi
movq -0x98(%rbp), %rax
movl 0x71bc(%rax), %edx
movl 0x71c0(%rax), %ecx
leaq -0x60(%rbp), %rsi
callq 0x13010
jmp 0x15c8f
leaq -0x60(%rbp), %rdi
callq 0x2130
leaq -0x61(%rbp), %rdi
callq 0x21e0
movq -0x98(%rbp), %rdi
callq 0x15e90
movq -0x98(%rbp), %rdi
callq 0x15ad0
movq -0x98(%rbp), %rdi
addq $0x4c38, %rdi           # imm = 0x4C38
callq 0x1a480
movq -0x98(%rbp), %rdi
addq $0x5050, %rdi           # imm = 0x5050
leaq 0x9e82(%rip), %rsi      # 0x1fb63
callq 0x10ea0
testb $0x1, %al
jne 0x15cef
jmp 0x15d83
movq -0x98(%rbp), %rdi
addq $0x5098, %rdi           # imm = 0x5098
leaq 0x9b0b(%rip), %rsi      # 0x1f80f
callq 0x2280
movq -0x98(%rbp), %rdi
callq 0x15310
movq 0x112ac(%rip), %rdi     # 0x26fc8
leaq 0x9aaf(%rip), %rsi      # 0x1f7d2
callq 0x21b0
movq %rax, %rdi
movq 0x11286(%rip), %rsi     # 0x26fb8
callq 0x21d0
movq -0x98(%rbp), %rax
movslq 0x71ec(%rax), %rcx
movl $0x0, 0x71c4(%rax,%rcx,4)
jmp 0x15d8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15d75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2130
leaq -0x61(%rbp), %rdi
callq 0x21e0
jmp 0x15e4a
movq -0x98(%rbp), %rdi
callq 0x15110
movq -0x98(%rbp), %rax
addq $0x50c0, %rax           # imm = 0x50C0
movq %rax, -0xc0(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x2350
movq -0xb8(%rbp), %rdx
leaq 0x9a33(%rip), %rsi      # 0x1f7f7
leaq -0x88(%rbp), %rdi
callq 0x2290
jmp 0x15dd2
movq -0xc0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x12ef0
jmp 0x15de7
leaq -0x88(%rbp), %rdi
callq 0x2130
leaq -0x89(%rbp), %rdi
callq 0x21e0
jmp 0x15e41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x15e27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x2130
leaq -0x89(%rbp), %rdi
callq 0x21e0
jmp 0x15e4a
movq -0x98(%rbp), %rdi
callq 0x15110
addq $0xc0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2340
nopw %cs:(%rax,%rax)