// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_haszemetazy
static bool mw_mirth_type_StackType_haszemetazy (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_MetaVar_2, struct mirth_type_StackType in_StackType_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	struct mirth_mirth_zaMirth* branch_zaMirth_6;
	bool branch_Bool_7;
	switch ((in_StackType_3).tag) {
		case mirth_type_StackType_Meta: {
			uint64_t v8 = mtp_mirth_type_StackType_Meta(in_StackType_3);
			struct mirth_mirth_zaMirth* v9;
			bool v10 = mw_mirth_type_MetaVar_haszemetazy(in_zaMirth_1, in_MetaVar_2, v8, &v9);
			branch_Bool_7 = v10;
			branch_zaMirth_6 = v9;
		} break;
		case mirth_type_StackType_Error: {
			bool v11 = false;
			branch_Bool_7 = v11;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Ignore: {
			bool v12 = false;
			branch_Bool_7 = v12;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Var: {
			uint64_t v13 = mtp_mirth_type_StackType_Var(in_StackType_3);
			bool v14 = false;
			branch_Bool_7 = v14;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Unit: {
			bool v15 = false;
			branch_Bool_7 = v15;
			branch_zaMirth_6 = 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_3, &v16);
			struct mirth_mirth_zaMirth* v18;
			bool v19 = mw_mirth_type_Type_haszemetazy(in_zaMirth_1, in_MetaVar_2, v16, &v18);
			struct mirth_mirth_zaMirth* branch_zaMirth_20;
			bool branch_Bool_21;
			if (v19) {
				decref(MK_mirth_type_StackType(v17));
				bool v22 = true;
				branch_Bool_21 = v22;
				branch_zaMirth_20 = v18;
			} else {
				struct mirth_mirth_zaMirth* v23;
				bool v24 = mw_mirth_type_StackType_haszemetazy(v18, in_MetaVar_2, v17, &v23);
				branch_Bool_21 = v24;
				branch_zaMirth_20 = v23;
			}
			branch_Bool_7 = branch_Bool_21;
			branch_zaMirth_6 = branch_zaMirth_20;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v25;
			uint64_t v26;
			struct mirth_type_StackType v27 = mtp_mirth_type_StackType_ConsLabel(in_StackType_3, &v25, &v26);
			struct mirth_mirth_zaMirth* v28;
			bool v29 = mw_mirth_type_Type_haszemetazy(in_zaMirth_1, in_MetaVar_2, v25, &v28);
			struct mirth_mirth_zaMirth* branch_zaMirth_30;
			bool branch_Bool_31;
			if (v29) {
				decref(MK_mirth_type_StackType(v27));
				bool v32 = true;
				branch_Bool_31 = v32;
				branch_zaMirth_30 = v28;
			} else {
				struct mirth_mirth_zaMirth* v33;
				bool v34 = mw_mirth_type_StackType_haszemetazy(v28, in_MetaVar_2, v27, &v33);
				branch_Bool_31 = v34;
				branch_zaMirth_30 = v33;
			}
			branch_Bool_7 = branch_Bool_31;
			branch_zaMirth_6 = branch_zaMirth_30;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v35;
			struct mirth_type_StackType v36 = mtp_mirth_type_StackType_With(in_StackType_3, &v35);
			struct mirth_mirth_zaMirth* v37;
			bool v38 = mw_mirth_type_Resource_haszemetazy(in_zaMirth_1, in_MetaVar_2, v35, &v37);
			struct mirth_mirth_zaMirth* branch_zaMirth_39;
			bool branch_Bool_40;
			if (v38) {
				decref(MK_mirth_type_StackType(v36));
				bool v41 = true;
				branch_Bool_40 = v41;
				branch_zaMirth_39 = v37;
			} else {
				struct mirth_mirth_zaMirth* v42;
				bool v43 = mw_mirth_type_StackType_haszemetazy(v37, in_MetaVar_2, v36, &v42);
				branch_Bool_40 = v43;
				branch_zaMirth_39 = v42;
			}
			branch_Bool_7 = branch_Bool_40;
			branch_zaMirth_6 = branch_zaMirth_39;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v44;
			uint64_t v45;
			struct mirth_type_StackType v46 = mtp_mirth_type_StackType_WithLabel(in_StackType_3, &v44, &v45);
			struct mirth_mirth_zaMirth* v47;
			bool v48 = mw_mirth_type_Resource_haszemetazy(in_zaMirth_1, in_MetaVar_2, v44, &v47);
			struct mirth_mirth_zaMirth* branch_zaMirth_49;
			bool branch_Bool_50;
			if (v48) {
				decref(MK_mirth_type_StackType(v46));
				bool v51 = true;
				branch_Bool_50 = v51;
				branch_zaMirth_49 = v47;
			} else {
				struct mirth_mirth_zaMirth* v52;
				bool v53 = mw_mirth_type_StackType_haszemetazy(v47, in_MetaVar_2, v46, &v52);
				branch_Bool_50 = v53;
				branch_zaMirth_49 = v52;
			}
			branch_Bool_7 = branch_Bool_50;
			branch_zaMirth_6 = branch_zaMirth_49;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_4 = branch_zaMirth_6;
	return branch_Bool_7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x8, %edx
ja 0x3bea8
movq %r8, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %eax
leaq 0xa6e19(%rip), %rdx     # 0xe2a60
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
xorl %r15d, %r15d
movq %r14, (%rbx)
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x50(%rbp), %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x39346
jmp 0x3bd84
movq %rbx, -0x30(%rbp)
leaq -0x50(%rbp), %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x392bf
movl %eax, %r13d
movq %rdx, %rbx
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x38(%rbp), %r8
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b74b
testb %al, %al
je 0x3be5b
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rbx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x3bce9
decl (%rax)
jne 0x3bce9
shlq $0x30, %r13
orq %rbx, %r13
leaq 0xd9ee0(%rip), %rsi     # 0x115bc1
movq %r13, %rdi
callq 0xd4e3
movb $0x1, %r15b
movq -0x38(%rbp), %r14
jmp 0x3be7a
leaq -0x50(%rbp), %r12
leaq -0x38(%rbp), %rdx
movq %rcx, %rdi
movq %r12, %rsi
callq 0x393cd
movq %rax, -0x30(%rbp)
movq %rdx, %r13
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x40(%rbp), %r8
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b74b
testb %al, %al
je 0x3be83
movq -0x30(%rbp), %rdi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %r13, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x3bd65
decl (%rax)
jne 0x3bd65
shlq $0x30, %rdi
orq %r13, %rdi
leaq 0xd9e61(%rip), %rsi     # 0x115bc1
callq 0xd4e3
movb $0x1, %r15b
movq -0x40(%rbp), %r14
jmp 0x3bc53
leaq -0x50(%rbp), %r12
leaq -0x40(%rbp), %rdx
movq %rcx, %rdi
movq %r12, %rsi
callq 0x39471
movq %rax, -0x30(%rbp)
movq %rdx, %r13
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x38(%rbp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %r8
callq 0x3b74b
movq (%r12), %r14
testb %al, %al
je 0x3bdf4
movq -0x30(%rbp), %rdi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %r13, %rax
sete %cl
testb $0x3, %r13b
setne %dl
movb $0x1, %r15b
orb %cl, %dl
jne 0x3bc53
decl (%rax)
jne 0x3bc53
shlq $0x30, %rdi
orq %r13, %rdi
leaq 0xd9dd7(%rip), %rsi     # 0x115bc1
callq 0xd4e3
jmp 0x3bc53
movq %r14, %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x3bc1b
movl %eax, %r15d
movq (%r12), %r14
jmp 0x3bc53
movq 0x8(%rcx), %r12
decl (%rcx)
jne 0x3be25
movq %rcx, %rdi
callq 0x5030
leaq -0x50(%rbp), %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x3bb74
movl %eax, %r15d
movq (%r13), %r14
jmp 0x3bc53
decl (%rcx)
jne 0x3bc50
movq %rcx, %rdi
callq 0x5030
jmp 0x3bc50
movq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %r14
movq %r15, %rsi
movl %r13d, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0x3bc1b
movl %eax, %r15d
movq (%r14), %r14
movq -0x30(%rbp), %rbx
jmp 0x3bc53
movq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %r14
movq %r15, %rsi
movq -0x30(%rbp), %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x3bc1b
movl %eax, %r15d
movq (%r14), %r14
jmp 0x3bc53
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xa888c(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xa8891(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5