// File: /workspace/github_cpp_makefile_star2_O2/ssubrandon[P]460Project2/SyntacticalAnalyzer.cpp
// Function: SyntacticalAnalyzer::stmt_pair_body()
int SyntacticalAnalyzer::stmt_pair_body(){
  //This function deals with the stmt_pair_body rules (22-23) and will check for syntactical correctness,
  //this function will then, depending on the token seen, send the program to stmt, stmt, and stmt_par, or
  // just stmt.
	ruleFile << "Entering stmt_pair_body function; Current token is: " << lex ->GetTokenName(token) << ", lexeme: " << lex->GetLexeme() << endl;

	int errors = 0;
	if (token == ELSE_T){
		//rule 23
	   ruleFile << "Using Rule 23" << endl;
		token = lex->GetToken();
		errors += stmt();
		if (token != RPAREN_T){
			errors++;
			ReportError(string("expected a RPAREN_T in stmt_pair_body, but found  " + lex->GetTokenName(token)));
		}
		else
		   token = lex->GetToken();
	}

	if(token == NUMLIT_T || token == STRLIT_T || token == SQUOTE_T ||token == IDENT_T || token== LPAREN_T) {
		//rule 22
	   ruleFile << "Using Rule 22" << endl;
		errors += stmt();
		errors += stmt();
		if (token != RPAREN_T){
			errors++;
			ReportError(string("expected a RPAREN_T in stmt_pair_body, but found  " + lex->GetTokenName(token)));
		}
		token = lex->GetToken();
		errors += stmt_pair();
	}

	ruleFile << "Exiting Stmt_Pair_Body function; current token is: " << lex->GetTokenName(token) << endl;

	return errors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x420(%rdi), %r14
leaq 0x1d8a(%rip), %rsi      # 0x91b8
movq %r14, %rdi
callq 0x21f0
movq %rax, %r15
movq 0x8(%rbx), %rsi
movl 0x10(%rbx), %edx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x3df8
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
leaq 0x1492(%rip), %rsi      # 0x88f0
movq %rax, %rdi
callq 0x21f0
movq %rax, %r15
movq 0x8(%rbx), %rsi
leaq -0x68(%rbp), %rdi
callq 0x3e22
leaq -0x68(%rbp), %rsi
movq %r15, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2130
leaq -0x68(%rbp), %rdi
callq 0x2398
leaq -0x48(%rbp), %rdi
callq 0x2398
movl 0x10(%rbx), %eax
xorl %r15d, %r15d
cmpl $0x15, %eax
jne 0x7536
leaq 0x1d3b(%rip), %rsi      # 0x91ed
movq %r14, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x53fe
movl %eax, %r15d
movl 0x10(%rbx), %edx
cmpl $0x20, %edx
jne 0x74ef
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
jmp 0x7536
movq 0x8(%rbx), %rsi
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x3df8
leaq 0x1cf5(%rip), %rsi      # 0x91fb
leaq -0x48(%rbp), %rdi
movq %r12, %rdx
callq 0x76ba
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x48e6
incl %r15d
leaq -0x48(%rbp), %rdi
callq 0x2398
leaq -0x68(%rbp), %rdi
callq 0x2398
movl 0x10(%rbx), %eax
cmpl $0x21, %eax
ja 0x75ee
movl %eax, %eax
movabsq $0x28000000e, %rcx      # imm = 0x28000000E
btq %rax, %rcx
jae 0x75ee
leaq 0x1cd2(%rip), %rsi      # 0x922e
movq %r14, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x53fe
movl %eax, %r13d
addl %r15d, %r13d
movq %rbx, %rdi
callq 0x53fe
movl %eax, %r12d
addl %r13d, %r12d
movl 0x10(%rbx), %edx
cmpl $0x20, %edx
je 0x75d4
movq 0x8(%rbx), %rsi
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x3df8
leaq 0x1c54(%rip), %rsi      # 0x91fb
leaq -0x48(%rbp), %rdi
movq %r15, %rdx
callq 0x76ba
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x48e6
incl %r12d
leaq -0x48(%rbp), %rdi
callq 0x2398
leaq -0x68(%rbp), %rdi
callq 0x2398
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x71d6
movl %eax, %r15d
addl %r12d, %r15d
leaq 0x1c47(%rip), %rsi      # 0x923c
movq %r14, %rdi
callq 0x21f0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movl 0x10(%rbx), %edx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x3df8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2130
leaq -0x48(%rbp), %rdi
callq 0x2398
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7645
jmp 0x7653
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2398
jmp 0x7656
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
jmp 0x7675
jmp 0x766e
jmp 0x766e
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2398
jmp 0x7671
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2398
movq %rbx, %rdi
callq 0x2330