// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_list_List_1_filter_1_sp6
static struct std_list_List_1 mw_std_list_List_1_filter_1_sp6 (struct mirth_mirth_zaMirth* in_zaMirth_1, VAL in_zux1_2, struct std_list_List_1 in_List_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, VAL *out_zux1_5) {
	struct std_list_List_1 v7 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v8;
	mw_std_list_List_1_buildzx(v7, &v8);
	bool v9 = true;
	struct mirth_mirth_zaMirth* r10 = in_zaMirth_1;
	VAL r11 = in_zux1_2;
	struct std_list_List_1 r12 = v8;
	struct std_list_List_1 v13 = in_List_3;
	bool v14 = v9;
	bool v15 = v9;
	while (v15) {
		struct mirth_mirth_zaMirth* r16 = r10;
		VAL r17 = r11;
		struct std_list_List_1 r18 = r12;
		struct std_list_List_1 v19 = v13;
		bool v20 = v14;
		struct mirth_mirth_zaMirth* branch_zaMirth_21;
		VAL branch_zux1_22;
		struct std_list_List_1 branch_zaLister_23;
		struct std_list_List_1 branch_List_24;
		bool branch_Bool_25;
		switch ((v19).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v26;
				VAL v27 = mtp_std_list_List_1_Cons(v19, &v26);
				incref(v27);
				struct mirth_mirth_zaMirth* v28;
				bool v29 = mw_mirth_c99_C99APIArg_iszephysicalzy(r16, V_mirth_c99_C99APIArg(v27), &v28);
				struct mirth_mirth_zaMirth* branch_zaMirth_30;
				VAL branch_zux1_31;
				struct std_list_List_1 branch_zaLister_32;
				if (v29) {
					struct std_list_List_1 v33;
					mw_std_list_zaLister_1_pushzx(v27, r18, &v33);
					branch_zaLister_32 = v33;
					branch_zux1_31 = r17;
					branch_zaMirth_30 = v28;
				} else {
					decref(v27);
					branch_zaLister_32 = r18;
					branch_zux1_31 = r17;
					branch_zaMirth_30 = v28;
				}
				bool v34 = true;
				branch_Bool_25 = v34;
				branch_List_24 = v26;
				branch_zaLister_23 = branch_zaLister_32;
				branch_zux1_22 = branch_zux1_31;
				branch_zaMirth_21 = branch_zaMirth_30;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v35 = { .tag=std_list_List_1_Nil };
				bool v36 = false;
				branch_Bool_25 = v36;
				branch_List_24 = v35;
				branch_zaLister_23 = r18;
				branch_zux1_22 = r17;
				branch_zaMirth_21 = r16;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v15 = branch_Bool_25;
		v14 = branch_Bool_25;
		v13 = branch_List_24;
		r12 = branch_zaLister_23;
		r11 = branch_zux1_22;
		r10 = branch_zaMirth_21;
	}
	decref(MK_std_list_List_1(v13));
	struct std_list_List_1 v37 = mw_std_list_zaLister_1_donezx(r12);
	*out_zux1_5 = r11;
	*out_zaMirth_4 = r10;
	return v37;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x50(%rbp)
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, -0x48(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdi, %r15
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd01b
movl %eax, -0x2c(%rbp)
movq %rdx, %r13
cmpl $0x1, %r14d
jne 0xae06b
movq %rbx, %rdi
leaq -0x70(%rbp), %rsi
callq 0xd0aa
movq %rax, %r14
movq %rdx, %rbx
testb $0x1, %bl
je 0xae028
movq %r14, %r12
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r12
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0xae028
incl (%r12)
movq %r15, %rdi
movq %r14, %rsi
leaq -0x38(%rbp), %rdx
callq 0xacba1
testb %al, %al
jne 0xae03b
decl (%r12)
jne 0xae05a
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd13d
jmp 0xae05a
movq %r15, %rdi
movq %r14, %rsi
leaq -0x38(%rbp), %rdx
callq 0xacba1
testb %al, %al
je 0xae05a
movq %r14, %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %edx
movq %r13, %rcx
leaq -0x60(%rbp), %r8
callq 0x949e
movl -0x60(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x58(%rbp), %r13
movq -0x38(%rbp), %r15
movl -0x70(%rbp), %r14d
movq -0x68(%rbp), %rbx
jmp 0xadfbf
testl %r14d, %r14d
jne 0xae0a8
xorl %edi, %edi
xorl %esi, %esi
movl -0x2c(%rbp), %edx
movq %r13, %rcx
callq 0xd01b
movq -0x40(%rbp), %rcx
movq 0x10(%rbp), %rsi
movq %rcx, (%rsi)
movq -0x48(%rbp), %rcx
movq %rcx, 0x8(%rsi)
movq -0x50(%rbp), %rcx
movq %r15, (%rcx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x3260c(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x32611(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302