// File: /workspace/github_cpp_makefile_star2_O1/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, %r15
leaq 0x420(%rdi), %r12
leaq 0x223e(%rip), %rsi      # 0xc0b8
movl $0x2f, %edx
movq %r12, %rdi
callq 0x2260
movq 0x8(%r15), %rsi
movl 0x10(%r15), %edx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x4a1c
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r12, %rdi
callq 0x2260
movq %rax, %rbx
leaq 0x19e4(%rip), %rsi      # 0xb898
movl $0xa, %edx
movq %rax, %rdi
callq 0x2260
movq 0x8(%r15), %rsi
leaq -0x68(%rbp), %rdi
callq 0x4a56
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 0x9f21
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9f3a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
xorl %r14d, %r14d
cmpl $0x1f, 0x10(%r15)
je 0x9f57
movq 0x8(%r15), %rdi
callq 0x3e8e
movl %eax, 0x10(%r15)
movl $0x1, %r14d
cmpl $0x20, 0x10(%r15)
jne 0xa007
leaq 0x217f(%rip), %rsi      # 0xc0e8
movl $0xd, %edx
movq %r12, %rdi
callq 0x2260
movq 0x420(%r15), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq 0x214e(%rip), %rsi      # 0xc0f6
movl $0x2e, %edx
movq %r12, %rdi
callq 0x2260
movq 0x8(%r15), %rsi
movl 0x10(%r15), %edx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x4a1c
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
jmp 0xa19d
movq 0x8(%r15), %rdi
callq 0x3e8e
movl %eax, 0x10(%r15)
leaq 0x210a(%rip), %rsi      # 0xc125
movl $0xd, %edx
movq %r12, %rdi
callq 0x2260
movq 0x420(%r15), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r12, -0x70(%rbp)
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %r15, %rdi
callq 0xa250
addl %eax, %r14d
movl 0x10(%r15), %eax
cmpl $0x20, %eax
je 0xa138
leaq -0x68(%rbp), %r12
leaq 0x20b9(%rip), %r13      # 0xc133
leaq -0x48(%rbp), %rbx
movq 0x8(%r15), %rsi
movq %r12, %rdi
movl %eax, %edx
callq 0x4a1c
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 0xa0c5
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0xa0cb
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 %r15, %rdi
movq %rbx, %rsi
callq 0x5778
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xa106
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa11f
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq 0x8(%r15), %rdi
callq 0x3e8e
movl %eax, 0x10(%r15)
incl %r14d
cmpl $0x20, %eax
jne 0xa07e
leaq 0x1fb7(%rip), %rsi      # 0xc0f6
movl $0x2e, %edx
movq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0x2260
movq 0x8(%r15), %rsi
movl 0x10(%r15), %edx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x4a1c
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 0xa1b6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa1d9
jmp 0xa1cc
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
jmp 0xa202
movq %rax, %rbx
jmp 0xa1fa
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1fa
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa247
movq -0x38(%rbp), %rsi
jmp 0xa23f
movq %rax, %rbx
jmp 0xa22e
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xa22e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa247
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2340
nop