// File: /workspace/github_cpp_makefile_star2_O3/ssubrandon[P]460Project2/SyntacticalAnalyzer.cpp
// Function: SyntacticalAnalyzer::else_part()
int SyntacticalAnalyzer::else_part(){
  //This function deals with the else part rules (18-19) and will check for syntactical correctness,
  //this function will then, depending on the token seen, send the program to stmt ot return.
	ruleFile << "Entering else_part function; Current token is: " << lex ->GetTokenName(token) << ", lexeme: " << lex->GetLexeme() << endl;

	int errors = 0;
	if (token == EOF_T) {
		errors++;
		ReportError(string("Reached an EOF_T but expected something else in else part"));
		ruleFile << "Exiting else_part function; current token is: " << lex ->GetTokenName (token) << endl;
		return errors;
	} // end EOF if 
	if (token == RPAREN_T) {
		ruleFile << "Using Rule 19" << endl;
		ruleFile << "Exiting else_part function; current token is: " << lex ->GetTokenName (token) << endl;
		return errors;
	} // end Right paren if  
	ruleFile << "Using Rule 18" << endl;
	errors += stmt();
	ruleFile << "Exiting else_part function; current token is: " << lex ->GetTokenName (token) << endl;

	return errors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
leaq 0x420(%rdi), %rbx
leaq 0x25ad(%rip), %rsi      # 0xc003
movl $0x2f, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x499a
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %r15
leaq 0x1e08(%rip), %rsi      # 0xb898
movl $0xa, %edx
movq %rax, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
leaq -0x60(%rbp), %rdi
callq 0x49d4
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %r15, %rdi
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9afd
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x30(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x9b17
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movl 0x10(%r14), %eax
cmpl $0x20, %eax
je 0x9be9
cmpl $0x23, %eax
jne 0x9ca6
leaq -0x40(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x24f8(%rip), %rsi      # 0xc033
leaq 0x252a(%rip), %rdx      # 0xc06c
callq 0x4bce
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x56f4
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x9b68
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
leaq 0x24fe(%rip), %rsi      # 0xc06d
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x499a
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x9bde
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x1, %r15d
jmp 0x9d66
leaq 0x24ac(%rip), %rsi      # 0xc09c
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x420(%r14), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq 0x243e(%rip), %rsi      # 0xc06d
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x499a
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x9c9e
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
xorl %r15d, %r15d
jmp 0x9d66
leaq 0x23fd(%rip), %rsi      # 0xc0aa
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x420(%r14), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x6b78
movl %eax, %r15d
leaq 0x2376(%rip), %rsi      # 0xc06d
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x499a
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x9d66
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movl %r15d, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9d83
movq %rax, %rbx
jmp 0x9dcb
jmp 0x9d91
jmp 0x9d83
jmp 0x9d83
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
jne 0x9dbf
jmp 0x9dcb
movq %rax, %rbx
jmp 0x9db2
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9db2
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9dcb
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2340
nop