// File: /workspace/github_c_makefile_star2_O2/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 0x34dd2
leal -0x5(%rax), %ecx
cmpl $0x3, %ecx
ja 0x713ca
leaq 0x6225a(%rip), %rax     # 0xd3484
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq -0x40(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x34ef8
jmp 0x71253
leaq -0x40(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x34f7f
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 0x71292
movl -0x40(%rbp), %edi
decl (%rcx)
jne 0x71292
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x9785c(%rip), %rsi     # 0x108ae9
callq 0xce94
movq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %r13
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x711ef
movq (%r13), %rcx
jmp 0x714a8
movq %rbx, -0x48(%rbp)
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
leaq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %rbx
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x350d3
movl %eax, %r12d
movq %rdx, %r13
cmpq %r14, (%rbx)
jne 0x7140e
movq %r13, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x71312
decl (%rax)
jne 0x71312
shlq $0x30, %r12
orq %r13, %r12
leaq 0x978b7(%rip), %rsi     # 0x108bc1
movq %r12, %rdi
callq 0xce94
movl -0x40(%rbp), %edi
shlq $0x30, %rdi
orq -0x38(%rbp), %rdi
leaq 0x977c5(%rip), %rsi     # 0x108ae9
callq 0x1e454
addq $0x4, %r15
orq %rdx, %r15
leaq 0x97bea(%rip), %rsi     # 0x108f21
movq %r15, %rdi
jmp 0x713b9
movq %rbx, -0x48(%rbp)
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
leaq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rdx
callq 0x3502f
movl %eax, %r15d
movq %rdx, %r12
cmpq %r14, (%r13)
jne 0x7145a
andq %r12, %rbx
sete %al
testb $0x3, %r12b
setne %cl
orb %al, %cl
jne 0x71398
decl (%rbx)
jne 0x71398
shlq $0x30, %r15
orq %r12, %r15
leaq 0x97831(%rip), %rsi     # 0x108bc1
movq %r15, %rdi
callq 0xce94
movl -0x40(%rbp), %edi
shlq $0x30, %rdi
orq -0x38(%rbp), %rdi
leaq 0x9773f(%rip), %rsi     # 0x108ae9
callq 0x1e400
movq %rdx, %rdi
leaq 0x97b68(%rip), %rsi     # 0x108f21
callq 0x8d0c
pushq $0x1
popq %rax
movq -0x30(%rbp), %rcx
jmp 0x714a4
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x71401
decl (%rcx)
jne 0x71401
shlq $0x30, %rax
orq %rdx, %rax
leaq 0x977c8(%rip), %rsi     # 0x108bc1
movq %rax, %rdi
callq 0xce94
xorl %eax, %eax
movq -0x30(%rbp), %rcx
xorl %edx, %edx
jmp 0x714a8
movq -0x38(%rbp), %rax
andq %rax, %r15
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x7143c
movl -0x40(%rbp), %edi
decl (%r15)
jne 0x7143c
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x976b2(%rip), %rsi     # 0x108ae9
callq 0xce94
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %rbx
movq %r14, %rsi
movl %r12d, %edx
movq %r13, %rcx
movq %rbx, %r8
callq 0x711ef
movq (%rbx), %rcx
jmp 0x714a4
movq -0x38(%rbp), %rax
andq %rax, %rbx
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x71487
movl -0x40(%rbp), %edi
decl (%rbx)
jne 0x71487
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x97667(%rip), %rsi     # 0x108ae9
callq 0xce94
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %r13
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x711ef
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