// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_name_Namespace_modulezy
static struct std_maybe_Maybe_1 mw_mirth_name_Namespace_modulezy (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_name_Namespace in_Namespace_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* branch_zaMirth_5;
	struct std_maybe_Maybe_1 branch_Maybe_6;
	switch ((in_Namespace_2).tag) {
		case mirth_name_Namespace_Root: {
			struct std_maybe_Maybe_1 v7 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v7;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_name_Namespace_Package: {
			uint64_t v8 = mtp_mirth_name_Namespace_Package(in_Namespace_2);
			struct std_maybe_Maybe_1 v9 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v9;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_name_Namespace_Module: {
			uint64_t v10 = mtp_mirth_name_Namespace_Module(in_Namespace_2);
			struct std_maybe_Maybe_1 v11 = mtw_std_maybe_Maybe_1_Some(MK_mirth_module_Module(v10));
			branch_Maybe_6 = v11;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_name_Namespace_Tycon: {
			struct mirth_tycon_Tycon v12 = mtp_mirth_name_Namespace_Tycon(in_Namespace_2);
			struct mirth_mirth_zaMirth* v13;
			struct mirth_name_QName* v14 = mw_mirth_tycon_Tycon_qnamezehard(in_zaMirth_1, v12, &v13);
			struct mirth_name_Namespace v15 = v14->mnamespace;
			incref(MK_mirth_name_Namespace(v15));
			decref(MK_mirth_name_QName(v14));
			struct mirth_mirth_zaMirth* v16;
			struct std_maybe_Maybe_1 v17 = mw_mirth_name_Namespace_modulezy(v13, v15, &v16);
			branch_Maybe_6 = v17;
			branch_zaMirth_5 = v16;
		} break;
		case mirth_name_Namespace_Word: {
			uint64_t v18 = mtp_mirth_name_Namespace_Word(in_Namespace_2);
			struct std_maybe_Maybe_1 v19 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v19;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_5;
	return branch_Maybe_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x4, %esi
ja 0x8208f
movq %rcx, %rbx
movl %esi, %eax
movq %rdi, %r14
movl %esi, %ecx
leaq 0x51653(%rip), %rsi     # 0xd3614
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movq %rdx, %rdi
callq 0x17b11
jmp 0x81fdc
movq %rdx, %rdi
callq 0x17c77
xorl %eax, %eax
xorl %edx, %edx
jmp 0x8207f
movq %rdx, %rdi
callq 0x17b2e
leaq 0x87004(%rip), %rsi     # 0x108ff8
movq %rax, %rdi
callq 0x8d0c
pushq $0x1
popq %rax
jmp 0x8207f
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
callq 0x17b4b
leaq -0x28(%rbp), %rcx
movq %r14, %rdi
movl %eax, %esi
callq 0x17ecb
movq %rax, %rdi
movl 0x8(%rax), %r14d
movq 0x10(%rax), %r15
movq %r15, %rcx
andq %r12, %rcx
sete %dl
testb $0x3, %r15b
setne %sil
orb %dl, %sil
jne 0x82044
incl (%rcx)
andq %r12, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x82065
decl (%rax)
jne 0x82065
leaq 0x866e1(%rip), %rsi     # 0x108741
callq 0xce94
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %r12
movl %r14d, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x81f98
movq (%r12), %r14
movq %r14, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x52777(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6