// File: /workspace/github_c_makefile_star2_O2/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 0x37855
movq %r8, %r13
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %eax
leaq 0x9b44d(%rip), %rdx     # 0xd2a74
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %rcx, %rdi
callq 0x34edb
xorl %eax, %eax
jmp 0x37842
leaq -0x50(%rbp), %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x34f7f
movq %rax, -0x30(%rbp)
movq %rdx, %rbx
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x40(%rbp), %r8
movq %r15, %rdi
movq %r14, %rsi
callq 0x3786c
jmp 0x3769d
leaq -0x50(%rbp), %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x34ef8
movq %rax, -0x30(%rbp)
movq %rdx, %rbx
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x40(%rbp), %r8
movq %r15, %rdi
movq %r14, %rsi
callq 0x3717f
testb %al, %al
je 0x376e1
movq -0x30(%rbp), %rdi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rbx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x376d6
decl (%rax)
jne 0x376d6
shlq $0x30, %rdi
orq %rbx, %rdi
leaq 0xd14f0(%rip), %rsi     # 0x108bc1
callq 0xce94
movb $0x1, %al
movq -0x40(%rbp), %r15
jmp 0x37842
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %r15
jmp 0x3782d
movq %r13, -0x30(%rbp)
leaq -0x50(%rbp), %r12
leaq -0x40(%rbp), %rdx
movq %rcx, %rdi
movq %r12, %rsi
callq 0x3502f
movl %eax, %ebx
movq %rdx, %r13
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x38(%rbp), %r8
movq %r15, %rdi
movq %r14, %rsi
callq 0x3717f
testb %al, %al
je 0x37804
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %r13, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x3775f
decl (%rax)
jne 0x3775f
shlq $0x30, %rbx
orq %r13, %rbx
leaq 0xd146a(%rip), %rsi     # 0x108bc1
movq %rbx, %rdi
callq 0xce94
movb $0x1, %al
movq -0x38(%rbp), %r15
jmp 0x3781f
leaq -0x50(%rbp), %r12
leaq -0x40(%rbp), %rdx
movq %rcx, %rdi
movq %r12, %rsi
callq 0x350d3
movq %rax, -0x30(%rbp)
movq %rdx, %rbx
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x38(%rbp), %r8
movq %r15, %rdi
movq %r14, %rsi
callq 0x3786c
testb %al, %al
je 0x37825
movq -0x30(%rbp), %rdi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rbx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x377d9
decl (%rax)
jne 0x377d9
shlq $0x30, %rdi
orq %rbx, %rdi
leaq 0xd13ed(%rip), %rsi     # 0x108bc1
callq 0xce94
movb $0x1, %al
movq -0x38(%rbp), %r15
jmp 0x37842
movq %rcx, %rdi
callq 0x34e20
leaq -0x50(%rbp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0x3756d
movq (%r12), %r15
jmp 0x37842
movq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r15
movq %r14, %rsi
movl %ebx, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0x375fb
movq (%r15), %r15
movq -0x30(%rbp), %r13
jmp 0x37842
movq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r15
movq %r14, %rsi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x375fb
movq (%r15), %r15
movq %r15, (%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9cfb1(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6