// File: /workspace/github_c_makefile_star2_O1/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, -0x38(%rbp)
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, -0x30(%rbp)
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %rbx, %rax
andq %r12, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x307d3
incl (%rax)
movl %r14d, %edi
movq %rbx, %rsi
callq 0x308cd
cmpl $0x1, %eax
jne 0x30814
movq %rdx, %rdi
callq 0xdaeb
leaq 0x10e8c26(%rip), %rdi   # 0x1119418
movq %rax, %rsi
callq 0x13ff0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
leaq -0x40(%rbp), %rdx
callq 0x158b0
movq -0x40(%rbp), %rcx
movq %rcx, -0x30(%rbp)
jmp 0x30818
xorl %eax, %eax
xorl %edx, %edx
shlq $0x30, %r14
movq %r14, %r15
orq %rbx, %r15
testl %eax, %eax
je 0x30864
cmpl $0x1, %eax
jne 0x3089d
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %r14
movq %rbx, %rax
andq %r12, %rax
sete %cl
testb $0x3, %bl
setne %dl
movb $0x1, %r13b
orb %cl, %dl
jne 0x3085f
decl (%rax)
jne 0x3085f
movq %r15, %rdi
leaq 0xe4f2f(%rip), %rsi     # 0x115789
callq 0xd4e3
movq %r14, %r15
jmp 0x30867
xorl %r13d, %r13d
movq %r15, %r14
shrq $0x30, %r14
movq %r15, %rbx
andq %r12, %rbx
testb %r13b, %r13b
jne 0x307be
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movl %r14d, %eax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xb3e97(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xb3e9c(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5