// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_parsezemodulezeheaderzx
static uint64_t mw_mirth_elab_parsezemodulezeheaderzx (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct mirth_mirth_zaMirth* *out_zaMirth_3, struct mirth_elab_ModuleHeader* *out_ModuleHeader_5) {
	struct mirth_mirth_zaMirth* v6;
	struct std_maybe_Maybe_1 v7 = mw_mirth_token_Token_doc(in_zaMirth_1, in_Token_2, &v6);
	struct mirth_mirth_zaMirth* v8;
	mw_mirth_mirth_zaMirth_errorzetokenzx(v6, in_Token_2, &v8);
	struct mirth_mirth_zaMirth* v9;
	bool v10 = mw_mirth_token_Token_modulezeheaderzy(v8, in_Token_2, &v9);
	struct mirth_mirth_zaMirth* branch_zaMirth_11;
	uint64_t branch_Token_12;
	if (v10) {
		branch_Token_12 = in_Token_2;
		branch_zaMirth_11 = v9;
	} else {
		STR* v13;
		STRLIT(v13, "Expected module header.", 23);
		mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v9, in_Token_2, v13);
	}
	struct mirth_mirth_zaMirth* v16;
	INT v17 = mw_mirth_token_Token_numzeargs(branch_zaMirth_11, branch_Token_12, &v16);
	INT v18 = WRAP_I63(0LL);
	INT v19 = v17;
	INT v20 = v18;
	bool v21 = int_lt(v20, v19);
	struct std_maybe_Maybe_1 branch_Maybe_22;
	uint64_t branch_Token_23;
	uint64_t branch_Name_24;
	uint64_t branch_Package_25;
	uint64_t branch_Token_26;
	struct mirth_mirth_zaMirth* branch_zaMirth_27;
	if (v21) {
		struct mirth_mirth_zaMirth* v28;
		uint64_t v29 = mw_mirth_token_Token_next(v16, branch_Token_12, &v28);
		struct mirth_mirth_zaMirth* v30;
		uint64_t v31 = mw_mirth_token_Token_argsze1(v28, branch_Token_12, &v30);
		struct mirth_mirth_zaMirth* v32;
		uint64_t v33;
		uint64_t v34 = mw_mirth_elab_parsezemodulezepackagezenamezx(v30, v31, &v32, &v33);
		struct mirth_mirth_zaMirth* v35;
		uint64_t v36 = mw_mirth_token_Token_next(v32, v31, &v35);
		struct mirth_mirth_zaMirth* v37;
		bool v38 = mw_mirth_token_Token_argzeendzy(v35, v36, &v37);
		struct mirth_mirth_zaMirth* branch_zaMirth_39;
		uint64_t branch_Token_40;
		if (v38) {
			branch_Token_40 = v36;
			branch_zaMirth_39 = v37;
		} else {
			STR* v41;
			STRLIT(v41, "Expected end of argument.", 25);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v37, v36, v41);
		}
		branch_zaMirth_27 = branch_zaMirth_39;
		branch_Token_26 = v31;
		branch_Package_25 = v34;
		branch_Name_24 = v33;
		branch_Token_23 = v29;
		branch_Maybe_22 = v7;
	} else {
		struct mirth_mirth_zaMirth* v44;
		uint64_t v45 = mw_mirth_token_Token_succ(v16, branch_Token_12, &v44);
		struct mirth_mirth_zaMirth* v46;
		uint64_t v47;
		uint64_t v48 = mw_mirth_elab_parsezemodulezepackagezenamezx(v44, v45, &v46, &v47);
		struct mirth_mirth_zaMirth* v49;
		uint64_t v50 = mw_mirth_token_Token_next(v46, v45, &v49);
		branch_zaMirth_27 = v49;
		branch_Token_26 = v45;
		branch_Package_25 = v48;
		branch_Name_24 = v47;
		branch_Token_23 = v50;
		branch_Maybe_22 = v7;
	}
	struct std_list_List_1 v51 = { .tag=std_list_List_1_Nil };
	struct mirth_mirth_zaMirth* v52;
	bool v53 = mw_mirth_token_Token_modulezeimportzy(branch_zaMirth_27, branch_Token_23, &v52);
	struct std_maybe_Maybe_1 v54 = branch_Maybe_22;
	uint64_t v55 = branch_Name_24;
	uint64_t v56 = branch_Package_25;
	uint64_t v57 = branch_Token_26;
	struct std_list_List_1 v58 = v51;
	uint64_t v59 = branch_Token_23;
	struct mirth_mirth_zaMirth* r60 = v52;
	bool v61 = v53;
	while (v61) {
		struct std_maybe_Maybe_1 v62 = v54;
		uint64_t v63 = v55;
		uint64_t v64 = v56;
		uint64_t v65 = v57;
		struct std_list_List_1 v66 = v58;
		uint64_t v67 = v59;
		struct mirth_mirth_zaMirth* r68 = r60;
		struct mirth_mirth_zaMirth* v69;
		uint64_t v70;
		uint64_t v71 = mw_mirth_elab_parsezemodulezeimport(r68, v67, &v69, &v70);
		struct std_list_List_1 v72 = mw_std_list_List_1_cons(MK_mirth_token_Token(v70), v66);
		struct mirth_mirth_zaMirth* v73;
		bool v74 = mw_mirth_token_Token_modulezeimportzy(v69, v71, &v73);
		v61 = v74;
		r60 = v73;
		v59 = v71;
		v58 = v72;
		v57 = v65;
		v56 = v64;
		v55 = v63;
		v54 = v62;
	}
	struct std_list_List_1 v75 = mw_std_list_List_1_reverse(v58);
	struct mirth_mirth_zaMirth* v76;
	bool v77 = mw_mirth_token_Token_sigzedasheszy(r60, v59, &v76);
	struct mirth_mirth_zaMirth* branch_zaMirth_78;
	uint64_t branch_Token_79;
	if (v77) {
		struct mirth_mirth_zaMirth* v80;
		uint64_t v81 = mw_mirth_token_Token_succ(v76, v59, &v80);
		branch_Token_79 = v81;
		branch_zaMirth_78 = v80;
	} else {
		branch_Token_79 = v59;
		branch_zaMirth_78 = v76;
	}
	struct mirth_elab_ModuleHeader* v82 = mtw_mirth_elab_ModuleHeader_ModuleHeader(v54, v56, v55, v57, v75);
	*out_ModuleHeader_5 = v82;
	*out_zaMirth_3 = branch_zaMirth_78;
	return branch_Token_79;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0xa3eb0
movl %eax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x9fa30
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x1ebfc0
andb $0x1, %al
movb %al, -0x49(%rbp)
testb $0x1, -0x49(%rbp)
je 0x1e8a45
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1e8b52
jmp 0x1e8a47
cmpq $0x0, 0x11ade11(%rip)   # 0x1396860
jne 0x1e8a69
leaq 0x173dd6(%rip), %rdi    # 0x35c82e
movl $0x17, %esi
callq 0xb6c0
movq %rax, 0x11addf7(%rip)   # 0x1396860
jmp 0x1e8a6b
movq 0x11addee(%rip), %rax   # 0x1396860
movq %rax, -0x78(%rbp)
leaq 0x1a86db(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1e8b34
movq 0x11addc2(%rip), %rax   # 0x1396860
movq %rax, -0x88(%rbp)
leaq 0x1a86ac(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x80(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x1e8b34
movq 0x11add8e(%rip), %rax   # 0x1396860
movq %rax, -0x98(%rbp)
leaq 0x1a8678(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1e8b34
movq 0x11add5d(%rip), %rax   # 0x1396860
movq %rax, -0xa8(%rbp)
leaq 0x1a8647(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xa0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xa8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1e8b36
movq 0x11add23(%rip), %rax   # 0x1396860
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x76b70
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x78f50
movq %rax, -0xb8(%rbp)
movq 0x185edc(%rip), %rax    # 0x36ea50
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0xae20
andb $0x1, %al
movb %al, -0xd1(%rbp)
testb $0x1, -0xd1(%rbp)
je 0x1e8e16
movq -0xb0(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0x7b380
movq %rax, -0x120(%rbp)
movq -0x118(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0xa8660
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rsi
leaq -0x138(%rbp), %rdx
leaq -0x140(%rbp), %rcx
callq 0x1ec020
movq %rax, -0x148(%rbp)
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x7b380
movq %rax, -0x158(%rbp)
movq -0x150(%rbp), %rdi
movq -0x158(%rbp), %rsi
leaq -0x160(%rbp), %rdx
callq 0x7b320
andb $0x1, %al
movb %al, -0x161(%rbp)
testb $0x1, -0x161(%rbp)
je 0x1e8c90
movq -0x158(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
jmp 0x1e8db5
jmp 0x1e8c92
cmpq $0x0, 0x11adbce(%rip)   # 0x1396868
jne 0x1e8cb4
leaq 0x173ba3(%rip), %rdi    # 0x35c846
movl $0x19, %esi
callq 0xb6c0
movq %rax, 0x11adbb4(%rip)   # 0x1396868
jmp 0x1e8cb6
movq 0x11adbab(%rip), %rax   # 0x1396868
movq %rax, -0x190(%rbp)
leaq 0x1a848d(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1e8d8b
movq 0x11adb76(%rip), %rax   # 0x1396868
movq %rax, -0x1a0(%rbp)
leaq 0x1a8458(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x198(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x1a0(%rbp), %rax
cmpq $0x0, %rax
je 0x1e8d8b
movq 0x11adb3f(%rip), %rax   # 0x1396868
movq %rax, -0x1b0(%rbp)
leaq 0x1a8421(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x1a8(%rbp)
movq -0x1b0(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1e8d8b
movq 0x11adb0e(%rip), %rax   # 0x1396868
movq %rax, -0x1c0(%rbp)
leaq 0x1a83f0(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x1b8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x1c0(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1e8d8d
movq 0x11adad4(%rip), %rax   # 0x1396868
movq %rax, -0x180(%rbp)
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x180(%rbp), %rdx
callq 0x76b70
movq -0x170(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0x1e8ed9
movq -0xb0(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
callq 0x78490
movq %rax, -0x1d0(%rbp)
movq -0x1c8(%rbp), %rdi
movq -0x1d0(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x1e0(%rbp), %rcx
callq 0x1ec020
movq %rax, -0x1e8(%rbp)
movq -0x1d8(%rbp), %rdi
movq -0x1d0(%rbp), %rsi
leaq -0x1f0(%rbp), %rdx
callq 0x7b380
movq %rax, -0x1f8(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x1e0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0x208(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x110(%rbp), %rdi
movq -0xf0(%rbp), %rsi
leaq -0x210(%rbp), %rdx
callq 0x1eca50
andb $0x1, %al
movb %al, -0x211(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x208(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x200(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x210(%rbp), %rax
movq %rax, -0x260(%rbp)
movb -0x211(%rbp), %al
andb $0x1, %al
movb %al, -0x261(%rbp)
testb $0x1, -0x261(%rbp)
je 0x1e9149
movq -0x228(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x230(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x250(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x258(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0x260(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x2b0(%rbp), %rdi
movq -0x2a8(%rbp), %rsi
leaq -0x2b8(%rbp), %rdx
leaq -0x2c0(%rbp), %rcx
callq 0x1ecab0
movq %rax, -0x2c8(%rbp)
movq -0x2c0(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq 0x1a8de6(%rip), %rax    # 0x391e48
movq %rax, -0x2e0(%rbp)
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rsi
movl -0x2a0(%rbp), %edx
movq -0x298(%rbp), %rcx
callq 0x12740
movl %eax, -0x2d8(%rbp)
movq %rdx, -0x2d0(%rbp)
movq -0x2b8(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
leaq -0x2f0(%rbp), %rdx
callq 0x1eca50
andb $0x1, %al
movb %al, -0x2f1(%rbp)
movb -0x2f1(%rbp), %al
andb $0x1, %al
movb %al, -0x261(%rbp)
movq -0x2f0(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x2d8(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x2d0(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x288(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x278(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x270(%rbp), %rax
movq %rax, -0x220(%rbp)
jmp 0x1e8f9a
movl -0x250(%rbp), %edi
movq -0x248(%rbp), %rsi
callq 0x122b0
movl %eax, -0x308(%rbp)
movq %rdx, -0x300(%rbp)
movq -0x260(%rbp), %rdi
movq -0x258(%rbp), %rsi
leaq -0x310(%rbp), %rdx
callq 0xaf320
andb $0x1, %al
movb %al, -0x311(%rbp)
testb $0x1, -0x311(%rbp)
je 0x1e91d2
movq -0x310(%rbp), %rdi
movq -0x258(%rbp), %rsi
leaq -0x330(%rbp), %rdx
callq 0x78490
movq %rax, -0x338(%rbp)
movq -0x338(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0x330(%rbp), %rax
movq %rax, -0x320(%rbp)
jmp 0x1e91ee
movq -0x258(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0x310(%rbp), %rax
movq %rax, -0x320(%rbp)
movq -0x238(%rbp), %rdx
movq -0x230(%rbp), %rcx
movq -0x240(%rbp), %r8
movl -0x228(%rbp), %edi
movq -0x220(%rbp), %rsi
leaq -0x308(%rbp), %rax
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x1ecf20
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x320(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x328(%rbp), %rax
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nop