// File: /workspace/github_cpp_makefile_star2_O1/CobaltXII[P]cxcc/./semantic/semantic_analyzer.hpp
// Function: semantic_analyzer_t::validate_statement(statement_t*, symbol_table_t&)
bool validate_statement(statement_t* statement, symbol_table_t& symbols) {
		if (statement->type == st_compound) {
			compound_statement_t stmt = statement->compound_stmt;
			// A compound statement is invalid if any of it's child statements
			// are invalid.
			symbol_table_t new_symbols(&symbols);
			for (int i = 0; i < stmt.statements.size(); i++) {
				if (!validate_statement(stmt.statements[i], new_symbols)) {
					return false;
				}
			}
		} else if (statement->type == st_conditional) {
			conditional_statement_t stmt = statement->conditional_stmt;
			// A conditional statement is invalid if it's condition is
			// invalid.
			if (!validate_expression(stmt.condition, symbols)) {
				return false;
			}
			// A conditional statement is invalid if it's condition cannot be
			// converted to int.
			type_t condition_type = expression_type(stmt.condition, symbols);
			if (!can_convert(condition_type, {0})) {
				die("cannot convert expression of type '" + prettyprint_type(condition_type) + "' to 'int'", stmt.condition);
				return false;
			}
			// A conditional statement is invalid if it's body statement is
			// invalid.
			symbol_table_t new_symbols(&symbols);
			if (!validate_statement(stmt.body, new_symbols)) {
				return false;
			}
		} else if (statement->type == st_while) {
			while_statement_t stmt = statement->while_stmt;
			// A while statement is invalid if it's condition is invalid.
			if (!validate_expression(stmt.condition, symbols)) {
				return false;
			}
			// A while statement is invalid if it's condition cannot be
			// converted to int.
			type_t condition_type = expression_type(stmt.condition, symbols);
			if (!can_convert(condition_type, {0})) {
				die("cannot convert expression of type '" + prettyprint_type(condition_type) + "' to 'int'", stmt.condition);
				return false;
			}
			// A while statement is invalid if it's body statement is invalid.
			symbol_table_t new_symbols(&symbols);
			new_symbols.in_loop = true;
			if (!validate_statement(stmt.body, new_symbols)) {
				return false;
			}
		} else if (statement->type == st_return) {
			return_statement_t stmt = statement->return_stmt;
			// A return statement is invalid if it's value's type cannot be
			// converted to the type of the return value of the function.
			type_t value_type = expression_type(stmt.value, symbols);
			type_t return_type = symbols.fetch("__return__").type;
			if (!can_convert(value_type, return_type)) {
				die("no conversion from value of type '" + prettyprint_type(value_type) + "' to function return type '" + prettyprint_type(return_type) + "'", stmt.value);
			}
			// A return statement is invalid if it's value is invalid.
			if (!validate_expression(stmt.value, symbols)) {
				return false;
			}
		} else if (statement->type == st_variable_declaration) {
			variable_declaration_statement_t stmt = statement->variable_declaration_stmt;
			// A variable declaration statement is invalid if it's identifier
			// is a reserved identifier.
			if (is_reserved(stmt.identifier)) {
				die("cannot declare variable with reserved identifier '" + stmt.identifier + "'");
				return false;
			}
			// A variable declaration statement is invalid if it's initializer
			// is invalid.
			if (stmt.initializer) {
				if (!validate_expression(stmt.initializer, symbols)) {
					return false;
				}
			}
			// A variable declaration statement is invalid if the type of it's
			// initializer cannot be converted to it's declared type.
			if (stmt.initializer) {
				type_t initializer_type = expression_type(stmt.initializer, symbols);
				if (!can_convert(initializer_type, stmt.type)) {
					die("no conversion from initializer value of type '" + prettyprint_type(initializer_type) + "' to variable type '" + prettyprint_type(stmt.type) + "'", stmt.initializer);
					return false;
				}
			}
			// A variable declaration statement is invalid if a variable under
			// the same identifier has already been declared in the current
			// scope.
			if (symbols.exists_locally(stmt.identifier)) {
				die("redefinition of '" + stmt.identifier + "'");
				return false;
			}
			// Add the variable to the current scope.
			symbols.add_symbol(symbol_t(stmt.type, stmt.identifier));
		} else if (statement->type == st_expression) {
			expression_statement_t stmt = statement->expression_stmt;
			// An expression statement is invalid if it's expression is
			// invalid.
			if (!validate_expression(stmt.expression, symbols)) {
				return false;
			}
		} else if (statement->type == st_break ||
				   statement->type == st_continue) {
			// A break or continue statement is invalid if it is encountered
			// outside of a loop.
			if (!symbols.in_loop) {
				if (statement->type == st_break) {
					die("break statement not within loop", statement->lineno, statement->colno);
				} else {
					die("continue statement not within loop", statement->lineno, statement->colno);
				}
				return false;
			}
		}
		return true;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0x12059
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x793f(%rip), %rcx      # 0x19168
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpb $0x0, 0x20(%r14)
jne 0x12059
cmpl $0x7, %eax
jne 0x11edc
leaq 0xf8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8200(%rip), %rsi      # 0x19a59
leaq 0x8218(%rip), %rdx      # 0x19a78
leaq 0xe8(%rsp), %r14
movq %r14, %rdi
callq 0x9052
movq 0x80(%r12), %rdx
movq 0x88(%r12), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11372
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1205d
movq 0xf8(%rsp), %rsi
jmp 0x11f3a
movq 0x78(%r12), %r12
movq (%r14), %rax
leaq 0x1c0(%rsp), %r15
movq %rax, -0x8(%r15)
leaq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x14d6e
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
movups %xmm1, 0x28(%r15)
movups %xmm0, 0x18(%r15)
leaq 0x1b8(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12296
movl %eax, %ebx
movq %r15, %rdi
jmp 0x11cdd
movq 0x20(%r12), %r13
movq 0x28(%r12), %rax
movq %rax, 0x20(%rsp)
movq (%r14), %rax
leaq 0x3c0(%rsp), %rbp
movq %rax, -0x8(%rbp)
leaq 0x8(%r14), %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x14d6e
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
movups %xmm1, 0x28(%rbp)
movups %xmm0, 0x18(%rbp)
leaq 0x3b8(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x12296
movl %eax, %r15d
movq %rbp, %rdi
callq 0x15538
testb %r15b, %r15b
je 0x1205d
leaq 0x20(%r14), %r15
movq (%r14), %rax
leaq 0x380(%rsp), %rbp
movq %rax, -0x8(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x14d6e
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x28(%rbp)
movups %xmm0, 0x18(%rbp)
leaq 0x378(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x13fec
movq %rbp, %rdi
callq 0x15538
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%r12)
movups %xmm0, (%r12)
movups %xmm0, 0x20(%r12)
movq $0x0, 0x30(%r12)
movq %r14, -0x8(%r12)
movb 0x20(%r14), %al
movb %al, 0x18(%r12)
movq 0x28(%r14), %rax
movq %rax, 0x20(%r12)
movq 0x30(%r14), %rax
movq %rax, 0x28(%r12)
movq 0x38(%r14), %rax
movq %rax, 0x30(%r12)
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0x117fc
jmp 0x11b1f
movq 0x30(%r12), %r13
movq 0x38(%r12), %rax
movq %rax, 0x20(%rsp)
movq (%r14), %rax
leaq 0x340(%rsp), %rbp
movq %rax, -0x8(%rbp)
leaq 0x8(%r14), %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x14d6e
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
movups %xmm1, 0x28(%rbp)
movups %xmm0, 0x18(%rbp)
leaq 0x338(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x12296
movl %eax, %r15d
movq %rbp, %rdi
callq 0x15538
testb %r15b, %r15b
je 0x1205d
leaq 0x20(%r14), %r15
movq (%r14), %rax
leaq 0x300(%rsp), %rbp
movq %rax, -0x8(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x14d6e
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x28(%rbp)
movups %xmm0, 0x18(%rbp)
leaq 0x2f8(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x13fec
movq %rbp, %rdi
callq 0x15538
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%r12)
movups %xmm0, (%r12)
movups %xmm0, 0x20(%r12)
movq $0x0, 0x30(%r12)
movq %r14, -0x8(%r12)
movb 0x20(%r14), %al
movb %al, 0x18(%r12)
movq 0x28(%r14), %rax
movq %rax, 0x20(%r12)
movq 0x30(%r14), %rax
movq %rax, 0x28(%r12)
movq 0x38(%r14), %rax
movq %rax, 0x30(%r12)
movb $0x1, 0x18(%r12)
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0x117fc
movl %eax, %ebx
movq %r12, %rdi
jmp 0x11cdd
addq $0x8, %r12
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0xb122
leaq 0x30(%rsp), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%r15)
movups %xmm0, (%r15)
movups %xmm0, 0x20(%r15)
movq $0x0, 0x30(%r15)
movq %r14, -0x8(%r15)
movb 0x20(%r14), %al
movb %al, 0x18(%r15)
movq 0x28(%r14), %rax
movq %rax, 0x20(%r15)
movq 0x30(%r14), %rax
movq %rax, 0x28(%r15)
movq 0x38(%r14), %rax
movq %rax, 0x30(%r15)
movq (%r13), %rax
cmpq %rax, 0x8(%r13)
setne %bpl
je 0x11bc2
xorl %r12d, %r12d
leaq 0x28(%rsp), %r14
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x117fc
testb %al, %al
je 0x11bc2
incq %r12
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
seta %bpl
ja 0x11b93
movq %r15, %rdi
callq 0x15538
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x11be0
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
testb $0x1, %bpl
je 0x12059
jmp 0x1205d
movq 0x40(%r12), %r15
movq (%r14), %rax
leaq 0x2c0(%rsp), %r13
movq %rax, -0x8(%r13)
leaq 0x8(%r14), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x14d6e
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
movups %xmm1, 0x28(%r13)
movups %xmm0, 0x18(%r13)
leaq 0x2b8(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13fec
movq %r13, %rdi
callq 0x15538
leaq 0x118(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x7d9b(%rip), %rsi      # 0x199ef
leaq 0x7d9e(%rip), %rdx      # 0x199f9
leaq 0x108(%rsp), %r13
movq %r13, %rdi
callq 0x9052
movq %r14, %rdi
movq %r13, %rsi
callq 0x14730
leaq 0x20(%r14), %r13
movq 0x108(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11c97
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%r14), %rax
leaq 0x280(%rsp), %r14
movq %rax, -0x8(%r14)
movq %r14, %rdi
movq %r12, %rsi
callq 0x14d6e
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x28(%r14)
movups %xmm0, 0x18(%r14)
leaq 0x278(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12296
movl %eax, %ebx
movq %r14, %rdi
callq 0x15538
testb %bl, %bl
je 0x1205d
jmp 0x12059
movq 0x48(%r12), %rax
leaq 0x30(%rsp), %r15
movq %rax, -0x8(%r15)
leaq 0x40(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x50(%r12), %rsi
movq 0x58(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x17a38
movq 0x70(%r12), %rax
movq %rax, 0x10(%rbp)
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0x17a38
leaq 0x148(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x148f6
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x11d76
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3280
testb %bpl, %bpl
jne 0x12071
movq 0x50(%rsp), %r13
testq %r13, %r13
je 0x11ddd
movq (%r14), %rax
leaq 0x240(%rsp), %r12
movq %rax, -0x8(%r12)
leaq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x14d6e
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
leaq 0x238(%rsp), %rdx
movups %xmm1, 0x30(%rdx)
movups %xmm0, 0x20(%rdx)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x12296
movl %eax, %ebp
movq %r12, %rdi
callq 0x15538
testb %bpl, %bpl
je 0x11fd1
movq 0x50(%rsp), %r13
testq %r13, %r13
je 0x11e30
movq (%r14), %rax
leaq 0x200(%rsp), %r12
movq %rax, -0x8(%r12)
leaq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x14d6e
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
leaq 0x1f8(%rsp), %rdx
movups %xmm1, 0x30(%rdx)
movups %xmm0, 0x20(%rdx)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x13fec
movq %r12, %rdi
callq 0x15538
leaq 0x138(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x17a38
leaq 0x128(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x14948
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x11e84
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3280
testb %bpl, %bpl
je 0x11f47
leaq 0x7bb3(%rip), %rsi      # 0x19a47
movq %rsp, %rdi
movq %r15, %rdx
callq 0xa33e
leaq 0x7cc7(%rip), %rsi      # 0x19b6d
movq %rsp, %rdi
callq 0x33f0
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11fda
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x11fe1
leaq 0xd8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7b8a(%rip), %rsi      # 0x19a79
leaq 0x7ba5(%rip), %rdx      # 0x19a9b
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
callq 0x9052
movq 0x80(%r12), %rdx
movq 0x88(%r12), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11372
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1205d
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x1205d
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %rsi
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x17a38
leaq 0x168(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
movq %rbx, %rsi
callq 0x1178c
addq $0x8, %r14
leaq 0x168(%rsp), %rsi
movq %r14, %rdi
callq 0x10b8e
leaq 0x168(%rsp), %rdi
callq 0x103f6
movq 0xa8(%rsp), %rdi
movb $0x1, %bl
cmpq %r15, %rdi
leaq 0x40(%rsp), %r14
je 0x1203e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x1203e
xorl %ebx, %ebx
leaq 0x40(%rsp), %r14
jmp 0x1203e
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x14928
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x1201c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x40(%rsp), %r14
je 0x1203c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3280
xorl %ebx, %ebx
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x12055
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
testb %bl, %bl
je 0x1205d
movb $0x1, %al
jmp 0x1205f
xorl %eax, %eax
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x799c(%rip), %rsi      # 0x19a14
movq %rsp, %rdi
movq %r15, %rdx
callq 0xa33e
leaq 0x7ae3(%rip), %rsi      # 0x19b6d
movq %rsp, %rdi
callq 0x33f0
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x120b6
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x120c9
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movq 0xdef5(%rip), %rdi      # 0x1fff0
callq 0x32b0
movq %rax, %rdi
callq 0x3130
movl $0x3, %edi
callq 0x32e0
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x1217d
movq 0x98(%rsp), %rsi
jmp 0x12140
jmp 0x1217a
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x1217d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x1217d
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x103f6
jmp 0x1215f
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x12253
movq 0xb8(%rsp), %rsi
jmp 0x12194
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12253
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x12253
jmp 0x12250
jmp 0x12202
jmp 0x12250
jmp 0x121af
movq %rax, %rbx
movq %r12, %rdi
jmp 0x12249
jmp 0x12250
jmp 0x1223b
jmp 0x1223b
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1228d
movq 0xd8(%rsp), %rsi
jmp 0x12267
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1228d
movq 0xf8(%rsp), %rsi
jmp 0x12267
movq %rax, %rbx
movq %r12, %rdi
callq 0x15538
jmp 0x12253
movq %rax, %rbx
movq %r14, %rdi
jmp 0x12249
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1228d
movq 0x118(%rsp), %rsi
jmp 0x12267
movq %rax, %rbx
movq %r13, %rdi
jmp 0x12249
jmp 0x1223b
movq %rax, %rbx
movq %rbp, %rdi
jmp 0x12249
movq %rax, %rbx
movq %r15, %rdi
callq 0x15538
jmp 0x1228d
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1228d
movq 0x40(%rsp), %rsi
incq %rsi
jmp 0x12288
movq %rax, %rbx
movq %r15, %rdi
callq 0x15538
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1228d
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x33b0
nop