// File: /workspace/github_c_makefile_star2_O0/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
subq $0x3d0, %rsp            # imm = 0x3D0
movl %edx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xe0ff0
movl %eax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movl -0x48(%rbp), %esi
movq -0x40(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x1225e0
movl %eax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x390(%rbp)
testl %eax, %eax
je 0x1201e2
jmp 0x11fab4
movl -0x390(%rbp), %eax
subl $0x1, %eax
jne 0x1202ff
jmp 0x11fac5
movl -0x60(%rbp), %edi
movq -0x58(%rbp), %rsi
callq 0x174a0
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movq -0x90(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x11fb99
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xa8(%rbp), %rax
cmpq $0x0, %rax
je 0x11fb99
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
movq -0xb8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x11fb99
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xc8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x11fb9b
movq -0x50(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x59cb0
movq -0x398(%rbp), %rdi
movl %eax, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
movl -0xe8(%rbp), %esi
movq -0xe0(%rbp), %rdx
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %r8
leaq -0xd0(%rbp), %r9
callq 0x59e90
andb $0x1, %al
movb %al, -0xd1(%rbp)
testb $0x1, -0xd1(%rbp)
je 0x11fd2b
jmp 0x11fc01
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x110(%rbp)
movq %rdx, -0x108(%rbp)
movq -0x108(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x11fcf6
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x120(%rbp)
movq %rdx, -0x118(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x120(%rbp), %rax
cmpq $0x0, %rax
je 0x11fcf6
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x130(%rbp)
movq %rdx, -0x128(%rbp)
movq -0x130(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x11fcf6
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x140(%rbp)
movq %rdx, -0x138(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x140(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x11fcf4
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x150(%rbp)
movq %rdx, -0x148(%rbp)
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x127c0
jmp 0x11fcf6
jmp 0x11fcf8
movb $0x1, -0x151(%rbp)
movb -0x151(%rbp), %al
andb $0x1, %al
movb %al, -0xf9(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x1201bc
movq -0x38(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0xe0ff0
movl %eax, -0x170(%rbp)
movq %rdx, -0x168(%rbp)
movq -0xd0(%rbp), %rdi
movl -0x170(%rbp), %esi
movq -0x168(%rbp), %rdx
leaq -0x178(%rbp), %rcx
callq 0xc8ac0
movl %eax, -0x188(%rbp)
movq %rdx, -0x180(%rbp)
movl -0x188(%rbp), %edi
movq -0x180(%rbp), %rsi
callq 0x120340
movl %eax, -0x198(%rbp)
movq %rdx, -0x190(%rbp)
movq -0x178(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xcd420
movl %eax, -0x1b0(%rbp)
movq %rdx, -0x1a8(%rbp)
movl -0x198(%rbp), %edi
movq -0x190(%rbp), %rsi
movl -0x1b0(%rbp), %edx
movq -0x1a8(%rbp), %rcx
callq 0x735b0
movq %rax, -0x1b8(%rbp)
movq -0x160(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0xe0d50
movl %eax, -0x1d0(%rbp)
movq %rdx, -0x1c8(%rbp)
movq -0x1c0(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0xe0b80
movq %rax, -0x1e0(%rbp)
movq -0x1d8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0xe1930
movl %eax, -0x1f8(%rbp)
movq %rdx, -0x1f0(%rbp)
movq -0x1b8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
leaq -0x218(%rbp), %rdx
callq 0xc1010
movl -0x208(%rbp), %edi
movq -0x200(%rbp), %rsi
callq 0x6f140
movq %rax, -0x228(%rbp)
movq %rdx, -0x220(%rbp)
movq -0x220(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x11ff23
movl -0x208(%rbp), %edi
movq -0x200(%rbp), %rsi
callq 0x6f140
movq %rax, -0x238(%rbp)
movq %rdx, -0x230(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x238(%rbp), %rax
cmpq $0x0, %rax
je 0x11ff23
movl -0x208(%rbp), %edi
movq -0x200(%rbp), %rsi
callq 0x6f140
movq %rax, -0x248(%rbp)
movq %rdx, -0x240(%rbp)
movq -0x248(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x11ff23
movl -0x208(%rbp), %edi
movq -0x200(%rbp), %rsi
callq 0x6f140
movq %rax, -0x258(%rbp)
movq %rdx, -0x250(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x258(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x11ff25
leaq -0x268(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x1e0(%rbp), %rdx
movq -0x1e0(%rbp), %rcx
movl -0x1f8(%rbp), %edi
movq -0x1f0(%rbp), %rsi
movl -0x1d0(%rbp), %r8d
movq -0x1c8(%rbp), %r9
leaq -0x208(%rbp), %r10
leaq -0x268(%rbp), %rax
movq (%r10), %r11
movq %r11, (%rsp)
movq 0x8(%r10), %r11
movq %r11, 0x8(%rsp)
movq (%r10), %r11
movq %r11, 0x10(%rsp)
movq 0x8(%r10), %r10
movq %r10, 0x18(%rsp)
movq (%rax), %r10
movq %r10, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xdffa0
movq %rax, -0x270(%rbp)
movq -0x1a0(%rbp), %rdi
movq -0x270(%rbp), %rsi
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rcx
leaq -0x278(%rbp), %r8
leaq -0x280(%rbp), %r9
callq 0x11fa50
andb $0x1, %al
movb %al, -0x281(%rbp)
movq -0x278(%rbp), %rdi
movq -0x280(%rbp), %rsi
movl -0x218(%rbp), %edx
movq -0x210(%rbp), %rcx
leaq -0x290(%rbp), %r8
leaq -0x298(%rbp), %r9
callq 0xe1bd0
movq -0x290(%rbp), %rdi
movq -0x298(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
callq 0x1204c0
movq %rax, -0x2a8(%rbp)
leaq -0x2b8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x2a8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq 0x27273c(%rip), %rax    # 0x392790
movq %rax, -0x2d0(%rbp)
movq -0x2d8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
movl -0x2b8(%rbp), %edx
movq -0x2b0(%rbp), %rcx
callq 0x12740
movl %eax, -0x2c8(%rbp)
movq %rdx, -0x2c0(%rbp)
movl $0x6, -0x2dc(%rbp)
movq -0x2a0(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
movl -0x2dc(%rbp), %r8d
movl -0x2c8(%rbp), %edx
movq -0x2c0(%rbp), %rcx
leaq -0x2e8(%rbp), %r9
leaq -0x2f0(%rbp), %rax
movq %rax, (%rsp)
callq 0x10f930
testb $0x1, -0x281(%rbp)
je 0x120161
leaq -0x318(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movl $0x4, -0x31c(%rbp)
movq -0x2e8(%rbp), %rdi
movq -0x2f0(%rbp), %rsi
movl -0x31c(%rbp), %r8d
movl -0x318(%rbp), %edx
movq -0x310(%rbp), %rcx
leaq -0x328(%rbp), %r9
leaq -0x330(%rbp), %rax
movq %rax, (%rsp)
callq 0x10f930
movb $0x1, -0x331(%rbp)
movb -0x331(%rbp), %al
andb $0x1, %al
movb %al, -0x301(%rbp)
movq -0x330(%rbp), %rax
movq %rax, -0x300(%rbp)
movq -0x328(%rbp), %rax
movq %rax, -0x2f8(%rbp)
jmp 0x120192
movb $0x0, -0x332(%rbp)
movb -0x332(%rbp), %al
andb $0x1, %al
movb %al, -0x301(%rbp)
movq -0x2f0(%rbp), %rax
movq %rax, -0x300(%rbp)
movq -0x2e8(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movb -0x301(%rbp), %al
andb $0x1, %al
movb %al, -0xf9(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x300(%rbp), %rax
movq %rax, -0xf0(%rbp)
movb -0xf9(%rbp), %al
andb $0x1, %al
movb %al, -0x71(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x120318
jmp 0x1201e4
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x348(%rbp)
movq %rdx, -0x340(%rbp)
movq -0x340(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1202d9
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x358(%rbp)
movq %rdx, -0x350(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x358(%rbp), %rax
cmpq $0x0, %rax
je 0x1202d9
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x368(%rbp)
movq %rdx, -0x360(%rbp)
movq -0x368(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1202d9
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x378(%rbp)
movq %rdx, -0x370(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x378(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1202d7
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x59b10
movq %rax, -0x388(%rbp)
movq %rdx, -0x380(%rbp)
movq -0x388(%rbp), %rdi
movq -0x380(%rbp), %rsi
callq 0x127c0
jmp 0x1202d9
jmp 0x1202db
movb $0x0, -0x389(%rbp)
movb -0x389(%rbp), %al
andb $0x1, %al
movb %al, -0x71(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x120318
leaq 0x233b7b(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x68(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movb -0x71(%rbp), %al
andb $0x1, %al
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
nopl (%rax)