// File: /workspace/github_c_makefile_star2_O2/Encryptr[P]O-plus-plus/opp/compiler/compile_stmt.c
// Function: opp_compile_stmt
void opp_compile_stmt(struct Opp_Context* opp, struct Opp_Node* node)
{
	switch (node->type)
	{
		case STMT_VAR:
			opp_compile_var(opp, node);
			break;

		case STMT_BLOCK:
			opp_compile_block(opp, node);
			break;

		case EASSIGN:
			opp_compile_assign(opp, node);
			break;

		case ECALL:
			opp_compile_call(opp, node, false);
			break;

		case STMT_RET:
			opp_compile_ret(opp, node);
			break;

		case STMT_IF:
			opp_compile_if(opp, node);
			break;

		case STMT_WHILE:
			opp_compile_while(opp, node);
			break;

		case STMT_BREAK:
			opp_compile_break(opp, node);
			break;

		default: 
			// temp
			opp_compile_expr(opp, node);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x67d5(%rip), %rax      # 0xb1a8
movl (%r14), %ecx
leal -0x11(%rcx), %edx
cmpl $0xc, %edx
ja 0x4a14
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%r14), %rsi
movq 0x20(%r14), %r12
cmpl $0x5, (%rsi)
jne 0x4a3f
cmpl $0x2, 0x10(%rsi)
jne 0x4a3f
cmpq $0x1, 0x18(%rsi)
jne 0x4a07
movq 0x18(%r14), %r14
jmp 0x49d3
movq %r12, %r14
testq %r12, %r12
jne 0x49d3
jmp 0x4d6b
cmpl $0x3, %ecx
je 0x4c88
cmpl $0x4, %ecx
jne 0x4b27
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4e24
movl 0x24(%rbx), %r15d
leal 0x1(%r15), %r13d
leal 0x2(%r15), %ebp
leal 0x3(%r15), %eax
testq %r12, %r12
cmovel %ebp, %eax
movl $0x1, 0x68(%rbx)
movl %ebp, %ecx
cmovel %r15d, %ecx
movl %eax, 0x24(%rbx)
movl %r15d, 0x78(%rbx)
movl %r13d, 0x70(%rbx)
movl %ecx, 0x74(%rbx)
movq %rbx, %rdi
callq 0x3abc
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0xa, (%rax,%rcx)
movl %r13d, 0x10(%rax,%rcx)
incq 0x48(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x49b8
testq %r12, %r12
je 0x4b05
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0x8, (%rax,%rcx)
andl $0x0, 0x8(%rax,%rcx)
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl %r15d, 0xc(%rax,%rcx)
incq 0x48(%rbx)
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0xa, (%rax,%rcx)
movl %ebp, 0x10(%rax,%rcx)
incq 0x48(%rbx)
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x49b8
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0xa, (%rax,%rcx)
movl %r15d, 0x10(%rax,%rcx)
jmp 0x4d67
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3abc
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3abc
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0x10(%rbx), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x37e2
movq %rbx, %rdi
callq 0x3725
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
imulq $0x28, %rax, %rdx
movl $0x9, (%rcx,%rdx)
incq %rax
movq %rax, 0x48(%rbx)
jmp 0x4d6b
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d7a
movq 0x10(%r14), %rax
cmpl $0x5, (%rax)
jne 0x4ca3
cmpl $0x2, 0x10(%rax)
jne 0x4ca3
cmpq $0x0, 0x18(%rax)
je 0x4d6b
movl 0x24(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0x24(%rbx)
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0xa, (%rax,%rcx)
movl %r15d, 0x10(%rax,%rcx)
incq 0x48(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x49b8
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0x8, (%rax,%rcx)
andl $0x0, 0x8(%rax,%rcx)
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl %r15d, 0xc(%rax,%rcx)
jmp 0x4d67
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0x8, (%rax,%rcx)
andl $0x0, 0x8(%rax,%rcx)
movl 0x78(%rbx), %eax
movq 0x58(%rbx), %rcx
imulq $0x28, 0x48(%rbx), %rdx
movl %eax, 0xc(%rcx,%rdx)
jmp 0x4d67
xorl %r15d, %r15d
movl 0x18(%r14), %eax
cmpq %rax, %r15
jae 0x4d6b
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x49b8
incq %r15
jmp 0x4c66
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x504d
movl $0x1, 0x68(%rbx)
movl 0x24(%rbx), %r15d
leal 0x1(%r15), %r13d
leal 0x2(%r15), %ebp
leal 0x3(%r15), %eax
movl %eax, 0x24(%rbx)
movl %ebp, 0x78(%rbx)
movl %r13d, 0x70(%rbx)
movl %ebp, 0x74(%rbx)
movq %rbx, %rdi
callq 0x3725
imulq $0x28, 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
pushq $0xa
popq %r12
movl %r12d, (%rcx,%rax)
movl %r15d, 0x10(%rcx,%rax)
incq 0x48(%rbx)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3abc
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl %r12d, (%rax,%rcx)
movl %r13d, 0x10(%rax,%rcx)
incq 0x48(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x49b8
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl $0x8, (%rax,%rcx)
andl $0x0, 0x8(%rax,%rcx)
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl %r15d, 0xc(%rax,%rcx)
incq 0x48(%rbx)
movq %rbx, %rdi
callq 0x3725
movq 0x58(%rbx), %rax
imulq $0x28, 0x48(%rbx), %rcx
movl %r12d, (%rax,%rcx)
movl %ebp, 0x10(%rax,%rcx)
incq 0x48(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq