// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_name_QName_climbzeupzenamezy
static struct std_list_List_1 mw_mirth_name_QName_climbzeupzenamezy (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Name_2, struct mirth_name_QName* in_QName_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	incref(MK_mirth_name_QName(in_QName_3));
	uint64_t v6 = in_QName_3->mname;
	decref(MK_mirth_name_QName(in_QName_3));
	uint64_t v7 = in_Name_2;
	uint64_t v8 = v6;
	bool v9 = (v7 == v8);
	struct mirth_mirth_zaMirth* branch_zaMirth_10;
	uint64_t branch_Name_11;
	struct mirth_name_QName* branch_QName_12;
	struct std_list_List_1 branch_List_13;
	if (v9) {
		incref(MK_mirth_name_QName(in_QName_3));
		struct mirth_name_Namespace v14 = in_QName_3->mnamespace;
		incref(MK_mirth_name_Namespace(v14));
		decref(MK_mirth_name_QName(in_QName_3));
		struct std_list_List_1 v15 = { .tag=std_list_List_1_Nil };
		struct std_list_List_1 v16 = mw_std_list_List_1_cons(MK_mirth_name_Namespace(v14), v15);
		branch_List_13 = v16;
		branch_QName_12 = in_QName_3;
		branch_Name_11 = in_Name_2;
		branch_zaMirth_10 = in_zaMirth_1;
	} else {
		struct std_list_List_1 v17 = { .tag=std_list_List_1_Nil };
		branch_List_13 = v17;
		branch_QName_12 = in_QName_3;
		branch_Name_11 = in_Name_2;
		branch_zaMirth_10 = in_zaMirth_1;
	}
	struct mirth_mirth_zaMirth* v18;
	struct std_list_List_1 v19 = mw_mirth_name_Name_defs(branch_zaMirth_10, branch_Name_11, &v18);
	bool v20 = true;
	struct std_list_List_1 v21 = branch_List_13;
	struct mirth_name_QName* v22 = branch_QName_12;
	struct mirth_mirth_zaMirth* r23 = v18;
	struct std_list_List_1 v24 = v19;
	bool v25 = v20;
	bool v26 = v20;
	while (v26) {
		struct std_list_List_1 v27 = v21;
		struct mirth_name_QName* v28 = v22;
		struct mirth_mirth_zaMirth* r29 = r23;
		struct std_list_List_1 v30 = v24;
		bool v31 = v25;
		struct mirth_name_QName* branch_QName_32;
		struct mirth_mirth_zaMirth* branch_zaMirth_33;
		struct std_list_List_1 branch_List_34;
		struct std_list_List_1 branch_List_35;
		bool branch_Bool_36;
		switch ((v30).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v37;
				VAL v38 = mtp_std_list_List_1_Cons(v30, &v37);
				struct mirth_name_QName* branch_QName_39;
				struct mirth_mirth_zaMirth* branch_zaMirth_40;
				struct std_list_List_1 branch_List_41;
				switch ((V_mirth_def_Def(v38)).tag) {
					case mirth_def_Def_Alias: {
						uint64_t v42 = mtp_mirth_def_Def_Alias(V_mirth_def_Def(v38));
						void* v43 = field_mut(&mfld_mirth_alias_Alias_zttarget, v42);
						struct mirth_mirth_zaMirth* v44;
						struct std_maybe_Maybe_1 v45 = mw_mirth_mirth_Prop_1_tryzeforcezx(r29, v43, &v44);
						struct mirth_name_QName* branch_QName_46;
						struct mirth_mirth_zaMirth* branch_zaMirth_47;
						bool branch_Bool_48;
						switch ((v45).tag) {
							case std_maybe_Maybe_1_Some: {
								VAL v49 = mtp_std_maybe_Maybe_1_Some(v45);
								struct mirth_mirth_zaMirth* v50;
								struct mirth_name_QName* v51 = mw_mirth_def_Def_qnamezehard(v44, V_mirth_def_Def(v49), &v50);
								incref(MK_mirth_name_QName(v28));
								struct mirth_mirth_zaMirth* v52;
								bool v53 = mw_mirth_name_QName_zd(v50, v51, v28, &v52);
								branch_Bool_48 = v53;
								branch_zaMirth_47 = v52;
								branch_QName_46 = v28;
							} break;
							case std_maybe_Maybe_1_None: {
								bool v54 = false;
								branch_Bool_48 = v54;
								branch_zaMirth_47 = v44;
								branch_QName_46 = v28;
							} break;
							default: {
								do_panic(str_make("unexpected fallthrough in match\n", 32));
							}
						}
						struct mirth_name_QName* branch_QName_55;
						struct mirth_mirth_zaMirth* branch_zaMirth_56;
						struct std_list_List_1 branch_List_57;
						if (branch_Bool_48) {
							struct mirth_mirth_zaMirth* v58;
							struct mirth_name_Namespace v59 = mw_mirth_alias_Alias_namespace(branch_zaMirth_47, v42, &v58);
							struct std_list_List_1 v60 = mw_std_list_List_1_cons(MK_mirth_name_Namespace(v59), v27);
							branch_List_57 = v60;
							branch_zaMirth_56 = v58;
							branch_QName_55 = branch_QName_46;
						} else {
							branch_List_57 = v27;
							branch_zaMirth_56 = branch_zaMirth_47;
							branch_QName_55 = branch_QName_46;
						}
						branch_List_41 = branch_List_57;
						branch_zaMirth_40 = branch_zaMirth_56;
						branch_QName_39 = branch_QName_55;
					} break;
					case mirth_def_Def_Type: {
						uint64_t v61 = mtp_mirth_def_Def_Type(V_mirth_def_Def(v38));
						struct mirth_mirth_zaMirth* v62;
						struct mirth_type_Type v63 = mw_mirth_typedef_TypeDef_target(r29, v61, &v62);
						struct mirth_mirth_zaMirth* v64;
						struct std_maybe_Maybe_1 v65 = mw_mirth_type_Type_tyconzy(v62, v63, &v64);
						struct mirth_name_QName* branch_QName_66;
						struct mirth_mirth_zaMirth* branch_zaMirth_67;
						bool branch_Bool_68;
						switch ((v65).tag) {
							case std_maybe_Maybe_1_Some: {
								VAL v69 = mtp_std_maybe_Maybe_1_Some(v65);
								struct mirth_mirth_zaMirth* v70;
								struct mirth_name_QName* v71 = mw_mirth_tycon_Tycon_qnamezehard(v64, V_mirth_tycon_Tycon(v69), &v70);
								incref(MK_mirth_name_QName(v28));
								struct mirth_mirth_zaMirth* v72;
								bool v73 = mw_mirth_name_QName_zd(v70, v71, v28, &v72);
								branch_Bool_68 = v73;
								branch_zaMirth_67 = v72;
								branch_QName_66 = v28;
							} break;
							case std_maybe_Maybe_1_None: {
								bool v74 = false;
								branch_Bool_68 = v74;
								branch_zaMirth_67 = v64;
								branch_QName_66 = v28;
							} break;
							default: {
								do_panic(str_make("unexpected fallthrough in match\n", 32));
							}
						}
						struct mirth_name_QName* branch_QName_75;
						struct mirth_mirth_zaMirth* branch_zaMirth_76;
						struct std_list_List_1 branch_List_77;
						if (branch_Bool_68) {
							struct mirth_mirth_zaMirth* v78;
							struct mirth_name_Namespace v79 = mw_mirth_typedef_TypeDef_namespace(branch_zaMirth_67, v61, &v78);
							struct std_list_List_1 v80 = mw_std_list_List_1_cons(MK_mirth_name_Namespace(v79), v27);
							branch_List_77 = v80;
							branch_zaMirth_76 = v78;
							branch_QName_75 = branch_QName_66;
						} else {
							branch_List_77 = v27;
							branch_zaMirth_76 = branch_zaMirth_67;
							branch_QName_75 = branch_QName_66;
						}
						branch_List_41 = branch_List_77;
						branch_zaMirth_40 = branch_zaMirth_76;
						branch_QName_39 = branch_QName_75;
					} break;
					default: {
						decref(MK_mirth_def_Def(V_mirth_def_Def(v38)));
						branch_List_41 = v27;
						branch_zaMirth_40 = r29;
						branch_QName_39 = v28;
					} break;
				}
				bool v81 = true;
				branch_Bool_36 = v81;
				branch_List_35 = v37;
				branch_List_34 = branch_List_41;
				branch_zaMirth_33 = branch_zaMirth_40;
				branch_QName_32 = branch_QName_39;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v82 = { .tag=std_list_List_1_Nil };
				bool v83 = false;
				branch_Bool_36 = v83;
				branch_List_35 = v82;
				branch_List_34 = v27;
				branch_zaMirth_33 = r29;
				branch_QName_32 = v28;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v26 = branch_Bool_36;
		v25 = branch_Bool_36;
		v24 = branch_List_35;
		r23 = branch_zaMirth_33;
		v22 = branch_QName_32;
		v21 = branch_List_34;
	}
	decref(MK_std_list_List_1(v24));
	decref(MK_mirth_name_QName(v22));
	*out_zaMirth_4 = r23;
	return v21;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
andq %rax, %rdi
setne %al
testb $0x3, %dl
sete %cl
andb %al, %cl
movb %cl, -0x29(%rbp)
cmpb $0x1, %cl
movq %rdi, -0x50(%rbp)
movq %r13, -0x68(%rbp)
movq %rdx, -0x48(%rbp)
jne 0x2baba
movq 0x18(%rdx), %r12
cmpl $0x0, (%rdi)
jne 0x2bab1
movq %rdx, %rdi
leaq 0xdcc9f(%rip), %rsi     # 0x108741
movq %rdx, %r14
callq 0xce94
movq -0x50(%rbp), %rdi
movq %r14, %rdx
cmpq %r15, %r12
jne 0x2bb29
incl (%rdi)
jmp 0x2bac0
cmpq %r15, 0x18(%rdx)
jne 0x2bb29
movq 0x10(%rdx), %rax
movl 0x8(%rdx), %r12d
shlq $0x30, %r12
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2baec
incl (%rcx)
orq %rax, %r12
leaq 0xdce43(%rip), %r13     # 0x108939
cmpb $0x0, -0x29(%rbp)
je 0x2bb10
decl (%rdi)
jne 0x2bb10
movq -0x48(%rbp), %rdi
leaq 0xdcc36(%rip), %rsi     # 0x108741
callq 0xce94
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xcf39
movq %rdx, -0x38(%rbp)
pushq $0x1
popq %r13
jmp 0x2bb34
xorl %r13d, %r13d
movq $0x0, -0x38(%rbp)
leaq -0x88(%rbp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x13e13
movq (%r12), %r15
leaq -0x80(%rbp), %r14
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movb $0x1, %cl
movq %rdx, %rdi
testb $0x1, %cl
je 0x2bd8f
xorl %ecx, %ecx
movl $0x0, %edx
testl %eax, %eax
je 0x2bb5d
cmpl $0x1, %eax
jne 0x2bdf7
movq %r14, %rsi
callq 0xce01
movq %rax, %rcx
shrq $0x30, %rcx
movq %rax, %rdi
andq %r12, %rdi
cmpq $0x5, %rcx
je 0x2bc3d
testl %ecx, %ecx
jne 0x2bd5b
callq 0x13ef6
movq %rax, %rbx
leaq 0x10e0865(%rip), %rdi   # 0x110c418
movq %rax, %rsi
callq 0x12f88
movq %r15, %rdi
movq %rax, %rsi
leaq -0x60(%rbp), %rdx
callq 0x1483b
testl %eax, %eax
je 0x2bd79
cmpl $0x1, %eax
jne 0x2bdf7
movq %rdx, %rdi
callq 0xd491
movq -0x60(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r12, %rax
movq %rax, %rdx
leaq -0x40(%rbp), %rcx
callq 0x2b1e9
cmpb $0x0, -0x29(%rbp)
je 0x2bc09
movq -0x50(%rbp), %rcx
incl (%rcx)
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movq -0x48(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x176c7
movq -0x58(%rbp), %r15
testb %al, %al
je 0x2bd83
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x40(%rbp), %rdx
callq 0x2b818
jmp 0x2bcd1
callq 0x140ca
movq %rax, %rbx
movq %r15, %rdi
movq %rax, %rsi
leaq -0x60(%rbp), %rdx
callq 0x2a620
movq -0x60(%rbp), %rdi
movl %eax, %esi
leaq -0x58(%rbp), %rcx
callq 0x2a670
testl %eax, %eax
je 0x2bd7f
cmpl $0x1, %eax
jne 0x2bdf7
movq %rdx, %rdi
callq 0xd491
movq -0x58(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r12, %rax
movq %rax, %rdx
leaq -0x40(%rbp), %rcx
callq 0x17ecb
cmpb $0x0, -0x29(%rbp)
je 0x2bca2
movq -0x50(%rbp), %rcx
incl (%rcx)
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movq -0x48(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x176c7
movq -0x70(%rbp), %r15
testb %al, %al
je 0x2bd83
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x40(%rbp), %rdx
callq 0x2b896
movl 0x8(%rax), %ebx
movq %r12, %rdx
movq 0x10(%rax), %r12
movq %r12, %rcx
andq %rdx, %rcx
sete %dl
testb $0x3, %r12b
setne %sil
orb %dl, %sil
jne 0x2bcf3
incl (%rcx)
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x2bd24
decl (%rcx)
jne 0x2bd24
movq %rax, %rdi
leaq 0xdca22(%rip), %rsi     # 0x108741
callq 0xce94
movq -0x40(%rbp), %r15
shlq $0x30, %rbx
orq %r12, %rbx
movq %rbx, %rdi
leaq 0xdcc00(%rip), %rsi     # 0x108939
movl %r13d, %edx
movq -0x38(%rbp), %rcx
callq 0xcf39
movq %rdx, -0x38(%rbp)
pushq $0x1
popq %rax
movl %eax, %r13d
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
jmp 0x2bd83
testq %rdi, %rdi
je 0x2bd83
decl (%rdi)
jne 0x2bd83
andq $-0x4, %rax
movq %rax, %rdi
leaq 0xdca17(%rip), %rsi     # 0x108789
callq 0xce94
jmp 0x2bd83
movq -0x60(%rbp), %r15
jmp 0x2bd83
movq -0x58(%rbp), %r15
movl -0x80(%rbp), %eax
movq -0x78(%rbp), %rdx
jmp 0x2bb5b
andq %rdi, %r12
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x2bdbc
decl (%r12)
jne 0x2bdbc
shlq $0x30, %rax
orq %rdi, %rax
leaq 0xdc4c5(%rip), %rsi     # 0x108279
movq %rax, %rdi
callq 0xce94
cmpb $0x0, -0x29(%rbp)
je 0x2bdda
movq -0x50(%rbp), %rax
decl (%rax)
jne 0x2bdda
movq -0x48(%rbp), %rdi
leaq 0xdc96c(%rip), %rsi     # 0x108741
callq 0xce94
movq -0x68(%rbp), %rax
movq %r15, (%rax)
movl %r13d, %eax
movq -0x38(%rbp), %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa8a0f(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6