// File: /workspace/github_c_makefile_star2_O0/Encryptr[P]O-plus-plus/opp/parser/parser.c
// Function: opp_free_node
static void opp_free_node(struct Opp_Node* node)
{
	unsigned int i = 0;
	switch (node->type)
	{
		case STMT_VAR:
			opp_free_node(node->var_stmt.var);
			break;

		case STMT_STRUCT:
			for (; i < node->struct_stmt.len; i++)
				opp_free_node(node->struct_stmt.elems[i]);
			free(node->struct_stmt.elems);
			break;

		case STMT_FUNC:
			opp_free_node(node->fn_stmt.name);
			if (node->fn_stmt.body)
				opp_free_node(node->fn_stmt.body);
			for (; i < node->fn_stmt.len; i++)
				opp_free_node(node->fn_stmt.args[i].var_stmt.var);
			free(node->fn_stmt.args);
			break;

		case STMT_EXTERN:
			opp_free_node(node->extrn_stmt.stmt);
			break;

		case STMT_RET:
			opp_free_node(node->ret_stmt.value);
			break;

		case STMT_WHILE:
			opp_free_node(node->while_stmt.cond);
			opp_free_node(node->while_stmt.then);
			break;

		case STMT_BLOCK:
			for (; i < node->block_stmt.len; i++)
				opp_free_node(node->block_stmt.stmts[i]);
			free(node->block_stmt.stmts);
			break;

		case STMT_IF:
			opp_free_node(node->if_stmt.cond);
			opp_free_node(node->if_stmt.then);
			if (node->if_stmt.other)
				opp_free_node(node->if_stmt.other);
			break;

		case STMT_FOR:
			opp_free_node(node->for_stmt.decl);
			opp_free_node(node->for_stmt.cond);
			opp_free_node(node->for_stmt.expr);
			opp_free_node(node->for_stmt.body);
			break;

		case STMT_CASE:
			opp_free_node(node->case_stmt.cond);
			opp_free_node(node->case_stmt.stmt);
			break;

		case STMT_SWITCH:
			opp_free_node(node->switch_stmt.cond);
			opp_free_node(node->switch_stmt.block);
			break;

		case ESIZEOF:
			opp_free_node(node->sizeof_expr.expr);
			break;

		case EADDR:
			opp_free_node(node->addr_expr.addr);
			break;

		case EDEREF:
			opp_free_node(node->deref_expr.deref);
			break;

		case EADJUST:
			opp_free_node(node->adjust_expr.left);
			break;

		case EELEMENT:
			opp_free_node(node->elem_expr.name);
			opp_free_node(node->elem_expr.loc);
			break;

		case ESUB:
			opp_free_node(node->sub_expr.unary);
			break;

		case ELOGIC:
			opp_free_node(node->logic_expr.left);
			opp_free_node(node->logic_expr.right);
			break;

		case ECALL:
			opp_free_node(node->call_expr.callee);
			for (; i < node->call_expr.args->length; i++)
				opp_free_node(node->call_expr.args->list[i]);
			free(node->call_expr.args->list);
			free(node->call_expr.args);
			break;

		case EASSIGN:
			opp_free_node(node->assign_expr.val);
			opp_free_node(node->assign_expr.ident);
			break;

		case EUNARY:
			if (node->unary_expr.type == TIDENT 
				|| node->unary_expr.type == TSTR)
				free(node->unary_expr.val.strval);
			break;

		case EBIN:
			opp_free_node(node->bin_expr.left);
			opp_free_node(node->bin_expr.right);
			break;

		case EDOT:
			opp_free_node(node->dot_expr.left);
			opp_free_node(node->dot_expr.right);
			break;

		case STMT_IMPORT:
		case STMT_BREAK:
			break;

		default:
			INTERNAL_ERROR("Unhandeled free node");
			break;
	}
	free(node);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x1d, %eax
ja 0xeb80
movq (%rsp), %rax
leaq 0x5fb4(%rip), %rcx      # 0x14788
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
jmp 0xe7f2
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xe823
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movl 0xc(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xe7a0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xe7f2
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x1030
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0xe85e
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0xe7a0
jmp 0xe860
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jae 0xe898
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movl 0xc(%rsp), %ecx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xe860
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x1030
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
jmp 0xe8f4
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xe925
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movl 0xc(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xe7a0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xe8f4
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x1030
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0xe96e
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
cmpl (%rcx), %eax
jae 0xead9
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movl 0xc(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xe7a0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xeaa1
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x1030
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
cmpl $0x1, 0x10(%rax)
je 0xeb32
movq 0x10(%rsp), %rax
cmpl $0x5, 0x10(%rax)
jne 0xeb40
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xe7a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe7a0
jmp 0xeb93
jmp 0xeb93
leaq 0x5e1c(%rip), %rdi      # 0x149a3
leaq 0x5e2a(%rip), %rsi      # 0x149b8
callq 0x114a0
movq 0x10(%rsp), %rdi
callq 0x1030
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)