// File: /workspace/github_cpp_makefile_star2_O1/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 0x1695f
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2d83(%rip), %rcx      # 0x192a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %r15
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb122
leaq 0x20(%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 (%r12), %rax
cmpq %rax, 0x8(%r12)
je 0x165b4
xorl %r12d, %r12d
leaq 0x18(%rsp), %r14
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x164f0
incq %r12
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x1658d
movq %r15, %rdi
callq 0x15538
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1695f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
jmp 0x1695a
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 0x16d54
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 0x16d54
leaq 0x3702(%rip), %rsi      # 0x19d1e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e4
leaq 0x3708(%rip), %rsi      # 0x19d35
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e4
leaq 0x20(%rsp), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%r13)
movups %xmm0, (%r13)
movups %xmm0, 0x20(%r13)
movq $0x0, 0x30(%r13)
movq %r14, -0x8(%r13)
movb 0x20(%r14), %al
movb %al, 0x18(%r13)
movq 0x28(%r14), %rax
movq %rax, 0x20(%r13)
movq 0x30(%r14), %rax
movq %rax, 0x28(%r13)
movq 0x38(%r14), %rax
movq %rax, 0x30(%r13)
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x164f0
leaq 0x36b3(%rip), %rsi      # 0x19d47
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e4
movq %r13, %rdi
jmp 0x167a8
movq 0x30(%r14), %rdx
jmp 0x166b3
movq 0x38(%r14), %rdx
leaq 0x3694(%rip), %rsi      # 0x19d4e
movq %rbx, %rdi
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x162e4
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 0x3651(%rip), %rsi      # 0x19d47
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x162e4
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x16d54
leaq 0x3606(%rip), %rsi      # 0x19d1e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e4
leaq 0x360c(%rip), %rsi      # 0x19d35
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e4
leaq 0x20(%rsp), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%rbp)
movups %xmm0, (%rbp)
movups %xmm0, 0x20(%rbp)
movq $0x0, 0x30(%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 0x164f0
leaq 0x35ca(%rip), %rsi      # 0x19d4e
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x162e4
leaq 0x35af(%rip), %rsi      # 0x19d47
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x162e4
movq %rbp, %rdi
callq 0x15538
jmp 0x1695f
movq 0x40(%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x16d54
leaq 0x3598(%rip), %rsi      # 0x19d60
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e4
leaq 0x35a1(%rip), %rsi      # 0x19d7a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e4
leaq 0x35a3(%rip), %rsi      # 0x19d8d
movq %rbx, %rdi
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x162e4
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 0x17a38
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 0x17a38
movq 0x28(%r14), %rcx
addq $-0x8, %rcx
movq %rcx, 0x28(%r14)
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq %r15, %rsi
callq 0x16476
leaq 0x8(%r14), %rdi
leaq 0x98(%rsp), %rsi
callq 0x10b8e
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
callq 0x9812
movq -0x20(%r15), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x168c0
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x168da
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x16948
movq %rbx, %rdi
movq %r14, %rdx
callq 0x16d54
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x17a38
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x14730
movq 0x48(%rax), %rdx
leaq 0x3470(%rip), %rsi      # 0x19d97
movq %rbx, %rdi
xorl %eax, %eax
callq 0x162e4
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x16948
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1695f
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 0x169ce
movq 0x68(%rsp), %rsi
jmp 0x169ac
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x103f6
jmp 0x1699a
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x169ce
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x169ce
movq %rax, %rbx
movq %rbp, %rdi
jmp 0x169c4
movq %rax, %rbx
movq %r13, %rdi
callq 0x15538
jmp 0x16a03
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x16a03
movq 0x30(%rsp), %rsi
incq %rsi
jmp 0x169fe
movq %rax, %rbx
movq %r15, %rdi
callq 0x15538
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x16a03
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x33b0
nop