// File: /workspace/github_c_makefile_star2_O1/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, -0x30(%rbp)
movq %rcx, %r12
movl %edx, %r13d
movq %rsi, %r15
movl 0x10(%rbp), %esi
movq 0x18(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x3917b
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x517f4
leaq 0x91697(%rip), %rsi     # 0xe2e54
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 0x517e3
incl (%rax)
movl $0x4, %eax
movq -0x38(%rbp), %rbx
movq %r15, %rdx
jmp 0x51ad6
movl %eax, %edi
movq %rdx, %rsi
callq 0x3cf9e
movq %rdx, %r8
movq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x58(%rbp), %r9
movl %r13d, %esi
movq %r12, %rdx
movl %eax, %ecx
callq 0x4b07d
movl %eax, %r13d
movq %rdx, %r12
movl (%rbx), %edi
movq 0x8(%rbx), %rsi
callq 0x391d9
leaq -0x58(%rbp), %rcx
movq (%rcx), %rbx
jmp 0x51ad6
leaq -0x78(%rbp), %rsi
leaq -0x40(%rbp), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0x393cd
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movups -0x58(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0xa0(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x48(%rbp), %r8
leaq -0x68(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x5177a
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x78(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x90(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x80(%rbp), %r9
callq 0x4b07d
movl %eax, %r13d
movq %rdx, %r12
leaq -0x40(%rbp), %rax
movq (%rax), %r8
leaq -0xa0(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
callq 0x3dc1a
leaq -0x80(%rbp), %rax
movq (%rax), %rbx
movl $0x6, %eax
jmp 0x51ad6
leaq -0x78(%rbp), %rsi
movq %rdx, %rdi
callq 0x392bf
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movups -0x58(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0xa0(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x40(%rbp), %r8
leaq -0x68(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x5177a
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x78(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x90(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x48(%rbp), %r9
callq 0x4b07d
movl %eax, %r13d
movq %rdx, %r12
leaq -0xa0(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
callq 0x20b1a
leaq -0x48(%rbp), %rax
movq (%rax), %rbx
movl $0x5, %eax
jmp 0x51ad6
leaq -0x58(%rbp), %rsi
movq %rdx, %rdi
callq 0x39346
movl %eax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movups -0x68(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x90(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x48(%rbp), %r8
leaq -0xa0(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x5177a
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x58(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x78(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x40(%rbp), %r9
callq 0x4b07d
movl %eax, %r13d
movq %rdx, %r12
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
leaq -0x40(%rbp), %rax
movq (%rax), %rbx
leaq -0x90(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
callq 0x21053
movl $0x7, %eax
jmp 0x51ad6
leaq -0x58(%rbp), %rsi
leaq -0x48(%rbp), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0x39471
movl %eax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movups -0x68(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x90(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq -0x80(%rbp), %r8
leaq -0xa0(%rbp), %rbx
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
movq %r8, %r12
movq %rbx, %r9
callq 0x5177a
movq %rax, %r15
movq (%r12), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x58(%rbp), %rax
movl (%rax), %ecx
movq 0x8(%rax), %r8
leaq -0x78(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x40(%rbp), %r9
callq 0x4b07d
movl %eax, %r13d
movq %rdx, %r12
movl (%rbx), %edx
movq 0x8(%rbx), %rcx
leaq -0x40(%rbp), %rax
movq (%rax), %rbx
leaq -0x48(%rbp), %rax
movq (%rax), %r8
leaq -0x90(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
callq 0x3e2fd
movl $0x8, %eax
movq -0x30(%rbp), %rcx
movq 0x20(%rbp), %rsi
movl %eax, (%rsi)
movq %rdx, 0x8(%rsi)
movl %r13d, (%r14)
movq %r12, 0x8(%r14)
movq %rbx, (%rcx)
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq