// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_token_Token_sigzelabelzy
static struct std_maybe_Maybe_1 mw_mirth_token_Token_sigzelabelzy (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* v5;
	struct std_maybe_Maybe_1 v6 = mw_mirth_token_Token_namezy(in_zaMirth_1, in_Token_2, &v5);
	uint64_t branch_Token_7;
	struct mirth_mirth_zaMirth* branch_zaMirth_8;
	struct std_maybe_Maybe_1 branch_Maybe_9;
	switch ((v6).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v10 = mtp_std_maybe_Maybe_1_Some(v6);
			incref(v10);
			struct mirth_mirth_zaMirth* v11;
			bool v12 = mw_mirth_name_Name_couldzebezelabelzenamezy(v5, V_mirth_name_Name(v10), &v11);
			uint64_t branch_Token_13;
			struct mirth_mirth_zaMirth* branch_zaMirth_14;
			bool branch_Bool_15;
			if (v12) {
				struct mirth_mirth_zaMirth* v16;
				uint64_t v17 = mw_mirth_token_Token_succ(v11, in_Token_2, &v16);
				struct mirth_mirth_zaMirth* v18;
				struct std_maybe_Maybe_1 v19 = mw_mirth_token_Token_lcolonzy(v16, v17, &v18);
				int64_t v20 = (v19).tag;
				decref(MK_std_maybe_Maybe_1(v19));
				INT v21 = WRAP_I63(0LL);
				INT v22 = v21;
				INT v23 = i64_to_int(v20);
				bool v24 = int_eq(v23, v22);
				bool v25 = !v24;
				branch_Bool_15 = v25;
				branch_zaMirth_14 = v18;
				branch_Token_13 = in_Token_2;
			} else {
				bool v26 = false;
				branch_Bool_15 = v26;
				branch_zaMirth_14 = v11;
				branch_Token_13 = in_Token_2;
			}
			uint64_t branch_Token_27;
			struct mirth_mirth_zaMirth* branch_zaMirth_28;
			struct std_maybe_Maybe_1 branch_Maybe_29;
			if (branch_Bool_15) {
				struct std_maybe_Maybe_1 v30 = mtw_std_maybe_Maybe_1_Some(v10);
				branch_Maybe_29 = v30;
				branch_zaMirth_28 = branch_zaMirth_14;
				branch_Token_27 = branch_Token_13;
			} else {
				decref(v10);
				struct std_maybe_Maybe_1 v31 = { .tag=std_maybe_Maybe_1_None };
				branch_Maybe_29 = v31;
				branch_zaMirth_28 = branch_zaMirth_14;
				branch_Token_27 = branch_Token_13;
			}
			branch_Maybe_9 = branch_Maybe_29;
			branch_zaMirth_8 = branch_zaMirth_28;
			branch_Token_7 = branch_Token_27;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v32 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_9 = v32;
			branch_zaMirth_8 = v5;
			branch_Token_7 = in_Token_2;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_zaMirth* branch_zaMirth_33;
	struct std_maybe_Maybe_1 branch_Maybe_34;
	switch ((branch_Maybe_9).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v35 = mtp_std_maybe_Maybe_1_Some(branch_Maybe_9);
			struct mirth_mirth_zaMirth* v36;
			uint64_t v37 = mw_mirth_name_Name_label(branch_zaMirth_8, V_mirth_name_Name(v35), &v36);
			struct std_maybe_Maybe_1 v38 = mtw_std_maybe_Maybe_1_Some(MK_mirth_label_Label(v37));
			branch_Maybe_34 = v38;
			branch_zaMirth_33 = v36;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v39 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_34 = v39;
			branch_zaMirth_33 = branch_zaMirth_8;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_33;
	return branch_Maybe_34;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r13
leaq -0x30(%rbp), %rdx
callq 0x2df97
cmpl $0x1, %eax
jne 0x3b4ce
movq %rdx, %rdi
callq 0xd491
movq %rax, %r15
movq %rdx, %r14
testb $0x1, %r14b
je 0x3b408
movq %r15, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x3b408
incl (%rax)
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x3c637
movq (%r12), %r12
testb %al, %al
je 0x3b497
xorl %esi, %esi
cmpq %r13, 0x10d0fcc(%rip)   # 0x110c3f8
leaq 0x1(%r13), %rax
cmovaq %rax, %rsi
leaq -0x38(%rbp), %rdx
movq %r12, %rdi
callq 0x3c713
movl %eax, %r12d
movq %rdx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x3b47c
decl (%rax)
jne 0x3b47c
movq %r12, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xcce4a(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %r12, %rdi
callq 0xd86d
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xd759
movq -0x38(%rbp), %r12
testb %al, %al
je 0x3b4e8
testb $0x1, %r14b
je 0x3b4ca
movq %r15, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x3b4ca
decl (%rax)
jne 0x3b4ca
movq %r15, %rdi
movq %r14, %rsi
callq 0xce94
xorl %eax, %eax
jmp 0x3b4d4
xorl %eax, %eax
movq -0x30(%rbp), %r12
xorl %edx, %edx
movq %r12, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x8d0c
movq %rdx, %rdi
callq 0xd491
leaq -0x40(%rbp), %r14
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3c78f
leaq 0xcddb4(%rip), %rsi     # 0x1092c8
movq %rax, %rdi
callq 0x8d0c
movq (%r14), %r12
pushq $0x1
popq %rax
jmp 0x3b4d6