// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_topzeresourcezeiszefinezy
static bool mw_mirth_type_StackType_topzeresourcezeiszefinezy (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* v5;
	struct mirth_type_StackType v6 = mw_mirth_type_StackType_expand(in_zaMirth_1, in_StackType_2, &v5);
	struct mirth_mirth_zaMirth* branch_zaMirth_7;
	bool branch_Bool_8;
	switch ((v6).tag) {
		case mirth_type_StackType_Cons: {
			struct mirth_type_Type v9;
			struct mirth_type_StackType v10 = mtp_mirth_type_StackType_Cons(v6, &v9);
			decref(MK_mirth_type_Type(v9));
			struct mirth_mirth_zaMirth* v11;
			bool v12 = mw_mirth_type_StackType_topzeresourcezeiszefinezy(v5, v10, &v11);
			branch_Bool_8 = v12;
			branch_zaMirth_7 = v11;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v13;
			uint64_t v14;
			struct mirth_type_StackType v15 = mtp_mirth_type_StackType_ConsLabel(v6, &v13, &v14);
			decref(MK_mirth_type_Type(v13));
			struct mirth_mirth_zaMirth* v16;
			bool v17 = mw_mirth_type_StackType_topzeresourcezeiszefinezy(v5, v15, &v16);
			branch_Bool_8 = v17;
			branch_zaMirth_7 = v16;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v18;
			struct mirth_type_StackType v19 = mtp_mirth_type_StackType_With(v6, &v18);
			decref(MK_mirth_type_StackType(v19));
			struct mirth_mirth_zaMirth* v20;
			bool v21 = mw_mirth_type_Type_errorzy(v5, v18, &v20);
			bool v22 = !v21;
			branch_Bool_8 = v22;
			branch_zaMirth_7 = v20;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v23;
			uint64_t v24;
			struct mirth_type_StackType v25 = mtp_mirth_type_StackType_WithLabel(v6, &v23, &v24);
			decref(MK_mirth_type_Type(v23));
			struct mirth_mirth_zaMirth* v26;
			bool v27 = mw_mirth_type_StackType_topzeresourcezeiszefinezy(v5, v25, &v26);
			branch_Bool_8 = v27;
			branch_zaMirth_7 = v26;
		} break;
		case mirth_type_StackType_Meta: {
			uint64_t v28 = mtp_mirth_type_StackType_Meta(v6);
			bool v29 = true;
			branch_Bool_8 = v29;
			branch_zaMirth_7 = v5;
		} break;
		case mirth_type_StackType_Var: {
			uint64_t v30 = mtp_mirth_type_StackType_Var(v6);
			bool v31 = true;
			branch_Bool_8 = v31;
			branch_zaMirth_7 = v5;
		} break;
		case mirth_type_StackType_Unit: {
			bool v32 = true;
			branch_Bool_8 = v32;
			branch_zaMirth_7 = v5;
		} break;
		case mirth_type_StackType_Error: {
			bool v33 = false;
			branch_Bool_8 = v33;
			branch_zaMirth_7 = v5;
		} break;
		case mirth_type_StackType_Ignore: {
			bool v34 = false;
			branch_Bool_8 = v34;
			branch_zaMirth_7 = v5;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_7;
	return branch_Bool_8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
leaq -0x28(%rbp), %rcx
callq 0x3917b
cmpl $0x8, %eax
ja 0x50dae
movl %eax, %eax
leaq 0x921be(%rip), %rcx     # 0xe2dec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rcx
xorl %eax, %eax
jmp 0x50d9e
decl (%rdx)
jne 0x50c4e
movq %rdx, %rdi
callq 0x5030
movb $0x1, %al
movq -0x28(%rbp), %rcx
jmp 0x50d9e
leaq -0x38(%rbp), %rsi
movq %rdx, %rdi
callq 0x39346
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x50c9c
decl (%rcx)
jne 0x50c9c
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xc4f2d(%rip), %rsi     # 0x115bc1
movq %rax, %rdi
callq 0xd4e3
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
movq -0x30(%rbp), %rdx
leaq -0x40(%rbp), %r14
movq %r14, %rcx
callq 0x429c2
xorb $0x1, %al
movq (%r14), %rcx
jmp 0x50d9e
leaq -0x38(%rbp), %r12
movq %rdx, %rdi
movq %r12, %rsi
callq 0x392bf
movl %eax, %r14d
movq %rdx, %r15
movq 0x8(%r12), %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x50d0c
movl -0x38(%rbp), %edi
decl (%rcx)
jne 0x50d0c
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc4de2(%rip), %rsi     # 0x115ae9
callq 0xd4e3
movq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %r12
jmp 0x50d8c
leaq -0x38(%rbp), %r12
leaq -0x40(%rbp), %rax
movq %rdx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x393cd
jmp 0x50d44
leaq -0x38(%rbp), %r12
leaq -0x40(%rbp), %rax
movq %rdx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x39471
movl %eax, %r14d
movq %rdx, %r15
movq 0x8(%r12), %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x50d84
movl -0x38(%rbp), %edi
decl (%rcx)
jne 0x50d84
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc4d6a(%rip), %rsi     # 0x115ae9
callq 0xd4e3
movq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %r12
movl %r14d, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x50c01
movq (%r12), %rcx
movq %rcx, (%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x93986(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x9398b(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5