// File: /workspace/github_c_makefile_star2_O2/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, %r13
movq %rdx, %r12
movq %rsi, %rbx
leaq -0x38(%rbp), %rdx
movq %r12, %rsi
callq 0x7ba57
testl %eax, %eax
je 0x7b73d
cmpl $0x1, %eax
jne 0x7b778
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
callq 0xd491
movq %rbx, %r15
movq %r14, -0x40(%rbp)
andq %r14, %r15
setne %cl
movq %rbx, -0x30(%rbp)
testb $0x3, %bl
sete %bl
andb %cl, %bl
cmpb $0x1, %bl
jne 0x7b69f
incl (%r15)
testb $0x1, %dl
je 0x7b6c4
movq %rax, %rdi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rdi
sete %cl
testb $0x3, %al
setne %sil
orb %cl, %sil
jne 0x7b6c4
incl (%rdi)
movq %rax, -0x48(%rbp)
movq %rax, %rdi
movq %rdx, %r14
movq %rdx, %rsi
callq 0x8b55
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0xd769
testl %eax, %eax
jne 0x7b78f
testb $0x1, %r14b
movq -0x48(%rbp), %rdi
je 0x7b71e
movq %rdi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x7b71e
decl (%rax)
jne 0x7b71e
movq %r14, %rsi
callq 0xce94
testb %bl, %bl
je 0x7b737
decl (%r15)
jne 0x7b737
leaq 0x8ca2b(%rip), %rsi     # 0x108159
movq -0x30(%rbp), %rdi
callq 0xce94
movq -0x38(%rbp), %rax
jmp 0x7b765
leaq 0x8ca15(%rip), %rsi     # 0x108159
movq %rbx, %rdi
callq 0x8d0c
movq -0x38(%rbp), %rdi
pushq $0x1
popq %rsi
leaq -0x50(%rbp), %rbx
movq %r12, %rcx
movq %rbx, %r8
callq 0x12769
movq (%rbx), %rax
movq %rax, (%r13)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5908e(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6
movq 0x1091d9a(%rip), %r13   # 0x110d530
testq %r13, %r13
jne 0x7b7b3
leaq 0x60f53(%rip), %rdi     # 0xdc6f5
xorl %esi, %esi
callq 0x8a21
movq %rax, %r13
movq %rax, 0x1091d7d(%rip)   # 0x110d530
movq %r13, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x7b7d3
incl (%rax)
movq 0x1091d5e(%rip), %rsi   # 0x110d538
testq %rsi, %rsi
jne 0x7b7f8
leaq 0x60eb0(%rip), %rdi     # 0xdc696
pushq $0x31
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x1091d40(%rip)   # 0x110d538
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x7b818
incl (%rax)
movq %r13, %rdi
callq 0xd8b0
movq %rax, %r13
movq 0x1091d16(%rip), %rsi   # 0x110d540
testq %rsi, %rsi
jne 0x7b848
leaq 0x60e92(%rip), %rdi     # 0xdc6c8
pushq $0xb
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x1091cf8(%rip)   # 0x110d540
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x7b868
incl (%rax)
movq %r13, %rdi
callq 0xd8b0
movq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rcx
leaq -0x68(%rbp), %r8
movq %rax, %rsi
movq %r12, %rdx
callq 0x17e68
movq 0x1091cba(%rip), %rsi   # 0x110d548
testq %rsi, %rsi
jne 0x7b8ac
leaq 0x60e3a(%rip), %rdi     # 0xdc6d4
pushq $0xb
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x1091c9c(%rip)   # 0x110d548
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x7b8cc
incl (%rax)
movq -0x68(%rbp), %rdi
callq 0xd8b0
leaq -0x60(%rbp), %rdx
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x7ba91
movq 0x1091c64(%rip), %rsi   # 0x110d550
testq %rsi, %rsi
jne 0x7b90a
leaq 0x60de8(%rip), %rdi     # 0xdc6e0
pushq $0xb
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x1091c46(%rip)   # 0x110d550
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x7b92a
incl (%rax)
movq -0x60(%rbp), %rdi
callq 0xd8b0
movq %rax, %r15
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x8b55
leaq -0x58(%rbp), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x7ba91
movq 0x1091c00(%rip), %rsi   # 0x110d558
testq %rsi, %rsi
jne 0x7b976
leaq 0x60e5e(%rip), %rdi     # 0xdc7c2
pushq $0x2
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x1091be2(%rip)   # 0x110d558
andq %rsi, -0x40(%rbp)
sete %al
testb $0x3, %sil
setne %cl
orb %al, %cl
jne 0x7b98e
movq -0x40(%rbp), %rax
incl (%rax)
movq -0x58(%rbp), %rdi
callq 0xd8b0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x13deb