// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_CTypeStackPart_c99zeargzename
static STR* mw_mirth_type_CTypeStackPart_c99zeargzename (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_c99_zaC99* in_zaC99_2, INT in_Nat_3, struct mirth_type_CTypeStackPart in_CTypeStackPart_4, struct mirth_mirth_zaMirth* *out_zaMirth_5, struct mirth_c99_zaC99* *out_zaC99_6, INT *out_Nat_7) {
	struct std_maybe_Maybe_1 v9 = mw_mirth_type_CTypeStackPart_labelzy(in_CTypeStackPart_4);
	INT branch_Nat_10;
	VAL branch_zux1_11;
	struct mirth_mirth_zaMirth* branch_zaMirth_12;
	STR* branch_Str_13;
	switch ((v9).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v14 = mtp_std_maybe_Maybe_1_Some(v9);
			struct mirth_mirth_zaMirth* v15;
			uint64_t v16 = mw_mirth_label_Label_name(in_zaMirth_1, V_mirth_label_Label(v14), &v15);
			struct mirth_mirth_zaMirth* v17;
			STR* v18 = mw_mirth_name_Name_mangled(v15, v16, &v17);
			branch_Str_13 = v18;
			branch_zaMirth_12 = v17;
			branch_zux1_11 = MK_mirth_c99_zaC99(in_zaC99_2);
			branch_Nat_10 = in_Nat_3;
		} break;
		case std_maybe_Maybe_1_None: {
			STR* v19;
			STRLIT(v19, "", 0);
			STR* v20;
			STRLIT(v20, "X", 1);
			STR* v21;
			mw_std_str_zaStr_pushzestrzx(v20, v19, &v21);
			incref(MKNAT(in_Nat_3));
			INT v22 = in_Nat_3;
			STR* v23 = int_to_str(v22);
			STR* v24;
			mw_std_str_zaStr_pushzestrzx(v23, v21, &v24);
			branch_Str_13 = v24;
			branch_zaMirth_12 = in_zaMirth_1;
			branch_zux1_11 = MK_mirth_c99_zaC99(in_zaC99_2);
			branch_Nat_10 = in_Nat_3;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_Nat_7 = branch_Nat_10;
	*out_zaC99_6 = V_mirth_c99_zaC99(branch_zux1_11);
	*out_zaMirth_5 = branch_zaMirth_12;
	return branch_Str_13;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movl %ecx, %edi
movq %r8, %rsi
callq 0x5ccd5
testl %eax, %eax
je 0xafa23
cmpl $0x1, %eax
jne 0xafafb
movq %rdx, %rdi
callq 0xd491
leaq -0x40(%rbp), %r13
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x37055
movq (%r13), %rdi
leaq -0x38(%rbp), %r12
movq %rax, %rsi
movq %r12, %rdx
callq 0x8b231
movq (%r12), %r12
jmp 0xafadb
movq %rbx, -0x30(%rbp)
movq 0x105f6f2(%rip), %r13   # 0x110f120
testq %r13, %r13
jne 0xafa4b
leaq 0x2ccbb(%rip), %rdi     # 0xdc6f5
xorl %esi, %esi
callq 0x8a21
movq %rax, %r13
movq %rax, 0x105f6d5(%rip)   # 0x110f120
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
movq %r13, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0xafa6b
incl (%rax)
movq 0x105f6b6(%rip), %rsi   # 0x110f128
testq %rsi, %rsi
jne 0xafa90
leaq 0x3e825(%rip), %rdi     # 0xee2a3
pushq $0x1
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x105f698(%rip)   # 0x110f128
movq %rsi, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0xafaa6
incl (%rax)
movq %r13, %rdi
callq 0xd8b0
movq %rax, %r13
andq %r15, %rbx
sete %al
testb $0x3, %r15b
setne %cl
orb %al, %cl
jne 0xafac4
incl (%rbx)
movq %r15, %rdi
callq 0xf51c
movq %r13, %rdi
movq %rax, %rsi
callq 0xd8b0
movq -0x30(%rbp), %rbx
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movq %r15, (%rcx)
movq %r14, (%rdx)
movq %r12, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24d0b(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6