// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
leaq 0x420(%rdi), %rbx
leaq 0x1eee(%rip), %rsi      # 0xc160
movl $0x34, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x4a1c
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %r15
leaq 0x15ec(%rip), %rsi      # 0xb898
movl $0xa, %edx
movq %rax, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %rdi
callq 0x4a56
movq -0x68(%rbp), %rsi
movq -0x60(%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 -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa319
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0xa332
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
xorl %r15d, %r15d
cmpl $0x15, 0x10(%r14)
jne 0xa457
leaq 0x1e4e(%rip), %rsi      # 0xc195
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 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
movq %r14, %rdi
callq 0x6bfc
movl %eax, %r15d
movl 0x10(%r14), %edx
cmpl $0x20, %edx
jne 0xa3b2
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
jmp 0xa457
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x4a1c
leaq 0x1dda(%rip), %rcx      # 0xc1a3
movl $0x32, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
movq %r13, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa3fb
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0xa403
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x5778
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xa43b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa454
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
incl %r15d
movl 0x10(%r14), %eax
cmpq $0x21, %rax
ja 0xa5aa
movabsq $0x28000000e, %rcx      # imm = 0x28000000E
btq %rax, %rcx
jae 0xa5aa
leaq 0x1d56(%rip), %rsi      # 0xc1d6
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, %r13d
addl %r15d, %r13d
movq %r14, %rdi
callq 0x6bfc
movl %eax, %r12d
addl %r13d, %r12d
movl 0x10(%r14), %edx
cmpl $0x20, %edx
jne 0xa4e6
leaq -0x38(%rbp), %r13
jmp 0xa58f
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x4a1c
leaq 0x1ca6(%rip), %rcx      # 0xc1a3
movl $0x32, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq -0x38(%rbp), %r13
movq %r13, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa533
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0xa53b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x5778
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xa573
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa58c
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
incl %r12d
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
movq %r14, %rdi
callq 0x9e58
movl %eax, %r15d
addl %r12d, %r15d
leaq 0x1c33(%rip), %rsi      # 0xc1e4
movl $0x33, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x48(%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 -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xa620
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 0xa636
jmp 0xa650
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xa653
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xa653
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa6b0
movq -0x58(%rbp), %rsi
jmp 0xa6a8
jmp 0xa668
movq %rax, %rbx
jmp 0xa697
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0xa6a4
jmp 0xa6b0
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa697
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa6b0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2340