// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_elabzedefzehead
static void mw_mirth_elab_elabzedefzehead (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct mirth_mirth_zaMirth* *out_zaMirth_3, uint64_t *out_Token_4, uint64_t *out_Name_5, INT *out_Nat_6, struct mirth_mirth_PropState_1 *out_PropState_7) {
	struct mirth_mirth_zaMirth* v8;
	struct std_maybe_Maybe_1 v9 = mw_mirth_token_Token_namezfdnamezy(in_zaMirth_1, in_Token_2, &v8);
	struct mirth_mirth_zaMirth* branch_zaMirth_10;
	uint64_t branch_Token_11;
	VAL branch_zux1_12;
	switch ((v9).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v13 = mtp_std_maybe_Maybe_1_Some(v9);
			branch_zux1_12 = v13;
			branch_Token_11 = in_Token_2;
			branch_zaMirth_10 = v8;
		} break;
		case std_maybe_Maybe_1_None: {
			STR* v14;
			STRLIT(v14, "expected name", 13);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v8, in_Token_2, v14);
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	uint64_t branch_Name_17;
	switch ((V_std_either_Either_2(branch_zux1_12)).tag) {
		case std_either_Either_2_Left: {
			VAL v18 = mtp_std_either_Either_2_Left(V_std_either_Either_2(branch_zux1_12));
			branch_Name_17 = V_mirth_name_Name(v18);
		} break;
		case std_either_Either_2_Right: {
			VAL v19 = mtp_std_either_Either_2_Right(V_std_either_Either_2(branch_zux1_12));
			struct std_list_Nest_1* v20 = mw_mirth_name_DName_parts(V_mirth_name_DName(v19));
			VAL v21 = mw_std_list_Nest_1_last(v20);
			branch_Name_17 = V_mirth_name_Name(v21);
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_zaMirth* v22;
	INT v23 = mw_mirth_token_Token_numzeargs(branch_zaMirth_10, branch_Token_11, &v22);
	struct mirth_mirth_LexicalState* v24 = v22->mlexicalzestate;
	incref(MK_mirth_mirth_LexicalState(v24));
	FNPTR v25 = &mb_mirth_elab_elabzedefzehead_0;
	struct mirth_mirth_PropState_1 v26 = mtw_mirth_mirth_PropState_1_Delay(v24, MK_mirth_token_Token(branch_Token_11), MKFNPTR(v25));
	*out_PropState_7 = v26;
	*out_Nat_6 = v23;
	*out_Name_5 = branch_Name_17;
	*out_Token_4 = branch_Token_11;
	*out_zaMirth_3 = v22;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
leaq -0x30(%rbp), %rdx
callq 0x275cc
cmpl $0x1, %eax
jne 0x30bba
movq %rdx, %rdi
callq 0xd745
movq -0x30(%rbp), %r15
movq %rax, %rcx
shrq $0x30, %rcx
andq %r13, %rax
cmpq $0x1, %rcx
movq %r14, -0x40(%rbp)
movq %r12, -0x38(%rbp)
je 0x30b1d
testl %ecx, %ecx
jne 0x30c1e
movq %rax, %rdi
callq 0x20a5a
jmp 0x30b35
movq %rax, %rdi
callq 0x20aa1
movq %rax, %rdi
callq 0x2cc3e
movq %rax, %rdi
callq 0x2cb6e
movq %rax, %r14
leaq -0x58(%rbp), %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x27a19
movq %rax, %r15
movq (%r12), %r12
movq 0x48(%r12), %rdi
andq %rdi, %r13
sete %al
testb $0x3, %dil
setne %cl
orb %al, %cl
jne 0x30b6b
incl (%r13)
leaq 0xe1246(%rip), %rdx     # 0x111db8
leaq 0xbc6(%rip), %rcx       # 0x3173f
movq %rbx, %rsi
callq 0x27765
movq 0x10(%rbp), %rcx
movl $0x1, (%rcx)
movq %rax, 0x8(%rcx)
movq -0x48(%rbp), %rax
movq %r15, (%rax)
movq -0x50(%rbp), %rax
movq %r14, (%rax)
movq -0x38(%rbp), %rax
movq %rbx, (%rax)
movq -0x40(%rbp), %rax
movq %r12, (%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10e4a57(%rip), %rdx   # 0x1115618
testq %rdx, %rdx
jne 0x30bfe
movl $0xd, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0xd, 0x10(%rax)
movabsq $0x6465746365707865, %rax # imm = 0x6465746365707865
movq %rax, 0x18(%rdx)
movabsq $0x656d616e20646574, %rax # imm = 0x656D616E20646574
movq %rax, 0x1d(%rdx)
movq %rdx, 0x10e4a1a(%rip)   # 0x1115618
andq %rdx, %r13
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x30c12
incl (%r13)
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x27183
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xafa96(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xafa9b(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302