// File: 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
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x249a2
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq -0x30(%rbp), %rdi
callq 0x1d5f0
movq -0x18(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x191a0
jmp 0x248ff
movl $0x0, -0x80(%rbp)
movslq -0x80(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x10c30
movq %rax, %rcx
movq -0x228(%rbp), %rax
cmpq %rcx, %rax
jae 0x2497d
movslq -0x80(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x1c130
movq -0x220(%rbp), %rdi
movq (%rax), %rsi
leaq -0x70(%rbp), %rdx
callq 0x248b0
jmp 0x2494b
jmp 0x2494d
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x24906
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x24994
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x19c10
jmp 0x24994
leaq -0x70(%rbp), %rdi
callq 0x19c10
leaq -0x30(%rbp), %rdi
callq 0x110f0
jmp 0x24ec6
leaq -0x30(%rbp), %rdi
callq 0x110f0
jmp 0x24ecf
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x24aa2
movq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rax
movups 0x20(%rax), %xmm0
movaps %xmm0, -0x90(%rbp)
movq 0x20(%rdi), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x20(%rdi)
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25240
movq -0x220(%rbp), %rdi
leaq 0x410f(%rip), %rsi      # 0x28b07
xorl %eax, %eax
movb %al, -0x231(%rbp)
callq 0x245e0
movb -0x231(%rbp), %al
movq -0x220(%rbp), %rdi
movq -0x98(%rbp), %rdx
leaq 0x40fe(%rip), %rsi      # 0x28b1e
callq 0x245e0
movq -0x18(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x191a0
movq -0x220(%rbp), %rdi
movq -0x230(%rbp), %rdx
movq -0x88(%rbp), %rsi
callq 0x248b0
jmp 0x24a58
movq -0x220(%rbp), %rdi
movq -0x98(%rbp), %rdx
leaq 0x40c3(%rip), %rsi      # 0x28b30
movb $0x0, %al
callq 0x245e0
leaq -0xd8(%rbp), %rdi
callq 0x19c10
jmp 0x24ec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x19c10
jmp 0x24ecf
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x24c0f
movq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rax
movups 0x30(%rax), %xmm0
movaps %xmm0, -0xf0(%rbp)
movq 0x20(%rdi), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x20(%rdi)
movq %rax, -0xf8(%rbp)
movq 0x20(%rdi), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x20(%rdi)
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rdx
leaq 0x4033(%rip), %rsi      # 0x28b30
xorl %eax, %eax
movb %al, -0x241(%rbp)
callq 0x245e0
movq -0x220(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25240
movb -0x241(%rbp), %al
movq -0x220(%rbp), %rdi
leaq 0x3fd2(%rip), %rsi      # 0x28b07
callq 0x245e0
movb -0x241(%rbp), %al
movq -0x220(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0x3fc9(%rip), %rsi      # 0x28b1e
callq 0x245e0
movq -0x18(%rbp), %rsi
leaq -0x140(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x191a0
movq -0x220(%rbp), %rdi
movq -0x240(%rbp), %rdx
movq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0xe8(%rbp), %rsi
callq 0x248b0
jmp 0x24ba9
movq -0x220(%rbp), %rdi
movq -0xf8(%rbp), %rdx
leaq 0x3f79(%rip), %rsi      # 0x28b37
movb $0x0, %al
callq 0x245e0
movq -0x220(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0x3f56(%rip), %rsi      # 0x28b30
movb $0x0, %al
callq 0x245e0
leaq -0x140(%rbp), %rdi
callq 0x19c10
jmp 0x24ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x19c10
jmp 0x24ecf
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x24c82
movq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25240
movq -0x220(%rbp), %rdi
leaq 0x3efd(%rip), %rsi      # 0x28b49
movb $0x0, %al
callq 0x245e0
movq -0x220(%rbp), %rdi
leaq 0x3f02(%rip), %rsi      # 0x28b63
movb $0x0, %al
callq 0x245e0
movq -0x220(%rbp), %rdi
leaq 0x3f00(%rip), %rsi      # 0x28b76
movb $0x0, %al
callq 0x245e0
jmp 0x24ec0
movq -0x10(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x24e39
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
leaq -0x178(%rbp), %rdi
callq 0x209e0
movq -0x18(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq -0x170(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x3130
jmp 0x24cd1
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
addq $-0x8, %rcx
movq %rcx, 0x28(%rax)
movq -0x1d0(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
leaq -0x1f0(%rbp), %rdx
callq 0x24810
jmp 0x24cfd
movq -0x250(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x19230
jmp 0x24d12
leaq -0x1c8(%rbp), %rdi
callq 0x193b0
leaq -0x1f0(%rbp), %rdi
callq 0x31c0
cmpq $0x0, -0x150(%rbp)
je 0x24e17
movq -0x220(%rbp), %rdi
movq -0x150(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25240
jmp 0x24d51
movq -0x18(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0x170(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x3130
jmp 0x24d71
movq -0x258(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x20800
movq %rax, -0x260(%rbp)
jmp 0x24d8d
movq -0x220(%rbp), %rdi
movq -0x260(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x3dda(%rip), %rsi      # 0x28b80
movb $0x0, %al
callq 0x245e0
leaq -0x210(%rbp), %rdi
callq 0x31c0
jmp 0x24e17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x24e28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x24def
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x193b0
leaq -0x1f0(%rbp), %rdi
callq 0x31c0
jmp 0x24e28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x31c0
jmp 0x24e28
leaq -0x178(%rbp), %rdi
callq 0x112c0
jmp 0x24ebe
leaq -0x178(%rbp), %rdi
callq 0x112c0
jmp 0x24ecf
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x24e6a
movq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25240
jmp 0x24ebc
movq -0x10(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x24e92
movq -0x220(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
leaq 0x3cae(%rip), %rsi      # 0x28b37
movb $0x0, %al
callq 0x245e0
jmp 0x24eba
movq -0x10(%rbp), %rax
cmpl $0x8, (%rax)
jne 0x24eb8
movq -0x220(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
leaq 0x3c86(%rip), %rsi      # 0x28b37
movb $0x0, %al
callq 0x245e0
jmp 0x24eba
jmp 0x24ebc
jmp 0x24ebe
jmp 0x24ec0
jmp 0x24ec2
jmp 0x24ec4
jmp 0x24ec6
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x34c0
nopl (%rax,%rax)