// File: /workspace/github_cpp_makefile_star2_O3/CobaltXII[P]cxcc/./compiler/compiler.hpp
// Function: compiler_t::compile_statement(statement_t*, symbol_table_t&)
void compile_statement(statement_t* statement, symbol_table_t& symbols) {
		if (statement->type == st_compound) {
			compound_statement_t stmt = statement->compound_stmt;
			symbol_table_t new_symbols(&symbols);
			for (int i = 0; i < stmt.statements.size(); i++) {
				compile_statement(stmt.statements[i], new_symbols);
			}
		} else if (statement->type == st_conditional) {
			conditional_statement_t stmt = statement->conditional_stmt;
			long l0 = label++;
			compile_expression(stmt.condition, symbols);
			emit("    cmpq    $0, %%rax\n");
			emit("    je      L%ld\n", l0);
			symbol_table_t new_symbols(&symbols);
			compile_statement(stmt.body, new_symbols);
			emit("L%ld:\n", l0);
		} else if (statement->type == st_while) {
			while_statement_t stmt = statement->while_stmt;
			long l0 = label++;
			long l1 = label++;
			emit("L%ld:\n", l0);
			compile_expression(stmt.condition, symbols);
			emit("    cmpq    $0, %%rax\n");
			emit("    je      L%ld\n", l1);
			symbol_table_t new_symbols(&symbols);
			new_symbols.loop_break_to = l1;
			new_symbols.loop_continue_to = l0;
			compile_statement(stmt.body, new_symbols);
			emit("    jmp     L%ld\n", l0);
			emit("L%ld:\n", l1);
		} else if (statement->type == st_return) {
			return_statement_t stmt = statement->return_stmt;
			compile_expression(stmt.value, symbols);
			emit("    movq    %%rbp, %%rsp\n");
			emit("    popq    %%rbp\n");
			emit("    retq\n");
		} else if (statement->type == st_variable_declaration) {
			variable_declaration_statement_t stmt = statement->variable_declaration_stmt;
			symbols.add_symbol(symbol_t(stmt.type, stmt.identifier, symbols.offset -= 8));
			if (stmt.initializer) {
				compile_expression(stmt.initializer, symbols);
				emit("    movq    %%rax, %ld(%%rbp)\n", symbols.fetch(stmt.identifier).offset);
			}
		} else if (statement->type == st_expression) {
			expression_statement_t stmt = statement->expression_stmt;
			compile_expression(stmt.expression, symbols);
		} else if (statement->type == st_break) {
			emit("    jmp     L%ld\n", symbols.loop_break_to);
		} else if (statement->type == st_continue) {
			emit("    jmp     L%ld\n", symbols.loop_continue_to);
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0x1692d
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2dbd(%rip), %rcx      # 0x192d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %r15
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb076
leaq 0x20(%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 (%r12), %rax
cmpq %rax, 0x8(%r12)
je 0x1659a
xorl %r12d, %r12d
leaq 0x18(%rsp), %r14
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x164e6
incq %r12
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x16573
movq %r15, %rdi
callq 0x1553e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1692d
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
jmp 0x16928
movq 0x78(%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16ce8
movq 0x20(%r15), %rsi
movq 0x28(%r15), %r12
movq 0x20(%rbx), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x16ce8
leaq 0x374c(%rip), %rsi      # 0x19d4e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e6
leaq 0x3752(%rip), %rsi      # 0x19d65
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e6
leaq 0x20(%rsp), %r13
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movq %r14, -0x8(%r13)
movb 0x20(%r14), %al
movb %al, 0x18(%r13)
movups 0x28(%r14), %xmm0
movups %xmm0, 0x20(%r13)
movq 0x38(%r14), %rax
movq %rax, 0x30(%r13)
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x164e6
leaq 0x370d(%rip), %rsi      # 0x19d77
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e6
movq %r13, %rdi
jmp 0x16776
movq 0x30(%r14), %rdx
jmp 0x16689
movq 0x38(%r14), %rdx
leaq 0x36ee(%rip), %rsi      # 0x19d7e
movq %rbx, %rdi
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x162e6
movq 0x30(%r15), %rbp
movq 0x38(%r15), %r13
movq 0x20(%rbx), %r12
leaq 0x1(%r12), %r15
leaq 0x2(%r12), %rax
movq %rax, 0x20(%rbx)
leaq 0x36ab(%rip), %rsi      # 0x19d77
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x162e6
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x16ce8
leaq 0x3660(%rip), %rsi      # 0x19d4e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e6
leaq 0x3666(%rip), %rsi      # 0x19d65
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e6
leaq 0x20(%rsp), %rbp
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
movq $0x0, 0x10(%rbp)
movq %r14, -0x8(%rbp)
movb 0x20(%r14), %al
movb %al, 0x18(%rbp)
movq 0x28(%r14), %rax
movq %rax, 0x20(%rbp)
movq %r15, 0x28(%rbp)
movq %r12, 0x30(%rbp)
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x164e6
leaq 0x362c(%rip), %rsi      # 0x19d7e
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x162e6
leaq 0x3611(%rip), %rsi      # 0x19d77
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e6
movq %rbp, %rdi
callq 0x1553e
jmp 0x1692d
movq 0x40(%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x16ce8
leaq 0x35fa(%rip), %rsi      # 0x19d90
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e6
leaq 0x3603(%rip), %rsi      # 0x19daa
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e6
leaq 0x3605(%rip), %rsi      # 0x19dbd
movq %rbx, %rdi
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x162e6
movq 0x48(%r15), %rax
leaq 0x20(%rsp), %rdi
movq %rax, -0x8(%rdi)
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x50(%r15), %rsi
movq 0x58(%r15), %rdx
addq %rsi, %rdx
callq 0x179ce
movq 0x70(%r15), %rax
movq %rax, 0x10(%r12)
movq -0x18(%r12), %r15
movq -0x10(%r12), %rsi
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq -0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x179ce
movq 0x28(%r14), %rcx
addq $-0x8, %rcx
movq %rcx, 0x28(%r14)
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq %r15, %rsi
callq 0x1646c
leaq 0x8(%r14), %rdi
leaq 0x98(%rsp), %rsi
callq 0x105f4
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
callq 0x9730
movq -0x20(%r15), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x1688e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x168a8
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x16916
movq %rbx, %rdi
movq %r14, %rdx
callq 0x16ce8
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x179ce
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x14186
movq 0x48(%rax), %rdx
leaq 0x34d2(%rip), %rsi      # 0x19dc7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e6
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x16916
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1692d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x1699c
movq 0x68(%rsp), %rsi
jmp 0x1697a
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0xfecc
jmp 0x16968
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x1699c
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x1699c
movq %rax, %rbx
movq %rbp, %rdi
jmp 0x16992
movq %rax, %rbx
movq %r13, %rdi
callq 0x1553e
jmp 0x169d1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x169d1
movq 0x30(%rsp), %rsi
incq %rsi
jmp 0x169cc
movq %rax, %rbx
movq %r15, %rdi
callq 0x1553e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x169d1
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x33b0
nop