// File: /workspace/github_c_makefile_star2_O2/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 0x24b09
cmpl $0x1, %eax
jne 0x2e2fe
movq %rdx, %rdi
callq 0xd491
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 0x2e261
testl %ecx, %ecx
jne 0x2e343
movq %rax, %rdi
callq 0x1e79d
jmp 0x2e279
movq %rax, %rdi
callq 0x1e7e4
movq %rax, %rdi
callq 0x2a325
movq %rax, %rdi
callq 0x2a221
movq %rax, %r14
leaq -0x58(%rbp), %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x24ee3
movq %rax, %r15
movq (%r12), %r12
movq 0x48(%r12), %rdi
andq %rdi, %r13
sete %al
testb $0x3, %dil
setne %cl
orb %al, %cl
jne 0x2e2af
incl (%r13)
leaq 0xdab02(%rip), %rdx     # 0x108db8
leaq 0xb73(%rip), %rcx       # 0x2ee30
movq %rbx, %rsi
callq 0x24c61
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 0x10de313(%rip), %rdx   # 0x110c618
testq %rdx, %rdx
jne 0x2e323
leaq 0xaa6fe(%rip), %rdi     # 0xd8a0f
pushq $0xd
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10de2f5(%rip)   # 0x110c618
andq %rdx, %r13
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x2e337
incl (%r13)
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x246fe
leaq 0xa64c3(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6