// File: /workspace/github_cpp_makefile_star2_O3/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 0x11994
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x7eeb(%rip), %rcx      # 0x19198
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpb $0x0, 0x20(%r14)
jne 0x11994
cmpl $0x7, %eax
jne 0x11900
leaq 0xd8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x87ac(%rip), %rsi      # 0x19a89
leaq 0x87c4(%rip), %rdx      # 0x19aa8
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
callq 0x8faa
movq 0x80(%r12), %rdx
movq 0x88(%r12), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10df6
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11aa3
movq 0xd8(%rsp), %rsi
jmp 0x1195e
movq 0x78(%r12), %r12
movq (%r14), %rax
leaq 0x1c0(%rsp), %r15
movq %rax, -0x8(%r15)
leaq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x147b2
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 0x11cd2
movl %eax, %ebx
movq %r15, %rdi
jmp 0x116fc
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 0x147b2
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 0x11cd2
movl %eax, %r15d
movq %rbp, %rdi
callq 0x1553e
testb %r15b, %r15b
je 0x11aa3
leaq 0x20(%r14), %r15
movq (%r14), %rax
leaq 0x380(%rsp), %rbp
movq %rax, -0x8(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x147b2
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 0x13a42
movq %rbp, %rdi
callq 0x1553e
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq %r14, -0x8(%r12)
movb 0x20(%r14), %al
movb %al, 0x18(%r12)
movups 0x28(%r14), %xmm0
movups %xmm0, 0x20(%r12)
movq 0x38(%r14), %rax
movq %rax, 0x30(%r12)
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0x11280
jmp 0x11574
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 0x147b2
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 0x11cd2
movl %eax, %r15d
movq %rbp, %rdi
callq 0x1553e
testb %r15b, %r15b
je 0x11aa3
leaq 0x20(%r14), %r15
movq (%r14), %rax
leaq 0x300(%rsp), %rbp
movq %rax, -0x8(%rbp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x147b2
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 0x13a42
movq %rbp, %rdi
callq 0x1553e
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq %r14, -0x8(%r12)
movups 0x28(%r14), %xmm0
movups %xmm0, 0x20(%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 0x11280
movl %eax, %ebx
movq %r12, %rdi
jmp 0x116fc
addq $0x8, %r12
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0xb076
leaq 0x30(%rsp), %r15
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq %r14, -0x8(%r15)
movb 0x20(%r14), %al
movb %al, 0x18(%r15)
movups 0x28(%r14), %xmm0
movups %xmm0, 0x20(%r15)
movq 0x38(%r14), %rax
movq %rax, 0x30(%r15)
movq (%r13), %rax
cmpq %rax, 0x8(%r13)
je 0x1196b
xorl %r12d, %r12d
leaq 0x28(%rsp), %r14
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x11280
movl %eax, %ebp
testb %al, %al
je 0x11605
incq %r12
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x115d8
xorb $0x1, %bpl
jmp 0x1196d
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 0x147b2
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 0x13a42
movq %r13, %rdi
callq 0x1553e
leaq 0x118(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x83ac(%rip), %rsi      # 0x19a1f
leaq 0x83af(%rip), %rdx      # 0x19a29
leaq 0x108(%rsp), %r13
movq %r13, %rdi
callq 0x8faa
movq %r14, %rdi
movq %r13, %rsi
callq 0x14186
leaq 0x20(%r14), %r13
movq 0x108(%rsp), %rdi
cmpq %rbp, %rdi
je 0x116b6
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 0x147b2
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 0x11cd2
movl %eax, %ebx
movq %r14, %rdi
callq 0x1553e
testb %bl, %bl
jne 0x11994
jmp 0x11aa3
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 0x179ce
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 0x179ce
leaq 0x148(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x14310
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x11795
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3280
testb %bpl, %bpl
jne 0x11ab7
movq 0x50(%rsp), %rbp
testq %rbp, %rbp
je 0x11854
movq (%r14), %rax
leaq 0x240(%rsp), %r13
movq %rax, -0x8(%r13)
leaq 0x8(%r14), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x147b2
movups 0x20(%r14), %xmm0
movups 0x30(%r14), %xmm1
leaq 0x238(%rsp), %rdx
movups %xmm1, 0x30(%rdx)
movups %xmm0, 0x20(%rdx)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x11cd2
movl %eax, %ebp
movq %r13, %rdi
callq 0x1553e
testb %bpl, %bpl
je 0x11a7d
movq 0x50(%rsp), %rbp
testq %rbp, %rbp
je 0x11854
movq (%r14), %rax
leaq 0x200(%rsp), %r13
movq %rax, -0x8(%r13)
movq %r13, %rdi
movq %r12, %rsi
callq 0x147b2
leaq 0x20(%r14), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
leaq 0x1f8(%rsp), %rdx
movups %xmm1, 0x30(%rdx)
movups %xmm0, 0x20(%rdx)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x13a42
movq %r13, %rdi
callq 0x1553e
leaq 0x138(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x179ce
leaq 0x128(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x14362
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x118a8
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3280
testb %bpl, %bpl
je 0x1199b
leaq 0x81bf(%rip), %rsi      # 0x19a77
movq %rsp, %rdi
movq %r15, %rdx
callq 0xa256
leaq 0x82d3(%rip), %rsi      # 0x19b9d
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 0x11a20
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x11a27
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8196(%rip), %rsi      # 0x19aa9
leaq 0x81b1(%rip), %rdx      # 0x19acb
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x8faa
movq 0x80(%r12), %rdx
movq 0x88(%r12), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10df6
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11aa3
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11aa3
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x1553e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1198b
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
testb %bpl, %bpl
jne 0x11aa3
movb $0x1, %al
jmp 0x11aa5
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %rsi
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x179ce
leaq 0x168(%rsp), %rdi
leaq 0x88(%rsp), %rdx
movq %rbx, %rsi
callq 0x11210
addq $0x8, %r14
leaq 0x168(%rsp), %rsi
movq %r14, %rdi
callq 0x105f4
leaq 0x168(%rsp), %rdi
callq 0xfecc
movq 0x88(%rsp), %rdi
movb $0x1, %bl
cmpq %r15, %rdi
je 0x11a7f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11a7f
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 0x14342
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x11a62
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11a7d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3280
xorl %ebx, %ebx
leaq 0x40(%rsp), %rax
movq 0x30(%rsp), %rdi
cmpq %rax, %rdi
je 0x11a9b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
testb %bl, %bl
jne 0x11994
xorl %eax, %eax
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f86(%rip), %rsi      # 0x19a44
movq %rsp, %rdi
movq %r15, %rdx
callq 0xa256
leaq 0x80cd(%rip), %rsi      # 0x19b9d
movq %rsp, %rdi
callq 0x33f0
leaq 0xf8(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
jne 0x11aff
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %r14, %rsi
jmp 0x11b12
movq %rsi, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0xf0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xe4bc(%rip), %rdi      # 0x1fff0
callq 0x32b0
movq %rax, %rdi
callq 0x3130
movl $0x3, %edi
callq 0x32e0
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x11bc0
movq 0xf8(%rsp), %rsi
jmp 0x11b83
jmp 0x11c3e
jmp 0x11c8c
jmp 0x11bbd
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x11bc0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11bc0
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0xfecc
jmp 0x11ba2
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x11c8f
movq 0x98(%rsp), %rsi
jmp 0x11bd7
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11c8f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11c8f
jmp 0x11c8c
jmp 0x11beb
movq %rax, %rbx
movq %r12, %rdi
jmp 0x11c85
jmp 0x11c8c
jmp 0x11c77
jmp 0x11c77
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11cc9
movq 0xb8(%rsp), %rsi
jmp 0x11ca3
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11cc9
movq 0xd8(%rsp), %rsi
jmp 0x11ca3
movq %rax, %rbx
movq %r13, %rdi
callq 0x1553e
jmp 0x11c8f
movq %rax, %rbx
movq %r14, %rdi
jmp 0x11c85
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11cc9
movq 0x118(%rsp), %rsi
jmp 0x11ca3
movq %rax, %rbx
movq %r13, %rdi
jmp 0x11c85
jmp 0x11c77
movq %rax, %rbx
movq %rbp, %rdi
jmp 0x11c85
movq %rax, %rbx
movq %r15, %rdi
callq 0x1553e
jmp 0x11cc9
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x11cc9
movq 0x40(%rsp), %rsi
incq %rsi
jmp 0x11cc4
movq %rax, %rbx
movq %r15, %rdi
callq 0x1553e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x11cc9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x33b0
nop