// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_physicalzebitszy
static struct std_maybe_Maybe_1 mw_mirth_type_StackType_physicalzebitszy (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* branch_zaMirth_5;
	struct std_maybe_Maybe_1 branch_Maybe_6;
	switch ((in_StackType_2).tag) {
		case mirth_type_StackType_Error: {
			struct std_maybe_Maybe_1 v7 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v7;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Ignore: {
			struct std_maybe_Maybe_1 v8 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v8;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Unit: {
			INT v9 = WRAP_I63(0LL);
			struct std_maybe_Maybe_1 v10 = mtw_std_maybe_Maybe_1_Some(MKNAT(v9));
			branch_Maybe_6 = v10;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Meta: {
			uint64_t v11 = mtp_mirth_type_StackType_Meta(in_StackType_2);
			struct mirth_mirth_zaMirth* v12;
			struct std_maybe_Maybe_1 v13 = mw_mirth_type_MetaVar_expandzeif_2_sp4(in_zaMirth_1, v11, &v12);
			branch_Maybe_6 = v13;
			branch_zaMirth_5 = v12;
		} break;
		case mirth_type_StackType_Var: {
			uint64_t v14 = mtp_mirth_type_StackType_Var(in_StackType_2);
			struct std_maybe_Maybe_1 v15 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v15;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Cons: {
			struct mirth_type_Type v16;
			struct mirth_type_StackType v17 = mtp_mirth_type_StackType_Cons(in_StackType_2, &v16);
			struct mirth_mirth_zaMirth* v18;
			struct std_maybe_Maybe_1 v19 = mw_mirth_type_StackType_physicalzebitszy(in_zaMirth_1, v17, &v18);
			struct mirth_mirth_zaMirth* v20;
			struct std_maybe_Maybe_1 v21 = mw_mirth_type_Type_physicalzebitszy(v18, v16, &v20);
			struct std_maybe_Maybe_1 v22 = mw_std_maybe_Maybe_1_map2_1_sp1(v19, v21);
			branch_Maybe_6 = v22;
			branch_zaMirth_5 = v20;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v23;
			struct mirth_type_StackType v24 = mtp_mirth_type_StackType_With(in_StackType_2, &v23);
			struct mirth_mirth_zaMirth* v25;
			struct std_maybe_Maybe_1 v26 = mw_mirth_type_StackType_physicalzebitszy(in_zaMirth_1, v24, &v25);
			struct mirth_mirth_zaMirth* v27;
			struct std_maybe_Maybe_1 v28 = mw_mirth_type_Resource_physicalzebitszy(v25, v23, &v27);
			struct std_maybe_Maybe_1 v29 = mw_std_maybe_Maybe_1_map2_1_sp1(v26, v28);
			branch_Maybe_6 = v29;
			branch_zaMirth_5 = v27;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v30;
			uint64_t v31;
			struct mirth_type_StackType v32 = mtp_mirth_type_StackType_ConsLabel(in_StackType_2, &v30, &v31);
			struct mirth_mirth_zaMirth* v33;
			struct std_maybe_Maybe_1 v34 = mw_mirth_type_StackType_physicalzebitszy(in_zaMirth_1, v32, &v33);
			struct mirth_mirth_zaMirth* v35;
			struct std_maybe_Maybe_1 v36 = mw_mirth_type_Type_physicalzebitszy(v33, v30, &v35);
			struct std_maybe_Maybe_1 v37 = mw_std_maybe_Maybe_1_map2_1_sp1(v34, v36);
			branch_Maybe_6 = v37;
			branch_zaMirth_5 = v35;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v38;
			uint64_t v39;
			struct mirth_type_StackType v40 = mtp_mirth_type_StackType_WithLabel(in_StackType_2, &v38, &v39);
			struct mirth_mirth_zaMirth* v41;
			struct std_maybe_Maybe_1 v42 = mw_mirth_type_StackType_physicalzebitszy(in_zaMirth_1, v40, &v41);
			struct mirth_mirth_zaMirth* v43;
			struct std_maybe_Maybe_1 v44 = mw_mirth_type_Resource_physicalzebitszy(v41, v38, &v43);
			struct std_maybe_Maybe_1 v45 = mw_std_maybe_Maybe_1_map2_1_sp1(v42, v44);
			branch_Maybe_6 = v45;
			branch_zaMirth_5 = v43;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_5;
	return branch_Maybe_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x8, %esi
ja 0x8583d
movq %rcx, %rbx
movq %rdi, %r14
movl %esi, %eax
leaq 0x4e09b(%rip), %rcx     # 0xd3768
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x82a34(%rip), %rsi     # 0x108111
pushq $0x1
popq %rdi
callq 0x8d0c
pushq $0x1
popq %rax
jmp 0x8582b
movq %rdx, %rdi
callq 0x34e20
leaq -0x48(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x85127
jmp 0x85828
movq %rdx, %rdi
callq 0x34edb
xorl %eax, %eax
xorl %edx, %edx
jmp 0x8582b
leaq -0x48(%rbp), %r15
movq %rdx, %rdi
movq %r15, %rsi
callq 0x34f7f
leaq -0x38(%rbp), %r12
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rcx
callq 0x856a4
movl %eax, %r14d
movq %rdx, %r13
movq (%r12), %rdi
movl (%r15), %esi
movq 0x8(%r15), %rdx
leaq -0x30(%rbp), %r15
jmp 0x85810
leaq -0x48(%rbp), %r15
movq %rdx, %rdi
movq %r15, %rsi
callq 0x34ef8
leaq -0x38(%rbp), %r12
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rcx
callq 0x856a4
movl %eax, %r14d
movq %rdx, %r13
movq (%r12), %rdi
movl (%r15), %esi
movq 0x8(%r15), %rdx
leaq -0x30(%rbp), %r15
jmp 0x857ca
leaq -0x48(%rbp), %r15
leaq -0x38(%rbp), %rax
movq %rdx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3502f
leaq -0x30(%rbp), %r12
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rcx
callq 0x856a4
movl %eax, %r14d
movq %rdx, %r13
movq (%r12), %rdi
movl (%r15), %esi
movq 0x8(%r15), %rdx
leaq -0x50(%rbp), %r15
movq %r15, %rcx
callq 0x84e20
jmp 0x85818
leaq -0x48(%rbp), %r15
leaq -0x38(%rbp), %rax
movq %rdx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x350d3
leaq -0x30(%rbp), %r12
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rcx
callq 0x856a4
movl %eax, %r14d
movq %rdx, %r13
movq (%r12), %rdi
movl (%r15), %esi
movq 0x8(%r15), %rdx
leaq -0x50(%rbp), %r15
movq %r15, %rcx
callq 0x85a8a
movq %rdx, %rcx
movl %r14d, %edi
movq %r13, %rsi
movl %eax, %edx
callq 0x85986
movq (%r15), %r14
movq %r14, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4efc9(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6