// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_PrimType_zgSortzy
static struct std_maybe_Maybe_1 mw_mirth_type_PrimType_zgSortzy (struct mirth_mirth_zaMirth* in_zaMirth_1, enum mirth_type_PrimType in_PrimType_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_PrimType_2) {
		case mirth_type_PrimType_TYPE: {
			enum mirth_var_Sort v7 = mirth_var_Sort_Type;
			struct std_maybe_Maybe_1 v8 = mtw_std_maybe_Maybe_1_Some(MK_mirth_var_Sort(v7));
			branch_Maybe_6 = v8;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_PrimType_STACK: {
			enum mirth_var_Sort v9 = mirth_var_Sort_Stack;
			struct std_maybe_Maybe_1 v10 = mtw_std_maybe_Maybe_1_Some(MK_mirth_var_Sort(v9));
			branch_Maybe_6 = v10;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_PrimType_RESOURCE: {
			enum mirth_var_Sort v11 = mirth_var_Sort_Resource;
			struct std_maybe_Maybe_1 v12 = mtw_std_maybe_Maybe_1_Some(MK_mirth_var_Sort(v11));
			branch_Maybe_6 = v12;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		default: {
			struct std_maybe_Maybe_1 v13 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v13;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
	}
	*out_zaMirth_3 = branch_zaMirth_5;
	return branch_Maybe_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xbc(%rbp)
subl $0x1, %eax
je 0xda957
jmp 0xda936
movl -0xbc(%rbp), %eax
subl $0x2, %eax
je 0xda9a1
jmp 0xda943
movl -0xbc(%rbp), %eax
subl $0x3, %eax
je 0xda9eb
jmp 0xdaa50
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq %rax, -0x58(%rbp)
leaq 0x2b7b9c(%rip), %rax    # 0x392508
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xca10
movl %eax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xdaa81
movl $0x2, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq %rax, -0x80(%rbp)
leaq 0x2b7b52(%rip), %rax    # 0x392508
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xca10
movl %eax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xdaa81
movl $0x1, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq %rax, -0xa8(%rbp)
leaq 0x2b7aff(%rip), %rax    # 0x392508
movq %rax, -0xa0(%rbp)
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xca10
movl %eax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xdaa81
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0xb8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)