// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaResolveDef_Beginzx
static void mw_mirth_elab_zaResolveDef_Beginzx (STR* in_Str_1, uint64_t in_Token_2, struct std_either_Either_2 in_Either_3, bool in_Bool_4, bool in_Bool_5, struct mirth_mirth_zaMirth* in_zaMirth_6, struct mirth_mirth_zaMirth* *out_zaMirth_7, struct mirth_elab_zaResolveDef* *out_zaResolveDef_8) {
	STR* branch_Str_9;
	uint64_t branch_Token_10;
	bool branch_Bool_11;
	struct mirth_mirth_zaMirth* branch_zaMirth_12;
	bool branch_Bool_13;
	struct std_either_Either_2 branch_Either_14;
	uint64_t branch_Name_15;
	if (in_Bool_4) {
		incref(MK_std_either_Either_2(in_Either_3));
		struct std_maybe_Maybe_1 v16 = mw_mirth_token_namezfdnamezepenultimatezenamezy(in_Either_3);
		struct mirth_mirth_zaMirth* branch_zaMirth_17;
		uint64_t branch_Token_18;
		VAL branch_zux1_19;
		switch ((v16).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v20 = mtp_std_maybe_Maybe_1_Some(v16);
				branch_zux1_19 = v20;
				branch_Token_18 = in_Token_2;
				branch_zaMirth_17 = in_zaMirth_6;
			} break;
			case std_maybe_Maybe_1_None: {
				STR* v21;
				STRLIT(v21, "Expected a namespace.", 21);
				mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(in_zaMirth_6, in_Token_2, v21);
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		branch_Name_15 = V_mirth_name_Name(branch_zux1_19);
		branch_Either_14 = in_Either_3;
		branch_Bool_13 = in_Bool_4;
		branch_zaMirth_12 = branch_zaMirth_17;
		branch_Bool_11 = in_Bool_5;
		branch_Token_10 = branch_Token_18;
		branch_Str_9 = in_Str_1;
	} else {
		incref(MK_std_either_Either_2(in_Either_3));
		uint64_t v24 = mw_mirth_token_namezfdnamezelastzename(in_Either_3);
		branch_Name_15 = v24;
		branch_Either_14 = in_Either_3;
		branch_Bool_13 = in_Bool_4;
		branch_zaMirth_12 = in_zaMirth_6;
		branch_Bool_11 = in_Bool_5;
		branch_Token_10 = in_Token_2;
		branch_Str_9 = in_Str_1;
	}
	struct mirth_mirth_zaMirth* v25;
	struct std_list_List_1 v26 = mw_mirth_name_Name_defs(branch_zaMirth_12, branch_Name_15, &v25);
	struct std_list_List_1 v27 = { .tag=std_list_List_1_Nil };
	struct mirth_elab_zaResolveDef* v28;
	mtw_mirth_elab_zaResolveDef_zaResolveDef(branch_Str_9, branch_Token_10, branch_Either_14, v26, v27, branch_Bool_13, branch_Bool_11, &v28);
	*out_zaResolveDef_8 = v28;
	*out_zaMirth_7 = v25;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movl %edx, %r13d
movq %rsi, %r12
movq 0x10(%rbp), %rbx
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
movq %rcx, %rax
andq %rsi, %rax
setne %dl
testb $0x3, %r15b
sete %cl
andb %dl, %cl
testl %r8d, %r8d
movq %rdi, -0x58(%rbp)
movl %r8d, -0x34(%rbp)
movl %r9d, -0x30(%rbp)
je 0x26117
testb %cl, %cl
je 0x2600f
incl (%rax)
movq %rsi, -0x40(%rbp)
movq %r12, -0x50(%rbp)
movl %r13d, -0x2c(%rbp)
cmpl $0x1, %r13d
jne 0x261e1
movq %r15, %rdi
callq 0x1e7e4
leaq -0x70(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2a0fa
movq %rax, -0x48(%rbp)
movq %rdx, %r13
movq (%rbx), %rdi
leaq -0x68(%rbp), %r12
movq %r12, %rsi
callq 0x2a166
movl %eax, %ebx
movq %rdx, %r14
movq 0x8(%r12), %rsi
testb $0x1, %sil
je 0x2608d
movq -0x68(%rbp), %rdi
movq %rdi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x2608d
decl (%rax)
jne 0x2608d
callq 0xce94
movl %ebx, %edi
movq %r14, %rsi
callq 0x2a1b2
testl %eax, %eax
je 0x26148
cmpl $0x1, %eax
jne 0x26294
movq %rdx, %rdi
callq 0xd491
movq %rax, %rdi
callq 0x2a221
movq %rax, %rdi
movq %rdx, %rsi
callq 0x8d0c
movq %rdx, %rdi
callq 0xd491
movq %rax, %rbx
movq %rdx, %r14
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %r13, %rdx
sete %al
testb $0x3, %r13b
setne %cl
orb %al, %cl
jne 0x26107
decl (%rdx)
jne 0x26107
movq -0x48(%rbp), %rdi
shlq $0x30, %rdi
orq %r13, %rdi
leaq 0xe21bf(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8d0c
movq %rdx, %r13
jmp 0x26155
testb %cl, %cl
je 0x2611d
incl (%rax)
cmpl $0x1, %r13d
je 0x26136
testl %r13d, %r13d
jne 0x26294
movq %r15, %rdi
callq 0x1e79d
jmp 0x26169
movq %r15, %rdi
callq 0x1e7e4
movq %rax, %rdi
callq 0x2a313
jmp 0x26169
movq -0x48(%rbp), %rax
cmpl $0x1, %eax
jne 0x26247
movq %r13, %rdi
callq 0xd491
movq -0x50(%rbp), %r12
movq 0x10(%rbp), %rbx
movl -0x2c(%rbp), %r13d
leaq -0x68(%rbp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13e13
movl %eax, %ebx
movq %rdx, %r14
pushq $0x1
popq %rdi
pushq $0x48
popq %rsi
callq 0x50c0
testq %rax, %rax
je 0x26228
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rdx
movl -0x30(%rbp), %esi
movb %sil, 0x41(%rax)
movl -0x34(%rbp), %esi
movb %sil, 0x40(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movl %ebx, 0x20(%rax)
movq %r14, 0x28(%rax)
movl %r13d, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %r12, 0x8(%rax)
movq -0x58(%rbp), %rsi
movq %rsi, (%rax)
movq %rax, (%rcx)
movq -0x68(%rbp), %rax
movq %rax, (%rdx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, -0x2c(%rbp)
jne 0x26294
movq %r15, %rdi
callq 0x1e79d
testb $0x1, %dl
je 0x2624b
movq %rax, %rcx
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
andq %rsi, %rcx
sete %sil
testb $0x3, %al
setne %dil
orb %sil, %dil
jne 0x2624b
decl (%rcx)
jne 0x2624b
movq %rax, %rdi
movq %rdx, %rsi
callq 0xce94
jmp 0x2624b
leaq 0xb207b(%rip), %rsi     # 0xd82aa
pushq $0x2
popq %rdi
pushq $0x31
popq %rdx
callq 0x5060
callq 0x52ae
pushq $0x1
popq %rdi
callq 0x5130
testl %eax, %eax
jne 0x26294
movq 0x10e61be(%rip), %rdx   # 0x110c410
testq %rdx, %rdx
jne 0x26270
leaq 0xb2036(%rip), %rdi     # 0xd8294
pushq $0x15
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10e61a0(%rip)   # 0x110c410
andq %rdx, -0x40(%rbp)
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x26287
movq -0x40(%rbp), %rax
incl (%rax)
movq 0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x246fe
leaq 0xae572(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6