// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_haszevarzy
static bool mw_mirth_type_StackType_haszevarzy (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Var_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_Error: {
			bool v8 = false;
			branch_Bool_7 = v8;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Ignore: {
			bool v9 = false;
			branch_Bool_7 = v9;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Unit: {
			bool v10 = false;
			branch_Bool_7 = v10;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Meta: {
			uint64_t v11 = mtp_mirth_type_StackType_Meta(in_StackType_3);
			struct mirth_mirth_zaMirth* v12;
			bool v13 = mw_mirth_type_MetaVar_haszevarzy(in_zaMirth_1, in_Var_2, v11, &v12);
			branch_Bool_7 = v13;
			branch_zaMirth_6 = v12;
		} break;
		case mirth_type_StackType_Var: {
			uint64_t v14 = mtp_mirth_type_StackType_Var(in_StackType_3);
			uint64_t v15 = v14;
			uint64_t v16 = in_Var_2;
			bool v17 = (v15 == v16);
			branch_Bool_7 = v17;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_type_StackType_Cons: {
			struct mirth_type_Type v18;
			struct mirth_type_StackType v19 = mtp_mirth_type_StackType_Cons(in_StackType_3, &v18);
			struct mirth_mirth_zaMirth* v20;
			bool v21 = mw_mirth_type_Type_haszevarzy(in_zaMirth_1, in_Var_2, v18, &v20);
			struct mirth_mirth_zaMirth* branch_zaMirth_22;
			bool branch_Bool_23;
			if (v21) {
				decref(MK_mirth_type_StackType(v19));
				bool v24 = true;
				branch_Bool_23 = v24;
				branch_zaMirth_22 = v20;
			} else {
				struct mirth_mirth_zaMirth* v25;
				bool v26 = mw_mirth_type_StackType_haszevarzy(v20, in_Var_2, v19, &v25);
				branch_Bool_23 = v26;
				branch_zaMirth_22 = v25;
			}
			branch_Bool_7 = branch_Bool_23;
			branch_zaMirth_6 = branch_zaMirth_22;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v27;
			struct mirth_type_StackType v28 = mtp_mirth_type_StackType_With(in_StackType_3, &v27);
			struct mirth_mirth_zaMirth* v29;
			bool v30 = mw_mirth_type_Resource_haszevarzy(in_zaMirth_1, in_Var_2, v27, &v29);
			struct mirth_mirth_zaMirth* branch_zaMirth_31;
			bool branch_Bool_32;
			if (v30) {
				decref(MK_mirth_type_StackType(v28));
				bool v33 = true;
				branch_Bool_32 = v33;
				branch_zaMirth_31 = v29;
			} else {
				struct mirth_mirth_zaMirth* v34;
				bool v35 = mw_mirth_type_StackType_haszevarzy(v29, in_Var_2, v28, &v34);
				branch_Bool_32 = v35;
				branch_zaMirth_31 = v34;
			}
			branch_Bool_7 = branch_Bool_32;
			branch_zaMirth_6 = branch_zaMirth_31;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v36;
			uint64_t v37;
			struct mirth_type_StackType v38 = mtp_mirth_type_StackType_ConsLabel(in_StackType_3, &v36, &v37);
			struct mirth_mirth_zaMirth* v39;
			bool v40 = mw_mirth_type_Type_haszevarzy(in_zaMirth_1, in_Var_2, v36, &v39);
			struct mirth_mirth_zaMirth* branch_zaMirth_41;
			bool branch_Bool_42;
			if (v40) {
				decref(MK_mirth_type_StackType(v38));
				bool v43 = true;
				branch_Bool_42 = v43;
				branch_zaMirth_41 = v39;
			} else {
				struct mirth_mirth_zaMirth* v44;
				bool v45 = mw_mirth_type_StackType_haszevarzy(v39, in_Var_2, v38, &v44);
				branch_Bool_42 = v45;
				branch_zaMirth_41 = v44;
			}
			branch_Bool_7 = branch_Bool_42;
			branch_zaMirth_6 = branch_zaMirth_41;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v46;
			uint64_t v47;
			struct mirth_type_StackType v48 = mtp_mirth_type_StackType_WithLabel(in_StackType_3, &v46, &v47);
			struct mirth_mirth_zaMirth* v49;
			bool v50 = mw_mirth_type_Resource_haszevarzy(in_zaMirth_1, in_Var_2, v46, &v49);
			struct mirth_mirth_zaMirth* branch_zaMirth_51;
			bool branch_Bool_52;
			if (v50) {
				decref(MK_mirth_type_StackType(v48));
				bool v53 = true;
				branch_Bool_52 = v53;
				branch_zaMirth_51 = v49;
			} else {
				struct mirth_mirth_zaMirth* v54;
				bool v55 = mw_mirth_type_StackType_haszevarzy(v49, in_Var_2, v48, &v54);
				branch_Bool_52 = v55;
				branch_zaMirth_51 = v54;
			}
			branch_Bool_7 = branch_Bool_52;
			branch_zaMirth_6 = branch_zaMirth_51;
		} 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 0xa379a
movq %r8, %r13
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %eax
leaq 0x30959(%rip), %rdx     # 0xd3ec0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
xorl %eax, %eax
jmp 0xa3787
movq %r13, -0x30(%rbp)
leaq -0x50(%rbp), %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x34f7f
movl %eax, %ebx
movq %rdx, %r13
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq -0x40(%rbp), %r8
movq %r15, %rdi
movq %r14, %rsi
callq 0xa37b1
testb %al, %al
je 0xa3749
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %r13, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0xa35e4
decl (%rax)
jne 0xa35e4
shlq $0x30, %rbx
orq %r13, %rbx
leaq 0x655e5(%rip), %rsi     # 0x108bc1
movq %rbx, %rdi
callq 0xce94
movb $0x1, %al
movq -0x40(%rbp), %r15
jmp 0xa3764
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 0xa3203
testb %al, %al
je 0xa376a
movq -0x30(%rbp), %rdi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rbx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0xa365a
decl (%rax)
jne 0xa365a
shlq $0x30, %rdi
orq %rbx, %rdi
leaq 0x6556c(%rip), %rsi     # 0x108bc1
callq 0xce94
movb $0x1, %al
movq -0x40(%rbp), %r15
jmp 0xa3787
leaq -0x50(%rbp), %r12
leaq -0x40(%rbp), %rdx
movq %rcx, %rdi
movq %r12, %rsi
callq 0x3502f
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 0xa3203
jmp 0xa36cb
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 0xa37b1
testb %al, %al
je 0xa370c
movq -0x30(%rbp), %rdi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rbx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0xa3704
decl (%rax)
jne 0xa3704
shlq $0x30, %rdi
orq %rbx, %rdi
leaq 0x654c2(%rip), %rsi     # 0x108bc1
callq 0xce94
movb $0x1, %al
movq -0x38(%rbp), %r15
jmp 0xa3787
movq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r15
jmp 0xa3772
movq %rcx, %rdi
callq 0x34e20
leaq -0x50(%rbp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0xa34b1
movq (%r12), %r15
jmp 0xa3787
movq %rcx, %rdi
callq 0x34edb
cmpq %r14, %rax
sete %al
jmp 0xa3787
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %r15
movq %r14, %rsi
movl %ebx, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0xa353b
movq (%r15), %r15
movq -0x30(%rbp), %r13
jmp 0xa3787
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %r15
movq %r14, %rsi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0xa353b
movq (%r15), %r15
movq %r15, (%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3106c(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6