// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_elabzemodulezeheaderzx
static uint64_t mw_mirth_elab_elabzemodulezeheaderzx (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* v7;
	uint64_t v8 = mw_mirth_token_Token_module(in_zaMirth_1, in_Token_2, &v7);
	struct mirth_mirth_zaMirth* v9;
	struct mirth_elab_ModuleHeader* v10;
	uint64_t v11 = mw_mirth_elab_parsezemodulezeheaderzx(v7, in_Token_2, &v9, &v10);
	struct std_maybe_Maybe_1 v12;
	uint64_t v13;
	uint64_t v14;
	uint64_t v15;
	struct std_list_List_1 v16;
	mtp_mirth_elab_ModuleHeader_ModuleHeader(v10, &v12, &v13, &v14, &v15, &v16);
	struct mirth_mirth_zaMirth* v17;
	mw_mirth_module_Module_namezx(v9, v14, v8, &v17);
	struct mirth_mirth_zaMirth* v18;
	mw_mirth_module_Module_doczx(v17, v12, v8, &v18);
	struct mirth_mirth_zaMirth* v19;
	mw_mirth_module_Module_packagezx(v18, v13, v8, &v19);
	struct mirth_mirth_zaMirth* v20;
	struct mirth_name_QName* v21 = mw_mirth_module_Module_qname(v19, v8, &v20);
	struct mirth_mirth_zaMirth* v22;
	bool v23 = mw_mirth_name_QName_definedzesoftzy(v20, v21, &v22);
	struct mirth_mirth_zaMirth* branch_zaMirth_24;
	uint64_t branch_Token_25;
	if (v23) {
		STR* v26;
		STRLIT(v26, "Module name already taken.", 26);
		mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v22, v15, v26);
	} else {
		branch_Token_25 = v15;
		branch_zaMirth_24 = v22;
	}
	struct mirth_mirth_zaMirth* v28;
	mw_mirth_module_Module_headzx(branch_zaMirth_24, branch_Token_25, v8, &v28);
	struct mirth_def_Def v29 = mtw_mirth_def_Def_Module(v8);
	struct mirth_mirth_zaMirth* v30;
	mw_mirth_def_Def_register(v28, v29, &v30);
	struct mirth_mirth_zaMirth* v31;
	mw_mirth_elab_checkzemodulezepath(v30, v11, v8, &v31);
	bool v32 = true;
	struct mirth_mirth_zaMirth* r33 = v31;
	struct std_list_List_1 v34 = v16;
	bool v35 = v32;
	bool v36 = v32;
	while (v36) {
		struct mirth_mirth_zaMirth* r37 = r33;
		struct std_list_List_1 v38 = v34;
		bool v39 = v35;
		struct mirth_mirth_zaMirth* branch_zaMirth_40;
		struct std_list_List_1 branch_List_41;
		bool branch_Bool_42;
		switch ((v38).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v43;
				VAL v44 = mtp_std_list_List_1_Cons(v38, &v43);
				struct mirth_mirth_zaMirth* v45;
				mw_mirth_elab_processzemodulezeimportzx(r37, V_mirth_token_Token(v44), &v45);
				bool v46 = true;
				branch_Bool_42 = v46;
				branch_List_41 = v43;
				branch_zaMirth_40 = v45;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v47 = { .tag=std_list_List_1_Nil };
				bool v48 = false;
				branch_Bool_42 = v48;
				branch_List_41 = v47;
				branch_zaMirth_40 = r37;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v36 = branch_Bool_42;
		v35 = branch_Bool_42;
		v34 = branch_List_41;
		r33 = branch_zaMirth_40;
	}
	decref(MK_std_list_List_1(v34));
	*out_zaMirth_3 = r33;
	return v11;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x614c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x1e89d0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x60(%rbp), %rcx
leaq -0x68(%rbp), %r8
leaq -0x78(%rbp), %r9
callq 0x1e9260
movq -0x30(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq 0x64a00
movq -0x80(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl -0x50(%rbp), %esi
movq -0x48(%rbp), %rdx
leaq -0x88(%rbp), %r8
callq 0x64a70
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq 0x64990
movq -0x90(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x454e0
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0xa5900
andb $0x1, %al
movb %al, -0xa9(%rbp)
testb $0x1, -0xa9(%rbp)
je 0x1e862e
jmp 0x1e850c
cmpq $0x0, 0x11ae344(%rip)   # 0x1396858
jne 0x1e852e
leaq 0x1742f6(%rip), %rdi    # 0x35c813
movl $0x1a, %esi
callq 0xb6c0
movq %rax, 0x11ae32a(%rip)   # 0x1396858
jmp 0x1e8530
movq 0x11ae321(%rip), %rax   # 0x1396858
movq %rax, -0xd8(%rbp)
leaq 0x1a8c13(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1e8605
movq 0x11ae2ec(%rip), %rax   # 0x1396858
movq %rax, -0xe8(%rbp)
leaq 0x1a8bde(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xe0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xe8(%rbp), %rax
cmpq $0x0, %rax
je 0x1e8605
movq 0x11ae2b5(%rip), %rax   # 0x1396858
movq %rax, -0xf8(%rbp)
leaq 0x1a8ba7(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xf0(%rbp)
movq -0xf8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1e8605
movq 0x11ae284(%rip), %rax   # 0x1396858
movq %rax, -0x108(%rbp)
leaq 0x1a8b76(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x100(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x108(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1e8607
movq 0x11ae24a(%rip), %rax   # 0x1396858
movq %rax, -0xc8(%rbp)
movq -0xa8(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0xc8(%rbp), %rdx
callq 0x76b70
jmp 0x1e8647
movq -0x68(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x110(%rbp), %rcx
callq 0x1e9480
movq -0x28(%rbp), %rdi
callq 0x64ae0
movl %eax, -0x120(%rbp)
movq %rdx, -0x118(%rbp)
movq -0x110(%rbp), %rdi
movl -0x120(%rbp), %esi
movq -0x118(%rbp), %rdx
leaq -0x128(%rbp), %rcx
callq 0x3f300
movq -0x128(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x130(%rbp), %rcx
callq 0x1e94f0
movb $0x1, -0x131(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x148(%rbp)
movb -0x131(%rbp), %al
andb $0x1, %al
movb %al, -0x151(%rbp)
movb -0x131(%rbp), %al
andb $0x1, %al
movb %al, -0x152(%rbp)
testb $0x1, -0x152(%rbp)
je 0x1e8895
movq -0x140(%rbp), %rax
movq %rax, -0x160(%rbp)
movups -0x150(%rbp), %xmm0
movaps %xmm0, -0x170(%rbp)
movb -0x151(%rbp), %al
andb $0x1, %al
movb %al, -0x171(%rbp)
movl -0x170(%rbp), %eax
movl %eax, -0x234(%rbp)
testl %eax, %eax
je 0x1e87dd
jmp 0x1e874a
movl -0x234(%rbp), %eax
subl $0x1, %eax
jne 0x1e8831
jmp 0x1e875b
movl -0x170(%rbp), %edi
movq -0x168(%rbp), %rsi
leaq -0x1a8(%rbp), %rdx
callq 0x125e0
movq %rax, -0x1b8(%rbp)
movq %rdx, -0x1b0(%rbp)
movq -0x160(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
leaq -0x1c0(%rbp), %rdx
callq 0x1eb760
movb $0x1, -0x1c1(%rbp)
movb -0x1c1(%rbp), %al
andb $0x1, %al
movb %al, -0x191(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x1c0(%rbp), %rax
movq %rax, -0x180(%rbp)
jmp 0x1e884a
leaq -0x1d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movb $0x0, -0x1d9(%rbp)
movb -0x1d9(%rbp), %al
andb $0x1, %al
movb %al, -0x191(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x180(%rbp)
jmp 0x1e884a
leaq 0x16b649(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movb -0x191(%rbp), %al
andb $0x1, %al
movb %al, -0x152(%rbp)
movb -0x191(%rbp), %al
andb $0x1, %al
movb %al, -0x151(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x140(%rbp)
jmp 0x1e86fd
jmp 0x1e8897
movl -0x150(%rbp), %edi
movq -0x148(%rbp), %rsi
callq 0x12780
movq %rax, -0x1f0(%rbp)
movq %rdx, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1e89aa
movl -0x150(%rbp), %edi
movq -0x148(%rbp), %rsi
callq 0x12780
movq %rax, -0x200(%rbp)
movq %rdx, -0x1f8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x200(%rbp), %rax
cmpq $0x0, %rax
je 0x1e89aa
movl -0x150(%rbp), %edi
movq -0x148(%rbp), %rsi
callq 0x12780
movq %rax, -0x210(%rbp)
movq %rdx, -0x208(%rbp)
movq -0x210(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1e89aa
movl -0x150(%rbp), %edi
movq -0x148(%rbp), %rsi
callq 0x12780
movq %rax, -0x220(%rbp)
movq %rdx, -0x218(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x220(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1e89a8
movl -0x150(%rbp), %edi
movq -0x148(%rbp), %rsi
callq 0x12780
movq %rax, -0x230(%rbp)
movq %rdx, -0x228(%rbp)
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0x127c0
jmp 0x1e89aa
jmp 0x1e89ac
movq -0x140(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw (%rax,%rax)