// File: /workspace/github_c_makefile_star2_O3/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 0x28aae
testb %cl, %cl
je 0x289a6
incl (%rax)
movq %rsi, -0x40(%rbp)
movq %r12, -0x50(%rbp)
movl %r13d, -0x2c(%rbp)
cmpl $0x1, %r13d
jne 0x28b84
movq %r15, %rdi
callq 0x20aa1
leaq -0x70(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2ca25
movq %rax, -0x48(%rbp)
movq %rdx, %r13
movq (%rbx), %rdi
leaq -0x68(%rbp), %r12
movq %r12, %rsi
callq 0x2ca91
movl %eax, %ebx
movq %rdx, %r14
movq 0x8(%r12), %rsi
testb $0x1, %sil
je 0x28a24
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 0x28a24
decl (%rax)
jne 0x28a24
callq 0xd13d
movl %ebx, %edi
movq %r14, %rsi
callq 0x2cae6
testl %eax, %eax
je 0x28ae7
cmpl $0x1, %eax
jne 0x28bcb
movq %rdx, %rdi
callq 0xd745
movq %rax, %rdi
callq 0x2cb6e
movq %rax, %rdi
movq %rdx, %rsi
callq 0x9353
movq %rdx, %rdi
callq 0xd745
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 0x28a9e
decl (%rdx)
jne 0x28a9e
movq -0x48(%rbp), %rdi
shlq $0x30, %rdi
orq %r13, %rdi
leaq 0xe8828(%rip), %rsi     # 0x1112c1
callq 0xd13d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9353
movq %rdx, %r13
jmp 0x28af4
testb %cl, %cl
je 0x28ab4
incl (%rax)
cmpl $0x1, %r13d
je 0x28acd
testl %r13d, %r13d
jne 0x28bcb
movq %r15, %rdi
callq 0x20a5a
jmp 0x28b08
movq %r15, %rdi
callq 0x20aa1
movq %rax, %rdi
callq 0x2cc3e
movq %rax, %rdi
callq 0x2cb6e
jmp 0x28b08
movq -0x48(%rbp), %rax
cmpl $0x1, %eax
jne 0x28c20
movq %r13, %rdi
callq 0xd745
movq -0x50(%rbp), %r12
movq 0x10(%rbp), %rbx
movl -0x2c(%rbp), %r13d
leaq -0x68(%rbp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14ce9
movl %eax, %ebx
movq %rdx, %r14
movl $0x1, %edi
movl $0x48, %esi
callq 0x50c0
testq %rax, %rax
je 0x28bfb
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 0x28bcb
movq %r15, %rdi
callq 0x20a5a
testb $0x1, %dl
je 0x28c24
movq %rax, %rcx
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
andq %rsi, %rcx
sete %sil
testb $0x3, %al
setne %dil
orb %sil, %dil
jne 0x28c24
decl (%rcx)
jne 0x28c24
movq %rax, %rdi
movq %rdx, %rsi
callq 0xd13d
jmp 0x28c24
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xb7ae9(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xb7aee(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302
leaq 0xbb50b(%rip), %rsi     # 0xe410d
movl $0x31, %edx
movl $0x2, %edi
callq 0x5060
callq 0x52b6
movl $0x1, %edi
callq 0x5130
testl %eax, %eax
jne 0x28c89
movq 0x10ec7e5(%rip), %rdx   # 0x1115410
testq %rdx, %rdx
jne 0x28c65
movl $0x15, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x15, 0x10(%rax)
movabsq $0x2e6563617073656d, %rax # imm = 0x2E6563617073656D
movq %rax, 0x25(%rdx)
movups 0xbb49d(%rip), %xmm0    # 0xe40f7
movups %xmm0, 0x18(%rdx)
movq %rdx, 0x10ec7ab(%rip)   # 0x1115410
andq %rdx, -0x40(%rbp)
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x28c7c
movq -0x40(%rbp), %rax
incl (%rax)
movq 0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x27183
leaq 0xb7a3d(%rip), %rdi     # 0xe06cd
movl $0x20, %esi
callq 0x9040
jmp 0x28bf3