// File: /workspace/github_c_makefile_star2_O3/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 0x2d389
movq %rcx, %rbx
movq %rdi, %r14
movl %esi, %eax
leaq 0xb16fb(%rip), %rcx     # 0xde6dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
decl (%rdx)
jne 0x2d214
movq %rdx, %rdi
callq 0x5030
jmp 0x2d214
leaq -0x38(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x2d5d6
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 0x2d04d
movl -0x38(%rbp), %edi
decl (%rcx)
jne 0x2d04d
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xe4aa1(%rip), %rsi     # 0x111ae9
callq 0xd13d
leaq -0x40(%rbp), %r13
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
movq %r13, %rcx
callq 0x2cfb8
movq (%r13), %r14
jmp 0x2d270
movq %rdx, %rdi
callq 0x2d65d
leaq -0x38(%rbp), %r15
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rcx
callq 0x2cfb8
movq (%r15), %r14
jmp 0x2d270
movq %rdx, %rdi
callq 0x2d596
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x2d214
decl (%rcx)
jne 0x2d214
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xe4af6(%rip), %rsi     # 0x111bc1
jmp 0x2d20c
movl 0x4(%rdx), %r15d
decl (%rdx)
jne 0x2d0e0
movq %rdx, %rdi
callq 0x5030
movl %r15d, %edi
callq 0x2d40c
btsq $0x31, %rax
jmp 0x2d25c
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2d254
movq %rdx, %rdi
callq 0x5030
jmp 0x2d254
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2d11b
movq %rdx, %rdi
callq 0x5030
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2d45d
cmpl $0x1, %eax
je 0x2d282
testl %eax, %eax
jne 0x2d389
xorl %eax, %eax
movq -0x38(%rbp), %r14
jmp 0x2d216
movq %rdx, %rdi
callq 0x2d69d
cmpl $0x3, %eax
ja 0x2d389
movl %eax, %eax
leaq 0xb15b4(%rip), %rcx     # 0xde714
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, %rdi
callq 0x2d85f
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2d19f
decl (%rcx)
jne 0x2d19f
leaq 0xe4292(%rip), %rsi     # 0x111429
movq %rax, %rdi
callq 0xd13d
movl $0x5, %edi
jmp 0x2d0e3
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2d1b9
movq %rdx, %rdi
callq 0x5030
movq %r15, %rdi
callq 0x2cf65
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
addq $0x4, %rdi
orq %rax, %rdi
leaq 0xe47a8(%rip), %rsi     # 0x111981
jmp 0x2d266
movq %rdx, %rdi
callq 0x2d55b
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2d214
decl (%rcx)
jne 0x2d214
leaq 0xe496d(%rip), %rsi     # 0x111b79
movq %rax, %rdi
callq 0xd13d
xorl %eax, %eax
xorl %edx, %edx
jmp 0x2d270
movq %rdx, %rdi
callq 0x2d520
movq 0x8(%rax), %r15
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2d254
decl (%rcx)
jne 0x2d254
leaq 0xe48e5(%rip), %rsi     # 0x111b31
movq %rax, %rdi
callq 0xd13d
movq %r15, %rdi
callq 0x1942b
leaq 0xe471e(%rip), %rsi     # 0x111981
movq %rax, %rdi
callq 0x9353
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 0xd745
movq -0x38(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r14, %rax
leaq -0x40(%rbp), %rcx
movq %rax, %rdx
callq 0x2d4cc
movq %rdx, %r12
movq %rax, -0x50(%rbp)
movq %rax, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xe4823(%rip), %rsi     # 0x111ae9
movq %rdx, %rax
andq %r14, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x2d2dc
incl (%rax)
callq 0x9353
movq %rdx, %r13
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x10e8135(%rip), %rdi   # 0x1115428
movq %r15, %rsi
callq 0x13c85
addq $0x4, %r14
orq %r13, %r14
leaq 0xe3fb8(%rip), %rsi     # 0x1112c1
movq %r14, %rdi
movq %rax, %rdx
callq 0x14766
leaq -0x58(%rbp), %r14
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2cfb8
movq (%r14), %r14
jmp 0x2d270
decl (%rdx)
jne 0x2d33f
movq %rdx, %rdi
callq 0x5030
movl $0x10, %edi
jmp 0x2d0e3
movq %rdx, %rdi
callq 0x2d89a
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2d37f
decl (%rcx)
jne 0x2d37f
leaq 0xe3de2(%rip), %rsi     # 0x111159
movq %rax, %rdi
callq 0xd13d
movl $0x12, %edi
jmp 0x2d0e3
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xb332b(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xb3330(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302