// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_maybe_Maybe_1_filter_1_sp7
static struct mirth_type_Type mw_std_maybe_Maybe_1_filter_1_sp7 (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_Type in_Resource_2, struct std_maybe_Maybe_1 in_Maybe_3, struct mirth_mirth_zaMirth* *out_zaMirth_5, struct std_maybe_Maybe_1 *out_Maybe_6) {
	struct mirth_type_Type branch_Resource_7;
	struct mirth_mirth_zaMirth* branch_zaMirth_8;
	struct std_maybe_Maybe_1 branch_Maybe_9;
	switch ((in_Maybe_3).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v10 = mtp_std_maybe_Maybe_1_Some(in_Maybe_3);
			incref(v10);
			incref(MK_mirth_type_Type(in_Resource_2));
			struct mirth_mirth_zaMirth* v11;
			bool v12 = mw_mirth_type_Resource_haszemetazy(in_zaMirth_1, V_mirth_type_MetaVar(v10), in_Resource_2, &v11);
			bool v13 = !v12;
			struct mirth_type_Type branch_Resource_14;
			struct mirth_mirth_zaMirth* branch_zaMirth_15;
			struct std_maybe_Maybe_1 branch_Maybe_16;
			if (v13) {
				struct std_maybe_Maybe_1 v17 = mtw_std_maybe_Maybe_1_Some(v10);
				branch_Maybe_16 = v17;
				branch_zaMirth_15 = v11;
				branch_Resource_14 = in_Resource_2;
			} else {
				decref(v10);
				struct std_maybe_Maybe_1 v18 = { .tag=std_maybe_Maybe_1_None };
				branch_Maybe_16 = v18;
				branch_zaMirth_15 = v11;
				branch_Resource_14 = in_Resource_2;
			}
			branch_Maybe_9 = branch_Maybe_16;
			branch_zaMirth_8 = branch_zaMirth_15;
			branch_Resource_7 = branch_Resource_14;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v19 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_9 = v19;
			branch_zaMirth_8 = in_zaMirth_1;
			branch_Resource_7 = in_Resource_2;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_Maybe_6 = branch_Maybe_9;
	*out_zaMirth_5 = branch_zaMirth_8;
	return branch_Resource_7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %rdx, %r14
movq %rdi, %r12
testl %ecx, %ecx
je 0x60cfc
movl %esi, -0x2c(%rbp)
cmpl $0x1, %ecx
jne 0x60d3f
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
movq %r8, %rdi
callq 0xdaeb
movq %rbx, %rsi
movq %rax, %rbx
movq %rdx, %r13
testb $0x1, %r13b
je 0x60c87
movq %rbx, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x60c87
incl (%rax)
movq %r15, -0x38(%rbp)
movq %r14, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x60ca1
incl (%rax)
leaq -0x40(%rbp), %r15
movq %r12, %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %edx
movq %r14, %rcx
movq %r15, %r8
callq 0x3b74b
movq (%r15), %r12
testb %al, %al
je 0x60d00
testb $0x1, %r13b
movq -0x38(%rbp), %r15
je 0x60cf6
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x60cf6
decl (%rax)
jne 0x60cf6
movq %rbx, %rdi
movq %r13, %rsi
callq 0xd4e3
xorl %ecx, %ecx
xorl %edx, %edx
jmp 0x60d14
xorl %edx, %edx
jmp 0x60d17
movq %rbx, %rdi
movq %r13, %rsi
callq 0x95f6
movl $0x1, %ecx
movq -0x38(%rbp), %r15
movl -0x2c(%rbp), %esi
movq 0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, 0x4(%rax)
movq %rdx, 0x8(%rax)
movq %r12, (%r15)
movl %esi, %eax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x839f5(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x839fa(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5