// File: AndrewAlbert[P]Compiler-Theory/SourceCode/parser.cpp
// Function: Parser::LoopStatement()
bool Parser::LoopStatement(){
	int type, size;
	string id;
	bool resyncEnabled = true;
	
	//Determine if a loop statement is going to be declared
	if( !CheckToken(T_FOR) ) return false;
	string labelCond, labelTrue, labelEnd;
	labelCond = generator->newLabel("Loop_Check");
	labelTrue = generator->newLabel("Loop_True");
	labelEnd = generator->newLabel("Loop_End");
	
	generator->placeLabel(labelCond);

	/* get assignment statement and expression for loop: '( <assignment_statement> ; <expression> )'
	 * Throws errors if '(' or ')' is missing. Throws warnings for other missing components */
	if( !CheckToken(T_LPAREN) ) ReportFatalError("expected '(' before assignment and expression in for loop statement");

	if( !Assignment(id) ) ReportError("expected an assignment at start of for loop statement");

	if( !CheckToken(T_SEMICOLON) ) ReportError("expected ';' separating assignment statement and expression in for loop statement");

	if( !Expression(type, size) ) ReportError("expected a valid expression following assignment in for loop statement");
	else generator->condBranch( labelTrue, labelEnd );

	if( !CheckToken(T_RPAREN) ) ReportError("expected ')' after assignment and expression in for loop statement");
	generator->placeLabel(labelTrue);
	while(true){
		while( Statement() ){
			if( !CheckToken(T_SEMICOLON) ) ReportLineError("expected ';' after statement in for loop",true);
		}
		
		/* check for correct closure of loop: 'end loop' */
		generator->branch(labelCond);

		if( CheckToken(T_END) ){
			generator->placeLabel(labelEnd);
			if( !CheckToken(T_FOR) ) ReportError("missing 'for' in the 'end for' closure of the for loop statement");
			return true;
		}
		else if(resyncEnabled){
			resyncEnabled = false;
			ReportLineError("Bad line. Could not find a valid statement or 'end' reserved keyword in loop statement.");
		}
		else{
			ReportFatalError("expected 'end for' at end of for loop statement");
			return false;	
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4b0, %rsp            # imm = 0x4B0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x3b8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3370
movq -0x3b8(%rbp), %rdi
movb $0x1, -0x39(%rbp)
movl $0x113, %esi            # imm = 0x113
callq 0x9300
movb %al, -0x3aa(%rbp)
jmp 0xe2f0
movb -0x3aa(%rbp), %al
testb $0x1, %al
jne 0xe31d
jmp 0xe2fc
movb $0x0, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0xef49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xef60
leaq -0x70(%rbp), %rdi
callq 0x3370
leaq -0x90(%rbp), %rdi
callq 0x3370
leaq -0xb0(%rbp), %rdi
callq 0x3370
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x3c8(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x3430
movq -0x3c0(%rbp), %rdx
leaq 0x17f07(%rip), %rsi     # 0x2627b
leaq -0xf0(%rbp), %rdi
callq 0x62d0
jmp 0xe382
movq -0x3c8(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x1ded0
jmp 0xe39e
leaq -0x70(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movq %rsi, -0x3e0(%rbp)
callq 0x3340
movq -0x3e0(%rbp), %rdi
callq 0x31a0
leaq -0xf0(%rbp), %rdi
callq 0x31a0
leaq -0xf1(%rbp), %rdi
callq 0x32e0
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x3d8(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x3430
movq -0x3d0(%rbp), %rdx
leaq 0x17e77(%rip), %rsi     # 0x26286
leaq -0x138(%rbp), %rdi
callq 0x62d0
jmp 0xe41d
movq -0x3d8(%rbp), %rsi
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rdx
callq 0x1ded0
jmp 0xe439
leaq -0x90(%rbp), %rdi
leaq -0x118(%rbp), %rsi
movq %rsi, -0x3f8(%rbp)
callq 0x3340
movq -0x3f8(%rbp), %rdi
callq 0x31a0
leaq -0x138(%rbp), %rdi
callq 0x31a0
leaq -0x139(%rbp), %rdi
callq 0x32e0
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x3f0(%rbp)
leaq -0x181(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x3430
movq -0x3e8(%rbp), %rdx
leaq 0x17de3(%rip), %rsi     # 0x26290
leaq -0x180(%rbp), %rdi
callq 0x62d0
jmp 0xe4bb
movq -0x3f0(%rbp), %rsi
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x1ded0
jmp 0xe4d7
leaq -0xb0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movq %rsi, -0x408(%rbp)
callq 0x3340
movq -0x408(%rbp), %rdi
callq 0x31a0
leaq -0x180(%rbp), %rdi
callq 0x31a0
leaq -0x181(%rbp), %rdi
callq 0x32e0
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x400(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3130
jmp 0xe53c
movq -0x400(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x1e060
jmp 0xe551
leaq -0x1a8(%rbp), %rdi
callq 0x31a0
movq -0x3b8(%rbp), %rdi
movl $0x12d, %esi            # imm = 0x12D
callq 0x9300
movb %al, -0x409(%rbp)
jmp 0xe576
movb -0x409(%rbp), %al
testb $0x1, %al
jne 0xe6f1
jmp 0xe586
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x3430
movq -0x418(%rbp), %rdx
leaq 0x17cf2(%rip), %rsi     # 0x26299
leaq -0x1c8(%rbp), %rdi
callq 0x62d0
jmp 0xe5b5
movq -0x3b8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x88a0
jmp 0xe5ca
leaq -0x1c8(%rbp), %rdi
callq 0x31a0
leaq -0x1c9(%rbp), %rdi
callq 0x32e0
jmp 0xe6f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe60d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x31a0
leaq -0xf1(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe644
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x31a0
leaq -0x139(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe67b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x31a0
leaq -0x181(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x31a0
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe6e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x31a0
leaq -0x1c9(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq -0x3b8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xefd0
movb %al, -0x419(%rbp)
jmp 0xe709
movb -0x419(%rbp), %al
testb $0x1, %al
jne 0xe7ae
jmp 0xe719
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x428(%rbp)
callq 0x3430
movq -0x428(%rbp), %rdx
leaq 0x17ba3(%rip), %rsi     # 0x262dd
leaq -0x1f0(%rbp), %rdi
callq 0x62d0
jmp 0xe748
movq -0x3b8(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x9060
jmp 0xe75d
leaq -0x1f0(%rbp), %rdi
callq 0x31a0
leaq -0x1f1(%rbp), %rdi
callq 0x32e0
jmp 0xe7ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe79d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x31a0
leaq -0x1f1(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq -0x3b8(%rbp), %rdi
movl $0x12c, %esi            # imm = 0x12C
callq 0x9300
movb %al, -0x429(%rbp)
jmp 0xe7c7
movb -0x429(%rbp), %al
testb $0x1, %al
jne 0xe86c
jmp 0xe7d7
leaq -0x219(%rbp), %rdi
movq %rdi, -0x438(%rbp)
callq 0x3430
movq -0x438(%rbp), %rdx
leaq 0x17b1b(%rip), %rsi     # 0x26313
leaq -0x218(%rbp), %rdi
callq 0x62d0
jmp 0xe806
movq -0x3b8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x9060
jmp 0xe81b
leaq -0x218(%rbp), %rdi
callq 0x31a0
leaq -0x219(%rbp), %rdi
callq 0x32e0
jmp 0xe86c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe85b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x31a0
leaq -0x219(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq -0x3b8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0xcab0
movb %al, -0x439(%rbp)
jmp 0xe888
movb -0x439(%rbp), %al
testb $0x1, %al
jne 0xe930
jmp 0xe898
leaq -0x241(%rbp), %rdi
movq %rdi, -0x448(%rbp)
callq 0x3430
movq -0x448(%rbp), %rdx
leaq 0x17aac(%rip), %rsi     # 0x26365
leaq -0x240(%rbp), %rdi
callq 0x62d0
jmp 0xe8c7
movq -0x3b8(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x9060
jmp 0xe8dc
leaq -0x240(%rbp), %rdi
callq 0x31a0
leaq -0x241(%rbp), %rdi
callq 0x32e0
jmp 0xe9dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe91f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x31a0
leaq -0x241(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x450(%rbp)
leaq -0x268(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3130
jmp 0xe95a
leaq -0x288(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3130
jmp 0xe96f
movq -0x450(%rbp), %rdi
leaq -0x268(%rbp), %rsi
leaq -0x288(%rbp), %rdx
callq 0x1e680
jmp 0xe98b
leaq -0x288(%rbp), %rdi
callq 0x31a0
leaq -0x268(%rbp), %rdi
callq 0x31a0
jmp 0xe9dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe9cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x31a0
leaq -0x268(%rbp), %rdi
callq 0x31a0
jmp 0xef26
movq -0x3b8(%rbp), %rdi
movl $0x12e, %esi            # imm = 0x12E
callq 0x9300
movb %al, -0x451(%rbp)
jmp 0xe9f5
movb -0x451(%rbp), %al
testb $0x1, %al
jne 0xea9a
jmp 0xea05
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x3430
movq -0x460(%rbp), %rdx
leaq 0x17986(%rip), %rsi     # 0x263ac
leaq -0x2a8(%rbp), %rdi
callq 0x62d0
jmp 0xea34
movq -0x3b8(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x9060
jmp 0xea49
leaq -0x2a8(%rbp), %rdi
callq 0x31a0
leaq -0x2a9(%rbp), %rdi
callq 0x32e0
jmp 0xea9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xea89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x31a0
leaq -0x2a9(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x468(%rbp)
leaq -0x2d0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3130
jmp 0xeac4
movq -0x468(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x1e060
jmp 0xead9
leaq -0x2d0(%rbp), %rdi
callq 0x31a0
jmp 0xeae7
jmp 0xeae9
movq -0x3b8(%rbp), %rdi
callq 0xac60
movb %al, -0x469(%rbp)
jmp 0xeafd
movb -0x469(%rbp), %al
testb $0x1, %al
jne 0xeb0c
jmp 0xebf1
movq -0x3b8(%rbp), %rdi
movl $0x12c, %esi            # imm = 0x12C
callq 0x9300
movb %al, -0x46a(%rbp)
jmp 0xeb25
movb -0x46a(%rbp), %al
testb $0x1, %al
jne 0xebec
jmp 0xeb35
leaq -0x2f1(%rbp), %rdi
movq %rdi, -0x478(%rbp)
callq 0x3430
movq -0x478(%rbp), %rdx
leaq 0x17899(%rip), %rsi     # 0x263ef
leaq -0x2f0(%rbp), %rdi
callq 0x62d0
jmp 0xeb64
movq -0x3b8(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
movl $0x1, %edx
callq 0x8b50
jmp 0xeb7e
leaq -0x2f0(%rbp), %rdi
callq 0x31a0
leaq -0x2f1(%rbp), %rdi
callq 0x32e0
jmp 0xebec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x31a0
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xebdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x31a0
leaq -0x2f1(%rbp), %rdi
callq 0x32e0
jmp 0xef26
jmp 0xeae9
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x480(%rbp)
leaq -0x318(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3130
jmp 0xec18
movq -0x480(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x1e7f0
jmp 0xec2d
leaq -0x318(%rbp), %rdi
callq 0x31a0
movq -0x3b8(%rbp), %rdi
movl $0x104, %esi            # imm = 0x104
callq 0x9300
movb %al, -0x481(%rbp)
jmp 0xec52
movb -0x481(%rbp), %al
testb $0x1, %al
jne 0xec61
jmp 0xedb4
movq -0x3b8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x490(%rbp)
leaq -0x338(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3130
jmp 0xec8b
movq -0x490(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x1e060
jmp 0xeca0
leaq -0x338(%rbp), %rdi
callq 0x31a0
movq -0x3b8(%rbp), %rdi
movl $0x113, %esi            # imm = 0x113
callq 0x9300
movb %al, -0x491(%rbp)
jmp 0xecc5
movb -0x491(%rbp), %al
testb $0x1, %al
jne 0xeda4
jmp 0xecd5
leaq -0x359(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x3430
movq -0x4a0(%rbp), %rdx
leaq 0x17722(%rip), %rsi     # 0x26418
leaq -0x358(%rbp), %rdi
callq 0x62d0
jmp 0xed04
movq -0x3b8(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x9060
jmp 0xed19
leaq -0x358(%rbp), %rdi
callq 0x31a0
leaq -0x359(%rbp), %rdi
callq 0x32e0
jmp 0xeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x31a0
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x31a0
jmp 0xef26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xed93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x31a0
leaq -0x359(%rbp), %rdi
callq 0x32e0
jmp 0xef26
movb $0x1, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0xef03
testb $0x1, -0x39(%rbp)
je 0xee5f
movb $0x0, -0x39(%rbp)
leaq -0x381(%rbp), %rdi
movq %rdi, -0x4a8(%rbp)
callq 0x3430
movq -0x4a8(%rbp), %rdx
leaq 0x17676(%rip), %rsi     # 0x26459
leaq -0x380(%rbp), %rdi
callq 0x62d0
jmp 0xedf1
movq -0x3b8(%rbp), %rdi
leaq -0x380(%rbp), %rsi
movl $0x1, %edx
callq 0x8b50
jmp 0xee0b
leaq -0x380(%rbp), %rdi
callq 0x31a0
leaq -0x381(%rbp), %rdi
callq 0x32e0
jmp 0xeefc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xee4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x31a0
leaq -0x381(%rbp), %rdi
callq 0x32e0
jmp 0xef26
leaq -0x3a9(%rbp), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x3430
movq -0x4b0(%rbp), %rdx
leaq 0x17631(%rip), %rsi     # 0x264b1
leaq -0x3a8(%rbp), %rdi
callq 0x62d0
jmp 0xee8e
movq -0x3b8(%rbp), %rdi
leaq -0x3a8(%rbp), %rsi
callq 0x88a0
jmp 0xeea3
leaq -0x3a8(%rbp), %rdi
callq 0x31a0
leaq -0x3a9(%rbp), %rdi
callq 0x32e0
movb $0x0, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0xef03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xeeee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x3a8(%rbp), %rdi
callq 0x31a0
leaq -0x3a9(%rbp), %rdi
callq 0x32e0
jmp 0xef26
jmp 0xeefe
jmp 0xeae5
leaq -0xb0(%rbp), %rdi
callq 0x31a0
leaq -0x90(%rbp), %rdi
callq 0x31a0
leaq -0x70(%rbp), %rdi
callq 0x31a0
jmp 0xef49
leaq -0xb0(%rbp), %rdi
callq 0x31a0
leaq -0x90(%rbp), %rdi
callq 0x31a0
leaq -0x70(%rbp), %rdi
callq 0x31a0
jmp 0xef60
leaq -0x38(%rbp), %rdi
callq 0x31a0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x4b0, %rsp            # imm = 0x4B0
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x31a0
movq -0x48(%rbp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)