// File: /workspace/github_cpp_makefile_star2_O1/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 0x2529(%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 0x4a1c
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %r15
leaq 0x1d84(%rip), %rsi      # 0xb898
movl $0xa, %edx
movq %rax, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
leaq -0x60(%rbp), %rdi
callq 0x4a56
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 0x9b81
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x30(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x9b9b
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movl 0x10(%r14), %eax
cmpl $0x20, %eax
je 0x9c6d
cmpl $0x23, %eax
jne 0x9d2a
leaq -0x40(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x2474(%rip), %rsi      # 0xc033
leaq 0x24a6(%rip), %rdx      # 0xc06c
callq 0x4c4c
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x5778
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x9bec
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
leaq 0x247a(%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 0x4a1c
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 0x9c62
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x1, %r15d
jmp 0x9dea
leaq 0x2428(%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 0x23ba(%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 0x4a1c
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 0x9d22
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
xorl %r15d, %r15d
jmp 0x9dea
leaq 0x2379(%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 0x6bfc
movl %eax, %r15d
leaq 0x22f2(%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 0x4a1c
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 0x9dea
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 0x9e07
movq %rax, %rbx
jmp 0x9e4f
jmp 0x9e15
jmp 0x9e07
jmp 0x9e07
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
jne 0x9e43
jmp 0x9e4f
movq %rax, %rbx
jmp 0x9e36
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9e36
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9e4f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2340
nop