// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaAB_abzeslidezeresourcezetyconzetozetopzx
static bool mw_mirth_elab_zaAB_abzeslidezeresourcezetyconzetozetopzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_arrow_Arrow* in_zaAB_2, struct mirth_tycon_Tycon in_Tycon_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_arrow_Arrow* *out_zaAB_5) {
	struct mirth_arrow_Arrow* v7;
	struct mirth_type_StackType v8 = mw_mirth_elab_zaAB_abzetypezo(in_zaAB_2, &v7);
	struct mirth_mirth_zaMirth* v9;
	struct std_maybe_Maybe_1 v10 = mw_mirth_type_StackType_topzeresourcezetyconzy(in_zaMirth_1, v8, &v9);
	struct mirth_arrow_Arrow* branch_zaAB_11;
	struct mirth_mirth_zaMirth* branch_zaMirth_12;
	bool branch_Bool_13;
	switch ((v10).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v14 = mtp_std_maybe_Maybe_1_Some(v10);
			incref(MK_mirth_tycon_Tycon(in_Tycon_3));
			struct mirth_mirth_zaMirth* v15;
			bool v16 = mw_mirth_tycon_Tycon_zd(v9, V_mirth_tycon_Tycon(v14), in_Tycon_3, &v15);
			struct mirth_arrow_Arrow* branch_zaAB_17;
			struct mirth_mirth_zaMirth* branch_zaMirth_18;
			bool branch_Bool_19;
			if (v16) {
				decref(MK_mirth_tycon_Tycon(in_Tycon_3));
				bool v20 = true;
				branch_Bool_19 = v20;
				branch_zaMirth_18 = v15;
				branch_zaAB_17 = v7;
			} else {
				struct mirth_arrow_Arrow* v21;
				struct mirth_type_StackType v22 = mw_mirth_elab_zaAB_abzetypezo(v7, &v21);
				struct mirth_mirth_zaMirth* v23;
				struct std_maybe_Maybe_1 v24 = mw_mirth_type_StackType_forcezewithzyzx(v15, v22, &v23);
				struct mirth_type_StackType v25 = mw_std_maybe_Maybe_1_ifzy_2_sp51(v24);
				struct mirth_mirth_zaMirth* v26;
				struct mirth_type_StackType v27 = mw_mirth_type_StackType_Freshzx(v23, &v26);
				struct mirth_type_ArrowType* v28 = mw_mirth_type_Tzezg(v25, v27);
				struct mirth_arrow_Arrow* v29;
				struct std_list_List_1 v30 = mw_mirth_elab_zaAB_abzectxzo(v21, &v29);
				struct mirth_arrow_Arrow* v31;
				uint64_t v32 = mw_mirth_elab_zaAB_abzetokenzo(v29, &v31);
				struct mirth_arrow_Arrow* v33;
				struct mirth_arrow_Home v34 = mw_mirth_elab_zaAB_abzehomezo(v31, &v33);
				struct mirth_type_StackType v35;
				struct mirth_type_StackType v36;
				mtp_mirth_type_ArrowType_ArrowType(v28, &v35, &v36);
				incref(MK_mirth_type_StackType(v35));
				struct std_list_List_1 v37 = { .tag=std_list_List_1_Nil };
				struct mirth_arrow_Arrow* v38 = mtw_mirth_arrow_Arrow_Arrow(v34, v32, v32, v30, v35, v35, v37);
				struct mirth_mirth_zaMirth* v39;
				struct mirth_arrow_Arrow* v40;
				bool v41 = mw_mirth_elab_zaAB_abzeslidezeresourcezetyconzetozetopzx(v26, v38, in_Tycon_3, &v39, &v40);
				struct mirth_mirth_zaMirth* v42;
				struct mirth_arrow_Arrow* v43;
				mw_mirth_elab_zaAB_abzeunifyzetypezx(v39, v40, v36, &v42, &v43);
				struct mirth_mirth_zaMirth* v44;
				uint64_t v45 = mw_mirth_arrow_Block_Newzx(v42, v43, &v44);
				struct std_list_List_1 v46 = { .tag=std_list_List_1_Nil };
				struct std_list_List_1 v47 = mw_std_list_List_1_cons(MK_mirth_arrow_Block(v45), v46);
				enum mirth_prim_Prim v48 = mirth_prim_Prim_RDip;
				struct mirth_mirth_zaMirth* v49;
				struct mirth_arrow_Arrow* v50;
				mw_mirth_elab_zaAB_abzeprimzx(v44, v33, v47, v48, &v49, &v50);
				struct mirth_mirth_zaMirth* branch_zaMirth_51;
				struct mirth_arrow_Arrow* branch_zaAB_52;
				bool branch_Bool_53;
				if (v41) {
					struct std_list_List_1 v54 = { .tag=std_list_List_1_Nil };
					enum mirth_prim_Prim v55 = mirth_prim_Prim_RSwap;
					struct mirth_mirth_zaMirth* v56;
					struct mirth_arrow_Arrow* v57;
					mw_mirth_elab_zaAB_abzeprimzx(v49, v50, v54, v55, &v56, &v57);
					bool v58 = true;
					branch_Bool_53 = v58;
					branch_zaAB_52 = v57;
					branch_zaMirth_51 = v56;
				} else {
					bool v59 = false;
					branch_Bool_53 = v59;
					branch_zaAB_52 = v50;
					branch_zaMirth_51 = v49;
				}
				branch_Bool_19 = branch_Bool_53;
				branch_zaMirth_18 = branch_zaMirth_51;
				branch_zaAB_17 = branch_zaAB_52;
			}
			branch_Bool_13 = branch_Bool_19;
			branch_zaMirth_12 = branch_zaMirth_18;
			branch_zaAB_11 = branch_zaAB_17;
		} break;
		case std_maybe_Maybe_1_None: {
			decref(MK_mirth_tycon_Tycon(in_Tycon_3));
			bool v60 = false;
			branch_Bool_13 = v60;
			branch_zaMirth_12 = v9;
			branch_zaAB_11 = v7;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaAB_5 = branch_zaAB_11;
	*out_zaMirth_4 = branch_zaMirth_12;
	return branch_Bool_13;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r14
movq %r8, %r13
movq %rcx, %r12
movl %edx, %r15d
movq %rsi, %rax
movq %rdi, %rbx
leaq -0x38(%rbp), %rsi
movq %rax, %rdi
callq 0x447fe
leaq -0x58(%rbp), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x578e2
testl %eax, %eax
movq %r14, -0x78(%rbp)
je 0x56dd4
movq %r15, -0x30(%rbp)
cmpl $0x1, %eax
jne 0x5705e
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
callq 0xdaeb
movq %r12, %rcx
andq %r15, %rcx
sete %dl
testb $0x3, %r12b
setne %sil
orb %dl, %sil
jne 0x56d6e
incl (%rcx)
movq -0x58(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r15, %rax
leaq -0x50(%rbp), %r9
movq %rax, %rdx
movq -0x30(%rbp), %rcx
movq %r12, %r8
callq 0x19f28
testb %al, %al
je 0x56e19
andq %r12, %r15
sete %al
testb $0x3, %r12b
setne %cl
orb %al, %cl
jne 0x56dc4
decl (%r15)
jne 0x56dc4
movq -0x30(%rbp), %rdi
shlq $0x30, %rdi
orq %r12, %rdi
leaq 0xbebc2(%rip), %rsi     # 0x115981
callq 0xd4e3
movq -0x50(%rbp), %rbx
movb $0x1, %r15b
movq -0x38(%rbp), %r14
jmp 0x5703e
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %r12, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x56e09
decl (%rax)
jne 0x56e09
shlq $0x30, %r15
orq %r12, %r15
leaq 0xbeb80(%rip), %rsi     # 0x115981
movq %r15, %rdi
callq 0xd4e3
movq -0x58(%rbp), %rbx
movq -0x38(%rbp), %r14
xorl %r15d, %r15d
jmp 0x5703e
movq %r13, -0x48(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x447fe
movq -0x50(%rbp), %rdi
leaq -0x100(%rbp), %rbx
movl %eax, %esi
movq %rbx, %rcx
callq 0x3d686
movl %eax, %edi
movq %rdx, %rsi
callq 0x5708e
movl %eax, %r13d
movq %rdx, %r14
movq (%rbx), %rdi
leaq -0x88(%rbp), %rsi
callq 0x3eba9
movl %r13d, %edi
movq %r14, %rsi
movl $0x4, %edx
movq %rax, %rcx
callq 0x210ca
movq %rax, -0x68(%rbp)
leaq -0x90(%rbp), %rax
movq (%rax), %rdi
leaq -0xf8(%rbp), %rbx
movq %rbx, %rsi
callq 0x44781
movl %eax, -0x3c(%rbp)
movq %rdx, -0x70(%rbp)
movq (%rbx), %rdi
leaq -0xf0(%rbp), %rbx
movq %rbx, %rsi
callq 0x44725
movq %rax, %r14
movq (%rbx), %rdi
leaq -0x80(%rbp), %rsi
callq 0x44bd2
movl %eax, %r13d
movq %rdx, -0x60(%rbp)
leaq -0xe8(%rbp), %rbx
leaq -0xb0(%rbp), %rdx
movq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x3b486
movq 0x8(%rbx), %rax
andq %rax, %r15
sete %cl
testb $0x3, %al
setne %al
orb %cl, %al
jne 0x56ef0
incl (%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x110(%rbp)
subq $0x30, %rsp
movups %xmm0, 0x20(%rsp)
movups -0xe8(%rbp), %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %r13d, %edi
movq -0x60(%rbp), %rsi
movq %r14, %rdx
movq %r14, %rcx
movl -0x3c(%rbp), %r8d
movq -0x70(%rbp), %r9
callq 0x4434e
addq $0x30, %rsp
movq -0x88(%rbp), %rdi
leaq -0xd8(%rbp), %rbx
leaq -0xd0(%rbp), %r14
movq %rax, %rsi
movq -0x30(%rbp), %rdx
movq %r12, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x56ceb
movl %eax, %r15d
movq (%rbx), %rdi
movq (%r14), %rsi
movl -0xb0(%rbp), %edx
movq -0xa8(%rbp), %rcx
leaq -0xc8(%rbp), %rbx
leaq -0xc0(%rbp), %r14
movq %rbx, %r8
movq %r14, %r9
callq 0x44c4f
movq (%rbx), %rdi
movq (%r14), %rsi
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdx
callq 0x57183
leaq 0xbf712(%rip), %rsi     # 0x1166b8
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd592
movq %rdx, %r14
movq (%rbx), %rbx
movq -0x80(%rbp), %r12
movl $0x6, %edi
callq 0x567d6
leaq -0x98(%rbp), %r13
leaq -0xa0(%rbp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %rcx, %r12
movl $0x1, %edx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rax, %r9
pushq %r13
pushq %r12
callq 0x44e2b
addq $0x10, %rsp
movq (%r13), %r14
movq (%r12), %rbx
testb %r15b, %r15b
je 0x5703a
movl $0x4, %edi
callq 0x567d6
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
pushq %r13
pushq %r12
callq 0x44e2b
addq $0x10, %rsp
movq -0x98(%rbp), %r14
movq -0xa0(%rbp), %rbx
movq -0x48(%rbp), %r13
movq -0x78(%rbp), %rax
movq %r14, (%rax)
movq %rbx, (%r13)
movl %r15d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x8d6d6(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x8d6db(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5