// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_namespacezeiszeimportedzeatzetokenzy
static bool mw_mirth_elab_namespacezeiszeimportedzeatzetokenzy (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct mirth_name_Namespace in_Namespace_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	struct mirth_mirth_zaMirth* branch_zaMirth_6;
	bool branch_Bool_7;
	switch ((in_Namespace_3).tag) {
		case mirth_name_Namespace_Root: {
			bool v8 = true;
			branch_Bool_7 = v8;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_name_Namespace_Package: {
			uint64_t v9 = mtp_mirth_name_Namespace_Package(in_Namespace_3);
			bool v10 = true;
			branch_Bool_7 = v10;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_name_Namespace_Module: {
			uint64_t v11 = mtp_mirth_name_Namespace_Module(in_Namespace_3);
			struct mirth_mirth_zaMirth* v12;
			bool v13 = mw_mirth_elab_modulezevisiblezefromzetokenzy(in_zaMirth_1, in_Token_2, v11, &v12);
			branch_Bool_7 = v13;
			branch_zaMirth_6 = v12;
		} break;
		case mirth_name_Namespace_Tycon: {
			struct mirth_tycon_Tycon v14 = mtp_mirth_name_Namespace_Tycon(in_Namespace_3);
			struct mirth_mirth_zaMirth* v15;
			struct mirth_name_QName* v16 = mw_mirth_tycon_Tycon_qnamezehard(in_zaMirth_1, v14, &v15);
			struct mirth_name_Namespace v17 = v16->mnamespace;
			incref(MK_mirth_name_Namespace(v17));
			decref(MK_mirth_name_QName(v16));
			struct mirth_mirth_zaMirth* v18;
			bool v19 = mw_mirth_elab_namespacezeiszeimportedzeatzetokenzy(v15, in_Token_2, v17, &v18);
			branch_Bool_7 = v19;
			branch_zaMirth_6 = v18;
		} break;
		case mirth_name_Namespace_Word: {
			uint64_t v20 = mtp_mirth_name_Namespace_Word(in_Namespace_3);
			bool v21 = false;
			branch_Bool_7 = v21;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_4 = branch_zaMirth_6;
	return branch_Bool_7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x4, %edx
ja 0x2c48b
movq %r8, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb $0x1, %r12b
movl %edx, %eax
leaq 0xa63df(%rip), %rdx     # 0xd278c
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %rcx, %rdi
callq 0x17b11
jmp 0x2c476
movq %rcx, %rdi
callq 0x17c77
xorl %r12d, %r12d
jmp 0x2c476
movq %rcx, %rdi
callq 0x17b2e
leaq -0x30(%rbp), %r13
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %r13, %rcx
callq 0x2c4a2
jmp 0x2c46f
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
movq %rcx, %rdi
callq 0x17b4b
leaq -0x30(%rbp), %rcx
movq %r15, %rdi
movl %eax, %esi
callq 0x17ecb
movq %rax, %rdi
movl 0x8(%rax), %r15d
movq 0x10(%rax), %r12
movq %r12, %rcx
andq %r13, %rcx
sete %dl
testb $0x3, %r12b
setne %sil
orb %dl, %sil
jne 0x2c435
incl (%rcx)
andq %r13, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x2c456
decl (%rax)
jne 0x2c456
leaq 0xdc2f0(%rip), %rsi     # 0x108741
callq 0xce94
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %r13
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x2c37e
movl %eax, %r12d
movq (%r13), %r15
movq %r15, (%rbx)
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa837b(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6