// File: /workspace/github_cpp_makefile_star2_O2/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 0xea5c
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x1ba0(%rip), %rcx      # 0x10298
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %rsi
movq %rsp, %rdi
callq 0x71ec
leaq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
andq $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)
xorl %r12d, %r12d
leaq 0x18(%rsp), %r14
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0xea4c
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xe6ce
incq %r12
jmp 0xe744
movq 0x78(%rsi), %rsi
movq %rbx, %rdi
movq %r14, %rdx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xed2a
movq 0x20(%rsi), %rax
movq 0x28(%rsi), %r12
movq 0x20(%rbx), %r15
leaq 0x1(%r15), %rcx
movq %rcx, 0x20(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xed2a
leaq 0x25dc(%rip), %rsi      # 0x10d96
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe4f2
leaq 0x25e2(%rip), %rsi      # 0x10dad
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe4f2
leaq 0x20(%rsp), %r13
xorps %xmm0, %xmm0
andq $0x0, 0x10(%r13)
movups %xmm0, (%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 0xe6ce
leaq 0x25a0(%rip), %rsi      # 0x10dbf
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe4f2
movq %r13, %rdi
jmp 0xe928
movq 0x30(%r14), %rdx
jmp 0xe83e
movq 0x38(%r14), %rdx
leaq 0x2581(%rip), %rsi      # 0x10dc6
movq %rbx, %rdi
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe4f2
movq 0x30(%rsi), %rbp
movq 0x38(%rsi), %r13
movq 0x20(%rbx), %r12
leaq 0x1(%r12), %r15
leaq 0x2(%r12), %rax
movq %rax, 0x20(%rbx)
leaq 0x253e(%rip), %rsi      # 0x10dbf
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe4f2
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0xed2a
leaq 0x24f3(%rip), %rsi      # 0x10d96
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe4f2
leaq 0x24f9(%rip), %rsi      # 0x10dad
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe4f2
leaq 0x20(%rsp), %rbp
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rbp)
movups %xmm0, (%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 0xe6ce
leaq 0x24c2(%rip), %rsi      # 0x10dc6
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe4f2
leaq 0x24a7(%rip), %rsi      # 0x10dbf
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe4f2
movq %rbp, %rdi
callq 0xdbb0
jmp 0xea5c
movq 0x40(%rsi), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xed2a
leaq 0x2490(%rip), %rsi      # 0x10dd8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe4f2
leaq 0x2499(%rip), %rsi      # 0x10df2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe4f2
leaq 0x249b(%rip), %rsi      # 0x10e05
movq %rbx, %rdi
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe4f2
addq $0x48, %rsi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0xcd7a
movq (%r15), %r12
leaq 0x20(%rsp), %r15
leaq 0x78(%rsp), %rdi
movq %r15, %rsi
callq 0x22e0
movq 0x28(%r14), %rcx
addq $-0x8, %rcx
movq %rcx, 0x28(%r14)
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq %r12, %rsi
callq 0xe662
leaq 0x8(%r14), %rdi
leaq 0x98(%rsp), %rsi
callq 0xa578
leaq 0x98(%rsp), %rdi
callq 0xa0d6
leaq 0x78(%rsp), %rdi
callq 0x2100
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0xea42
movq %rbx, %rdi
movq %r14, %rdx
callq 0xed2a
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x22e0
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0xcc74
movq 0x48(%rax), %rdx
leaq 0x23e1(%rip), %rsi      # 0x10e0f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe4f2
leaq 0x58(%rsp), %rdi
callq 0x2100
movq %r15, %rdi
callq 0x2100
jmp 0xea5c
movq %r15, %rdi
callq 0xdbb0
movq %rsp, %rdi
callq 0x72ee
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0xea92
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0xa0d6
jmp 0xea8d
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x2100
jmp 0xeab1
movq %rax, %rbx
movq %rbp, %rdi
jmp 0xeaa7
movq %rax, %rbx
movq %r13, %rdi
callq 0xdbb0
jmp 0xeace
movq %rax, %rbx
movq %r15, %rdi
callq 0x2100
jmp 0xeace
movq %rax, %rbx
movq %r15, %rdi
callq 0xdbb0
movq %rsp, %rdi
callq 0x72ee
movq %rbx, %rdi
callq 0x2390