// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaAB_elabzeatomzeresolvezedefzx
static void mw_mirth_elab_zaAB_elabzeatomzeresolvezedefzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_arrow_Arrow* in_zaAB_2, struct std_either_Either_2 in_Either_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_arrow_Arrow* *out_zaAB_5) {
	struct mirth_arrow_Arrow* v6;
	struct mirth_type_StackType v7 = mw_mirth_elab_zaAB_abzetypezo(in_zaAB_2, &v6);
	struct mirth_mirth_zaMirth* v8;
	bool v9 = mw_mirth_type_StackType_topzetypeszearezefinezy(in_zaMirth_1, v7, &v8);
	bool v10 = !v9;
	struct mirth_arrow_Arrow* v11;
	uint64_t v12 = mw_mirth_elab_zaAB_abzetokenzo(v6, &v11);
	STR* v13;
	STRLIT(v13, "word", 4);
	bool v14 = false;
	struct mirth_mirth_zaMirth* v15;
	struct mirth_elab_zaResolveDef* v16;
	mw_mirth_elab_zaResolveDef_Beginzx(v13, v12, in_Either_3, v14, v10, v8, &v15, &v16);
	struct std_list_List_1 v17 = v16->mcandidates;
	incref(MK_std_list_List_1(v17));
	struct std_list_List_1 v18 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v19 = { .tag=std_list_List_1_Nil };
	bool v20 = true;
	struct mirth_mirth_zaMirth* r21 = v15;
	struct mirth_elab_zaResolveDef* r22 = v16;
	struct std_list_List_1 v23 = v18;
	struct std_list_List_1 v24 = v19;
	struct std_list_List_1 v25 = v17;
	bool v26 = v20;
	bool v27 = v20;
	while (v27) {
		struct mirth_mirth_zaMirth* r28 = r21;
		struct mirth_elab_zaResolveDef* r29 = r22;
		struct std_list_List_1 v30 = v23;
		struct std_list_List_1 v31 = v24;
		struct std_list_List_1 v32 = v25;
		bool v33 = v26;
		struct mirth_mirth_zaMirth* branch_zaMirth_34;
		VAL branch_zux1_35;
		struct std_list_List_1 branch_List_36;
		struct std_list_List_1 branch_List_37;
		struct std_list_List_1 branch_List_38;
		bool branch_Bool_39;
		switch ((v32).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v40;
				VAL v41 = mtp_std_list_List_1_Cons(v32, &v40);
				incref(v41);
				struct mirth_mirth_zaMirth* v42;
				bool v43 = mw_mirth_def_Def_callablezy(r28, V_mirth_def_Def(v41), &v42);
				struct mirth_mirth_zaMirth* branch_zaMirth_44;
				VAL branch_zux1_45;
				struct std_either_Either_2 branch_Either_46;
				if (v43) {
					struct std_either_Either_2 v47 = mtw_std_either_Either_2_Right(v41);
					branch_Either_46 = v47;
					branch_zux1_45 = MK_mirth_elab_zaResolveDef(r29);
					branch_zaMirth_44 = v42;
				} else {
					struct mirth_elab_RejectedDef v48 = mtw_mirth_elab_RejectedDef_WrongSort(V_mirth_def_Def(v41));
					struct std_either_Either_2 v49 = mtw_std_either_Either_2_Left(MK_mirth_elab_RejectedDef(v48));
					branch_Either_46 = v49;
					branch_zux1_45 = MK_mirth_elab_zaResolveDef(r29);
					branch_zaMirth_44 = v42;
				}
				struct mirth_mirth_zaMirth* branch_zaMirth_50;
				VAL branch_zux1_51;
				struct std_list_List_1 branch_List_52;
				struct std_list_List_1 branch_List_53;
				switch ((branch_Either_46).tag) {
					case std_either_Either_2_Left: {
						VAL v54 = mtp_std_either_Either_2_Left(branch_Either_46);
						struct std_list_List_1 v55 = mw_std_list_List_1_cons(v54, v30);
						branch_List_53 = v31;
						branch_List_52 = v55;
						branch_zux1_51 = branch_zux1_45;
						branch_zaMirth_50 = branch_zaMirth_44;
					} break;
					case std_either_Either_2_Right: {
						VAL v56 = mtp_std_either_Either_2_Right(branch_Either_46);
						struct std_list_List_1 v57 = mw_std_list_List_1_cons(v56, v31);
						branch_List_53 = v57;
						branch_List_52 = v30;
						branch_zux1_51 = branch_zux1_45;
						branch_zaMirth_50 = branch_zaMirth_44;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				bool v58 = true;
				branch_Bool_39 = v58;
				branch_List_38 = v40;
				branch_List_37 = branch_List_53;
				branch_List_36 = branch_List_52;
				branch_zux1_35 = branch_zux1_51;
				branch_zaMirth_34 = branch_zaMirth_50;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v59 = { .tag=std_list_List_1_Nil };
				bool v60 = false;
				branch_Bool_39 = v60;
				branch_List_38 = v59;
				branch_List_37 = v31;
				branch_List_36 = v30;
				branch_zux1_35 = MK_mirth_elab_zaResolveDef(r29);
				branch_zaMirth_34 = r28;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v27 = branch_Bool_39;
		v26 = branch_Bool_39;
		v25 = branch_List_38;
		v24 = branch_List_37;
		v23 = branch_List_36;
		r22 = V_mirth_elab_zaResolveDef(branch_zux1_35);
		r21 = branch_zaMirth_34;
	}
	decref(MK_std_list_List_1(v25));
	struct std_list_List_1 v61 = mw_std_list_List_1_reverse(v23);
	struct std_list_List_1 v62 = mw_std_list_List_1_reverse(v24);
	struct std_list_List_1 v63 = r22->mrejected;
	incref(MK_std_list_List_1(v63));
	struct std_list_List_1 v64 = mw_std_list_List_1_cat(v61, v63);
	struct std_list_List_1 v65 = r22->mrejected;
	decref(MK_std_list_List_1(v65));
	r22->mrejected = v64;
	struct std_list_List_1 v66 = r22->mcandidates;
	decref(MK_std_list_List_1(v66));
	r22->mcandidates = v62;
	struct mirth_mirth_zaMirth* v67;
	struct mirth_elab_zaResolveDef* v68;
	mw_mirth_elab_zaResolveDef_filterzearity(r21, r22, &v67, &v68);
	struct mirth_mirth_zaMirth* v69;
	struct mirth_elab_zaResolveDef* v70;
	mw_mirth_elab_zaResolveDef_filterzequalifiers(v67, v68, &v69, &v70);
	uint64_t v71 = v70->mtoken;
	struct mirth_mirth_zaMirth* v72;
	bool v73 = mw_mirth_token_Token_canzebezerelativezenamezeorzednamezy(v69, v71, &v72);
	struct mirth_arrow_Arrow* branch_zaAB_74;
	struct mirth_mirth_zaMirth* branch_zaMirth_75;
	struct mirth_elab_zaResolveDef* branch_zaResolveDef_76;
	if (v73) {
		struct mirth_arrow_Arrow* v77;
		struct mirth_type_StackType v78 = mw_mirth_elab_zaAB_abzetypezo(v11, &v77);
		struct mirth_mirth_zaMirth* v79;
		bool v80 = mw_mirth_type_StackType_topzetypeszearezefinezy(v72, v78, &v79);
		struct mirth_arrow_Arrow* branch_zaAB_81;
		struct mirth_mirth_zaMirth* branch_zaMirth_82;
		struct mirth_elab_zaResolveDef* branch_zaResolveDef_83;
		if (v80) {
			struct mirth_arrow_Arrow* v84;
			struct mirth_type_StackType v85 = mw_mirth_elab_zaAB_abzetypezo(v77, &v84);
			struct mirth_mirth_zaMirth* v86;
			struct std_list_List_1 v87 = mw_mirth_type_StackType_topzenamespaces(v79, v85, &v86);
			struct mirth_mirth_zaMirth* v88;
			struct mirth_elab_zaResolveDef* v89;
			mw_mirth_elab_zaResolveDef_filterzeroots(v86, v70, v87, &v88, &v89);
			branch_zaResolveDef_83 = v89;
			branch_zaMirth_82 = v88;
			branch_zaAB_81 = v84;
		} else {
			branch_zaResolveDef_83 = v70;
			branch_zaMirth_82 = v79;
			branch_zaAB_81 = v77;
		}
		branch_zaResolveDef_76 = branch_zaResolveDef_83;
		branch_zaMirth_75 = branch_zaMirth_82;
		branch_zaAB_74 = branch_zaAB_81;
	} else {
		struct std_list_List_1 v90 = { .tag=std_list_List_1_Nil };
		struct mirth_mirth_zaMirth* v91;
		struct mirth_elab_zaResolveDef* v92;
		mw_mirth_elab_zaResolveDef_filterzeroots(v72, v70, v90, &v91, &v92);
		branch_zaResolveDef_76 = v92;
		branch_zaMirth_75 = v91;
		branch_zaAB_74 = v11;
	}
	struct mirth_mirth_zaMirth* v93;
	struct std_maybe_Maybe_1 v94 = mw_mirth_elab_zaResolveDef_endzx(branch_zaMirth_75, branch_zaResolveDef_76, &v93);
	struct mirth_mirth_zaMirth* branch_zaMirth_95;
	struct mirth_arrow_Arrow* branch_zaAB_96;
	switch ((v94).tag) {
		case std_maybe_Maybe_1_None: {
			struct mirth_mirth_zaMirth* v97;
			struct mirth_arrow_Arrow* v98;
			mw_mirth_elab_zaAB_elabzeatomzefailedzx(v93, branch_zaAB_74, &v97, &v98);
			branch_zaAB_96 = v98;
			branch_zaMirth_95 = v97;
		} break;
		case std_maybe_Maybe_1_Some: {
			VAL v99 = mtp_std_maybe_Maybe_1_Some(v94);
			struct mirth_mirth_zaMirth* v100;
			struct mirth_arrow_Arrow* v101;
			mw_mirth_elab_zaAB_elabzeatomzedefzx(v93, branch_zaAB_74, V_mirth_def_Def(v99), &v100, &v101);
			branch_zaAB_96 = v101;
			branch_zaMirth_95 = v100;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaAB_5 = branch_zaAB_96;
	*out_zaMirth_4 = branch_zaMirth_95;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, -0x88(%rbp)
movq %r8, -0x90(%rbp)
movq %rcx, %r14
movl %edx, %r15d
movq %rdi, %rbx
leaq -0xe0(%rbp), %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x447fe
leaq -0xa8(%rbp), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4fe24
movl %eax, %ebx
movq (%r12), %rdi
leaq -0x80(%rbp), %rsi
callq 0x44725
movq %rax, %r12
cmpq $0x0, 0x10c67ab(%rip)   # 0x1119a68
jne 0x532df
movl $0x4, %edi
callq 0xf9f7
movq $0x4, 0x10(%rax)
movl $0x64726f77, 0x18(%rax) # imm = 0x64726F77
movq %rax, 0x10c6789(%rip)   # 0x1119a68
xorb $0x1, %bl
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
movq 0x10c6775(%rip), %rdi   # 0x1119a68
movq %rdi, %rax
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x53309
incl (%rax)
subq $0x8, %rsp
leaq -0xd8(%rbp), %r13
leaq -0xa0(%rbp), %rax
movzbl %bl, %r9d
movq $0x0, -0x68(%rbp)
movq %r12, %rsi
movl %r15d, %edx
movq %r14, %rcx
xorl %r8d, %r8d
pushq %r13
pushq %rax
pushq -0xa8(%rbp)
callq 0x28f93
addq $0x20, %rsp
movq (%r13), %rax
movl 0x20(%rax), %edi
movq %rax, -0x40(%rbp)
movq 0x28(%rax), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x53374
incl (%rcx)
movq -0xa0(%rbp), %r13
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movl $0x0, -0x2c(%rbp)
testl %edi, %edi
je 0x5341a
cmpl $0x1, %edi
jne 0x537ec
movq %r13, %r15
movq %rax, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd450
movq %rax, %r14
movq %rdx, %rbx
movq %rax, %r12
testb $0x1, %bl
je 0x533e0
movq %r14, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x533e0
incl (%rax)
movq %r14, %r13
shrq $0x30, %r13
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r14
movq %r15, %rdi
movl %r13d, %esi
movq %r14, %rdx
leaq -0x78(%rbp), %rcx
callq 0x5381c
movl %eax, %r15d
testb %al, %al
je 0x53420
movq %r12, %rdi
movq %rbx, %rsi
callq 0x20c67
jmp 0x5343a
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x53498
movl %r13d, %edi
movq %r14, %rsi
callq 0x29392
movq %rax, %rdi
leaq 0xc2b7c(%rip), %rsi     # 0x115fb1
callq 0x20c09
movq %rdx, %rdi
movq -0x78(%rbp), %r13
testb %r15b, %r15b
je 0x5346a
callq 0x2100c
movq %rax, %rdi
movq %rdx, %rsi
movl -0x2c(%rbp), %edx
movq -0x60(%rbp), %rcx
callq 0xd592
movq %rdx, -0x60(%rbp)
movl $0x1, -0x2c(%rbp)
jmp 0x5348f
callq 0x20fc5
movq %rax, %rdi
movq %rdx, %rsi
movq -0x68(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq 0xd592
movq %rdx, -0x58(%rbp)
movl $0x1, %eax
movq %rax, -0x68(%rbp)
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rax
movb $0x1, %cl
testb %cl, %cl
jne 0x53392
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x534d5
decl (%rcx)
jne 0x534d5
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc1da9(%rip), %rsi     # 0x115279
callq 0xd4e3
xorl %edi, %edi
xorl %esi, %esi
movq -0x68(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq 0xd37c
movl %eax, %r15d
movq %rdx, %r12
xorl %edi, %edi
xorl %esi, %esi
movl -0x2c(%rbp), %edx
movq -0x60(%rbp), %rcx
callq 0xd37c
movl %eax, %ebx
movq %rdx, %r14
movq -0x40(%rbp), %rax
movl 0x30(%rax), %edx
movq 0x38(%rax), %rcx
movq %rcx, %rax
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
andq %rsi, %rax
sete %sil
testb $0x3, %cl
setne %dil
orb %sil, %dil
jne 0x5352e
incl (%rax)
movl %r15d, %edi
movq %r12, %rsi
callq 0x293eb
movl %eax, %r15d
movq %rdx, %r12
movq -0x40(%rbp), %rdi
movq 0x38(%rdi), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
movq %rdi, %rdx
jne 0x53586
movl 0x30(%rdx), %edi
decl (%rcx)
jne 0x53586
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc1cfc(%rip), %rsi     # 0x115279
callq 0xd4e3
movq -0x40(%rbp), %rdx
movl %r15d, 0x30(%rdx)
movq %r12, 0x38(%rdx)
movq 0x28(%rdx), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
movq -0x40(%rbp), %rsi
jne 0x535d2
movl 0x20(%rsi), %edi
decl (%rcx)
jne 0x535d2
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc1cb0(%rip), %rsi     # 0x115279
callq 0xd4e3
movq -0x40(%rbp), %rsi
movl %ebx, 0x20(%rsi)
movq %r14, 0x28(%rsi)
leaq -0x78(%rbp), %rbx
leaq -0xd0(%rbp), %r14
movq %r13, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x424e9
movq (%rbx), %rdi
movq (%r14), %rsi
leaq -0xc8(%rbp), %rbx
leaq -0x70(%rbp), %r14
movq %rbx, %rdx
movq %r14, %rcx
callq 0x29427
movq (%r14), %r14
movq 0x8(%r14), %rsi
movq (%rbx), %rbx
leaq 0x10c5dc9(%rip), %rdi   # 0x11193e8
callq 0x13ff0
movq %rax, %rdi
callq 0x140f0
movq %rax, %rcx
shrq $0x30, %rcx
movq %rax, %rdi
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rdi
cmpq $0x1c, %rcx
je 0x53673
cmpl $0x1b, %ecx
jne 0x53682
movq 0x8(%rdi), %r15
decl (%rdi)
jne 0x5365b
callq 0x5030
leaq -0x50(%rbp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2f781
movq (%r12), %rbx
jmp 0x536a0
callq 0x284d1
movq %rax, %rdi
callq 0x2f90e
jmp 0x536a0
testq %rdi, %rdi
je 0x5369e
decl (%rdi)
jne 0x5369e
andq $-0x4, %rax
leaq 0xc2843(%rip), %rsi     # 0x115ed9
movq %rax, %rdi
callq 0xd4e3
xorl %eax, %eax
testb %al, %al
je 0x5371f
movq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x447fe
leaq -0x38(%rbp), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4fe24
testb %al, %al
je 0x53749
movq -0x50(%rbp), %rdi
leaq -0x98(%rbp), %rbx
movq %rbx, %rsi
callq 0x447fe
movq -0x38(%rbp), %rdi
leaq -0xc0(%rbp), %r14
movl %eax, %esi
movq %r14, %rcx
callq 0x4fef2
movq %rdx, %rcx
movq (%r14), %rdi
movq -0x70(%rbp), %rsi
leaq -0xb8(%rbp), %r14
leaq -0xb0(%rbp), %r15
movl %eax, %edx
movq %r14, %r8
movq %r15, %r9
callq 0x29858
movq (%r15), %rsi
movq (%r14), %rdi
movq (%rbx), %rbx
jmp 0x53755
leaq -0x50(%rbp), %r15
leaq -0x38(%rbp), %r12
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x29858
movq (%r12), %rsi
movq (%r15), %rdi
movq -0x80(%rbp), %rbx
jmp 0x53755
movq -0x70(%rbp), %rsi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rbx
leaq -0x38(%rbp), %rdx
callq 0x2aec1
cmpl $0x1, %eax
je 0x53787
testl %eax, %eax
jne 0x537ec
movq -0x38(%rbp), %r15
leaq -0x50(%rbp), %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x557e2
movq (%r14), %rax
jmp 0x537c6
movq %rdx, %rdi
callq 0xdaeb
movq -0x38(%rbp), %rdi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
movq %rax, %rdx
shrq $0x30, %rdx
leaq -0x50(%rbp), %r14
leaq -0x98(%rbp), %r15
movq %rbx, %rsi
movq %r14, %r8
movq %r15, %r9
callq 0x539ba
movq (%r15), %rax
movq (%r14), %r15
movq -0x88(%rbp), %rcx
movq %rax, (%rcx)
movq -0x90(%rbp), %rax
movq %r15, (%rax)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x90f48(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x90f4d(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5