// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaAB_abzeslidezeresourcezetyconszetozetopzx
static void mw_mirth_elab_zaAB_abzeslidezeresourcezetyconszetozetopzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_arrow_Arrow* in_zaAB_2, struct std_list_List_1 in_List_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_arrow_Arrow* *out_zaAB_5) {
	incref(MK_std_list_List_1(in_List_3));
	struct mirth_mirth_zaMirth* v6;
	struct mirth_arrow_Arrow* v7;
	bool v8 = mw_mirth_elab_zaAB_worthzeslidingzeforzy(in_zaMirth_1, in_zaAB_2, in_List_3, &v6, &v7);
	struct mirth_mirth_zaMirth* branch_zaMirth_9;
	struct mirth_arrow_Arrow* branch_zaAB_10;
	if (v8) {
		struct std_maybe_Maybe_1 v11;
		struct std_list_List_1 v12 = mw_std_list_List_1_unsnoc(in_List_3, &v11);
		VAL branch_zux1_13;
		switch ((v11).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v14 = mtp_std_maybe_Maybe_1_Some(v11);
				branch_zux1_13 = v14;
			} break;
			case std_maybe_Maybe_1_None: {
				STR* v15;
				STRLIT(v15, "logic error: expected resource for sliding", 42);
				do_panic(v15);
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		struct mirth_mirth_zaMirth* v17;
		struct mirth_arrow_Arrow* v18;
		bool v19 = mw_mirth_elab_zaAB_abzeslidezeresourcezetyconzetozetopzx(v6, v7, V_mirth_tycon_Tycon(branch_zux1_13), &v17, &v18);
		struct mirth_mirth_zaMirth* branch_zaMirth_20;
		struct mirth_arrow_Arrow* branch_zaAB_21;
		if (v19) {
			struct mirth_arrow_Arrow* v22;
			struct mirth_type_StackType v23 = mw_mirth_elab_zaAB_abzetypezo(v18, &v22);
			struct mirth_mirth_zaMirth* v24;
			struct std_maybe_Maybe_1 v25 = mw_mirth_type_StackType_forcezewithzyzx(v17, v23, &v24);
			struct mirth_type_StackType v26 = mw_std_maybe_Maybe_1_ifzy_2_sp51(v25);
			struct mirth_mirth_zaMirth* v27;
			struct mirth_type_StackType v28 = mw_mirth_type_StackType_Freshzx(v24, &v27);
			struct mirth_type_ArrowType* v29 = mw_mirth_type_Tzezg(v26, v28);
			struct mirth_arrow_Arrow* v30;
			struct std_list_List_1 v31 = mw_mirth_elab_zaAB_abzectxzo(v22, &v30);
			struct mirth_arrow_Arrow* v32;
			uint64_t v33 = mw_mirth_elab_zaAB_abzetokenzo(v30, &v32);
			struct mirth_arrow_Arrow* v34;
			struct mirth_arrow_Home v35 = mw_mirth_elab_zaAB_abzehomezo(v32, &v34);
			struct mirth_type_StackType v36;
			struct mirth_type_StackType v37;
			mtp_mirth_type_ArrowType_ArrowType(v29, &v36, &v37);
			incref(MK_mirth_type_StackType(v36));
			struct std_list_List_1 v38 = { .tag=std_list_List_1_Nil };
			struct mirth_arrow_Arrow* v39 = mtw_mirth_arrow_Arrow_Arrow(v35, v33, v33, v31, v36, v36, v38);
			struct mirth_mirth_zaMirth* v40;
			struct mirth_arrow_Arrow* v41;
			mw_mirth_elab_zaAB_abzeslidezeresourcezetyconszetozetopzx(v27, v39, v12, &v40, &v41);
			struct mirth_mirth_zaMirth* v42;
			struct mirth_arrow_Arrow* v43;
			mw_mirth_elab_zaAB_abzeunifyzetypezx(v40, v41, v37, &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, v34, v47, v48, &v49, &v50);
			branch_zaAB_21 = v50;
			branch_zaMirth_20 = v49;
		} else {
			decref(MK_std_list_List_1(v12));
			branch_zaAB_21 = v18;
			branch_zaMirth_20 = v17;
		}
		branch_zaAB_10 = branch_zaAB_21;
		branch_zaMirth_9 = branch_zaMirth_20;
	} else {
		decref(MK_std_list_List_1(in_List_3));
		branch_zaAB_10 = v7;
		branch_zaMirth_9 = v6;
	}
	*out_zaAB_5 = branch_zaAB_10;
	*out_zaMirth_4 = branch_zaMirth_9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r9, -0x78(%rbp)
movq %r8, -0x80(%rbp)
movq %rcx, %rbx
movl %edx, %r14d
movq %rsi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
movq %r14, %r13
shlq $0x30, %r13
movq %rcx, %r15
movq %rax, -0x48(%rbp)
andq %rax, %r15
setne %al
testb $0x3, %bl
sete %r12b
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x50938
addl $0x2, (%r15)
orq %rbx, %r13
movl %r14d, %edi
movq %rbx, %rsi
callq 0xeb14
testb %al, %al
je 0x50980
testb %r12b, %r12b
movq -0x38(%rbp), %rdx
je 0x50c3c
decl (%r15)
movq -0x30(%rbp), %rcx
jne 0x50c47
movq %r13, %rdi
leaq 0xb790b(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
jmp 0x50c47
leaq -0xb0(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x3f687
leaq -0x90(%rbp), %rcx
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0x4af7b
movl %eax, %edi
movq %rdx, %rsi
callq 0xcd32
movl %eax, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movl %r14d, %edi
movq %rbx, %rsi
callq 0xcd32
movq %rdx, %r9
leaq -0x90(%rbp), %rcx
movq (%rcx), %rdi
leaq -0xb0(%rbp), %rcx
movq (%rcx), %rsi
leaq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rsp)
leaq -0x68(%rbp), %rcx
movq %rcx, (%rsp)
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rcx
movl %eax, %r8d
callq 0x513d3
leaq -0xc0(%rbp), %rcx
movq (%rcx), %rdx
leaq -0x68(%rbp), %rcx
movq (%rcx), %rcx
testb %al, %al
je 0x50c42
movq %rdx, %r15
movq %rcx, %r12
leaq -0xb0(%rbp), %r13
movl %r14d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2b9f8
movq %rax, -0x30(%rbp)
movl (%r13), %eax
cmpl $0x1, %eax
jne 0x50cbd
movq %rdx, %r14
movq -0xa8(%rbp), %rdi
callq 0xd491
movq %rax, %rdx
shrq $0x30, %rdx
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
andq %rbx, %rax
leaq -0x58(%rbp), %r8
leaq -0x50(%rbp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0x50d1a
testb %al, %al
je 0x50c69
movq %r14, -0x38(%rbp)
movq -0x50(%rbp), %rdi
leaq -0x118(%rbp), %rbx
movq %rbx, %rsi
callq 0x3f687
movq -0x58(%rbp), %rdi
leaq -0x110(%rbp), %r14
movl %eax, %esi
movq %r14, %rcx
callq 0x38e9f
movl %eax, %edi
movq %rdx, %rsi
callq 0x51072
movl %eax, %r15d
movq %rdx, %r12
movq (%r14), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3a29b
pushq $0x4
popq %rdx
movl %r15d, %edi
movq %r12, %rsi
movq %rax, %rcx
callq 0x1e896
movq %rax, %r12
movq (%rbx), %rdi
leaq -0x108(%rbp), %rbx
movq %rbx, %rsi
callq 0x3f60a
movl %eax, -0x3c(%rbp)
movq %rdx, -0x70(%rbp)
movq (%rbx), %rdi
leaq -0x100(%rbp), %rbx
movq %rbx, %rsi
callq 0x3f5b0
movq %rax, %r15
movq (%rbx), %rdi
leaq -0x98(%rbp), %rsi
callq 0x3fa30
movl %eax, %r13d
movq %rdx, %rbx
leaq -0x90(%rbp), %r14
leaq -0x68(%rbp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x36e55
movq 0x8(%r14), %rax
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
sete %cl
testb $0x3, %al
setne %al
orb %cl, %al
jne 0x50b55
incl (%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, -0xc0(%rbp)
movups %xmm0, 0x20(%rsp)
movups -0x90(%rbp), %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %r13d, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r15, %rcx
movl -0x3c(%rbp), %r8d
movq -0x70(%rbp), %r9
callq 0x3f209
movq -0xa0(%rbp), %rdi
leaq -0xf8(%rbp), %rbx
leaq -0xf0(%rbp), %r14
movq %rax, %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x508dc
movq (%rbx), %rdi
movq (%r14), %rsi
movl -0x68(%rbp), %edx
movq -0x60(%rbp), %rcx
leaq -0xe8(%rbp), %rbx
leaq -0xe0(%rbp), %r14
movq %rbx, %r8
movq %r14, %r9
callq 0x3faad
movq (%rbx), %rdi
movq (%r14), %rsi
leaq -0xd8(%rbp), %rbx
movq %rbx, %rdx
callq 0x5114e
leaq 0xb8abe(%rip), %rsi     # 0x1096b8
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xcf39
movq %rdx, %rcx
movq (%rbx), %rdi
movq -0x98(%rbp), %rsi
leaq -0xc8(%rbp), %r14
movq %r14, (%rsp)
pushq $0x1
popq %rdx
pushq $0x6
popq %r8
leaq -0xd0(%rbp), %rbx
movq %rbx, %r9
callq 0x4d0c4
movq (%r14), %rdx
movq (%rbx), %rcx
jmp 0x50c9d
movq -0x30(%rbp), %rcx
jmp 0x50c9d
testb %r12b, %r12b
je 0x50c9d
decl (%r15)
jne 0x50c9d
movq %rcx, %rbx
movq %r13, %rdi
movq %rdx, %r14
leaq 0xb761d(%rip), %rsi     # 0x108279
callq 0xce94
movq %r14, %rdx
movq %rbx, %rcx
jmp 0x50c9d
andq %r14, %rbx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x50c95
decl (%rbx)
jne 0x50c95
movq -0x30(%rbp), %rdi
shlq $0x30, %rdi
orq %r14, %rdi
leaq 0xb75e9(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x50(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rdx, (%rax)
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x50d03
movq 0x10bbdf0(%rip), %rdi   # 0x110cab8
testq %rdi, %rdi
jne 0x50ce6
leaq 0x89984(%rip), %rdi     # 0xda658
pushq $0x2a
popq %rsi
callq 0x8a21
movq %rax, %rdi
movq %rax, 0x10bbdd2(%rip)   # 0x110cab8
andq %rdi, -0x48(%rbp)
sete %al
testb $0x3, %dil
setne %cl
orb %al, %cl
jne 0x50cfe
movq -0x48(%rbp), %rax
incl (%rax)
callq 0x8cc6
leaq 0x83b03(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6