// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdi, %r14
cmpl $0x8, %esi
ja 0x2cd36
movl %esi, %eax
leaq 0xb1a01(%rip), %rcx     # 0xde6b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2ccd0
movq %rdx, %rdi
callq 0x5030
leaq 0x10e8741(%rip), %rdi   # 0x1115418
movq %r15, %rsi
callq 0x13c85
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1555d
testl %eax, %eax
je 0x2cf19
cmpl $0x1, %eax
jne 0x2cf35
movq %rdx, %rdi
callq 0xd745
movq -0x28(%rbp), %rdi
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
movq %rax, %rsi
shrq $0x30, %rsi
leaq -0x30(%rbp), %r14
movq %r14, %rcx
callq 0x2cc90
movl %eax, %r15d
movq (%r14), %r14
jmp 0x2cf22
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rax
sete %cl
testb $0x3, %dl
setne %dil
orb %cl, %dil
jne 0x2cd6f
decl (%rax)
jne 0x2cd6f
shlq $0x30, %rsi
orq %rdx, %rsi
leaq 0xe4a25(%rip), %rax     # 0x111789
movq %rsi, %rdi
movq %rax, %rsi
callq 0xd13d
xorl %r15d, %r15d
jmp 0x2cf20
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2cd87
movq %rdx, %rdi
callq 0x5030
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
leaq 0x10e8290(%rip), %rdi   # 0x1115028
movq %r15, %rsi
callq 0x13c85
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a6db
movq (%r15), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r12, %rax
leaq -0x28(%rbp), %rcx
movq %rax, %rdx
callq 0x2cfb8
movl %eax, %r15d
testl %eax, %eax
je 0x2cf11
cmpl $0x1, %r15d
jne 0x2cf35
movq %rdx, %rdi
callq 0xd745
andq %rax, %r12
movq %rax, %rdi
shrq $0x30, %rdi
movq %r12, %rsi
callq 0x1947e
movabsq $0x3000000000000, %rdi  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xe4b2b(%rip), %rsi     # 0x111939
callq 0x9353
jmp 0x2cf13
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2ce28
movq %rdx, %rdi
callq 0x5030
movq %r15, %rdi
callq 0x193d8
btsq $0x31, %rax
jmp 0x2ce54
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2ce47
movq %rdx, %rdi
callq 0x5030
movq %r15, %rdi
callq 0x2d3b9
btsq $0x32, %rax
leaq 0xe4ade(%rip), %rsi     # 0x111939
movq %rax, %rdi
jmp 0x2cebe
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2ce70
movq %rdx, %rdi
callq 0x5030
movq %r15, %rdi
callq 0x1550a
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
addq $0x4, %rdi
jmp 0x2ceb4
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2ce98
movq %rdx, %rdi
callq 0x5030
movq %r15, %rdi
callq 0x1942b
xorl %edi, %edi
movq %rax, %rsi
callq 0x1947e
movabsq $0x3000000000000, %rdi  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xe4a7b(%rip), %rsi     # 0x111939
callq 0x9353
movl $0x1, %r15d
jmp 0x2cf22
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x2cedb
movq %rdx, %rdi
callq 0x5030
movq %r15, %rdi
callq 0x2cf65
movl $0x1, %r15d
movl $0x1, %edi
movq %rax, %rsi
callq 0x1947e
movabsq $0x3000000000000, %rdi  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xe4a2f(%rip), %rsi     # 0x111939
callq 0x9353
jmp 0x2cf22
xorl %edx, %edx
movq -0x28(%rbp), %r14
jmp 0x2cf22
xorl %r15d, %r15d
movq -0x28(%rbp), %r14
xorl %edx, %edx
movq %r14, (%rbx)
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xb377f(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xb3784(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302