// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_package_Package_tryzepathzx
static void mw_mirth_package_Package_tryzepathzx (struct mirth_mirth_zaMirth* in_zaMirth_1, STR* in_Path_2, uint64_t in_Package_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	struct mirth_mirth_zaMirth* v5;
	struct std_maybe_Maybe_1 v6 = mw_mirth_package_Package_path(in_zaMirth_1, in_Package_3, &v5);
	struct mirth_mirth_zaMirth* branch_zaMirth_7;
	switch ((v6).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v8 = mtp_std_maybe_Maybe_1_Some(v6);
			incref(MKSTR(in_Path_2));
			incref(v8);
			bool v9 = (str_cmp(in_Path_2, value_str(v8)) == 0);
			struct mirth_mirth_zaMirth* branch_zaMirth_10;
			if (v9) {
				decref(v8);
				decref(MKSTR(in_Path_2));
				branch_zaMirth_10 = v5;
			} else {
				STR* v11;
				STRLIT(v11, "", 0);
				STR* v12;
				STRLIT(v12, "Tried to set different path for the same package ", 49);
				STR* v13;
				mw_std_str_zaStr_pushzestrzx(v12, v11, &v13);
				STR* v14;
				STRLIT(v14, "(package = ", 11);
				STR* v15;
				mw_std_str_zaStr_pushzestrzx(v14, v13, &v15);
				struct mirth_mirth_zaMirth* v16;
				STR* v17;
				mw_mirth_package_Package_namezj(v5, v15, in_Package_3, &v16, &v17);
				STR* v18;
				STRLIT(v18, ", path 1 = ", 11);
				STR* v19;
				mw_std_str_zaStr_pushzestrzx(v18, v17, &v19);
				STR* v20;
				mw_std_prim_Str_reprzj(in_Path_2, v19, &v20);
				STR* v21;
				STRLIT(v21, ", path 2 = ", 11);
				STR* v22;
				mw_std_str_zaStr_pushzestrzx(v21, v20, &v22);
				STR* v23;
				mw_std_prim_Str_reprzj(value_str(v8), v22, &v23);
				STR* v24;
				STRLIT(v24, ").", 2);
				STR* v25;
				mw_std_str_zaStr_pushzestrzx(v24, v23, &v25);
				mw_mirth_mirth_zaMirth_fatalzeerrorzx(v16, v25);
			}
			branch_zaMirth_7 = branch_zaMirth_10;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v27 = mtw_std_maybe_Maybe_1_Some(MKSTR(in_Path_2));
			struct mirth_mirth_zaMirth* v28;
			mw_mirth_package_Package_pathzx(v5, v27, in_Package_3, &v28);
			branch_zaMirth_7 = v28;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_4 = branch_zaMirth_7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
leaq 0x1091864(%rip), %rdi   # 0x11144f0
movq %rdx, %rsi
callq 0x13c85
movq %rax, %rdi
callq 0x13d82
movq %rax, %rcx
shrq $0x30, %rcx
je 0x82d8d
movq %r12, -0x48(%rbp)
cmpl $0x1, %ecx
jne 0x82de0
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
andq %r12, %rax
movq %rax, %rdi
callq 0xd745
movq %r15, %rbx
movq %r12, -0x38(%rbp)
andq %r12, %rbx
setne %cl
movq %r15, -0x30(%rbp)
testb $0x3, %r15b
sete %r15b
andb %cl, %r15b
cmpb $0x1, %r15b
jne 0x82cef
incl (%rbx)
testb $0x1, %dl
je 0x82d14
movq %rax, %rdi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rdi
sete %cl
testb $0x3, %al
setne %sil
orb %cl, %sil
jne 0x82d14
incl (%rdi)
movq %rax, -0x40(%rbp)
movq %rax, %rdi
movq %rdx, %r12
movq %rdx, %rsi
callq 0x9189
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0xdf18
testl %eax, %eax
jne 0x82e10
testb $0x1, %r12b
movq -0x40(%rbp), %rdi
je 0x82d6e
movq %rdi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x82d6e
decl (%rax)
jne 0x82d6e
movq %r12, %rsi
callq 0xd13d
testb %r15b, %r15b
movq -0x48(%rbp), %r12
je 0x82dce
decl (%rbx)
jne 0x82dce
leaq 0x8e3d7(%rip), %rsi     # 0x111159
movq -0x30(%rbp), %rdi
callq 0xd13d
jmp 0x82dce
leaq 0x8e3c5(%rip), %rsi     # 0x111159
movq %r15, %rdi
callq 0x9353
movq %rdx, %rbx
leaq 0x109174a(%rip), %rdi   # 0x11144f0
movq %r13, %rsi
callq 0x13c85
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
addq $0x4, %rdi
orq %rbx, %rdi
leaq 0x8e4fb(%rip), %rsi     # 0x1112c1
movq %rax, %rdx
callq 0x14766
movq %r12, (%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x5d8d4(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x5d8d9(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302
movq 0x1093711(%rip), %r14   # 0x1116528
testq %r14, %r14
jne 0x82e35
xorl %edi, %edi
callq 0xf5e4
movq %rax, %r14
movq $0x0, 0x10(%rax)
movq %rax, 0x10936f3(%rip)   # 0x1116528
movq %r14, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x82e55
incl (%rax)
movq 0x10936d4(%rip), %rsi   # 0x1116530
testq %rsi, %rsi
jne 0x82ea2
movl $0x31, %edi
callq 0xf5e4
movq %rax, %rsi
movq $0x31, 0x10(%rax)
movups 0x6561b(%rip), %xmm0    # 0xe8498
movups %xmm0, 0x18(%rax)
movups 0x65620(%rip), %xmm0    # 0xe84a8
movups %xmm0, 0x28(%rax)
movups 0x65625(%rip), %xmm0    # 0xe84b8
movups %xmm0, 0x38(%rax)
movb $0x20, 0x48(%rax)
movq %rax, 0x109368e(%rip)   # 0x1116530
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x82ec2
incl (%rax)
movq %r14, %rdi
callq 0xe069
movq %rax, %r14
movq 0x1093664(%rip), %rsi   # 0x1116538
testq %rsi, %rsi
jne 0x82f0a
movl $0xb, %edi
callq 0xf5e4
movq %rax, %rsi
movq $0xb, 0x10(%rax)
movabsq $0x6567616b63617028, %rax # imm = 0x6567616B63617028
movq %rax, 0x18(%rsi)
movl $0x203d2065, 0x1f(%rsi) # imm = 0x203D2065
movq %rsi, 0x109362e(%rip)   # 0x1116538
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x82f2a
incl (%rax)
movq %r14, %rdi
callq 0xe069
leaq -0x68(%rbp), %rcx
leaq -0x60(%rbp), %r8
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x19f85
movq 0x10935f0(%rip), %rsi   # 0x1116540
testq %rsi, %rsi
jne 0x82f86
movl $0xb, %edi
callq 0xf5e4
movq %rax, %rsi
movq $0xb, 0x10(%rax)
movabsq $0x312068746170202c, %rax # imm = 0x312068746170202C
movq %rax, 0x18(%rsi)
movl $0x203d2031, 0x1f(%rsi) # imm = 0x203D2031
movq %rsi, 0x10935ba(%rip)   # 0x1116540
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x82fa6
incl (%rax)
movq -0x60(%rbp), %rdi
callq 0xe069
leaq -0x58(%rbp), %rdx
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x83154
movq 0x1093582(%rip), %rsi   # 0x1116548
testq %rsi, %rsi
jne 0x82ffc
movl $0xb, %edi
callq 0xf5e4
movq %rax, %rsi
movq $0xb, 0x10(%rax)
movabsq $0x322068746170202c, %rax # imm = 0x322068746170202C
movq %rax, 0x18(%rsi)
movl $0x203d2032, 0x1f(%rsi) # imm = 0x203D2032
movq %rsi, 0x109354c(%rip)   # 0x1116548
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x8301c
incl (%rax)
movq -0x58(%rbp), %rdi
callq 0xe069
movq %rax, %rbx
movq -0x40(%rbp), %rdi
movq %r12, %rsi
callq 0x9189
leaq -0x50(%rbp), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x83154
movq 0x1093506(%rip), %rsi   # 0x1116550
testq %rsi, %rsi
jne 0x83071
movl $0x2, %edi
callq 0xf5e4
movq %rax, %rsi
movq $0x2, 0x10(%rax)
movw $0x2e29, 0x18(%rax)     # imm = 0x2E29
movq %rax, 0x10934df(%rip)   # 0x1116550
andq %rsi, -0x38(%rbp)
sete %al
testb $0x3, %sil
setne %cl
orb %al, %cl
jne 0x83089
movq -0x38(%rbp), %rax
incl (%rax)
movq -0x50(%rbp), %rdi
callq 0xe069
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x14cad