// File: /workspace/github_c_makefile_star2_O1/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 0x4cb5
movq 0x10(%r14), %rsi
movq 0x20(%r14), %r12
cmpl $0x5, (%rsi)
jne 0x4d27
cmpl $0x2, 0x10(%rsi)
jne 0x4d27
cmpq $0x1, 0x18(%rsi)
jne 0x4ca8
movq 0x18(%r14), %r14
jmp 0x4c78
movq %r12, %r14
testq %r12, %r12
jne 0x4c78
jmp 0x500c
leal -0x12(%rax), %ecx
cmpl $0xb, %ecx
ja 0x4cfc
leaq 0x74e4(%rip), %rax      # 0xc1a8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x0, 0x18(%r14)
je 0x500c
xorl %r15d, %r15d
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x4c64
incq %r15
movl 0x18(%r14), %eax
cmpq %rax, %r15
jb 0x4cdb
jmp 0x500c
cmpl $0x3, %eax
je 0x4f15
cmpl $0x4, %eax
jne 0x4e1f
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50ce
movl 0x24(%rbx), %r15d
leal 0x1(%r15), %r13d
leal 0x2(%r15), %ebp
leal 0x3(%r15), %eax
testq %r12, %r12
movl $0x1, 0x68(%rbx)
cmovel %ebp, %eax
cmovel %r15d, %ebp
movl %eax, 0x24(%rbx)
movl %r15d, 0x78(%rbx)
movl %r13d, 0x70(%rbx)
movl %ebp, 0x74(%rbx)
movq %rbx, %rdi
callq 0x3c28
movq %rbx, %rdi
callq 0x385b
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 0x4c64
testq %r12, %r12
je 0x4dfa
movq %rbx, %rdi
callq 0x385b
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 0x385b
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 0x4c64
movq %rbx, %rdi
callq 0x385b
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 0x5008
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c28
movq 0x10(%r14), %rax
cmpl $0x5, (%rax)
jne 0x4f30
cmpl $0x2, 0x10(%rax)
jne 0x4f30
cmpq $0x0, 0x18(%rax)
je 0x500c
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x558c
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3c28
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0x10(%rbx), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x3929
movq %rbx, %rdi
callq 0x385b
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 0x500c
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x501b
movq %rbx, %rdi
callq 0x385b
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 0x5008
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 0x533e
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 0x385b
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 0x3c28
movq %rbx, %rdi
callq 0x385b
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 0x4c64
movq %rbx, %rdi
callq 0x385b
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 0x385b
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