// File: /workspace/github_c_makefile_star2_O2/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, -0x48(%rbp)
movq %r8, %r15
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r12
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
xorl %edi, %edi
xorl %esi, %esi
callq 0xcd32
movq %rdx, %r13
leaq -0x58(%rbp), %rsi
movb $0x1, %cl
movq %r15, %rdi
testb $0x1, %cl
je 0xa43ee
xorl %ecx, %ecx
movl $0x0, %r15d
testl %r14d, %r14d
je 0xa4308
cmpl $0x1, %r14d
jne 0xa4452
movq %r13, %rbx
movl %eax, %r13d
callq 0xce01
movq %rax, %r15
movq %rdx, %r14
testb $0x1, %r14b
je 0xa4362
movq %r15, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0xa4362
incl (%rax)
movq %r12, %rdi
movq %r15, %rsi
leaq -0x30(%rbp), %rdx
callq 0xa2ec1
testb %al, %al
je 0xa4397
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
movq %rbx, %rcx
leaq -0x68(%rbp), %r8
callq 0x8e35
movl -0x68(%rbp), %eax
movq -0x60(%rbp), %r13
movq -0x30(%rbp), %r12
jmp 0xa43d7
testb $0x1, %r14b
movl %r13d, %eax
je 0xa43d0
movq %r15, %rsi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rsi
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0xa43d0
decl (%rsi)
jne 0xa43d0
movq %r15, %rdi
movq %r14, %rsi
callq 0xce94
movl %r13d, %eax
movq -0x30(%rbp), %r12
movq %rbx, %r13
movl -0x58(%rbp), %r14d
movq -0x50(%rbp), %r15
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
jmp 0xa4302
andq %rdi, %rbx
sete %dl
testb $0x3, %dil
setne %cl
orb %dl, %cl
jne 0xa441f
decl (%rbx)
jne 0xa441f
shlq $0x30, %r14
orq %rdi, %r14
movl %eax, %r15d
leaq 0x63e65(%rip), %rsi     # 0x108279
movq %r14, %rdi
callq 0xce94
movl %r15d, %eax
movl %eax, %edi
movq %r13, %rsi
callq 0xcd32
movq -0x38(%rbp), %rcx
movq 0x10(%rbp), %rsi
movq %rcx, (%rsi)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rsi)
movq -0x48(%rbp), %rcx
movq %r12, (%rcx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x303b4(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6