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

	int errors = 0;
	if(token != LPAREN_T){
		errors ++;
		token = lex->GetToken();	
	} // end left paren if
	if(token == RPAREN_T){
	  ruleFile << "Using Rule 21" << endl;
	  ruleFile << "Exiting stmt_pair function; current token is: " << lex ->GetTokenName (token) << endl;
	  return errors;

	}
	token = lex->GetToken();
	ruleFile << "Using Rule 20" << endl;
	errors += stmt_pair_body();
	while(token != RPAREN_T){

		errors++;
		ReportError(string("expected a RPAREN_T in stmtpair, but found  " + lex->GetTokenName(token)));
		token = lex->GetToken();
	} // end right paren if 
	//token = lex->GetToken();
	ruleFile << "Exiting stmt_pair 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), %r12
leaq 0x1f18(%rip), %rsi      # 0x9110
movq %r12, %rdi
callq 0x21f0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movl 0x10(%rbx), %edx
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x3df8
movq %r14, %rdi
movq %r15, %rsi
callq 0x21d0
leaq 0x16c8(%rip), %rsi      # 0x88f0
movq %rax, %rdi
callq 0x21f0
movq %rax, %r14
movq 0x8(%rbx), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3e22
leaq -0x70(%rbp), %rsi
movq %r14, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2130
leaq -0x70(%rbp), %rdi
callq 0x2398
leaq -0x48(%rbp), %rdi
callq 0x2398
xorl %r14d, %r14d
cmpl $0x1f, 0x10(%rbx)
je 0x72e5
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
cmpl $0x20, %eax
jne 0x72e1
leaq 0x1eb9(%rip), %rsi      # 0x9140
movq %r12, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq 0x1eb0(%rip), %rsi      # 0x914e
movq %r12, %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
pushq $0x1
popq %r15
jmp 0x73bb
pushq $0x1
popq %r14
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
leaq 0x1e85(%rip), %rsi      # 0x917d
movq %r12, -0x50(%rbp)
movq %r12, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x740c
movl %eax, %r15d
addl %r14d, %r15d
movl 0x10(%rbx), %edx
leaq -0x70(%rbp), %r12
leaq 0x1e63(%rip), %r13      # 0x918b
leaq -0x48(%rbp), %r14
cmpl $0x20, %edx
je 0x7379
movq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x3df8
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x76ba
movq %rbx, %rdi
movq %r14, %rsi
callq 0x48e6
movq %r14, %rdi
callq 0x2398
movq %r12, %rdi
callq 0x2398
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, %edx
movl %eax, 0x10(%rbx)
incl %r15d
jmp 0x732c
leaq 0x1dce(%rip), %rsi      # 0x914e
movq -0x50(%rbp), %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 0x73e1
jmp 0x73e1
jmp 0x73e1
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2398
jmp 0x73e4
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
jmp 0x73ff
movq %rax, %rbx
jmp 0x73fb
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2398
leaq -0x70(%rbp), %rdi
callq 0x2398
movq %rbx, %rdi
callq 0x2330