// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_Type_freshen
static struct std_list_List_1 mw_mirth_type_Type_freshen (struct mirth_mirth_zaMirth* in_zaMirth_1, struct std_list_List_1 in_Subst_2, struct mirth_type_Type in_Type_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_type_Type *out_Type_6) {
	struct mirth_mirth_zaMirth* branch_zaMirth_7;
	struct std_list_List_1 branch_Subst_8;
	struct mirth_type_Type branch_Type_9;
	switch ((in_Type_3).tag) {
		case mirth_type_Type_Error: {
			struct mirth_type_Type v10 = { .tag=mirth_type_Type_Error };
			branch_Type_9 = v10;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Ignore: {
			struct mirth_type_Type v11 = { .tag=mirth_type_Type_Ignore };
			branch_Type_9 = v11;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Prim: {
			enum mirth_type_PrimType v12 = mtp_mirth_type_Type_Prim(in_Type_3);
			struct mirth_type_Type v13 = mtw_mirth_type_Type_Prim(v12);
			branch_Type_9 = v13;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Hole: {
			uint64_t v14 = mtp_mirth_type_Type_Hole(in_Type_3);
			struct mirth_type_Type v15 = mtw_mirth_type_Type_Hole(v14);
			branch_Type_9 = v15;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Data: {
			uint64_t v16 = mtp_mirth_type_Type_Data(in_Type_3);
			struct mirth_type_Type v17 = mtw_mirth_type_Type_Data(v16);
			branch_Type_9 = v17;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Type_DataPartial: {
			struct mirth_data_DataPartial* v18 = mtp_mirth_type_Type_DataPartial(in_Type_3);
			struct mirth_type_Type v19 = mtw_mirth_type_Type_DataPartial(v18);
			branch_Type_9 = v19;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Table: {
			uint64_t v20 = mtp_mirth_type_Type_Table(in_Type_3);
			struct mirth_type_Type v21 = mtw_mirth_type_Type_Table(v20);
			branch_Type_9 = v21;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Value: {
			struct mirth_type_Value v22 = mtp_mirth_type_Type_Value(in_Type_3);
			struct mirth_mirth_zaMirth* v23;
			struct mirth_type_Type v24 = mw_mirth_type_Value_type(in_zaMirth_1, v22, &v23);
			struct mirth_mirth_zaMirth* v25;
			struct mirth_type_Type v26;
			struct std_list_List_1 v27 = mw_mirth_type_Type_freshen(v23, in_Subst_2, v24, &v25, &v26);
			branch_Type_9 = v26;
			branch_Subst_8 = v27;
			branch_zaMirth_7 = v25;
		} break;
		case mirth_type_Type_Var: {
			uint64_t v28 = mtp_mirth_type_Type_Var(in_Type_3);
			struct mirth_mirth_zaMirth* v29;
			struct mirth_type_Type v30;
			struct std_list_List_1 v31 = mw_mirth_var_Var_freshen(in_zaMirth_1, in_Subst_2, v28, &v29, &v30);
			branch_Type_9 = v30;
			branch_Subst_8 = v31;
			branch_zaMirth_7 = v29;
		} break;
		case mirth_type_Type_Meta: {
			uint64_t v32 = mtp_mirth_type_Type_Meta(in_Type_3);
			struct mirth_mirth_zaMirth* v33;
			struct mirth_type_Type v34;
			struct std_list_List_1 v35 = mw_mirth_type_MetaVar_freshen(in_zaMirth_1, in_Subst_2, v32, &v33, &v34);
			branch_Type_9 = v34;
			branch_Subst_8 = v35;
			branch_zaMirth_7 = v33;
		} break;
		case mirth_type_Type_Stack: {
			struct mirth_type_StackType v36 = mtp_mirth_type_Type_Stack(in_Type_3);
			struct mirth_mirth_zaMirth* v37;
			struct mirth_type_StackType v38;
			struct std_list_List_1 v39 = mw_mirth_type_StackType_freshen(in_zaMirth_1, in_Subst_2, v36, &v37, &v38);
			struct mirth_type_Type v40 = mtw_mirth_type_Type_Stack(v38);
			branch_Type_9 = v40;
			branch_Subst_8 = v39;
			branch_zaMirth_7 = v37;
		} break;
		case mirth_type_Type_Arrow: {
			struct mirth_type_ArrowType* v41 = mtp_mirth_type_Type_Arrow(in_Type_3);
			struct mirth_mirth_zaMirth* v42;
			struct mirth_type_ArrowType* v43;
			struct std_list_List_1 v44 = mw_mirth_type_ArrowType_freshen(in_zaMirth_1, in_Subst_2, v41, &v42, &v43);
			struct mirth_type_Type v45 = mtw_mirth_type_Type_Arrow(v43);
			branch_Type_9 = v45;
			branch_Subst_8 = v44;
			branch_zaMirth_7 = v42;
		} break;
		case mirth_type_Type_App: {
			struct mirth_type_Type v46;
			struct mirth_type_Type v47 = mtp_mirth_type_Type_App(in_Type_3, &v46);
			struct mirth_mirth_zaMirth* v48;
			struct mirth_type_Type v49;
			struct mirth_type_Type v50;
			struct std_list_List_1 v51 = mw_mirth_type_Type_freshen2(in_zaMirth_1, in_Subst_2, v47, v46, &v48, &v49, &v50);
			struct mirth_type_Type v52 = mtw_mirth_type_Type_App(v49, v50);
			branch_Type_9 = v52;
			branch_Subst_8 = v51;
			branch_zaMirth_7 = v48;
		} break;
		case mirth_type_Type_Mut: {
			struct mirth_type_Type v53 = mtp_mirth_type_Type_Mut(in_Type_3);
			struct mirth_mirth_zaMirth* v54;
			struct mirth_type_Type v55;
			struct std_list_List_1 v56 = mw_mirth_type_Type_freshen(in_zaMirth_1, in_Subst_2, v53, &v54, &v55);
			struct mirth_type_Type v57 = mtw_mirth_type_Type_Mut(v55);
			branch_Type_9 = v57;
			branch_Subst_8 = v56;
			branch_zaMirth_7 = v54;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_Type_6 = branch_Type_9;
	*out_zaMirth_4 = branch_zaMirth_7;
	return branch_Subst_8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpl $0xd, %ecx
ja 0x4a1b4
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
movl %ecx, %eax
leaq 0x95153(%rip), %rcx     # 0xdecfc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r13d, %r13d
movl %ebx, %eax
jmp 0x4a18f
leaq -0x80(%rbp), %rbx
movq %r8, %rdi
movq %rbx, %rsi
movq %r9, -0x30(%rbp)
callq 0x2d5d6
movq %rdx, %r8
movl (%rbx), %r13d
movq 0x8(%rbx), %rcx
movq %rcx, -0x38(%rbp)
leaq -0x60(%rbp), %rcx
movq %rcx, (%rsp)
leaq -0x68(%rbp), %rbx
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movq %rbx, %r9
callq 0x49b7b
movq (%rbx), %rdi
leaq -0x50(%rbp), %r12
movq %r12, (%rsp)
leaq -0x88(%rbp), %rbx
movl %eax, %esi
movl %r13d, %ecx
movq -0x38(%rbp), %r8
movq %rbx, %r9
callq 0x49b7b
movl %eax, %r15d
movq %rdx, %r14
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x60(%rbp), %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
movq (%rbx), %r12
callq 0x1f39c
movq -0x30(%rbp), %r9
movq %rdx, %r13
movl $0xb, %ebx
jmp 0x4a00a
movq %r9, -0x30(%rbp)
movq 0x8(%r8), %rbx
decl (%r8)
jne 0x49c66
movq %r8, %rdi
callq 0x5030
movq %rbx, %rdi
callq 0x383d6
movq %rax, %r13
movl $0x4, %ebx
jmp 0x4a18b
movq %r8, %rdi
movq %r9, %rbx
callq 0x2d65d
movq %rdx, %r8
leaq -0x60(%rbp), %r13
movq %r13, (%rsp)
leaq -0x50(%rbp), %r9
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movq %r9, %r12
callq 0x49b7b
movl %eax, %r15d
movq %rdx, %r14
movl (%r13), %edi
movq 0x8(%r13), %rsi
callq 0x3df28
movq %rbx, %r9
movq %rdx, %r13
movq (%r12), %r12
movl $0xc, %ebx
jmp 0x4a00a
movq %r8, %rdi
movq %r9, %rbx
callq 0x2d596
movq %rdx, %r8
leaq -0x60(%rbp), %r13
movq %r13, (%rsp)
leaq -0x50(%rbp), %r9
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movq %r9, %r12
callq 0x4a255
movl %eax, %r15d
movq %rdx, %r14
movl (%r13), %edi
movq 0x8(%r13), %rsi
callq 0x3d699
movq %rbx, %r9
movq %rax, %r13
movq (%r12), %r12
movl $0x9, %ebx
jmp 0x4a00a
movq %r9, -0x30(%rbp)
movl 0x4(%r8), %ebx
decl (%r8)
jne 0x49d38
movq %r8, %rdi
callq 0x5030
movl %ebx, %edi
callq 0x1eb4d
movq %rdx, %r13
movl $0x2, %ebx
jmp 0x4a18b
movq %r9, -0x30(%rbp)
movq 0x8(%r8), %rbx
decl (%r8)
jne 0x49d61
movq %r8, %rdi
callq 0x5030
leaq -0x50(%rbp), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2d45d
cmpl $0x1, %eax
je 0x4a00f
testl %eax, %eax
jne 0x4a1b4
movq -0x50(%rbp), %r12
leaq 0x10cbb14(%rip), %rdi   # 0x11158a0
movq %rbx, %rsi
callq 0x13c85
movq %rax, %rdi
callq 0x13d82
movq %rax, %rbx
movq 0x10cbb0a(%rip), %r13   # 0x11158b0
incq %r13
movq %r13, 0x10cbb00(%rip)   # 0x11158b0
leaq 0x10cbae9(%rip), %rdi   # 0x11158a0
movq %r13, %rsi
callq 0x13c85
andq $-0x4, %rbx
leaq 0xc7d1f(%rip), %rsi     # 0x111ae9
movq %rbx, %rdi
movq %rax, %rdx
callq 0x14766
movq %r13, %rdi
callq 0x2d804
movq %rdx, %r13
movl $0x3, %ebx
jmp 0x4a18b
movq %r9, -0x30(%rbp)
movq 0x8(%r8), %rbx
decl (%r8)
jne 0x49dff
movq %r8, %rdi
callq 0x5030
movq %rbx, %rdi
callq 0x2075d
movq %rax, %r13
movl $0x7, %ebx
jmp 0x4a18b
xorl %eax, %eax
xorl %r13d, %r13d
jmp 0x4a18f
movq 0x8(%r8), %rax
movq %rax, -0x38(%rbp)
decl (%r8)
jne 0x49e39
movq %r8, %rdi
movq %r9, %rbx
callq 0x5030
movq %rbx, %r9
movq %r9, -0x30(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
movq %r14, %rbx
andq %rax, %rbx
setne %al
testb $0x3, %r14b
sete %r13b
andb %al, %r13b
cmpb $0x1, %r13b
jne 0x49e63
incl (%rbx)
movq -0x38(%rbp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x41f6a
movl %eax, %edi
movq %rdx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x49eb6
decl (%rax)
jne 0x49eb6
movq %rdi, -0x40(%rbp)
movq -0x40(%rbp), %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xc7414(%rip), %rsi     # 0x1112c1
callq 0xd13d
movq -0x40(%rbp), %rdi
leaq 0x1(,%rdi,2), %rdi
movl $0x1, %esi
callq 0xe83a
testl %eax, %eax
je 0x4a0e8
testb %r13b, %r13b
je 0x49ed7
incl (%rbx)
movq -0x38(%rbp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x41f6a
movl %eax, %ebx
testl %eax, %eax
je 0x4a188
cmpl $0x1, %ebx
jne 0x4a1b4
movq %rdx, %rdi
callq 0xd745
movq %rax, %rbx
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
andq %rax, %r13
shrq $0x30, %rbx
jmp 0x4a18b
movq %r8, %rdi
movq %r9, -0x30(%rbp)
callq 0x2d69d
leaq -0x50(%rbp), %rbx
movq %r12, %rdi
movl %eax, %esi
movq %rbx, %rcx
callq 0x39cf8
movq %rdx, %r8
movq (%rbx), %rdi
leaq -0x60(%rbp), %r13
movq %r13, (%rsp)
leaq -0x80(%rbp), %r12
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movq %r12, %r9
callq 0x49b7b
movq -0x30(%rbp), %r9
movl %eax, %r15d
movq %rdx, %r14
movl (%r13), %ebx
movl 0x4(%r13), %eax
movq 0x8(%r13), %r13
movq (%r12), %r12
jmp 0x4a18f
movq %r9, -0x30(%rbp)
movq 0x8(%r8), %rbx
decl (%r8)
jne 0x49f8d
movq %r8, %rdi
callq 0x5030
movq %rbx, %rdi
callq 0x3ded5
movq %rax, %r13
movl $0x6, %ebx
jmp 0x4a18b
movq %r8, %rdi
movq %r9, %rbx
callq 0x2d55b
leaq -0x60(%rbp), %r8
leaq -0x50(%rbp), %r13
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movq %rax, %rcx
movq %r8, %r12
movq %r13, %r9
callq 0x4a554
movl %eax, %r15d
movq %rdx, %r14
movq (%r13), %rdi
callq 0x34fb2
movq %rbx, %r9
movq %rdx, %r13
movq (%r12), %r12
movl $0xa, %ebx
jmp 0x4a00a
movq %r8, %rdi
movq %r9, %rbx
callq 0x2d520
movq %rax, %rdi
callq 0x3de7a
movq %rbx, %r9
movq %rdx, %r13
movl $0x8, %ebx
jmp 0x4a18f
movq %rbx, -0x38(%rbp)
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
callq 0xd745
movq -0x50(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r12, %rax
leaq -0x80(%rbp), %rcx
movq %rax, %rdx
callq 0x2d4cc
movq %rdx, %r13
movq %rax, -0x40(%rbp)
movq %rax, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xc7a92(%rip), %rsi     # 0x111ae9
movq %rdx, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x4a06d
incl (%rax)
callq 0x9353
movq %rdx, %rbx
movq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x10cb3a4(%rip), %rdi   # 0x1115428
movq -0x38(%rbp), %rsi
callq 0x13c85
addq $0x4, %r12
orq %rbx, %r12
leaq 0xc7226(%rip), %rsi     # 0x1112c1
movq %r12, %rdi
movq %rax, %rdx
callq 0x14766
leaq -0x60(%rbp), %r12
movq %r12, (%rsp)
leaq -0x68(%rbp), %r9
movq -0x70(%rbp), %rdi
movl %r15d, %esi
movq %r14, %rdx
movq -0x40(%rbp), %rcx
movq %r13, %r8
callq 0x49b7b
movl %eax, %r15d
movq %rdx, %r14
movl (%r12), %ebx
movl 0x4(%r12), %eax
movq 0x8(%r12), %r13
leaq -0x68(%rbp), %rcx
movq (%rcx), %r12
jmp 0x4a18b
leaq 0x10caf01(%rip), %rdi   # 0x1114ff0
movq -0x38(%rbp), %rsi
callq 0x13c85
movq %rax, %rdi
callq 0x13d82
movq %rax, %rbx
movq 0x10cb7a6(%rip), %r13   # 0x11158b0
incq %r13
movq %r13, 0x10cb79c(%rip)   # 0x11158b0
leaq 0x10cb785(%rip), %rdi   # 0x11158a0
movq %r13, %rsi
callq 0x13c85
andq $-0x4, %rbx
leaq 0xc79bb(%rip), %rsi     # 0x111ae9
movq %rbx, %rdi
movq %rax, %rdx
callq 0x14766
movq %r13, %rdi
callq 0x2d804
movq %rdx, %r13
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %r13, %rdx
sete %al
testb $0x3, %r13b
setne %cl
orb %al, %cl
jne 0x4a161
incl (%rdx)
movl $0x3, %ebx
movl $0x3, %edi
movq %r13, %rsi
movq -0x38(%rbp), %rdx
movl %r15d, %ecx
movq %r14, %r8
callq 0x414fe
movq %rax, %r14
movl $0x1, %r15d
jmp 0x4a18b
xorl %r13d, %r13d
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %rcx
movl %ebx, (%rcx)
movl %eax, 0x4(%rcx)
movq %r13, 0x8(%rcx)
movq %r12, (%r9)
movl %r15d, %eax
movq %r14, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x96500(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x96505(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302