// File: Blaze2305[P]Compiler-Design-2021-Assignment/src/Parser/Parser.cpp
// Function: Parser::parseStmt()
void Parser::parseStmt(){
	tabNum+=1;
	printParseEnters(tabNum,tabChar,"parseStmt");
	if(checkToken(Identifier)){
		parseAssignementStmt();
	}else if(checkToken(Read)){
		parseReadStmt();
	}else if(checkToken(Print)){
		parsePrintStmt();
	}else if(checkToken(If)){
		parseIfStmt();
	}else if(checkToken(While)){
		parseWhileStmt();
	}else{
		std::ostringstream out;
		out << "Syntax error on line ";
		out << currentToken.lineNumber;
		throw  std::runtime_error(out.str());
	}
	tabNum-=1;
	printParseExits(tabNum,tabChar,"parseStmt");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x220(%rbp)
movl 0x1355c(%rip), %eax     # 0x222cc
incl %eax
movl %eax, 0x13554(%rip)     # 0x222cc
movl 0x1354e(%rip), %eax     # 0x222cc
movl %eax, -0x218(%rbp)
movb 0x1353e(%rip), %al      # 0x222c8
movb %al, -0x211(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x3510
movq -0x210(%rbp), %rdx
leaq 0xa553(%rip), %rsi      # 0x19301
leaq -0x28(%rbp), %rdi
callq 0xb640
jmp 0xedb9
movl -0x218(%rbp), %edi
movb -0x211(%rbp), %al
movsbl %al, %esi
leaq -0x28(%rbp), %rdx
callq 0x15530
jmp 0xedd3
leaq -0x28(%rbp), %rdi
callq 0x3558
leaq -0x29(%rbp), %rdi
callq 0x3300
movq -0x220(%rbp), %rdi
xorl %esi, %esi
callq 0xdb20
testb $0x1, %al
jne 0xedf9
jmp 0xee3b
movq -0x220(%rbp), %rdi
callq 0xf2b0
jmp 0xefe9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xee2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3558
leaq -0x29(%rbp), %rdi
callq 0x3300
jmp 0xf0ae
movq -0x220(%rbp), %rdi
movl $0x13, %esi
callq 0xdb20
testb $0x1, %al
jne 0xee52
jmp 0xee63
movq -0x220(%rbp), %rdi
callq 0xf440
jmp 0xefe7
movq -0x220(%rbp), %rdi
movl $0x14, %esi
callq 0xdb20
testb $0x1, %al
jne 0xee7a
jmp 0xee8b
movq -0x220(%rbp), %rdi
callq 0xf5c0
jmp 0xefe5
movq -0x220(%rbp), %rdi
movl $0x10, %esi
callq 0xdb20
testb $0x1, %al
jne 0xeea2
jmp 0xeeb3
movq -0x220(%rbp), %rdi
callq 0xf740
jmp 0xefe3
movq -0x220(%rbp), %rdi
movl $0x12, %esi
callq 0xdb20
testb $0x1, %al
jne 0xeeca
jmp 0xeedb
movq -0x220(%rbp), %rdi
callq 0xf8f0
jmp 0xefe1
leaq -0x1b8(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x33e0
movq -0x228(%rbp), %rdi
leaq 0xa2f9(%rip), %rsi      # 0x191f5
callq 0x3290
jmp 0xef03
movq -0x220(%rbp), %rax
movl 0x28(%rax), %esi
leaq -0x1b8(%rbp), %rdi
callq 0x34e0
jmp 0xef1b
movb $0x1, -0x1d9(%rbp)
movl $0x10, %edi
callq 0x3150
movq %rax, -0x230(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x32c0
jmp 0xef48
movq -0x230(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x3470
jmp 0xef5d
movq -0x230(%rbp), %rdi
movb $0x0, -0x1d9(%rbp)
movq 0x1307e(%rip), %rsi     # 0x21ff0
movq 0x13047(%rip), %rdx     # 0x21fc0
callq 0x34d0
jmp 0xf0b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xefd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xefb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3558
testb $0x1, -0x1d9(%rbp)
jne 0xefc2
jmp 0xefce
movq -0x230(%rbp), %rdi
callq 0x3200
jmp 0xefd0
leaq -0x1b8(%rbp), %rdi
callq 0x30c0
jmp 0xf0ae
jmp 0xefe3
jmp 0xefe5
jmp 0xefe7
jmp 0xefe9
movl 0x132dd(%rip), %eax     # 0x222cc
decl %eax
movl %eax, 0x132d5(%rip)     # 0x222cc
movl 0x132cf(%rip), %eax     # 0x222cc
movl %eax, -0x240(%rbp)
movb 0x132bf(%rip), %al      # 0x222c8
movb %al, -0x239(%rbp)
leaq -0x201(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x3510
movq -0x238(%rbp), %rdx
leaq 0xa2d1(%rip), %rsi      # 0x19301
leaq -0x200(%rbp), %rdi
callq 0xb640
jmp 0xf03e
movl -0x240(%rbp), %edi
movb -0x239(%rbp), %al
movsbl %al, %esi
leaq -0x200(%rbp), %rdx
callq 0x15550
jmp 0xf05b
leaq -0x200(%rbp), %rdi
callq 0x3558
leaq -0x201(%rbp), %rdi
callq 0x3300
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xf0a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x3558
leaq -0x201(%rbp), %rdi
callq 0x3300
movq -0x38(%rbp), %rdi
callq 0x3500
nopw (%rax,%rax)