// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_freshenzeaux
static struct mirth_type_StackType mw_mirth_type_StackType_freshenzeaux (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, struct std_list_List_1 in_Subst_3, struct mirth_type_StackType in_StackType_4, struct mirth_mirth_zaMirth* *out_zaMirth_5, struct std_list_List_1 *out_Subst_7, struct mirth_type_StackType *out_StackType_8) {
	struct mirth_mirth_zaMirth* v9;
	struct mirth_type_StackType v10 = mw_mirth_type_StackType_expand(in_zaMirth_1, in_StackType_4, &v9);
	struct mirth_mirth_zaMirth* branch_zaMirth_11;
	struct mirth_type_StackType branch_StackType_12;
	struct std_list_List_1 branch_Subst_13;
	struct mirth_type_StackType branch_StackType_14;
	switch ((v10).tag) {
		case mirth_type_StackType_Unit: {
			incref(MK_mirth_type_StackType(in_StackType_2));
			branch_StackType_14 = in_StackType_2;
			branch_Subst_13 = in_Subst_3;
			branch_StackType_12 = in_StackType_2;
			branch_zaMirth_11 = v9;
		} break;
		case mirth_type_StackType_Cons: {
			struct mirth_type_Type v15;
			struct mirth_type_StackType v16 = mtp_mirth_type_StackType_Cons(v10, &v15);
			struct mirth_mirth_zaMirth* v17;
			struct std_list_List_1 v18;
			struct mirth_type_StackType v19;
			struct mirth_type_StackType v20 = mw_mirth_type_StackType_freshenzeaux(v9, in_StackType_2, in_Subst_3, v16, &v17, &v18, &v19);
			struct mirth_mirth_zaMirth* v21;
			struct mirth_type_Type v22;
			struct std_list_List_1 v23 = mw_mirth_type_Type_freshen(v17, v18, v15, &v21, &v22);
			struct mirth_type_StackType v24 = mtw_mirth_type_StackType_Cons(v19, v22);
			branch_StackType_14 = v24;
			branch_Subst_13 = v23;
			branch_StackType_12 = v20;
			branch_zaMirth_11 = v21;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v25;
			struct mirth_type_StackType v26 = mtp_mirth_type_StackType_With(v10, &v25);
			struct mirth_mirth_zaMirth* v27;
			struct std_list_List_1 v28;
			struct mirth_type_StackType v29;
			struct mirth_type_StackType v30 = mw_mirth_type_StackType_freshenzeaux(v9, in_StackType_2, in_Subst_3, v26, &v27, &v28, &v29);
			struct mirth_mirth_zaMirth* v31;
			struct mirth_type_Type v32;
			struct std_list_List_1 v33 = mw_mirth_type_Resource_freshen(v27, v28, v25, &v31, &v32);
			struct mirth_type_StackType v34 = mtw_mirth_type_StackType_With(v29, v32);
			branch_StackType_14 = v34;
			branch_Subst_13 = v33;
			branch_StackType_12 = v30;
			branch_zaMirth_11 = v31;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v35;
			uint64_t v36;
			struct mirth_type_StackType v37 = mtp_mirth_type_StackType_ConsLabel(v10, &v35, &v36);
			struct mirth_mirth_zaMirth* v38;
			struct std_list_List_1 v39;
			struct mirth_type_StackType v40;
			struct mirth_type_StackType v41 = mw_mirth_type_StackType_freshenzeaux(v9, in_StackType_2, in_Subst_3, v37, &v38, &v39, &v40);
			struct mirth_mirth_zaMirth* v42;
			struct mirth_type_Type v43;
			struct std_list_List_1 v44 = mw_mirth_type_Type_freshen(v38, v39, v35, &v42, &v43);
			struct mirth_type_StackType v45 = mtw_mirth_type_StackType_ConsLabel(v40, v43, v36);
			branch_StackType_14 = v45;
			branch_Subst_13 = v44;
			branch_StackType_12 = v41;
			branch_zaMirth_11 = v42;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v46;
			uint64_t v47;
			struct mirth_type_StackType v48 = mtp_mirth_type_StackType_WithLabel(v10, &v46, &v47);
			struct mirth_mirth_zaMirth* v49;
			struct std_list_List_1 v50;
			struct mirth_type_StackType v51;
			struct mirth_type_StackType v52 = mw_mirth_type_StackType_freshenzeaux(v9, in_StackType_2, in_Subst_3, v48, &v49, &v50, &v51);
			struct mirth_mirth_zaMirth* v53;
			struct mirth_type_Type v54;
			struct std_list_List_1 v55 = mw_mirth_type_Resource_freshen(v49, v50, v46, &v53, &v54);
			struct mirth_type_StackType v56 = mtw_mirth_type_StackType_WithLabel(v51, v54, v47);
			branch_StackType_14 = v56;
			branch_Subst_13 = v55;
			branch_StackType_12 = v52;
			branch_zaMirth_11 = v53;
		} break;
		default: {
			struct mirth_type_Type v57 = mw_mirth_type_StackType_zgType(v10);
			struct mirth_mirth_zaMirth* v58;
			struct mirth_type_Type v59;
			struct std_list_List_1 v60 = mw_mirth_type_Type_freshen(v9, in_Subst_3, v57, &v58, &v59);
			struct mirth_type_StackType v61 = mw_mirth_type_Type_zgStackType(v59);
			branch_StackType_14 = v61;
			branch_Subst_13 = v60;
			branch_StackType_12 = in_StackType_2;
			branch_zaMirth_11 = v58;
		} break;
	}
	*out_StackType_8 = branch_StackType_14;
	*out_Subst_7 = branch_Subst_13;
	*out_zaMirth_5 = branch_zaMirth_11;
	return branch_StackType_12;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r12
movl %edx, %r13d
movq %rsi, %r15
movl 0x10(%rbp), %esi
movq 0x18(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0x34dd2
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x4b977
leaq 0x87526(%rip), %rsi     # 0xd2e68
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %r15, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x4b968
incl (%rax)
pushq $0x4
popq %rax
movq -0x48(%rbp), %rcx
movq %r15, %rdx
jmp 0x4bc70
movl %eax, %edi
movq %rdx, %rsi
callq 0x3883b
movq %rdx, %r8
movq -0x48(%rbp), %rdi
movq %r14, -0x30(%rbp)
movq %rbx, %r14
leaq -0x68(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x40(%rbp), %r9
movl %r13d, %esi
movq %r12, %rdx
movl %eax, %ecx
callq 0x457da
movl %eax, %r13d
movq %rdx, %r12
movl (%rbx), %edi
movq 0x8(%rbx), %rsi
movq %r14, %rbx
movq -0x30(%rbp), %r14
callq 0x34e3d
leaq -0x40(%rbp), %rcx
movq (%rcx), %rcx
jmp 0x4bc70
leaq -0x68(%rbp), %rsi
leaq -0x58(%rbp), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0x3502f
movl %eax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x48(%rbp), %rdi
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x80(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x50(%rbp), %r8
movq %rbx, -0x30(%rbp)
leaq -0xa0(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x4b900
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x68(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x90(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x70(%rbp), %r9
callq 0x457da
movl %eax, %r13d
movq %rdx, %r12
leaq -0x58(%rbp), %rax
movq (%rax), %r8
leaq -0x80(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
movq -0x30(%rbp), %rbx
callq 0x393fa
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
pushq $0x6
jmp 0x4bc6f
leaq -0x68(%rbp), %rsi
movq %rdx, %rdi
callq 0x34ef8
movl %eax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x48(%rbp), %rdi
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x80(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x58(%rbp), %r8
movq %rbx, -0x30(%rbp)
leaq -0xa0(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x4b900
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x68(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x90(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x50(%rbp), %r9
callq 0x457da
movl %eax, %r13d
movq %rdx, %r12
leaq -0x80(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
movq -0x30(%rbp), %rbx
callq 0x1e310
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
pushq $0x5
jmp 0x4bc6f
leaq -0x68(%rbp), %rsi
movq %rdx, %rdi
callq 0x34f7f
movl %eax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x48(%rbp), %rdi
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x80(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x58(%rbp), %r8
movq %rbx, -0x30(%rbp)
leaq -0xa0(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x4b900
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x68(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x90(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x50(%rbp), %r9
callq 0x45d52
movl %eax, %r13d
movq %rdx, %r12
leaq -0x80(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
movq -0x30(%rbp), %rbx
callq 0x1e82b
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
pushq $0x7
jmp 0x4bc6f
leaq -0x68(%rbp), %rsi
leaq -0x58(%rbp), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0x350d3
movl %eax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x48(%rbp), %rdi
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x80(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x50(%rbp), %r8
movq %rbx, -0x30(%rbp)
leaq -0xa0(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x4b900
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x68(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x90(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x70(%rbp), %r9
callq 0x45d52
movl %eax, %r13d
movq %rdx, %r12
leaq -0x58(%rbp), %rax
movq (%rax), %r8
leaq -0x80(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
movq -0x30(%rbp), %rbx
callq 0x39a7a
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
pushq $0x8
popq %rax
movq 0x20(%rbp), %rsi
movl %eax, (%rsi)
movq %rdx, 0x8(%rsi)
movl %r13d, (%r14)
movq %r12, 0x8(%r14)
movq %rcx, (%rbx)
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq