// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_def_Def_resolve
static struct mirth_def_Def mw_mirth_def_Def_resolve (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_def_Def in_Def_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	bool v5 = true;
	struct mirth_mirth_zaMirth* r6 = in_zaMirth_1;
	struct mirth_def_Def v7 = in_Def_2;
	bool v8 = v5;
	bool v9 = v5;
	while (v9) {
		struct mirth_mirth_zaMirth* r10 = r6;
		struct mirth_def_Def v11 = v7;
		bool v12 = v8;
		incref(MK_mirth_def_Def(v11));
		struct std_maybe_Maybe_1 v13 = mw_mirth_def_Def_aliaszy(v11);
		struct mirth_mirth_zaMirth* branch_zaMirth_14;
		struct std_maybe_Maybe_1 branch_Maybe_15;
		switch ((v13).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v16 = mtp_std_maybe_Maybe_1_Some(v13);
				void* v17 = field_mut(&mfld_mirth_alias_Alias_zttarget, V_mirth_alias_Alias(v16));
				struct mirth_mirth_zaMirth* v18;
				struct std_maybe_Maybe_1 v19 = mw_mirth_mirth_Prop_1_tryzeforcezx(r10, v17, &v18);
				branch_Maybe_15 = v19;
				branch_zaMirth_14 = v18;
			} break;
			case std_maybe_Maybe_1_None: {
				struct std_maybe_Maybe_1 v20 = { .tag=std_maybe_Maybe_1_None };
				branch_Maybe_15 = v20;
				branch_zaMirth_14 = r10;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		VAL branch_zux1_21;
		bool branch_Bool_22;
		switch ((branch_Maybe_15).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v23 = mtp_std_maybe_Maybe_1_Some(branch_Maybe_15);
				decref(MK_mirth_def_Def(v11));
				bool v24 = true;
				branch_Bool_22 = v24;
				branch_zux1_21 = v23;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v25 = false;
				branch_Bool_22 = v25;
				branch_zux1_21 = MK_mirth_def_Def(v11);
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v9 = branch_Bool_22;
		v8 = branch_Bool_22;
		v7 = V_mirth_def_Def(branch_zux1_21);
		r6 = branch_zaMirth_14;
	}
	*out_zaMirth_3 = r6;
	return v7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, -0x30(%rbp)
movq %rdx, %rbx
movq %rdi, %r14
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
movq %rbx, %r12
andq %rax, %r12
setne %al
testb $0x3, %bl
sete %r13b
andb %al, %r13b
cmpb $0x1, %r13b
jne 0x2f8f8
incl (%r12)
movq %rsi, %r15
shlq $0x30, %r15
orq %rbx, %r15
movl %esi, %edi
movq %rbx, %rsi
callq 0x2f9d2
cmpl $0x1, %eax
jne 0x2f982
movq %rdx, %rdi
callq 0xd745
leaq 0x10e5af8(%rip), %rdi   # 0x1115418
movq %rax, %rsi
callq 0x13c85
movq %r14, %rdi
movq %rax, %rsi
leaq -0x38(%rbp), %rdx
callq 0x1555d
movq -0x38(%rbp), %r14
cmpl $0x1, %eax
jne 0x2f97e
movq %rdx, %rdi
callq 0xd745
movq %rax, %rbx
testb %r13b, %r13b
je 0x2f965
decl (%r12)
jne 0x2f965
movq %r15, %rdi
leaq 0xe1e29(%rip), %rsi     # 0x111789
callq 0xd13d
movq %rbx, %rsi
shrq $0x30, %rsi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %rbx
jmp 0x2f8db
testl %eax, %eax
jne 0x2f9a2
shrq $0x30, %r15
movq -0x30(%rbp), %rax
movq %r14, (%rax)
movl %r15d, %eax
movq %r12, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xb0d12(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xb0d17(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302