// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_parsezemodulezepackagezenamezx
static uint64_t mw_mirth_elab_parsezemodulezepackagezenamezx (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct mirth_mirth_zaMirth* *out_zaMirth_3, uint64_t *out_Name_5) {
	struct mirth_mirth_zaMirth* v6;
	struct std_maybe_Maybe_1 v7 = mw_mirth_token_Token_namezfdnamezy(in_zaMirth_1, in_Token_2, &v6);
	int64_t v8 = (v7).tag;
	decref(MK_std_maybe_Maybe_1(v7));
	INT v9 = WRAP_I63(0LL);
	INT v10 = v9;
	INT v11 = i64_to_int(v8);
	bool v12 = int_eq(v11, v10);
	bool v13 = !v12;
	struct mirth_mirth_zaMirth* branch_zaMirth_14;
	uint64_t branch_Token_15;
	if (v13) {
		branch_Token_15 = in_Token_2;
		branch_zaMirth_14 = v6;
	} else {
		STR* v16;
		STRLIT(v16, "Expected module name.", 21);
		mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v6, in_Token_2, v16);
	}
	struct mirth_mirth_zaMirth* v19;
	struct std_maybe_Maybe_1 v20 = mw_mirth_token_Token_dnamezy(branch_zaMirth_14, branch_Token_15, &v19);
	struct mirth_mirth_zaMirth* branch_zaMirth_21;
	uint64_t branch_Token_22;
	VAL branch_zux1_23;
	switch ((v20).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v24 = mtp_std_maybe_Maybe_1_Some(v20);
			branch_zux1_23 = v24;
			branch_Token_22 = branch_Token_15;
			branch_zaMirth_21 = v19;
		} break;
		case std_maybe_Maybe_1_None: {
			STR* v25;
			STRLIT(v25, "Invalid module name: Module name must include package, for example \"package.module\"", 83);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v19, branch_Token_15, v25);
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_zaMirth* v29;
	mw_mirth_token_Token_argsze0(branch_zaMirth_21, branch_Token_22, &v29);
	incref(branch_zux1_23);
	struct std_maybe_Maybe_1 v30 = mw_mirth_name_DName_rootzy(V_mirth_name_DName(branch_zux1_23));
	struct mirth_mirth_zaMirth* branch_zaMirth_31;
	uint64_t branch_Token_32;
	VAL branch_zux1_33;
	VAL branch_zux2_34;
	switch ((v30).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v35 = mtp_std_maybe_Maybe_1_Some(v30);
			branch_zux2_34 = v35;
			branch_zux1_33 = branch_zux1_23;
			branch_Token_32 = branch_Token_22;
			branch_zaMirth_31 = v29;
		} break;
		case std_maybe_Maybe_1_None: {
			decref(branch_zux1_23);
			STR* v36;
			STRLIT(v36, "Invalid module name: Package name is missing.", 45);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v29, branch_Token_22, v36);
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct std_list_Nest_1* v41 = mw_mirth_name_DName_parts(V_mirth_name_DName(branch_zux1_33));
	struct std_maybe_Maybe_1 v42 = mw_std_list_Nest_1_singlezy(v41);
	struct mirth_mirth_zaMirth* branch_zaMirth_43;
	uint64_t branch_Token_44;
	VAL branch_zux1_45;
	VAL branch_zux2_46;
	switch ((v42).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v47 = mtp_std_maybe_Maybe_1_Some(v42);
			branch_zux2_46 = v47;
			branch_zux1_45 = branch_zux2_34;
			branch_Token_44 = branch_Token_32;
			branch_zaMirth_43 = branch_zaMirth_31;
		} break;
		case std_maybe_Maybe_1_None: {
			decref(branch_zux2_34);
			STR* v48;
			STRLIT(v48, "Expected module name. (3)", 25);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(branch_zaMirth_31, branch_Token_32, v48);
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_zaMirth* v53;
	uint64_t v54 = mw_mirth_package_Package_FindzeOrzeNewzx(branch_zaMirth_43, V_mirth_name_Name(branch_zux1_45), &v53);
	*out_Name_5 = V_mirth_name_Name(branch_zux2_46);
	*out_zaMirth_3 = v53;
	return v54;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
leaq -0x58(%rbp), %rdx
callq 0x275cc
movl %eax, %r14d
movq %rdx, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x885da
decl (%rax)
jne 0x885da
movq %r14, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0x88cec(%rip), %rsi     # 0x1112c1
callq 0xd13d
leaq 0x1(,%r14,2), %rdi
movl $0x1, %esi
callq 0xe83a
testl %eax, %eax
je 0x887f9
movq %r15, -0x70(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq %r12, %rsi
callq 0x2da46
cmpl $0x1, %eax
jne 0x88858
movq %rdx, %rdi
callq 0xd745
movq %rax, %r15
movq %rdx, %r14
movq -0x50(%rbp), %rdi
leaq -0x48(%rbp), %rdx
movq %r12, -0x38(%rbp)
movq %r12, %rsi
callq 0x27534
testb $0x1, %r14b
je 0x8864f
movq %r15, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x8864f
incl (%rax)
movq %r13, -0x40(%rbp)
movq %rbx, -0x30(%rbp)
movq %r15, %rdi
callq 0x2e0f0
cmpl $0x1, %eax
jne 0x88725
movq %rdx, %rdi
callq 0xd745
movq %rax, %r12
movq %rdx, %r14
movq -0x48(%rbp), %rbx
movq %r15, %rdi
callq 0x2cc3e
leaq -0x68(%rbp), %rsi
leaq -0x80(%rbp), %r15
movq %rax, %rdi
movq %r15, %rdx
callq 0xf281
movl (%r15), %edi
movq 0x8(%r15), %rsi
callq 0xf421
testb %al, %al
je 0x888b7
leaq -0x68(%rbp), %r14
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x9353
movq %rdx, %rdi
callq 0xd745
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x82bc3
testl %eax, %eax
movq -0x70(%rbp), %r15
je 0x886f1
cmpl $0x1, %eax
jne 0x887c9
movq %rdx, %rdi
callq 0xd745
movq -0x68(%rbp), %rcx
jmp 0x8870b
movq -0x68(%rbp), %rdi
leaq -0x80(%rbp), %r14
xorl %esi, %esi
xorl %edx, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x8309e
movq (%r14), %rcx
movq -0x40(%rbp), %r12
movq %r13, (%r15)
movq %rcx, (%r12)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x887c9
testb $0x1, %r14b
je 0x88760
movq %r15, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x88760
decl (%rax)
jne 0x88760
movq %r15, %rdi
movq %r14, %rsi
callq 0xd13d
movq 0x108dfd9(%rip), %rdx   # 0x1116740
testq %rdx, %rdx
jne 0x887a9
movl $0x2d, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x2d, 0x10(%rax)
movups 0x60606(%rip), %xmm0    # 0xe8d8e
movups %xmm0, 0x18(%rax)
movups 0x6060b(%rip), %xmm0    # 0xe8d9e
movups %xmm0, 0x28(%rax)
movups 0x6060d(%rip), %xmm0    # 0xe8dab
movups %xmm0, 0x35(%rax)
movq %rax, 0x108df97(%rip)   # 0x1116740
andq %rdx, -0x30(%rbp)
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x887c0
movq -0x30(%rbp), %rax
incl (%rax)
movq -0x48(%rbp), %rdi
jmp 0x88977
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x57eeb(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x57ef0(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302
movq 0x108df30(%rip), %rdx   # 0x1116730
testq %rdx, %rdx
jne 0x8883a
movl $0x15, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x15, 0x10(%rax)
movabsq $0x2e656d616e20656c, %rax # imm = 0x2E656D616E20656C
movq %rax, 0x25(%rdx)
movups 0x604f5(%rip), %xmm0    # 0xe8d24
movups %xmm0, 0x18(%rdx)
movq %rdx, 0x108def6(%rip)   # 0x1116730
andq %rdx, %rbx
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x8884c
incl (%rbx)
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x27183
movq 0x108ded9(%rip), %r14   # 0x1116738
testq %r14, %r14
jne 0x88895
movl $0x53, %edi
callq 0xf5e4
movq %rax, %r14
movq $0x53, 0x10(%rax)
leaq 0x18(%rax), %rdi
leaq 0x604b6(%rip), %rsi     # 0xe8d3a
movl $0x53, %edx
callq 0x50e0
movq %r14, 0x108dea3(%rip)   # 0x1116738
andq %r14, %rbx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x888a8
incl (%rbx)
movq -0x50(%rbp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x27183
movq -0x60(%rbp), %rsi
testb $0x1, %sil
je 0x888ec
movq -0x68(%rbp), %rdi
movq %rdi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x888ec
decl (%rax)
jne 0x888ec
callq 0xd13d
testb $0x1, %r14b
je 0x8891f
movq %r12, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x8891f
decl (%rax)
jne 0x8891f
movq %r12, %rdi
movq %r14, %rsi
callq 0xd13d
movq 0x108de22(%rip), %rdx   # 0x1116748
testq %rdx, %rdx
jne 0x8895d
movl $0x19, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x19, 0x10(%rax)
movups 0x60475(%rip), %xmm0    # 0xe8dbc
movups %xmm0, 0x18(%rax)
movups 0x60473(%rip), %xmm0    # 0xe8dc5
movups %xmm0, 0x21(%rax)
movq %rax, 0x108ddeb(%rip)   # 0x1116748
andq %rdx, -0x30(%rbp)
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x88974
movq -0x30(%rbp), %rax
incl (%rax)
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
callq 0x27183