// File: /workspace/github_c_makefile_star2_O3/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
movl (%r14), %eax
cmpl $0x11, %eax
jne 0x4c21
movq 0x10(%r14), %rsi
movq 0x20(%r14), %r12
cmpl $0x5, (%rsi)
jne 0x4c93
cmpl $0x2, 0x10(%rsi)
jne 0x4c93
cmpq $0x1, 0x18(%rsi)
jne 0x4c14
movq 0x18(%r14), %r14
jmp 0x4be4
movq %r12, %r14
testq %r12, %r12
jne 0x4be4
jmp 0x4f7a
leal -0x12(%rax), %ecx
cmpl $0xb, %ecx
ja 0x4c68
leaq 0x7578(%rip), %rax      # 0xc1a8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x0, 0x18(%r14)
je 0x4f7a
xorl %r15d, %r15d
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x4bd0
incq %r15
movl 0x18(%r14), %eax
cmpq %rax, %r15
jb 0x4c47
jmp 0x4f7a
cmpl $0x3, %eax
je 0x4e83
cmpl $0x4, %eax
jne 0x4d8d
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x503c
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 0x3bac
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0xa, (%rcx,%rax,8)
movl %r13d, 0x10(%rcx,%rax,8)
incq 0x48(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x4bd0
testq %r12, %r12
je 0x4d68
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0x8, (%rcx,%rax,8)
movl $0x0, 0x8(%rcx,%rax,8)
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl %r15d, 0xc(%rcx,%rax,8)
incq 0x48(%rbx)
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0xa, (%rcx,%rax,8)
movl %ebp, 0x10(%rcx,%rax,8)
incq 0x48(%rbx)
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x4bd0
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0xa, (%rcx,%rax,8)
movl %r15d, 0x10(%rcx,%rax,8)
jmp 0x4f76
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3bac
movq 0x10(%r14), %rax
cmpl $0x5, (%rax)
jne 0x4e9e
cmpl $0x2, 0x10(%rax)
jne 0x4e9e
cmpq $0x0, 0x18(%rax)
je 0x4f7a
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x54ef
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3bac
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0x10(%rbx), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x38a2
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rdx
movl $0x9, (%rcx,%rdx,8)
incq %rax
movq %rax, 0x48(%rbx)
jmp 0x4f7a
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4f89
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0x8, (%rcx,%rax,8)
movl $0x0, 0x8(%rcx,%rax,8)
movl 0x78(%rbx), %eax
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rdx
leaq (%rcx,%rcx,4), %rcx
movl %eax, 0xc(%rdx,%rcx,8)
jmp 0x4f76
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 0x52a4
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 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0xa, %r12d
movl %r12d, (%rcx,%rax,8)
movl %r15d, 0x10(%rcx,%rax,8)
incq 0x48(%rbx)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3bac
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl %r12d, (%rcx,%rax,8)
movl %r13d, 0x10(%rcx,%rax,8)
incq 0x48(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x4bd0
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl $0x8, (%rcx,%rax,8)
movl $0x0, 0x8(%rcx,%rax,8)
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl %r15d, 0xc(%rcx,%rax,8)
incq 0x48(%rbx)
movq %rbx, %rdi
callq 0x37d7
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl %r12d, (%rcx,%rax,8)
movl %ebp, 0x10(%rcx,%rax,8)
incq 0x48(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq