// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
leaq 0x420(%rdi), %r15
leaq 0x22c2(%rip), %rsi      # 0xc0b8
movl $0x2f, %edx
movq %r15, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x499a
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x2260
movq %rax, %rbx
leaq 0x1a68(%rip), %rsi      # 0xb898
movl $0xa, %edx
movq %rax, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %rdi
callq 0x49d4
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %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
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9e9d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9eb6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
xorl %ebx, %ebx
cmpl $0x1f, 0x10(%r14)
je 0x9fa2
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
movl $0x1, %ebx
cmpl $0x20, %eax
jne 0x9fa2
leaq 0x2203(%rip), %rsi      # 0xc0e8
movl $0xd, %edx
movq %r15, %rdi
callq 0x2260
movq 0x420(%r14), %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 0x21d2(%rip), %rsi      # 0xc0f6
movl $0x2e, %edx
movq %r15, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x499a
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %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 -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9f97
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x1, %r15d
jmp 0xa154
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
leaq 0x216f(%rip), %rsi      # 0xc125
movl $0xd, %edx
movq %r15, %rdi
callq 0x2260
movq 0x420(%r14), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r15, -0x70(%rbp)
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %r14, %rdi
callq 0xa1ee
movl %eax, %r15d
addl %ebx, %r15d
movl 0x10(%r14), %eax
cmpl $0x20, %eax
je 0xa0d6
leaq -0x68(%rbp), %r12
leaq 0x211b(%rip), %r13      # 0xc133
leaq -0x48(%rbp), %rbx
movq 0x8(%r14), %rsi
movq %r12, %rdi
movl %eax, %edx
callq 0x499a
movl $0x2c, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r13, %rcx
callq 0x2240
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa063
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0xa069
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x56f4
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xa0a4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa0bd
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
incl %r15d
cmpl $0x20, %eax
jne 0xa01c
leaq 0x2019(%rip), %rsi      # 0xc0f6
movl $0x2e, %edx
movq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x499a
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r12, %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 -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xa154
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa16f
jmp 0xa16a
movq %rax, %rbx
jmp 0xa198
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
jmp 0xa1a0
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa198
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1e5
movq -0x38(%rbp), %rsi
jmp 0xa1dd
movq %rax, %rbx
jmp 0xa1cc
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xa1cc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa1e5
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2340
nop