// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_elabzedeclzx
static uint64_t mw_mirth_elab_elabzedeclzx (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* v7;
	mw_mirth_mirth_zaMirth_errorzetokenzx(in_zaMirth_1, in_Token_2, &v7);
	struct mirth_mirth_zaMirth* v8;
	struct std_maybe_Maybe_1 v9 = mw_mirth_token_Token_namezy(v7, in_Token_2, &v8);
	struct mirth_mirth_zaMirth* v10;
	VAL v11;
	uint64_t v12 = mw_std_maybe_Maybe_1_unwrap_1_sp27(v8, in_Token_2, v9, &v10, &v11);
	struct mirth_mirth_zaMirth* v13;
	struct std_list_List_1 v14 = mw_mirth_name_Name_defs(v10, V_mirth_name_Name(v11), &v13);
	struct std_maybe_Maybe_1 v15 = { .tag=std_maybe_Maybe_1_None };
	bool v16 = true;
	struct mirth_mirth_zaMirth* r17 = v13;
	struct std_maybe_Maybe_1 v18 = v15;
	struct std_list_List_1 v19 = v14;
	bool v20 = v16;
	bool v21 = v16;
	while (v21) {
		struct mirth_mirth_zaMirth* r22 = r17;
		struct std_maybe_Maybe_1 v23 = v18;
		struct std_list_List_1 v24 = v19;
		bool v25 = v20;
		struct std_list_List_1 v26;
		struct std_maybe_Maybe_1 v27 = mw_std_list_List_1_uncons(v24, &v26);
		struct mirth_mirth_zaMirth* branch_zaMirth_28;
		struct std_maybe_Maybe_1 branch_Maybe_29;
		struct std_list_List_1 branch_List_30;
		bool branch_Bool_31;
		switch ((v27).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v32 = mtp_std_maybe_Maybe_1_Some(v27);
				struct std_maybe_Maybe_1 v33 = mw_mirth_def_Def_macrozy(V_mirth_def_Def(v32));
				struct mirth_mirth_zaMirth* branch_zaMirth_34;
				struct std_maybe_Maybe_1 branch_Maybe_35;
				switch ((v33).tag) {
					case std_maybe_Maybe_1_Some: {
						VAL v36 = mtp_std_maybe_Maybe_1_Some(v33);
						struct mirth_mirth_zaMirth* v37;
						struct mirth_macro_MacroAction v38 = mw_mirth_macro_Macro_action(r22, V_mirth_macro_Macro(v36), &v37);
						struct std_maybe_Maybe_1 v39 = mw_mirth_macro_MacroAction_declzy(v38);
						branch_Maybe_35 = v39;
						branch_zaMirth_34 = v37;
					} break;
					case std_maybe_Maybe_1_None: {
						struct std_maybe_Maybe_1 v40 = { .tag=std_maybe_Maybe_1_None };
						branch_Maybe_35 = v40;
						branch_zaMirth_34 = r22;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				struct mirth_mirth_zaMirth* branch_zaMirth_41;
				struct std_maybe_Maybe_1 branch_Maybe_42;
				struct std_list_List_1 branch_List_43;
				switch ((branch_Maybe_35).tag) {
					case std_maybe_Maybe_1_None: {
						branch_List_43 = v26;
						branch_Maybe_42 = v23;
						branch_zaMirth_41 = branch_zaMirth_34;
					} break;
					default: {
						decref(MK_std_list_List_1(v26));
						decref(MK_std_maybe_Maybe_1(v23));
						struct std_list_List_1 v44 = { .tag=std_list_List_1_Nil };
						branch_List_43 = v44;
						branch_Maybe_42 = branch_Maybe_35;
						branch_zaMirth_41 = branch_zaMirth_34;
					} break;
				}
				bool v45 = true;
				branch_Bool_31 = v45;
				branch_List_30 = branch_List_43;
				branch_Maybe_29 = branch_Maybe_42;
				branch_zaMirth_28 = branch_zaMirth_41;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v46 = false;
				branch_Bool_31 = v46;
				branch_List_30 = v26;
				branch_Maybe_29 = v23;
				branch_zaMirth_28 = r22;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v21 = branch_Bool_31;
		v20 = branch_Bool_31;
		v19 = branch_List_30;
		v18 = branch_Maybe_29;
		r17 = branch_zaMirth_28;
	}
	decref(MK_std_list_List_1(v19));
	struct mirth_mirth_zaMirth* v47;
	VAL v48;
	uint64_t v49 = mw_std_maybe_Maybe_1_unwrap_1_sp27(r17, v12, v18, &v47, &v48);
	push_resource(MKI64(0));
	push_resource(MK_mirth_mirth_zaMirth(v47));
	push_value(MK_mirth_token_Token(v49));
	run_value(v48);
	uint64_t v50 = V_mirth_token_Token(pop_value());
	struct mirth_mirth_zaMirth* r51 = V_mirth_mirth_zaMirth(pop_resource());
	*out_zaMirth_3 = r51;
	pop_resource();
	return v50;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, -0x60(%rbp)
movq %rsi, %r15
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
callq 0x2df0c
movq (%rbx), %rdi
leaq -0x78(%rbp), %rbx
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2df97
movq %rdx, %rcx
movq (%rbx), %rdi
leaq -0x70(%rbp), %rbx
leaq -0x90(%rbp), %r14
movq %r15, -0x58(%rbp)
movq %r15, %rsi
movl %eax, %edx
movq %rbx, %r8
movq %r14, %r9
callq 0x2dfca
movq (%rbx), %rdi
movq (%r14), %rsi
leaq -0x68(%rbp), %rbx
movq %rbx, %rdx
callq 0x13e13
movl %eax, %edi
movq %rdx, %rsi
movq (%rbx), %r14
movq $0x0, -0x38(%rbp)
movb $0x1, %bl
leaq -0x50(%rbp), %r13
leaq -0x30(%rbp), %r15
movq $0x0, -0x40(%rbp)
testb $0x1, %bl
je 0x2de42
movq %r13, %rdx
callq 0x1075d
testl %eax, %eax
je 0x2dd71
cmpl $0x1, %eax
jne 0x2def5
movq %rdx, %rdi
callq 0xd491
movq %rax, %rdi
shrq $0x30, %rdi
andq %r12, %rax
movq %rax, %rsi
callq 0x2d3cb
cmpl $0x1, %eax
jne 0x2dd63
movq %rdx, %rdi
callq 0xd491
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x2e06f
testl %eax, %eax
je 0x2dd7f
movq %rdx, %rcx
andq %r12, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x2dd5f
decl (%rcx)
jne 0x2dd5f
shlq $0x30, %rax
orq %rdx, %rax
movq %rax, %rdi
leaq 0xdb0a7(%rip), %rsi     # 0x108e01
callq 0xce94
movq -0x30(%rbp), %r14
movl -0x50(%rbp), %edi
movb $0x1, %bl
movq -0x48(%rbp), %rsi
jmp 0x2dcd4
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
xorl %ebx, %ebx
jmp 0x2dcd4
movq 0x8(%rdx), %r14
movq 0x10(%rdx), %r15
decl (%rdx)
je 0x2dda9
testb $0x1, %r15b
je 0x2ddb1
movq %r14, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x2ddb1
incl (%rax)
jmp 0x2ddb1
movq %rdx, %rdi
callq 0x5030
movq %r14, %rdi
movq %r15, %rsi
callq 0x8d0c
movq %rdx, %r15
movq -0x30(%rbp), %r14
movq -0x48(%rbp), %rax
movq %rax, %rcx
andq %r12, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2ddf5
movl -0x50(%rbp), %edi
decl (%rcx)
jne 0x2ddf5
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xda489(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x40(%rbp), %rsi
movq %rsi, %rax
andq %r12, %rax
sete %cl
testb $0x3, %sil
setne %dl
movb $0x1, %bl
orb %cl, %dl
jne 0x2de2a
decl (%rax)
jne 0x2de2a
movq -0x38(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xda49c(%rip), %rsi     # 0x1082c1
callq 0xce94
xorl %edi, %edi
pushq $0x1
popq %rax
movq %rax, -0x38(%rbp)
movq %r15, -0x40(%rbp)
xorl %esi, %esi
leaq -0x30(%rbp), %r15
jmp 0x2dcd4
andq %rsi, %r12
sete %al
testb $0x3, %sil
setne %cl
orb %al, %cl
jne 0x2de6c
decl (%r12)
jne 0x2de6c
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xda412(%rip), %rsi     # 0x108279
callq 0xce94
leaq -0x30(%rbp), %r13
leaq -0x50(%rbp), %r15
movq %r14, %rdi
movq -0x58(%rbp), %rbx
movq %rbx, %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq %r13, %r8
movq %r15, %r9
callq 0x2dfca
leaq 0xda220(%rip), %rsi     # 0x1080b8
xorl %edi, %edi
callq 0x883c
movq (%r13), %rdi
leaq 0xdaa46(%rip), %rsi     # 0x1088f0
callq 0x883c
leaq 0xdaf02(%rip), %rsi     # 0x108db8
movq %rbx, %rdi
callq 0xd08e
movq (%r15), %rdi
movq 0x8(%r15), %rsi
callq 0xfad6
callq 0xd3d6
movq %rax, %rbx
callq 0xd429
movq -0x60(%rbp), %rcx
movq %rax, (%rcx)
callq 0xd429
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa6911(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6