// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_name_QName_defzesoftzy
static struct std_maybe_Maybe_1 mw_mirth_name_QName_defzesoftzy (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 = mtw_std_maybe_Maybe_1_Some(MK_mirth_name_QName(in_QName_2));
	struct std_maybe_Maybe_1 v9 = { .tag=std_maybe_Maybe_1_None };
	bool v10 = true;
	struct mirth_mirth_zaMirth* r11 = v6;
	struct std_maybe_Maybe_1 v12 = v8;
	struct std_maybe_Maybe_1 v13 = v9;
	struct std_list_List_1 v14 = v7;
	bool v15 = v10;
	bool v16 = v10;
	while (v16) {
		struct mirth_mirth_zaMirth* r17 = r11;
		struct std_maybe_Maybe_1 v18 = v12;
		struct std_maybe_Maybe_1 v19 = v13;
		struct std_list_List_1 v20 = v14;
		bool v21 = v15;
		struct std_list_List_1 v22;
		struct std_maybe_Maybe_1 v23 = mw_std_list_List_1_uncons(v20, &v22);
		struct mirth_mirth_zaMirth* branch_zaMirth_24;
		struct std_maybe_Maybe_1 branch_Maybe_25;
		struct std_maybe_Maybe_1 branch_Maybe_26;
		struct std_list_List_1 branch_List_27;
		bool branch_Bool_28;
		switch ((v23).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v29 = mtp_std_maybe_Maybe_1_Some(v23);
				incref(v29);
				incref(MK_std_maybe_Maybe_1(v18));
				struct mirth_mirth_zaMirth* v30;
				struct std_maybe_Maybe_1 v31 = mw_mirth_def_Def_qnamezesoft(r17, V_mirth_def_Def(v29), &v30);
				struct mirth_mirth_zaMirth* branch_zaMirth_32;
				bool branch_Bool_33;
				switch ((v31).tag) {
					case std_maybe_Maybe_1_None: {
						int64_t v34 = (v18).tag;
						decref(MK_std_maybe_Maybe_1(v18));
						INT v35 = WRAP_I63(0LL);
						INT v36 = v35;
						INT v37 = i64_to_int(v34);
						bool v38 = int_eq(v37, v36);
						branch_Bool_33 = v38;
						branch_zaMirth_32 = v30;
					} break;
					case std_maybe_Maybe_1_Some: {
						VAL v39 = mtp_std_maybe_Maybe_1_Some(v31);
						struct mirth_mirth_zaMirth* branch_zaMirth_40;
						bool branch_Bool_41;
						switch ((v18).tag) {
							case std_maybe_Maybe_1_Some: {
								VAL v42 = mtp_std_maybe_Maybe_1_Some(v18);
								struct mirth_mirth_zaMirth* v43;
								bool v44 = mw_mirth_name_QName_zd(v30, V_mirth_name_QName(v42), V_mirth_name_QName(v39), &v43);
								branch_Bool_41 = v44;
								branch_zaMirth_40 = v43;
							} break;
							case std_maybe_Maybe_1_None: {
								decref(v39);
								bool v45 = false;
								branch_Bool_41 = v45;
								branch_zaMirth_40 = v30;
							} break;
							default: {
								do_panic(str_make("unexpected fallthrough in match\n", 32));
							}
						}
						branch_Bool_33 = branch_Bool_41;
						branch_zaMirth_32 = branch_zaMirth_40;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				struct mirth_mirth_zaMirth* branch_zaMirth_46;
				struct std_maybe_Maybe_1 branch_Maybe_47;
				struct std_maybe_Maybe_1 branch_Maybe_48;
				if (branch_Bool_33) {
					struct std_maybe_Maybe_1 v49 = mtw_std_maybe_Maybe_1_Some(v29);
					branch_Maybe_48 = v49;
					branch_Maybe_47 = v18;
					branch_zaMirth_46 = branch_zaMirth_32;
				} else {
					decref(v29);
					struct std_maybe_Maybe_1 v50 = { .tag=std_maybe_Maybe_1_None };
					branch_Maybe_48 = v50;
					branch_Maybe_47 = v18;
					branch_zaMirth_46 = branch_zaMirth_32;
				}
				struct mirth_mirth_zaMirth* branch_zaMirth_51;
				struct std_maybe_Maybe_1 branch_Maybe_52;
				struct std_maybe_Maybe_1 branch_Maybe_53;
				struct std_list_List_1 branch_List_54;
				switch ((branch_Maybe_48).tag) {
					case std_maybe_Maybe_1_None: {
						branch_List_54 = v22;
						branch_Maybe_53 = v19;
						branch_Maybe_52 = branch_Maybe_47;
						branch_zaMirth_51 = branch_zaMirth_46;
					} break;
					default: {
						decref(MK_std_list_List_1(v22));
						decref(MK_std_maybe_Maybe_1(v19));
						struct std_list_List_1 v55 = { .tag=std_list_List_1_Nil };
						branch_List_54 = v55;
						branch_Maybe_53 = branch_Maybe_48;
						branch_Maybe_52 = branch_Maybe_47;
						branch_zaMirth_51 = branch_zaMirth_46;
					} break;
				}
				bool v56 = true;
				branch_Bool_28 = v56;
				branch_List_27 = branch_List_54;
				branch_Maybe_26 = branch_Maybe_53;
				branch_Maybe_25 = branch_Maybe_52;
				branch_zaMirth_24 = branch_zaMirth_51;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v57 = false;
				branch_Bool_28 = v57;
				branch_List_27 = v22;
				branch_Maybe_26 = v19;
				branch_Maybe_25 = v18;
				branch_zaMirth_24 = r17;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v16 = branch_Bool_28;
		v15 = branch_Bool_28;
		v14 = branch_List_27;
		v13 = branch_Maybe_26;
		v12 = branch_Maybe_25;
		r11 = branch_zaMirth_24;
	}
	decref(MK_std_list_List_1(v14));
	decref(MK_std_maybe_Maybe_1(v12));
	*out_zaMirth_3 = r11;
	return v13;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %r15
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
leaq 0xf1379(%rip), %rbx     # 0x108741
movq %rsi, %rax
andq %rcx, %rax
setne %cl
testb $0x3, %r14b
sete %sil
testb %sil, %cl
movq %rdx, -0x70(%rbp)
je 0x173f8
movq 0x18(%r14), %r12
cmpl $0x0, (%rax)
jne 0x173fc
movq %r14, %rdi
movq %rbx, %rsi
callq 0xce94
jmp 0x173fc
movq 0x18(%r14), %r12
leaq -0x88(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %rdx, %r12
callq 0x13e13
movl %eax, %r13d
movq %rdx, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d0c
movq (%r12), %r14
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
leaq 0x4(%rcx), %rax
orq %rdx, %rax
movq %rax, -0x60(%rbp)
movq %rdx, %rax
andq %rcx, %rax
movq %rax, -0x48(%rbp)
setne %al
movq %rdx, -0x78(%rbp)
testb $0x3, %dl
sete %cl
andb %al, %cl
movb %cl, -0x29(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x1, %al
leaq -0x58(%rbp), %rbx
movq $0x0, -0x40(%rbp)
testb $0x1, %al
je 0x1763f
movl %r13d, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1075d
testl %eax, %eax
je 0x17536
cmpl $0x1, %eax
jne 0x176b0
movq %rdx, %rdi
callq 0xd491
movq %rax, %r12
movq %rdx, %r13
movq %rax, %r15
testb $0x1, %r13b
je 0x174cb
movq %r12, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x174cb
incl (%rax)
cmpb $0x0, -0x29(%rbp)
je 0x174d7
movq -0x48(%rbp), %rax
incl (%rax)
movq %r12, %rsi
shrq $0x30, %rsi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r12
movq %r14, %rdi
movq %r12, %rdx
leaq -0x68(%rbp), %rcx
callq 0x139a1
cmpl $0x1, %eax
je 0x17545
testl %eax, %eax
jne 0x176b0
cmpb $0x0, -0x29(%rbp)
je 0x17525
movq -0x48(%rbp), %rax
decl (%rax)
jne 0x17525
movq -0x60(%rbp), %rdi
leaq 0xf0da1(%rip), %rsi     # 0x1082c1
callq 0xce94
pushq $0x3
popq %rdi
pushq $0x1
popq %rsi
callq 0xd759
movq -0x68(%rbp), %r14
jmp 0x17570
movl -0x58(%rbp), %r13d
movq -0x50(%rbp), %r15
xorl %eax, %eax
jmp 0x1746d
movq %rdx, %rdi
callq 0xd491
movq %rax, %r14
movq -0x78(%rbp), %rdi
callq 0xd491
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movq %r14, %rdx
leaq -0x80(%rbp), %rcx
callq 0x176c7
movq -0x80(%rbp), %r14
testb %al, %al
je 0x17608
movq %r15, %rdi
movq %r13, %rsi
callq 0x8d0c
movq %rdx, %r15
movq -0x50(%rbp), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
andq %r12, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x175c2
movl -0x58(%rbp), %edi
decl (%rcx)
jne 0x175c2
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xf0cbc(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x40(%rbp), %rsi
movq %rsi, %rax
andq %r12, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x175f5
decl (%rax)
jne 0x175f5
movq -0x38(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xf0cd1(%rip), %rsi     # 0x1082c1
callq 0xce94
xorl %r13d, %r13d
pushq $0x1
popq %rax
movq %rax, -0x38(%rbp)
movq %r15, -0x40(%rbp)
xorl %r15d, %r15d
jmp 0x17638
testb $0x1, %r13b
je 0x17630
testq %r12, %r12
sete %al
testb $0x3, %r15b
setne %cl
orb %al, %cl
jne 0x17630
decl (%r12)
jne 0x17630
movq %r15, %rdi
movq %r13, %rsi
callq 0xce94
movl -0x58(%rbp), %r13d
movq -0x50(%rbp), %r15
movb $0x1, %al
jmp 0x1746d
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %r15, %rdx
sete %al
testb $0x3, %r15b
setne %cl
orb %al, %cl
jne 0x17674
decl (%rdx)
jne 0x17674
shlq $0x30, %r13
orq %r15, %r13
movq %r13, %rdi
leaq 0xf0c0a(%rip), %rsi     # 0x108279
callq 0xce94
cmpb $0x0, -0x29(%rbp)
je 0x17692
movq -0x48(%rbp), %rax
decl (%rax)
jne 0x17692
movq -0x60(%rbp), %rdi
leaq 0xf0c34(%rip), %rsi     # 0x1082c1
callq 0xce94
movq -0x70(%rbp), %rax
movq %r14, (%rax)
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbd156(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6