// File: /workspace/github_c_makefile_star2_O1/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 $0x78, %rsp
movq %rdx, -0x58(%rbp)
movq %rsi, %r12
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
leaq -0x88(%rbp), %r14
movq %r14, %rdx
callq 0x316e2
movq (%r14), %rdi
leaq -0x80(%rbp), %r14
movq %r12, %rsi
movq %r14, %rdx
callq 0x3176f
movq %rdx, %rcx
movq (%r14), %rdi
leaq -0x78(%rbp), %r15
leaq -0x98(%rbp), %r14
movq %r12, -0x50(%rbp)
movq %r12, %rsi
movl %eax, %edx
movq %r15, %r8
movq %r14, %r9
callq 0x317b1
movq (%r15), %rdi
movq (%r14), %rsi
leaq -0x70(%rbp), %r14
movq %r14, %rdx
callq 0x1503c
movl %eax, %edi
movq %rdx, %rsi
movq (%r14), %rax
movq %rax, -0x48(%rbp)
xorl %r14d, %r14d
leaq -0x40(%rbp), %r15
leaq 0x4(%rbx), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x30(%rbp)
movq %r15, %rdx
callq 0x115ef
testl %eax, %eax
je 0x31529
cmpl $0x1, %eax
jne 0x316b2
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %rdi
shrq $0x30, %rdi
andq %rbx, %rax
movq %rax, %rsi
callq 0x30b67
movb $0x1, %r13b
cmpl $0x1, %eax
jne 0x31554
movq %rdx, %rdi
callq 0xdaeb
leaq 0x10e7ed5(%rip), %rdi   # 0x11193b8
movq %rax, %rsi
callq 0x13ff0
movq %rax, %rdi
callq 0x140f0
movq %rax, %rdi
andq %rbx, %rdi
cmpq -0x60(%rbp), %rax
jae 0x31538
movq 0x8(%rdi), %r12
movq 0x10(%rdi), %r15
decl (%rdi)
je 0x3155c
testb $0x1, %r15b
je 0x31561
movq %r12, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x31561
incl (%rax)
jmp 0x31561
movl -0x40(%rbp), %edi
movq -0x38(%rbp), %rsi
xorl %r13d, %r13d
jmp 0x315f9
testq %rdi, %rdi
je 0x31554
decl (%rdi)
jne 0x31554
andq $-0x4, %rax
movq %rax, %rdi
leaq 0xe48b2(%rip), %rsi     # 0x115e01
callq 0xd4e3
xorl %r15d, %r15d
xorl %r12d, %r12d
jmp 0x31578
callq 0x5030
movq %r12, %rdi
movq %r15, %rsi
callq 0x95f6
movq %rdx, %r12
movl $0x1, %r15d
xorl %r13d, %r13d
movl -0x40(%rbp), %edi
testb %r13b, %r13b
je 0x31589
movb $0x1, %r13b
movq -0x38(%rbp), %rsi
jmp 0x315f5
movq -0x38(%rbp), %rax
movq %rax, %rcx
andq %rbx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x315b8
decl (%rcx)
jne 0x315b8
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xe3cc6(%rip), %rsi     # 0x115279
callq 0xd4e3
movq %r14, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
movb $0x1, %r13b
orb %cl, %dl
jne 0x315ea
decl (%rax)
jne 0x315ea
movq -0x30(%rbp), %rdi
shlq $0x30, %rdi
orq %r14, %rdi
leaq 0xe3cdc(%rip), %rsi     # 0x1152c1
callq 0xd4e3
xorl %edi, %edi
movq %r15, -0x30(%rbp)
movq %r12, %r14
xorl %esi, %esi
leaq -0x40(%rbp), %r15
testb %r13b, %r13b
jne 0x31495
andq %rsi, %rbx
sete %al
testb $0x3, %sil
setne %cl
orb %al, %cl
jne 0x3162a
decl (%rbx)
jne 0x3162a
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xe3c54(%rip), %rsi     # 0x115279
callq 0xd4e3
leaq -0x68(%rbp), %r15
leaq -0x40(%rbp), %rbx
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %r12
movq %r12, %rsi
movq -0x30(%rbp), %rdx
movq %r14, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x317b1
leaq 0xe3a62(%rip), %rsi     # 0x1150b8
xorl %edi, %edi
callq 0x9116
movq (%r15), %rdi
leaq 0xe4289(%rip), %rsi     # 0x1158f0
callq 0x9116
leaq 0xe4745(%rip), %rsi     # 0x115db8
movq %r12, %rdi
callq 0xd6f1
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x108e5
callq 0xda3f
movq %rax, %rbx
callq 0xda98
movq -0x58(%rbp), %rcx
movq %rax, (%rcx)
callq 0xda98
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xb3082(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xb3087(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5