// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_labelzetopzy
static struct std_maybe_Maybe_1 mw_mirth_type_StackType_labelzetopzy (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Label_2, struct mirth_type_StackType in_StackType_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	struct mirth_mirth_zaMirth* v6;
	struct mirth_type_StackType v7 = mw_mirth_type_StackType_expand(in_zaMirth_1, in_StackType_3, &v6);
	struct mirth_mirth_zaMirth* branch_zaMirth_8;
	struct std_maybe_Maybe_1 branch_Maybe_9;
	switch ((v7).tag) {
		case mirth_type_StackType_Cons: {
			struct mirth_type_Type v10;
			struct mirth_type_StackType v11 = mtp_mirth_type_StackType_Cons(v7, &v10);
			decref(MK_mirth_type_Type(v10));
			struct mirth_mirth_zaMirth* v12;
			struct std_maybe_Maybe_1 v13 = mw_mirth_type_StackType_labelzetopzy(v6, in_Label_2, v11, &v12);
			branch_Maybe_9 = v13;
			branch_zaMirth_8 = v12;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v14;
			struct mirth_type_StackType v15 = mtp_mirth_type_StackType_With(v7, &v14);
			decref(MK_mirth_type_Type(v14));
			struct mirth_mirth_zaMirth* v16;
			struct std_maybe_Maybe_1 v17 = mw_mirth_type_StackType_labelzetopzy(v6, in_Label_2, v15, &v16);
			branch_Maybe_9 = v17;
			branch_zaMirth_8 = v16;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v18;
			uint64_t v19;
			struct mirth_type_StackType v20 = mtp_mirth_type_StackType_ConsLabel(v7, &v18, &v19);
			uint64_t v21 = v19;
			uint64_t v22 = in_Label_2;
			bool v23 = (v21 == v22);
			struct mirth_mirth_zaMirth* branch_zaMirth_24;
			struct std_maybe_Maybe_1 branch_Maybe_25;
			if (v23) {
				decref(MK_mirth_type_StackType(v20));
				struct std_either_Either_2 v26 = mtw_std_either_Either_2_Left(MK_mirth_type_Type(v18));
				struct std_maybe_Maybe_1 v27 = mtw_std_maybe_Maybe_1_Some(MK_std_either_Either_2(v26));
				branch_Maybe_25 = v27;
				branch_zaMirth_24 = v6;
			} else {
				decref(MK_mirth_type_Type(v18));
				struct mirth_mirth_zaMirth* v28;
				struct std_maybe_Maybe_1 v29 = mw_mirth_type_StackType_labelzetopzy(v6, in_Label_2, v20, &v28);
				branch_Maybe_25 = v29;
				branch_zaMirth_24 = v28;
			}
			branch_Maybe_9 = branch_Maybe_25;
			branch_zaMirth_8 = branch_zaMirth_24;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v30;
			uint64_t v31;
			struct mirth_type_StackType v32 = mtp_mirth_type_StackType_WithLabel(v7, &v30, &v31);
			uint64_t v33 = v31;
			uint64_t v34 = in_Label_2;
			bool v35 = (v33 == v34);
			struct mirth_mirth_zaMirth* branch_zaMirth_36;
			struct std_maybe_Maybe_1 branch_Maybe_37;
			if (v35) {
				decref(MK_mirth_type_StackType(v32));
				struct std_either_Either_2 v38 = mtw_std_either_Either_2_Right(MK_mirth_type_Type(v30));
				struct std_maybe_Maybe_1 v39 = mtw_std_maybe_Maybe_1_Some(MK_std_either_Either_2(v38));
				branch_Maybe_37 = v39;
				branch_zaMirth_36 = v6;
			} else {
				decref(MK_mirth_type_Type(v30));
				struct mirth_mirth_zaMirth* v40;
				struct std_maybe_Maybe_1 v41 = mw_mirth_type_StackType_labelzetopzy(v6, in_Label_2, v32, &v40);
				branch_Maybe_37 = v41;
				branch_zaMirth_36 = v40;
			}
			branch_Maybe_9 = branch_Maybe_37;
			branch_zaMirth_8 = branch_zaMirth_36;
		} break;
		default: {
			decref(MK_mirth_type_StackType(v7));
			struct std_maybe_Maybe_1 v42 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_9 = v42;
			branch_zaMirth_8 = v6;
		} break;
	}
	*out_zaMirth_4 = branch_zaMirth_8;
	return branch_Maybe_9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rsi, %r14
leaq -0x30(%rbp), %rax
movl %edx, %esi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x3917b
leal -0x5(%rax), %ecx
cmpl $0x3, %ecx
ja 0x79b16
leaq 0x69ac8(%rip), %rax     # 0xe343c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq -0x40(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x392bf
jmp 0x7999d
leaq -0x40(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x39346
movl %eax, %r15d
movq %rdx, %r12
movq 0x8(%r13), %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x799dc
movl -0x40(%rbp), %edi
decl (%rcx)
jne 0x799dc
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x9c112(%rip), %rsi     # 0x115ae9
callq 0xd4e3
movq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %r13
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x79939
movq (%r13), %rcx
jmp 0x79bf4
movq %rbx, -0x48(%rbp)
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
leaq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %rbx
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x39471
movl %eax, %r12d
movq %rdx, %r13
cmpq %r14, (%rbx)
jne 0x79b5a
movq %r13, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x79a5c
decl (%rax)
jne 0x79a5c
shlq $0x30, %r12
orq %r13, %r12
leaq 0x9c16d(%rip), %rsi     # 0x115bc1
movq %r12, %rdi
callq 0xd4e3
movl -0x40(%rbp), %edi
shlq $0x30, %rdi
orq -0x38(%rbp), %rdi
leaq 0x9c07b(%rip), %rsi     # 0x115ae9
callq 0x20c67
addq $0x4, %r15
orq %rdx, %r15
leaq 0x9c4a0(%rip), %rsi     # 0x115f21
movq %r15, %rdi
jmp 0x79b03
movq %rbx, -0x48(%rbp)
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
leaq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rdx
callq 0x393cd
movl %eax, %r15d
movq %rdx, %r12
cmpq %r14, (%r13)
jne 0x79ba6
andq %r12, %rbx
sete %al
testb $0x3, %r12b
setne %cl
orb %al, %cl
jne 0x79ae2
decl (%rbx)
jne 0x79ae2
shlq $0x30, %r15
orq %r12, %r15
leaq 0x9c0e7(%rip), %rsi     # 0x115bc1
movq %r15, %rdi
callq 0xd4e3
movl -0x40(%rbp), %edi
shlq $0x30, %rdi
orq -0x38(%rbp), %rdi
leaq 0x9bff5(%rip), %rsi     # 0x115ae9
callq 0x20c09
movq %rdx, %rdi
leaq 0x9c41e(%rip), %rsi     # 0x115f21
callq 0x95f6
movl $0x1, %eax
movq -0x30(%rbp), %rcx
jmp 0x79bf0
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x79b4d
decl (%rcx)
jne 0x79b4d
shlq $0x30, %rax
orq %rdx, %rax
leaq 0x9c07c(%rip), %rsi     # 0x115bc1
movq %rax, %rdi
callq 0xd4e3
xorl %eax, %eax
movq -0x30(%rbp), %rcx
xorl %edx, %edx
jmp 0x79bf4
movq -0x38(%rbp), %rax
andq %rax, %r15
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x79b88
movl -0x40(%rbp), %edi
decl (%r15)
jne 0x79b88
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x9bf66(%rip), %rsi     # 0x115ae9
callq 0xd4e3
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %rbx
movq %r14, %rsi
movl %r12d, %edx
movq %r13, %rcx
movq %rbx, %r8
callq 0x79939
movq (%rbx), %rcx
jmp 0x79bf0
movq -0x38(%rbp), %rax
andq %rax, %rbx
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x79bd3
movl -0x40(%rbp), %edi
decl (%rbx)
jne 0x79bd3
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x9bf1b(%rip), %rsi     # 0x115ae9
callq 0xd4e3
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %r13
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x79939
movq (%r13), %rcx
movq -0x48(%rbp), %rbx
movq %rcx, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq