// File: /workspace/github_c_makefile_star2_O1/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 0x27bd7
cmpl $0x1, %eax
jne 0x31aec
movq %rdx, %rdi
callq 0xdaeb
movq -0x30(%rbp), %r15
movq %rax, %rcx
shrq $0x30, %rcx
andq %r13, %rax
testq %rcx, %rcx
movq %r14, -0x40(%rbp)
movq %r12, -0x38(%rbp)
je 0x31a5f
cmpl $0x1, %ecx
jne 0x31b52
movq %rax, %rdi
callq 0x2100c
movq %rax, %rdi
callq 0x2d8fc
movq %rax, %rdi
callq 0x2d7f3
jmp 0x31a67
movq %rax, %rdi
callq 0x20fc5
movq %rax, %r14
leaq -0x58(%rbp), %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2801e
movq %rax, %r15
movq (%r12), %r12
movq 0x48(%r12), %rdi
andq %rdi, %r13
sete %al
testb $0x3, %dil
setne %cl
orb %al, %cl
jne 0x31a9d
incl (%r13)
leaq 0xe4314(%rip), %rdx     # 0x115db8
leaq 0xc73(%rip), %rcx       # 0x3271e
movq %rbx, %rsi
callq 0x27d72
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
cmpq $0x0, 0x10e7b24(%rip)   # 0x1119618
jne 0x31b2b
movl $0xd, %edi
callq 0xf9f7
movq $0xd, 0x10(%rax)
movabsq $0x6465746365707865, %rcx # imm = 0x6465746365707865
movq %rcx, 0x18(%rax)
movabsq $0x656d616e20646574, %rcx # imm = 0x656D616E20646574
movq %rcx, 0x1d(%rax)
movq %rax, 0x10e7aed(%rip)   # 0x1119618
movq 0x10e7ae6(%rip), %rdx   # 0x1119618
andq %rdx, %r13
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x31b46
incl (%r13)
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x2778c
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xb2be2(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xb2be7(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5