// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_Type_zgSortzy
static struct std_maybe_Maybe_1 mw_mirth_type_Type_zgSortzy (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_Meta: {
			uint64_t v7 = mtp_mirth_type_Type_Meta(in_Type_2);
			struct mirth_mirth_zaMirth* v8;
			struct std_maybe_Maybe_1 v9 = mw_mirth_type_MetaVar_typezy(in_zaMirth_1, v7, &v8);
			struct mirth_mirth_zaMirth* branch_zaMirth_10;
			struct std_maybe_Maybe_1 branch_Maybe_11;
			switch ((v9).tag) {
				case std_maybe_Maybe_1_None: {
					struct std_maybe_Maybe_1 v12 = { .tag=std_maybe_Maybe_1_None };
					branch_Maybe_11 = v12;
					branch_zaMirth_10 = v8;
				} break;
				case std_maybe_Maybe_1_Some: {
					VAL v13 = mtp_std_maybe_Maybe_1_Some(v9);
					struct mirth_mirth_zaMirth* v14;
					struct mirth_type_Type v15 = mw_mirth_type_Type_expand(v8, V_mirth_type_Type(v13), &v14);
					incref(MK_mirth_type_Type(v15));
					struct std_maybe_Maybe_1 v16 = mtw_std_maybe_Maybe_1_Some(MK_mirth_type_Type(v15));
					struct mirth_mirth_zaMirth* v17;
					mw_mirth_type_MetaVar_typezyzx(v14, v16, v7, &v17);
					struct mirth_mirth_zaMirth* v18;
					struct std_maybe_Maybe_1 v19 = mw_mirth_type_Type_zgSortzy(v17, v15, &v18);
					branch_Maybe_11 = v19;
					branch_zaMirth_10 = v18;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			branch_Maybe_6 = branch_Maybe_11;
			branch_zaMirth_5 = branch_zaMirth_10;
		} break;
		case mirth_type_Type_Prim: {
			enum mirth_type_PrimType v20 = mtp_mirth_type_Type_Prim(in_Type_2);
			struct mirth_mirth_zaMirth* v21;
			struct std_maybe_Maybe_1 v22 = mw_mirth_type_PrimType_zgSortzy(in_zaMirth_1, v20, &v21);
			branch_Maybe_6 = v22;
			branch_zaMirth_5 = v21;
		} break;
		default: {
			decref(MK_mirth_type_Type(in_Type_2));
			struct std_maybe_Maybe_1 v23 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v23;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
	}
	*out_zaMirth_3 = branch_zaMirth_5;
	return branch_Maybe_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movl %esi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1bc(%rbp)
subl $0x2, %eax
je 0xda766
jmp 0xda4ae
movl -0x1bc(%rbp), %eax
subl $0x3, %eax
jne 0xda7c1
jmp 0xda4bf
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x870e0
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x87130
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x1c0(%rbp)
testl %eax, %eax
je 0xda506
jmp 0xda4f6
movl -0x1c0(%rbp), %eax
subl $0x1, %eax
je 0xda533
jmp 0xda730
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xda749
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rsi
callq 0x174a0
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x6f100
movq -0x1c8(%rbp), %rdi
movl %eax, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
movl -0xb8(%rbp), %esi
movq -0xb0(%rbp), %rdx
leaq -0x98(%rbp), %rcx
callq 0x872e0
movl %eax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movl -0xa8(%rbp), %edi
movq -0xa0(%rbp), %rsi
callq 0x6e780
movq %rax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xda67a
movl -0xa8(%rbp), %edi
movq -0xa0(%rbp), %rsi
callq 0x6e780
movq %rax, -0xd8(%rbp)
movq %rdx, -0xd0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xd8(%rbp), %rax
cmpq $0x0, %rax
je 0xda67a
movl -0xa8(%rbp), %edi
movq -0xa0(%rbp), %rsi
callq 0x6e780
movq %rax, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
movq -0xe8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0xda67a
movl -0xa8(%rbp), %edi
movq -0xa0(%rbp), %rsi
callq 0x6e780
movq %rax, -0xf8(%rbp)
movq %rdx, -0xf0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xf8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xda67c
movl -0xa8(%rbp), %edi
movq -0xa0(%rbp), %rsi
callq 0x6e780
movq %rax, -0x118(%rbp)
movq %rdx, -0x110(%rbp)
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0xca10
movl %eax, -0x108(%rbp)
movq %rdx, -0x100(%rbp)
movq -0x98(%rbp), %rdi
movq -0x40(%rbp), %rcx
movl -0x108(%rbp), %esi
movq -0x100(%rbp), %rdx
leaq -0x120(%rbp), %r8
callq 0x87380
movq -0x120(%rbp), %rdi
movl -0xa8(%rbp), %esi
movq -0xa0(%rbp), %rdx
leaq -0x128(%rbp), %rcx
callq 0xda480
movl %eax, -0x138(%rbp)
movq %rdx, -0x130(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xda749
leaq 0x27974a(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x70(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xda8eb
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x87010
movl %eax, -0x13c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x13c(%rbp), %esi
leaq -0x148(%rbp), %rdx
callq 0xda910
movl %eax, -0x158(%rbp)
movq %rdx, -0x150(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xda8eb
jmp 0xda7c3
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0x168(%rbp)
movq %rdx, -0x160(%rbp)
movq -0x160(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xda8b8
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0x178(%rbp)
movq %rdx, -0x170(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x178(%rbp), %rax
cmpq $0x0, %rax
je 0xda8b8
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0x188(%rbp)
movq %rdx, -0x180(%rbp)
movq -0x188(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0xda8b8
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0x198(%rbp)
movq %rdx, -0x190(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x198(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0xda8b6
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0x1a8(%rbp)
movq %rdx, -0x1a0(%rbp)
movq -0x1a8(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
callq 0x127c0
jmp 0xda8b8
jmp 0xda8ba
leaq -0x1b8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x1b8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)