// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_maybe_Maybe_1_map_1_sp12
static struct mirth_type_Type mw_std_maybe_Maybe_1_map_1_sp12 (struct mirth_type_Type in_Resource_1, struct std_maybe_Maybe_1 in_Maybe_2, struct std_maybe_Maybe_1 *out_Maybe_4) {
	struct mirth_type_Type branch_Resource_5;
	struct std_maybe_Maybe_1 branch_Maybe_6;
	switch ((in_Maybe_2).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v7 = mtp_std_maybe_Maybe_1_Some(in_Maybe_2);
			VAL v8 = ((TUP*)PTRPTR(value_tup(v7)))->cells[0];
			VAL v9 = ((TUP*)PTRPTR(value_tup(v7)))->cells[1];
			tup_decref_outer(value_tup(v7));
			incref(MK_mirth_type_Type(in_Resource_1));
			struct mirth_type_StackType v10 = mtw_mirth_type_StackType_With(V_mirth_type_StackType(v8), in_Resource_1);
			PTUP r11 = PTRMK(0,tup_new(2),0);
			((TUP*)PTRPTR(r11))->size = 2;
			((TUP*)PTRPTR(r11))->cells[1] = v9;
			((TUP*)PTRPTR(r11))->cells[0] = MK_mirth_type_StackType(v10);
			struct std_maybe_Maybe_1 v12 = mtw_std_maybe_Maybe_1_Some(MKTUP(r11));
			branch_Maybe_6 = v12;
			branch_Resource_5 = in_Resource_1;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v13 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v13;
			branch_Resource_5 = in_Resource_1;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_Maybe_4 = branch_Maybe_6;
	return branch_Resource_5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %eax
movq %rsi, %rbx
movl %edi, %r15d
testl %edx, %edx
je 0x3d80c
movl %r15d, -0x30(%rbp)
movq %rbx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movl %eax, -0x2c(%rbp)
cmpl $0x1, %eax
jne 0x3d832
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %rcx, %rdi
callq 0xd745
movq %rax, %rbx
movq %rdx, %r14
movq %rax, %rdi
movq %rdx, %rsi
callq 0x90ba
movq %rbx, %r15
andq %r12, %r15
movq 0x8(%r15), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x90ba
movups 0x18(%r15), %xmm0
movaps %xmm0, -0x50(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x90ba
movq %rbx, %rdi
callq 0x910b
movq -0x38(%rbp), %rbx
movq %rbx, %rax
andq %r12, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x3d798
incl (%rax)
movq %r13, %rdi
shrq $0x30, %rdi
andq %r12, %r13
movq %r13, %rsi
movl -0x30(%rbp), %r15d
movl %r15d, %edx
movq %rbx, %rcx
callq 0x20ae8
movq %rdx, %r14
movl $0x2, %edi
callq 0xe0e7
andq %rax, %r12
movw $0x2, 0x6(%r12)
movaps -0x50(%rbp), %xmm0
movups %xmm0, 0x18(%r12)
movabsq $0x7000000000000, %rcx  # imm = 0x7000000000000
orq %r14, %rcx
leaq 0xd43d7(%rip), %rdx     # 0x111bc1
movq %rcx, 0x8(%r12)
movq %rdx, 0x10(%r12)
leaq 0xd3b9e(%rip), %rsi     # 0x111399
movq %rax, %rdi
callq 0x9353
movq -0x40(%rbp), %r8
movl -0x2c(%rbp), %eax
jmp 0x3d80e
xorl %edx, %edx
movl %eax, (%r8)
movl $0x0, 0x4(%r8)
movq %rdx, 0x8(%r8)
movl %r15d, %eax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xa2e82(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xa2e87(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302