// File: /workspace/github_c_makefile_star2_O3/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 0x37fe3
leal -0x5(%rax), %ecx
cmpl $0x3, %ecx
ja 0x77c63
leaq 0x679c3(%rip), %rax     # 0xdf484
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq -0x40(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x38125
jmp 0x77aea
leaq -0x40(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x381ac
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 0x77b29
movl -0x40(%rbp), %edi
decl (%rcx)
jne 0x77b29
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x99fc5(%rip), %rsi     # 0x111ae9
callq 0xd13d
movq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %r13
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x77a86
movq (%r13), %rcx
jmp 0x77d41
movq %rbx, -0x48(%rbp)
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
leaq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %rbx
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x382d7
movl %eax, %r12d
movq %rdx, %r13
cmpq %r14, (%rbx)
jne 0x77ca7
movq %r13, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x77ba9
decl (%rax)
jne 0x77ba9
shlq $0x30, %r12
orq %r13, %r12
leaq 0x9a020(%rip), %rsi     # 0x111bc1
movq %r12, %rdi
callq 0xd13d
movl -0x40(%rbp), %edi
shlq $0x30, %rdi
orq -0x38(%rbp), %rdi
leaq 0x99f2e(%rip), %rsi     # 0x111ae9
callq 0x206fc
addq $0x4, %r15
orq %rdx, %r15
leaq 0x9a353(%rip), %rsi     # 0x111f21
movq %r15, %rdi
jmp 0x77c50
movq %rbx, -0x48(%rbp)
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
leaq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rdx
callq 0x38233
movl %eax, %r15d
movq %rdx, %r12
cmpq %r14, (%r13)
jne 0x77cf3
andq %r12, %rbx
sete %al
testb $0x3, %r12b
setne %cl
orb %al, %cl
jne 0x77c2f
decl (%rbx)
jne 0x77c2f
shlq $0x30, %r15
orq %r12, %r15
leaq 0x99f9a(%rip), %rsi     # 0x111bc1
movq %r15, %rdi
callq 0xd13d
movl -0x40(%rbp), %edi
shlq $0x30, %rdi
orq -0x38(%rbp), %rdi
leaq 0x99ea8(%rip), %rsi     # 0x111ae9
callq 0x2069e
movq %rdx, %rdi
leaq 0x9a2d1(%rip), %rsi     # 0x111f21
callq 0x9353
movl $0x1, %eax
movq -0x30(%rbp), %rcx
jmp 0x77d3d
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x77c9a
decl (%rcx)
jne 0x77c9a
shlq $0x30, %rax
orq %rdx, %rax
leaq 0x99f2f(%rip), %rsi     # 0x111bc1
movq %rax, %rdi
callq 0xd13d
xorl %eax, %eax
movq -0x30(%rbp), %rcx
xorl %edx, %edx
jmp 0x77d41
movq -0x38(%rbp), %rax
andq %rax, %r15
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x77cd5
movl -0x40(%rbp), %edi
decl (%r15)
jne 0x77cd5
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x99e19(%rip), %rsi     # 0x111ae9
callq 0xd13d
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %rbx
movq %r14, %rsi
movl %r12d, %edx
movq %r13, %rcx
movq %rbx, %r8
callq 0x77a86
movq (%rbx), %rcx
jmp 0x77d3d
movq -0x38(%rbp), %rax
andq %rax, %rbx
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x77d20
movl -0x40(%rbp), %edi
decl (%rbx)
jne 0x77d20
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x99dce(%rip), %rsi     # 0x111ae9
callq 0xd13d
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %r13
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x77a86
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