// File: /workspace/github_c_makefile_star2_O0/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
subq $0x130, %rsp            # imm = 0x130
movl %edi, -0x20(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x30(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x38(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x124(%rbp)
testl %eax, %eax
je 0xcd3a8
jmp 0xcd110
movl -0x124(%rbp), %eax
subl $0x1, %eax
jne 0xcd3e3
jmp 0xcd121
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x174a0
movq %rax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xb770
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xb770
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
movq 0x18(%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xb770
movq %rax, %rdi
callq 0xb7e0
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x80(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xcd255
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x98(%rbp), %rax
cmpq $0x0, %rax
je 0xcd255
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0xcd255
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6e780
movq %rax, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xb8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xcd257
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x6fd00
movl %eax, -0xd8(%rbp)
movq %rdx, -0xd0(%rbp)
movl -0xd8(%rbp), %edi
movq -0xd0(%rbp), %rsi
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rcx
callq 0x749e0
movl %eax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movl $0x2, %edi
callq 0x1a7d0
orq $0x0, %rax
orq $0x0, %rax
movq %rax, -0xe0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xe0(%rbp), %rax
movw $0x2, 0x6(%rax)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xe0(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x20(%rax)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xe0(%rbp), %rax
movq %rax, -0x130(%rbp)
movl -0xc8(%rbp), %edi
movq -0xc0(%rbp), %rsi
callq 0x6f140
movq %rax, %rcx
movq -0x130(%rbp), %rax
movq %rcx, -0xf0(%rbp)
movq %rdx, -0xe8(%rbp)
movq -0xf0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xe8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xe0(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq 0x2c4043(%rip), %rax    # 0x391398
orq $0x1, %rax
movq %rax, -0x108(%rbp)
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0xca10
movl %eax, -0x100(%rbp)
movq %rdx, -0xf8(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcd3fc
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x120(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcd3fc
leaq 0x286a97(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x38(%rbp), %rax
movups -0x48(%rbp), %xmm0
movups %xmm0, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw (%rax,%rax)