// File: /workspace/github_c_makefile_star2_O1/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
movl %r9d, -0x34(%rbp)
movq %rcx, %r15
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, -0x50(%rbp)
movq 0x10(%rbp), %rbx
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %rcx, %rax
andq %r12, %rax
setne %dl
testb $0x3, %r15b
sete %cl
andb %dl, %cl
movl %r8d, -0x38(%rbp)
testl %r8d, %r8d
je 0x2902d
testb %cl, %cl
je 0x28fe4
incl (%rax)
cmpl $0x1, %r13d
je 0x29053
testl %r13d, %r13d
jne 0x292ba
movq %r15, %rdi
callq 0x20fc5
testb $0x1, %dl
je 0x29024
movq %rax, %rcx
andq %r12, %rcx
sete %sil
testb $0x3, %al
setne %dil
orb %sil, %dil
jne 0x29024
decl (%rcx)
jne 0x29024
movq %rax, %rdi
movq %rdx, %rsi
callq 0xd4e3
xorl %eax, %eax
xorl %edi, %edi
jmp 0x291a1
testb %cl, %cl
je 0x29033
incl (%rax)
cmpl $0x1, %r13d
je 0x290fd
testl %r13d, %r13d
jne 0x292ba
movq %r15, %rdi
callq 0x20fc5
jmp 0x291af
movq %r14, -0x48(%rbp)
movq %r15, %rdi
callq 0x2100c
leaq -0x68(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2d6aa
movq %rax, -0x40(%rbp)
movq %rdx, -0x30(%rbp)
movq (%rbx), %rdi
leaq -0x60(%rbp), %r14
movq %r14, %rsi
callq 0x2d716
movl %eax, %r12d
movq %rdx, %rbx
movq 0x8(%r14), %rsi
testb $0x1, %sil
je 0x290c0
movq -0x60(%rbp), %rdi
movq %rdi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x290c0
decl (%rax)
jne 0x290c0
callq 0xd4e3
movl %r12d, %edi
movq %rbx, %rsi
callq 0x2d76b
movl %eax, %r12d
testl %eax, %eax
movq -0x48(%rbp), %r14
je 0x2911a
cmpl $0x1, %r12d
jne 0x292ba
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %rdi
callq 0x2d7f3
movq %rax, %rdi
movq %rdx, %rsi
callq 0x95f6
jmp 0x2911c
movq %r15, %rdi
callq 0x2100c
movq %rax, %rdi
callq 0x2d8fc
movq %rax, %rdi
callq 0x2d7f3
jmp 0x291af
xorl %edx, %edx
testl %r12d, %r12d
je 0x2918b
cmpl $0x1, %r12d
jne 0x292ba
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %rbx
movq %rdx, %r12
movq -0x30(%rbp), %rdx
movq %rdx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dl
setne %dl
orb %cl, %dl
jne 0x29176
decl (%rax)
jne 0x29176
movq -0x40(%rbp), %rdi
shlq $0x30, %rdi
orq -0x30(%rbp), %rdi
leaq 0xec150(%rip), %rsi     # 0x1152c1
callq 0xd4e3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x95f6
movq %rdx, %rdi
movl $0x1, %eax
jmp 0x29193
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rdi
movq 0x10(%rbp), %rbx
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
cmpl $0x1, %eax
jne 0x2922b
callq 0xdaeb
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1503c
movl %eax, %ebx
movq %rdx, %r12
movl $0x1, %edi
movl $0x48, %esi
callq 0x50c0
testq %rax, %rax
je 0x29295
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rdx
movl -0x34(%rbp), %esi
movb %sil, 0x41(%rax)
movl -0x38(%rbp), %esi
movb %sil, 0x40(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movl %ebx, 0x20(%rax)
movq %r12, 0x28(%rax)
movl %r13d, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %r14, 0x8(%rax)
movq -0x50(%rbp), %rsi
movq %rsi, (%rax)
movq %rax, (%rcx)
movq -0x60(%rbp), %rax
movq %rax, (%rdx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x292e4
cmpq $0x0, 0x10f01d5(%rip)   # 0x1119410
jne 0x2926f
movl $0x15, %edi
callq 0xf9f7
movq $0x15, 0x10(%rax)
movabsq $0x2e6563617073656d, %rcx # imm = 0x2E6563617073656D
movq %rcx, 0x25(%rax)
movups 0xbef92(%rip), %xmm0    # 0xe81f6
movups %xmm0, 0x18(%rax)
movq %rax, 0x10f01a1(%rip)   # 0x1119410
movq 0x10f019a(%rip), %rdx   # 0x1119410
andq %rdx, %r12
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x2928a
incl (%r12)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2778c
leaq 0xbef70(%rip), %rsi     # 0xe820c
movl $0x31, %edx
movl $0x2, %edi
callq 0x5060
callq 0x52be
movl $0x1, %edi
callq 0x5130
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xbb47a(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xbb47f(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
jmp 0x292f5
leaq 0xbb462(%rip), %rdi     # 0xe474d
movl $0x20, %esi
callq 0x92e9
movq %rax, %rdi
callq 0x95a5