// File: /workspace/github_c_makefile_star2_O2/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 $0x28, %rsp
cmpl $0xd, %esi
ja 0x2a9fd
movq %rcx, %rbx
movq %rdi, %r14
movl %esi, %eax
leaq 0xa8043(%rip), %rcx     # 0xd26dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, %rdi
callq 0x2aa5d
movl %eax, %edi
jmp 0x2a9cf
leaq -0x38(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x2ad00
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 0x2a6ff
movl -0x38(%rbp), %edi
decl (%rcx)
jne 0x2a6ff
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xde3ef(%rip), %rsi     # 0x108ae9
callq 0xce94
leaq -0x40(%rbp), %r13
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
movq %r13, %rcx
callq 0x2a670
movq (%r13), %r14
jmp 0x2a9eb
movq %rdx, %rdi
callq 0x2abd6
jmp 0x2a9be
movq %rdx, %rdi
callq 0x2ad87
leaq -0x38(%rbp), %r15
movq %r14, %rdi
movl %eax, %esi
jmp 0x2a96f
movq %rdx, %rdi
callq 0x2acc0
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x2a9be
decl (%rcx)
jne 0x2a9be
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xde442(%rip), %rsi     # 0x108bc1
jmp 0x2a89a
movq %rdx, %rdi
callq 0x2aabf
movq %rax, %r15
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x2aadc
cmpl $0x1, %eax
je 0x2a8ee
testl %eax, %eax
jne 0x2a9fd
xorl %eax, %eax
movq -0x38(%rbp), %r14
jmp 0x2a9c0
movq %rdx, %rdi
callq 0x2ac2d
movq %rax, %rdi
jmp 0x2a8e4
movq %rdx, %rdi
callq 0x2abf3
jmp 0x2a9be
movq %rdx, %rdi
callq 0x2adc7
cmpl $0x3, %eax
ja 0x2a9fd
movl %eax, %eax
leaq 0xa7f23(%rip), %rcx     # 0xd2714
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, %rdi
callq 0x2af3e
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2a830
decl (%rcx)
jne 0x2a830
leaq 0xddc01(%rip), %rsi     # 0x108429
movq %rax, %rdi
callq 0xce94
pushq $0x5
jmp 0x2a9ce
movq %rdx, %rdi
callq 0x2ac10
movq %rax, %rdi
callq 0x2a5d7
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
addq $0x4, %rdi
orq %rax, %rdi
leaq 0xde122(%rip), %rsi     # 0x108981
jmp 0x2a9e3
movq %rdx, %rdi
callq 0x2ac85
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2a9be
decl (%rcx)
jne 0x2a9be
leaq 0xde2df(%rip), %rsi     # 0x108b79
movq %rax, %rdi
callq 0xce94
jmp 0x2a9be
movq %rdx, %rdi
callq 0x2ac4a
movq 0x8(%rax), %r15
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2a8e1
decl (%rcx)
jne 0x2a8e1
leaq 0xde258(%rip), %rsi     # 0x108b31
movq %rax, %rdi
callq 0xce94
movq %r15, %rdi
callq 0x17308
jmp 0x2a9d9
movq %rdx, %rdi
callq 0xd491
movq -0x38(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
andq %r13, %rax
leaq -0x40(%rbp), %rcx
movq %rax, %rdx
callq 0x2ab4b
movl %eax, %r12d
movq %rdx, %r14
movq %r12, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xde1b8(%rip), %rsi     # 0x108ae9
andq %rdx, %r13
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x2a946
incl (%r13)
callq 0x8d0c
movq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %r13
movq %rdx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x2ab8f
movq (%r13), %rdi
leaq -0x48(%rbp), %r15
movl %r12d, %esi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2a670
movq (%r15), %r14
jmp 0x2a9eb
movq %rdx, %rdi
callq 0x2afa0
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2a9b2
decl (%rcx)
jne 0x2a9b2
leaq 0xdd7af(%rip), %rsi     # 0x108159
movq %rax, %rdi
callq 0xce94
pushq $0x12
jmp 0x2a9ce
movq %rdx, %rdi
callq 0x2afdb
xorl %eax, %eax
xorl %edx, %edx
jmp 0x2a9eb
movq %rdx, %rdi
callq 0x2af79
pushq $0x10
popq %rdi
callq 0x2aa78
btsq $0x31, %rax
leaq 0xddfa1(%rip), %rsi     # 0x108981
movq %rax, %rdi
callq 0x8d0c
pushq $0x1
popq %rax
movq %r14, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa9e09(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6