// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_name_QName_defzehardzy
static struct std_maybe_Maybe_1 mw_mirth_name_QName_defzehardzy (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_name_QName* in_QName_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	incref(MK_mirth_name_QName(in_QName_2));
	uint64_t v5 = in_QName_2->mname;
	decref(MK_mirth_name_QName(in_QName_2));
	struct mirth_mirth_zaMirth* v6;
	struct std_list_List_1 v7 = mw_mirth_name_Name_defs(in_zaMirth_1, v5, &v6);
	struct std_maybe_Maybe_1 v8 = { .tag=std_maybe_Maybe_1_None };
	bool v9 = true;
	struct mirth_mirth_zaMirth* r10 = v6;
	struct mirth_name_QName* v11 = in_QName_2;
	struct std_maybe_Maybe_1 v12 = v8;
	struct std_list_List_1 v13 = v7;
	bool v14 = v9;
	bool v15 = v9;
	while (v15) {
		struct mirth_mirth_zaMirth* r16 = r10;
		struct mirth_name_QName* v17 = v11;
		struct std_maybe_Maybe_1 v18 = v12;
		struct std_list_List_1 v19 = v13;
		bool v20 = v14;
		struct std_list_List_1 v21;
		struct std_maybe_Maybe_1 v22 = mw_std_list_List_1_uncons(v19, &v21);
		struct mirth_mirth_zaMirth* branch_zaMirth_23;
		struct mirth_name_QName* branch_QName_24;
		struct std_maybe_Maybe_1 branch_Maybe_25;
		struct std_list_List_1 branch_List_26;
		bool branch_Bool_27;
		switch ((v22).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v28 = mtp_std_maybe_Maybe_1_Some(v22);
				incref(v28);
				incref(MK_mirth_name_QName(v17));
				struct mirth_mirth_zaMirth* v29;
				struct mirth_name_QName* v30 = mw_mirth_def_Def_qnamezehard(r16, V_mirth_def_Def(v28), &v29);
				struct mirth_mirth_zaMirth* v31;
				bool v32 = mw_mirth_name_QName_zd(v29, v17, v30, &v31);
				struct mirth_mirth_zaMirth* branch_zaMirth_33;
				struct mirth_name_QName* branch_QName_34;
				struct std_maybe_Maybe_1 branch_Maybe_35;
				if (v32) {
					struct std_maybe_Maybe_1 v36 = mtw_std_maybe_Maybe_1_Some(v28);
					branch_Maybe_35 = v36;
					branch_QName_34 = v17;
					branch_zaMirth_33 = v31;
				} else {
					decref(v28);
					struct std_maybe_Maybe_1 v37 = { .tag=std_maybe_Maybe_1_None };
					branch_Maybe_35 = v37;
					branch_QName_34 = v17;
					branch_zaMirth_33 = v31;
				}
				struct mirth_mirth_zaMirth* branch_zaMirth_38;
				struct mirth_name_QName* branch_QName_39;
				struct std_maybe_Maybe_1 branch_Maybe_40;
				struct std_list_List_1 branch_List_41;
				switch ((branch_Maybe_35).tag) {
					case std_maybe_Maybe_1_None: {
						branch_List_41 = v21;
						branch_Maybe_40 = v18;
						branch_QName_39 = branch_QName_34;
						branch_zaMirth_38 = branch_zaMirth_33;
					} break;
					default: {
						decref(MK_std_list_List_1(v21));
						decref(MK_std_maybe_Maybe_1(v18));
						struct std_list_List_1 v42 = { .tag=std_list_List_1_Nil };
						branch_List_41 = v42;
						branch_Maybe_40 = branch_Maybe_35;
						branch_QName_39 = branch_QName_34;
						branch_zaMirth_38 = branch_zaMirth_33;
					} break;
				}
				bool v43 = true;
				branch_Bool_27 = v43;
				branch_List_26 = branch_List_41;
				branch_Maybe_25 = branch_Maybe_40;
				branch_QName_24 = branch_QName_39;
				branch_zaMirth_23 = branch_zaMirth_38;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v44 = false;
				branch_Bool_27 = v44;
				branch_List_26 = v21;
				branch_Maybe_25 = v18;
				branch_QName_24 = v17;
				branch_zaMirth_23 = r16;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v15 = branch_Bool_27;
		v14 = branch_Bool_27;
		v13 = branch_List_26;
		v12 = branch_Maybe_25;
		v11 = branch_QName_24;
		r10 = branch_zaMirth_23;
	}
	decref(MK_std_list_List_1(v13));
	decref(MK_mirth_name_QName(v11));
	*out_zaMirth_3 = r10;
	return v12;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x70(%rbp)
movq %rdi, %rbx
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
leaq 0xad51b(%rip), %rcx     # 0x108741
movq %rsi, %rdx
andq %rax, %rdx
setne %al
testb $0x3, %sil
sete %dil
andb %al, %dil
movb %dil, -0x29(%rbp)
movq %rsi, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
je 0x5b25e
movq 0x18(%rsi), %r14
cmpl $0x0, (%rdx)
jne 0x5b262
movq %rsi, %rdi
movq %rcx, %rsi
callq 0xce94
jmp 0x5b262
movq 0x18(%rsi), %r14
leaq -0x80(%rbp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x13e13
movl %eax, %edi
movq %rdx, %rsi
movq (%r12), %r15
movq $0x0, -0x38(%rbp)
movb $0x1, %al
leaq -0x50(%rbp), %rbx
movq $0x0, -0x40(%rbp)
testb $0x1, %al
je 0x5b410
movq %rbx, %rdx
callq 0x1075d
testl %eax, %eax
je 0x5b3c8
cmpl $0x1, %eax
jne 0x5b47e
movq %rdx, %rdi
callq 0xd491
movq %rax, %r12
movq %rdx, %r14
movq %rax, %r13
testb $0x1, %r14b
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
je 0x5b2eb
movq %r12, %rax
andq %rdi, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x5b2eb
incl (%rax)
cmpb $0x0, -0x29(%rbp)
je 0x5b2f7
movq -0x58(%rbp), %rax
incl (%rax)
movq %r12, %rsi
shrq $0x30, %rsi
andq %rdi, %r12
movq %r15, %rdi
movq %r12, %rdx
leaq -0x78(%rbp), %rcx
callq 0x2b1e9
movq -0x78(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
leaq -0x68(%rbp), %rcx
callq 0x176c7
testb %al, %al
je 0x5b3d6
movq %r13, %rdi
movq %r14, %rsi
callq 0x8d0c
movq %rdx, %r14
movq -0x68(%rbp), %r15
movq -0x48(%rbp), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x5b37a
movl -0x50(%rbp), %edi
decl (%rcx)
jne 0x5b37a
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xacf04(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x40(%rbp), %rsi
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x5b3b7
decl (%rax)
jne 0x5b3b7
movq -0x38(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xacf0f(%rip), %rsi     # 0x1082c1
callq 0xce94
xorl %edi, %edi
pushq $0x1
popq %rax
movq %rax, -0x38(%rbp)
movq %r14, -0x40(%rbp)
xorl %esi, %esi
jmp 0x5b409
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
xorl %eax, %eax
jmp 0x5b293
testb $0x1, %r14b
je 0x5b3fe
testq %r12, %r12
sete %al
testb $0x3, %r13b
setne %cl
orb %al, %cl
jne 0x5b3fe
decl (%r12)
jne 0x5b3fe
movq %r13, %rdi
movq %r14, %rsi
callq 0xce94
movq -0x68(%rbp), %r15
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
movb $0x1, %al
jmp 0x5b293
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rsi, %rdx
sete %al
testb $0x3, %sil
setne %cl
orb %al, %cl
jne 0x5b442
decl (%rdx)
jne 0x5b442
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xace3c(%rip), %rsi     # 0x108279
callq 0xce94
cmpb $0x0, -0x29(%rbp)
je 0x5b460
movq -0x58(%rbp), %rax
decl (%rax)
jne 0x5b460
movq -0x60(%rbp), %rdi
leaq 0xad2e6(%rip), %rsi     # 0x108741
callq 0xce94
movq -0x70(%rbp), %rax
movq %r15, (%rax)
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x79388(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6