// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_list_List_1_zd_sp1
static bool mw_std_list_List_1_zd_sp1 (struct mirth_mirth_zaMirth* in_zaMirth_1, struct std_list_List_1 in_List_2, struct std_list_List_1 in_List_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	bool v6 = true;
	struct std_list_List_1 v7;
	struct std_maybe_Maybe_1 v8 = mw_std_list_List_1_uncons(in_List_2, &v7);
	struct std_list_List_1 v9;
	struct std_maybe_Maybe_1 v10 = mw_std_list_List_1_uncons(in_List_3, &v9);
	struct mirth_mirth_zaMirth* branch_zaMirth_11;
	bool branch_Bool_12;
	switch ((v10).tag) {
		case std_maybe_Maybe_1_None: {
			int64_t v13 = (v8).tag;
			decref(MK_std_maybe_Maybe_1(v8));
			INT v14 = WRAP_I63(0LL);
			INT v15 = v14;
			INT v16 = i64_to_int(v13);
			bool v17 = int_eq(v16, v15);
			branch_Bool_12 = v17;
			branch_zaMirth_11 = in_zaMirth_1;
		} break;
		case std_maybe_Maybe_1_Some: {
			VAL v18 = mtp_std_maybe_Maybe_1_Some(v10);
			struct mirth_mirth_zaMirth* branch_zaMirth_19;
			bool branch_Bool_20;
			switch ((v8).tag) {
				case std_maybe_Maybe_1_Some: {
					VAL v21 = mtp_std_maybe_Maybe_1_Some(v8);
					struct mirth_mirth_zaMirth* v22;
					bool v23 = mw_mirth_arrow_Arg_similar(in_zaMirth_1, V_mirth_arrow_Block(v21), V_mirth_arrow_Block(v18), &v22);
					branch_Bool_20 = v23;
					branch_zaMirth_19 = v22;
				} break;
				case std_maybe_Maybe_1_None: {
					decref(v18);
					bool v24 = false;
					branch_Bool_20 = v24;
					branch_zaMirth_19 = in_zaMirth_1;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			branch_Bool_12 = branch_Bool_20;
			branch_zaMirth_11 = branch_zaMirth_19;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	bool v25 = (branch_Bool_12 && v6);
	incref(MK_std_list_List_1(v7));
	bool v26 = mw_std_list_List_1_emptyzy(v7);
	incref(MK_std_list_List_1(v9));
	bool v27 = mw_std_list_List_1_emptyzy(v9);
	bool v28 = (v26 && v27);
	bool v29 = !v28;
	bool v30 = (v29 && v25);
	struct mirth_mirth_zaMirth* r31 = branch_zaMirth_11;
	struct std_list_List_1 v32 = v7;
	struct std_list_List_1 v33 = v9;
	bool v34 = v25;
	bool v35 = v30;
	while (v35) {
		struct mirth_mirth_zaMirth* r36 = r31;
		struct std_list_List_1 v37 = v32;
		struct std_list_List_1 v38 = v33;
		bool v39 = v34;
		struct std_list_List_1 v40;
		struct std_maybe_Maybe_1 v41 = mw_std_list_List_1_uncons(v37, &v40);
		struct std_list_List_1 v42;
		struct std_maybe_Maybe_1 v43 = mw_std_list_List_1_uncons(v38, &v42);
		struct mirth_mirth_zaMirth* branch_zaMirth_44;
		bool branch_Bool_45;
		switch ((v43).tag) {
			case std_maybe_Maybe_1_None: {
				int64_t v46 = (v41).tag;
				decref(MK_std_maybe_Maybe_1(v41));
				INT v47 = WRAP_I63(0LL);
				INT v48 = v47;
				INT v49 = i64_to_int(v46);
				bool v50 = int_eq(v49, v48);
				branch_Bool_45 = v50;
				branch_zaMirth_44 = r36;
			} break;
			case std_maybe_Maybe_1_Some: {
				VAL v51 = mtp_std_maybe_Maybe_1_Some(v43);
				struct mirth_mirth_zaMirth* branch_zaMirth_52;
				bool branch_Bool_53;
				switch ((v41).tag) {
					case std_maybe_Maybe_1_Some: {
						VAL v54 = mtp_std_maybe_Maybe_1_Some(v41);
						struct mirth_mirth_zaMirth* v55;
						bool v56 = mw_mirth_arrow_Arg_similar(r36, V_mirth_arrow_Block(v54), V_mirth_arrow_Block(v51), &v55);
						branch_Bool_53 = v56;
						branch_zaMirth_52 = v55;
					} break;
					case std_maybe_Maybe_1_None: {
						decref(v51);
						bool v57 = false;
						branch_Bool_53 = v57;
						branch_zaMirth_52 = r36;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				branch_Bool_45 = branch_Bool_53;
				branch_zaMirth_44 = branch_zaMirth_52;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		bool v58 = (branch_Bool_45 && v39);
		incref(MK_std_list_List_1(v40));
		bool v59 = mw_std_list_List_1_emptyzy(v40);
		incref(MK_std_list_List_1(v42));
		bool v60 = mw_std_list_List_1_emptyzy(v42);
		bool v61 = (v59 && v60);
		bool v62 = !v61;
		bool v63 = (v62 && v58);
		v35 = v63;
		v34 = v58;
		v33 = v42;
		v32 = v40;
		r31 = branch_zaMirth_44;
	}
	decref(MK_std_list_List_1(v33));
	decref(MK_std_list_List_1(v32));
	*out_zaMirth_4 = r31;
	return v34;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, -0x48(%rbp)
movq %r8, %r14
movl %ecx, %r12d
movq %rdi, -0x30(%rbp)
leaq -0x90(%rbp), %rax
movl %esi, %edi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x1075d
movl %eax, %r15d
movq %rdx, %rbx
leaq -0x80(%rbp), %rdx
movl %r12d, %edi
movq %r14, %rsi
callq 0x1075d
cmpl $0x1, %eax
je 0x8634d
testl %eax, %eax
jne 0x8664c
movl %r15d, %r14d
movq %rbx, %rax
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
andq %r15, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x86332
decl (%rax)
jne 0x86332
movq %r14, %rdi
shlq $0x30, %rdi
orq %rbx, %rdi
leaq 0x81f94(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %r14, %rdi
callq 0xd86d
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xd759
movl %eax, %r13d
jmp 0x863d7
movq %rdx, %rdi
callq 0xd491
movq %rax, %r14
testl %r15d, %r15d
je 0x86391
cmpl $0x1, %r15d
jne 0x8664c
movq %rbx, %rdi
callq 0xd491
leaq -0x60(%rbp), %rbx
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x86663
movl %eax, %r13d
movq (%rbx), %rax
movq %rax, -0x30(%rbp)
jmp 0x86399
testb $0x1, %dl
jne 0x863a5
xorl %r13d, %r13d
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
jmp 0x863d7
movq %r14, %rax
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
andq %r15, %rax
sete %cl
testb $0x3, %r14b
setne %sil
orb %cl, %sil
jne 0x863d4
decl (%rax)
jne 0x863d4
movq %r14, %rdi
movq %rdx, %rsi
callq 0xce94
xorl %r13d, %r13d
movl -0x90(%rbp), %edi
movq -0x88(%rbp), %r14
movq %r14, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x863fa
incl (%rax)
movq %rdi, -0x38(%rbp)
movq %r14, %rsi
callq 0xeb14
movl %eax, %r15d
movl -0x80(%rbp), %r12d
movq -0x78(%rbp), %rbx
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x865a8
incl (%rax)
jmp 0x865a8
movq -0x38(%rbp), %rdi
movq %r14, %rsi
leaq -0x60(%rbp), %rdx
callq 0x1075d
movl %eax, %r15d
movq %rdx, %r14
movl %r12d, %edi
movq %rbx, %rsi
leaq -0x70(%rbp), %rdx
callq 0x1075d
cmpl $0x1, %eax
movl %r13d, -0x3c(%rbp)
je 0x864c5
testl %eax, %eax
jne 0x8664c
movl %r15d, %ebx
movq %r14, %rax
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
andq %r15, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x864aa
decl (%rax)
jne 0x864aa
movq %rbx, %rdi
shlq $0x30, %rdi
orq %r14, %rdi
leaq 0x81e1c(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %rbx, %rdi
callq 0xd86d
movq %rax, %rdi
pushq $0x1
popq %rsi
callq 0xd759
movl %eax, %r13d
jmp 0x8654c
movq %rdx, %rdi
callq 0xd491
movq %rax, %rbx
testl %r15d, %r15d
je 0x86507
cmpl $0x1, %r15d
jne 0x8664c
movq %r14, %rdi
callq 0xd491
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movq %rbx, %rdx
leaq -0x50(%rbp), %rcx
callq 0x86663
movl %eax, %r13d
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x8650f
testb $0x1, %dl
jne 0x8651b
xorl %r13d, %r13d
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
jmp 0x8654c
movq %rbx, %rax
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
andq %r15, %rax
sete %cl
testb $0x3, %bl
setne %sil
orb %cl, %sil
jne 0x86549
decl (%rax)
jne 0x86549
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xce94
xorl %r13d, %r13d
movl -0x60(%rbp), %edi
movq -0x58(%rbp), %r14
movq %r14, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x86569
incl (%rax)
movq %rdi, -0x38(%rbp)
movq %r14, %rsi
callq 0xeb14
movl %eax, %r15d
movl -0x70(%rbp), %r12d
movq -0x68(%rbp), %rbx
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x8659f
incl (%rax)
movl -0x3c(%rbp), %eax
andb %r13b, %al
movl %eax, %r13d
movl %r12d, %edi
movq %rbx, %rsi
callq 0xeb14
andb %al, %r15b
xorb $0x1, %r15b
andb %r13b, %r15b
testb $0x1, %r15b
jne 0x86439
movq %rbx, %rax
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
andq %r15, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x865fe
decl (%rax)
jne 0x865fe
shlq $0x30, %r12
orq %rbx, %r12
movq %r12, %rdi
leaq 0x81c80(%rip), %rsi     # 0x108279
callq 0xce94
andq %r14, %r15
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x8662b
decl (%r15)
jne 0x8662b
movq -0x38(%rbp), %rdi
shlq $0x30, %rdi
orq %r14, %rdi
leaq 0x81c53(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x48(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
andb $0x1, %r13b
movl %r13d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e1ba(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6