// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_def_Def_aszenamespacezy
static struct std_maybe_Maybe_1 mw_mirth_def_Def_aszenamespacezy (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_def_Def in_Def_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_Def_2).tag) {
		case mirth_def_Def_Alias: {
			uint64_t v7 = mtp_mirth_def_Def_Alias(in_Def_2);
			void* v8 = field_mut(&mfld_mirth_alias_Alias_zttarget, v7);
			struct mirth_mirth_zaMirth* v9;
			struct std_maybe_Maybe_1 v10 = mw_mirth_mirth_Prop_1_tryzeforcezx(in_zaMirth_1, v8, &v9);
			struct mirth_mirth_zaMirth* branch_zaMirth_11;
			struct std_maybe_Maybe_1 branch_Maybe_12;
			switch ((v10).tag) {
				case std_maybe_Maybe_1_Some: {
					VAL v13 = mtp_std_maybe_Maybe_1_Some(v10);
					struct mirth_mirth_zaMirth* v14;
					struct std_maybe_Maybe_1 v15 = mw_mirth_def_Def_aszenamespacezy(v9, V_mirth_def_Def(v13), &v14);
					branch_Maybe_12 = v15;
					branch_zaMirth_11 = v14;
				} break;
				case std_maybe_Maybe_1_None: {
					struct std_maybe_Maybe_1 v16 = { .tag=std_maybe_Maybe_1_None };
					branch_Maybe_12 = v16;
					branch_zaMirth_11 = v9;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			branch_Maybe_6 = branch_Maybe_12;
			branch_zaMirth_5 = branch_zaMirth_11;
		} break;
		case mirth_def_Def_Package: {
			uint64_t v17 = mtp_mirth_def_Def_Package(in_Def_2);
			struct mirth_name_Namespace v18 = mtw_mirth_name_Namespace_Package(v17);
			struct std_maybe_Maybe_1 v19 = mtw_std_maybe_Maybe_1_Some(MK_mirth_name_Namespace(v18));
			branch_Maybe_6 = v19;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Module: {
			uint64_t v20 = mtp_mirth_def_Def_Module(in_Def_2);
			struct mirth_name_Namespace v21 = mtw_mirth_name_Namespace_Module(v20);
			struct std_maybe_Maybe_1 v22 = mtw_std_maybe_Maybe_1_Some(MK_mirth_name_Namespace(v21));
			branch_Maybe_6 = v22;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Data: {
			uint64_t v23 = mtp_mirth_def_Def_Data(in_Def_2);
			struct mirth_tycon_Tycon v24 = mtw_mirth_tycon_Tycon_Data(v23);
			struct mirth_name_Namespace v25 = mtw_mirth_name_Namespace_Tycon(v24);
			struct std_maybe_Maybe_1 v26 = mtw_std_maybe_Maybe_1_Some(MK_mirth_name_Namespace(v25));
			branch_Maybe_6 = v26;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Table: {
			uint64_t v27 = mtp_mirth_def_Def_Table(in_Def_2);
			struct mirth_tycon_Tycon v28 = mtw_mirth_tycon_Tycon_Table(v27);
			struct mirth_name_Namespace v29 = mtw_mirth_name_Namespace_Tycon(v28);
			struct std_maybe_Maybe_1 v30 = mtw_std_maybe_Maybe_1_Some(MK_mirth_name_Namespace(v29));
			branch_Maybe_6 = v30;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Type: {
			uint64_t v31 = mtp_mirth_def_Def_Type(in_Def_2);
			struct mirth_mirth_zaMirth* v32;
			struct mirth_type_Type v33 = mw_mirth_typedef_TypeDef_target(in_zaMirth_1, v31, &v32);
			struct mirth_mirth_zaMirth* v34;
			struct std_maybe_Maybe_1 v35 = mw_mirth_type_Type_tyconzy(v32, v33, &v34);
			struct std_maybe_Maybe_1 branch_Maybe_36;
			switch ((v35).tag) {
				case std_maybe_Maybe_1_Some: {
					VAL v37 = mtp_std_maybe_Maybe_1_Some(v35);
					struct mirth_name_Namespace v38 = mtw_mirth_name_Namespace_Tycon(V_mirth_tycon_Tycon(v37));
					struct std_maybe_Maybe_1 v39 = mtw_std_maybe_Maybe_1_Some(MK_mirth_name_Namespace(v38));
					branch_Maybe_36 = v39;
				} break;
				case std_maybe_Maybe_1_None: {
					struct std_maybe_Maybe_1 v40 = { .tag=std_maybe_Maybe_1_None };
					branch_Maybe_36 = v40;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			branch_Maybe_6 = branch_Maybe_36;
			branch_zaMirth_5 = v34;
		} break;
		case mirth_def_Def_Word: {
			uint64_t v41 = mtp_mirth_def_Def_Word(in_Def_2);
			struct mirth_name_Namespace v42 = mtw_mirth_name_Namespace_Word(v41);
			struct std_maybe_Maybe_1 v43 = mtw_std_maybe_Maybe_1_Some(MK_mirth_name_Namespace(v42));
			branch_Maybe_6 = v43;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		default: {
			decref(MK_mirth_def_Def(in_Def_2));
			struct std_maybe_Maybe_1 v44 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_6 = v44;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
	}
	*out_zaMirth_3 = branch_zaMirth_5;
	return branch_Maybe_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r14
cmpl $0x8, %esi
ja 0x2a413
movl %esi, %eax
leaq 0xa831c(%rip), %rcx     # 0xd26b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, %rdi
callq 0x13ef6
leaq 0x10e2064(%rip), %rdi   # 0x110c418
movq %rax, %rsi
callq 0x12f88
leaq -0x20(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1483b
testl %eax, %eax
je 0x2a5a6
cmpl $0x1, %eax
jne 0x2a5c0
movq %rdx, %rdi
callq 0xd491
movq -0x20(%rbp), %rdi
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
movq %rax, %rsi
shrq $0x30, %rsi
leaq -0x28(%rbp), %r14
movq %r14, %rcx
callq 0x2a377
movl %eax, %r15d
movq (%r14), %r14
jmp 0x2a5af
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rax
sete %cl
testb $0x3, %dl
setne %dil
orb %cl, %dil
jne 0x2a44c
decl (%rax)
jne 0x2a44c
shlq $0x30, %rsi
orq %rdx, %rsi
leaq 0xde348(%rip), %rax     # 0x108789
movq %rsi, %rdi
movq %rax, %rsi
callq 0xce94
xorl %r15d, %r15d
jmp 0x2a5ad
movq %rdx, %rdi
callq 0x140ca
leaq -0x20(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x2a620
movq (%r15), %rdi
leaq -0x28(%rbp), %rcx
movl %eax, %esi
callq 0x2a670
movl %eax, %r15d
testl %eax, %eax
je 0x2a59e
cmpl $0x1, %r15d
jne 0x2a5c0
movq %rdx, %rdi
callq 0xd491
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
andq %rax, %rsi
movq %rax, %rdi
shrq $0x30, %rdi
callq 0x17351
movabsq $0x3000000000000, %rdi  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xde473(%rip), %rsi     # 0x108939
callq 0x8d0c
jmp 0x2a5a0
movq %rdx, %rdi
callq 0x13f68
movq %rax, %rdi
callq 0x17267
movq %rdx, %rdi
btsq $0x31, %rdi
jmp 0x2a552
movq %rdx, %rdi
callq 0x14104
movq %rax, %rdi
callq 0x2aa14
btsq $0x32, %rax
leaq 0xde433(%rip), %rsi     # 0x108939
movq %rax, %rdi
jmp 0x2a559
movq %rdx, %rdi
callq 0x13f13
movq %rax, %rdi
callq 0x147c9
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
addq $0x4, %rdi
jmp 0x2a54f
movq %rdx, %rdi
callq 0x14090
movq %rax, %rdi
callq 0x17308
xorl %edi, %edi
movq %rax, %rsi
callq 0x17351
movabsq $0x3000000000000, %rdi  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xde3e0(%rip), %rsi     # 0x108939
callq 0x8d0c
pushq $0x1
popq %r15
jmp 0x2a5af
movq %rdx, %rdi
callq 0x140ad
movq %rax, %rdi
callq 0x2a5d7
pushq $0x1
popq %r15
movl %r15d, %edi
movq %rax, %rsi
callq 0x17351
movabsq $0x3000000000000, %rdi  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xde3a2(%rip), %rsi     # 0x108939
callq 0x8d0c
jmp 0x2a5af
xorl %edx, %edx
movq -0x28(%rbp), %r14
jmp 0x2a5af
xorl %r15d, %r15d
movq -0x20(%rbp), %r14
xorl %edx, %edx
movq %r14, (%rbx)
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaa246(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6