// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_Type_tyconzy
static struct std_maybe_Maybe_1 mw_mirth_type_Type_tyconzy (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_Type in_Type_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* branch_zaMirth_5;
	struct std_maybe_Maybe_1 branch_Maybe_6;
	switch ((in_Type_2).tag) {
		case mirth_type_Type_Error: {
			struct std_maybe_Maybe_1 v7 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v7;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Ignore: {
			struct std_maybe_Maybe_1 v8 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v8;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Prim: {
			enum mirth_type_PrimType v9 = mtp_mirth_type_Type_Prim(in_Type_2);
			struct mirth_tycon_Tycon v10 = mtw_mirth_tycon_Tycon_Prim(v9);
			struct std_maybe_Maybe_1 v11 = mtw_std_maybe_Maybe_1_Some(MK_mirth_tycon_Tycon(v10));
			branch_Maybe_6 = v11;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Meta: {
			uint64_t v12 = mtp_mirth_type_Type_Meta(in_Type_2);
			struct mirth_mirth_zaMirth* v13;
			struct std_maybe_Maybe_1 v14 = mw_mirth_type_MetaVar_typezy(in_zaMirth_1, v12, &v13);
			struct mirth_mirth_zaMirth* branch_zaMirth_15;
			struct std_maybe_Maybe_1 branch_Maybe_16;
			switch ((v14).tag) {
				case std_maybe_Maybe_1_None: {
					struct std_maybe_Maybe_1 v17 = { .tag=std_maybe_Maybe_1_None };
					branch_Maybe_16 = v17;
					branch_zaMirth_15 = v13;
				} break;
				case std_maybe_Maybe_1_Some: {
					VAL v18 = mtp_std_maybe_Maybe_1_Some(v14);
					struct mirth_mirth_zaMirth* v19;
					struct mirth_type_Type v20 = mw_mirth_type_Type_expand(v13, V_mirth_type_Type(v18), &v19);
					incref(MK_mirth_type_Type(v20));
					struct std_maybe_Maybe_1 v21 = mtw_std_maybe_Maybe_1_Some(MK_mirth_type_Type(v20));
					struct mirth_mirth_zaMirth* v22;
					mw_mirth_type_MetaVar_typezyzx(v19, v21, v12, &v22);
					struct mirth_mirth_zaMirth* v23;
					struct std_maybe_Maybe_1 v24 = mw_mirth_type_Type_tyconzy(v22, v20, &v23);
					branch_Maybe_16 = v24;
					branch_zaMirth_15 = v23;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			branch_Maybe_6 = branch_Maybe_16;
			branch_zaMirth_5 = branch_zaMirth_15;
		} break;
		case mirth_type_Type_Hole: {
			uint64_t v25 = mtp_mirth_type_Type_Hole(in_Type_2);
			struct std_maybe_Maybe_1 v26 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v26;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Var: {
			uint64_t v27 = mtp_mirth_type_Type_Var(in_Type_2);
			struct std_maybe_Maybe_1 v28 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v28;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Table: {
			uint64_t v29 = mtp_mirth_type_Type_Table(in_Type_2);
			struct mirth_tycon_Tycon v30 = mtw_mirth_tycon_Tycon_Table(v29);
			struct std_maybe_Maybe_1 v31 = mtw_std_maybe_Maybe_1_Some(MK_mirth_tycon_Tycon(v30));
			branch_Maybe_6 = v31;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Data: {
			uint64_t v32 = mtp_mirth_type_Type_Data(in_Type_2);
			struct mirth_tycon_Tycon v33 = mtw_mirth_tycon_Tycon_Data(v32);
			struct std_maybe_Maybe_1 v34 = mtw_std_maybe_Maybe_1_Some(MK_mirth_tycon_Tycon(v33));
			branch_Maybe_6 = v34;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_DataPartial: {
			struct mirth_data_DataPartial* v35 = mtp_mirth_type_Type_DataPartial(in_Type_2);
			uint64_t v36 = v35->mdata;
			decref(MK_mirth_data_DataPartial(v35));
			struct mirth_tycon_Tycon v37 = mtw_mirth_tycon_Tycon_Data(v36);
			struct std_maybe_Maybe_1 v38 = mtw_std_maybe_Maybe_1_Some(MK_mirth_tycon_Tycon(v37));
			branch_Maybe_6 = v38;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Arrow: {
			struct mirth_type_ArrowType* v39 = mtp_mirth_type_Type_Arrow(in_Type_2);
			decref(MK_mirth_type_ArrowType(v39));
			struct std_maybe_Maybe_1 v40 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v40;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_Stack: {
			struct mirth_type_StackType v41 = mtp_mirth_type_Type_Stack(in_Type_2);
			decref(MK_mirth_type_StackType(v41));
			struct std_maybe_Maybe_1 v42 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v42;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_Type_App: {
			struct mirth_type_Type v43;
			struct mirth_type_Type v44 = mtp_mirth_type_Type_App(in_Type_2, &v43);
			decref(MK_mirth_type_Type(v43));
			struct mirth_mirth_zaMirth* v45;
			struct std_maybe_Maybe_1 v46 = mw_mirth_type_Type_tyconzy(in_zaMirth_1, v44, &v45);
			branch_Maybe_6 = v46;
			branch_zaMirth_5 = v45;
		} break;
		case mirth_type_Type_Mut: {
			struct mirth_type_Type v47 = mtp_mirth_type_Type_Mut(in_Type_2);
			struct mirth_mirth_zaMirth* v48;
			struct std_maybe_Maybe_1 v49 = mw_mirth_type_Type_tyconzy(in_zaMirth_1, v47, &v48);
			branch_Maybe_6 = v49;
			branch_zaMirth_5 = v48;
		} break;
		case mirth_type_Type_Value: {
			struct mirth_type_Value v50 = mtp_mirth_type_Type_Value(in_Type_2);
			struct std_maybe_Maybe_1 v51 = mw_mirth_type_Value_tyconzy(v50);
			branch_Maybe_6 = v51;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_5;
	return branch_Maybe_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0xd, %esi
ja 0x2e047
movq %rcx, %rbx
movq %rdi, %r14
movl %esi, %eax
leaq 0xb4a29(%rip), %rcx     # 0xe26c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
decl (%rdx)
jne 0x2ded2
movq %rdx, %rdi
callq 0x5030
jmp 0x2ded2
leaq -0x38(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x2e294
movl %eax, %r15d
movq %rdx, %r12
movq 0x8(%r13), %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2dd0b
movl -0x38(%rbp), %edi
decl (%rcx)
jne 0x2dd0b
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xe7de3(%rip), %rsi     # 0x115ae9
callq 0xd4e3
leaq -0x40(%rbp), %r13
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
movq %r13, %rcx
callq 0x2dc76
movq (%r13), %r14
jmp 0x2df2e
movq %rdx, %rdi
callq 0x2e31b
leaq -0x38(%rbp), %r15
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rcx
callq 0x2dc76
movq (%r15), %r14
jmp 0x2df2e
movq %rdx, %rdi
callq 0x2e254
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x2ded2
decl (%rcx)
jne 0x2ded2
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xe7e38(%rip), %rsi     # 0x115bc1
jmp 0x2deca
movl 0x4(%rdx), %r15d
decl (%rdx)
jne 0x2dd9e
movq %rdx, %rdi
callq 0x5030
movl %r15d, %edi
callq 0x2e0ca
btsq $0x31, %rax
jmp 0x2df1a
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2df12
movq %rdx, %rdi
callq 0x5030
jmp 0x2df12
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2ddd9
movq %rdx, %rdi
callq 0x5030
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e11b
cmpl $0x1, %eax
je 0x2df40
testl %eax, %eax
jne 0x2e047
xorl %eax, %eax
movq -0x38(%rbp), %r14
jmp 0x2ded4
movq %rdx, %rdi
callq 0x2e35b
cmpl $0x3, %eax
ja 0x2e047
movl %eax, %eax
leaq 0xb48e2(%rip), %rcx     # 0xe2700
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, %rdi
callq 0x2e51d
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2de5d
decl (%rcx)
jne 0x2de5d
leaq 0xe75d4(%rip), %rsi     # 0x115429
movq %rax, %rdi
callq 0xd4e3
movl $0x5, %edi
jmp 0x2dda1
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2de77
movq %rdx, %rdi
callq 0x5030
movq %r15, %rdi
callq 0x2dc23
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
addq $0x4, %rdi
orq %rax, %rdi
leaq 0xe7aea(%rip), %rsi     # 0x115981
jmp 0x2df24
movq %rdx, %rdi
callq 0x2e219
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2ded2
decl (%rcx)
jne 0x2ded2
leaq 0xe7caf(%rip), %rsi     # 0x115b79
movq %rax, %rdi
callq 0xd4e3
xorl %eax, %eax
xorl %edx, %edx
jmp 0x2df2e
movq %rdx, %rdi
callq 0x2e1de
movq 0x8(%rax), %r15
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2df12
decl (%rcx)
jne 0x2df12
leaq 0xe7c27(%rip), %rsi     # 0x115b31
movq %rax, %rdi
callq 0xd4e3
movq %r15, %rdi
callq 0x1968f
leaq 0xe7a60(%rip), %rsi     # 0x115981
movq %rax, %rdi
callq 0x95f6
movl $0x1, %eax
movq %r14, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
callq 0xdaeb
movq -0x38(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r14, %rax
leaq -0x40(%rbp), %rcx
movq %rax, %rdx
callq 0x2e18a
movq %rdx, %r12
movq %rax, -0x50(%rbp)
movq %rax, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xe7b65(%rip), %rsi     # 0x115ae9
movq %rdx, %rax
andq %r14, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x2df9a
incl (%rax)
callq 0x95f6
movq %rdx, %r13
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x10eb477(%rip), %rdi   # 0x1119428
movq %r15, %rsi
callq 0x13ff0
addq $0x4, %r14
orq %r13, %r14
leaq 0xe72fa(%rip), %rsi     # 0x1152c1
movq %r14, %rdi
movq %rax, %rdx
callq 0x14ab5
leaq -0x58(%rbp), %r14
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2dc76
movq (%r14), %r14
jmp 0x2df2e
decl (%rdx)
jne 0x2dffd
movq %rdx, %rdi
callq 0x5030
movl $0x10, %edi
jmp 0x2dda1
movq %rdx, %rdi
callq 0x2e558
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2e03d
decl (%rcx)
jne 0x2e03d
leaq 0xe7124(%rip), %rsi     # 0x115159
movq %rax, %rdi
callq 0xd4e3
movl $0x12, %edi
jmp 0x2dda1
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xb66ed(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xb66f2(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5