// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackTypeCounts_addzelabelzx
static struct mirth_type_StackTypeCounts* mw_mirth_type_StackTypeCounts_addzelabelzx (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Label_2, struct mirth_type_StackTypeCounts* in_StackTypeCounts_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	incref(MK_mirth_type_StackTypeCounts(in_StackTypeCounts_3));
	struct std_list_List_1 v6 = in_StackTypeCounts_3->mlabels;
	incref(MK_std_list_List_1(v6));
	decref(MK_mirth_type_StackTypeCounts(in_StackTypeCounts_3));
	struct std_list_List_1 v7 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v8 = { .tag=std_list_List_1_Nil };
	struct std_maybe_Maybe_1 v9 = { .tag=std_maybe_Maybe_1_None };
	bool v10 = true;
	uint64_t v11 = in_Label_2;
	struct std_list_List_1 v12 = v8;
	struct std_list_List_1 v13 = v7;
	struct std_maybe_Maybe_1 v14 = v9;
	struct std_list_List_1 v15 = v6;
	bool v16 = v10;
	bool v17 = v10;
	while (v17) {
		uint64_t v18 = v11;
		struct std_list_List_1 v19 = v12;
		struct std_list_List_1 v20 = v13;
		struct std_maybe_Maybe_1 v21 = v14;
		struct std_list_List_1 v22 = v15;
		bool v23 = v16;
		struct std_list_List_1 v24;
		struct std_maybe_Maybe_1 v25 = mw_std_list_List_1_uncons(v22, &v24);
		uint64_t branch_Label_26;
		struct std_list_List_1 branch_List_27;
		struct std_list_List_1 branch_List_28;
		struct std_maybe_Maybe_1 branch_Maybe_29;
		struct std_list_List_1 branch_List_30;
		bool branch_Bool_31;
		switch ((v25).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v32 = mtp_std_maybe_Maybe_1_Some(v25);
				incref(v32);
				VAL v33 = V_std_map_KeyValuePair_2(v32)->mkey;
				incref(v33);
				decref(MK_std_map_KeyValuePair_2(V_std_map_KeyValuePair_2(v32)));
				uint64_t v34 = V_mirth_label_Label(v33);
				uint64_t v35 = v18;
				bool v36 = (v34 == v35);
				uint64_t branch_Label_37;
				struct std_list_List_1 branch_List_38;
				struct std_list_List_1 branch_List_39;
				struct std_maybe_Maybe_1 branch_Maybe_40;
				struct std_list_List_1 branch_List_41;
				if (v36) {
					decref(MK_std_list_List_1(v19));
					struct std_maybe_Maybe_1 v42 = mtw_std_maybe_Maybe_1_Some(v32);
					decref(MK_std_maybe_Maybe_1(v21));
					struct std_list_List_1 v43 = { .tag=std_list_List_1_Nil };
					branch_List_41 = v43;
					branch_Maybe_40 = v42;
					branch_List_39 = v24;
					branch_List_38 = v20;
					branch_Label_37 = v18;
				} else {
					struct std_list_List_1 v44 = mw_std_list_List_1_cons(v32, v20);
					branch_List_41 = v24;
					branch_Maybe_40 = v21;
					branch_List_39 = v19;
					branch_List_38 = v44;
					branch_Label_37 = v18;
				}
				bool v45 = true;
				branch_Bool_31 = v45;
				branch_List_30 = branch_List_41;
				branch_Maybe_29 = branch_Maybe_40;
				branch_List_28 = branch_List_39;
				branch_List_27 = branch_List_38;
				branch_Label_26 = branch_Label_37;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v46 = false;
				branch_Bool_31 = v46;
				branch_List_30 = v24;
				branch_Maybe_29 = v21;
				branch_List_28 = v19;
				branch_List_27 = v20;
				branch_Label_26 = v18;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v17 = branch_Bool_31;
		v16 = branch_Bool_31;
		v15 = branch_List_30;
		v14 = branch_Maybe_29;
		v13 = branch_List_27;
		v12 = branch_List_28;
		v11 = branch_Label_26;
	}
	decref(MK_std_list_List_1(v15));
	struct std_list_List_1 v47;
	mw_std_list_List_1_for_1_sp82(v12, v13, &v47);
	struct std_maybe_Maybe_1 v48 = mw_std_maybe_Maybe_1_map_1_sp18(v14);
	VAL branch_zux1_49;
	INT branch_Nat_50;
	switch ((v48).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v51 = mtp_std_maybe_Maybe_1_Some(v48);
			INT v52 = WRAP_I63(1LL);
			INT v53 = value_nat(v51);
			INT v54 = v52;
			INT v55 = int_add(v53, v54);
			INT v56 = v55;
			branch_Nat_50 = v56;
			branch_zux1_49 = MK_mirth_label_Label(v11);
		} break;
		case std_maybe_Maybe_1_None: {
			INT v57 = WRAP_I63(1LL);
			branch_Nat_50 = v57;
			branch_zux1_49 = MK_mirth_label_Label(v11);
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct std_maybe_Maybe_1 v58 = mtw_std_maybe_Maybe_1_Some(MKNAT(branch_Nat_50));
	struct std_list_List_1 v59 = mw_std_maybe_Maybe_1_ifzy_2_sp54(branch_zux1_49, v47, v58);
	struct mirth_type_StackTypeCounts* v60 = mirth_type_StackTypeCounts_set_labels(in_StackTypeCounts_3, v59);
	*out_zaMirth_4 = in_zaMirth_1;
	return v60;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, -0x88(%rbp)
movq %rdx, %r14
movq %rsi, -0x70(%rbp)
movq %rdi, -0x80(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rax
movq %rcx, -0x48(%rbp)
andq %rcx, %rax
setne %dl
testb $0x3, %r14b
sete %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x5f492
incl (%rax)
movl 0x18(%r14), %r15d
movq 0x20(%r14), %rbx
movq %rbx, %rdx
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
andq %rsi, %rdx
sete %sil
testb $0x3, %bl
setne %dil
orb %sil, %dil
jne 0x5f4bc
incl (%rdx)
testb %cl, %cl
je 0x5f4d3
decl (%rax)
jne 0x5f4d3
leaq 0xb7236(%rip), %rsi     # 0x116701
movq %r14, %rdi
callq 0xd4e3
movq %r14, -0x78(%rbp)
movq $0x0, -0x30(%rbp)
leaq -0x40(%rbp), %r14
xorl %r13d, %r13d
movq $0x0, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movl %r15d, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x115ef
testl %eax, %eax
je 0x5f668
cmpl $0x1, %eax
jne 0x5f860
movq %rdx, %rdi
callq 0xdaeb
movq %rdx, %rbx
movq %rax, %r15
testb $0x1, %bl
je 0x5f55a
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %r15b
setne %sil
orb %dl, %sil
jne 0x5f55a
incl (%rcx)
movq 0x8(%r15), %r12
testb $0x1, 0x10(%r15)
je 0x5f587
movq %r12, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %r12b
setne %sil
orb %dl, %sil
jne 0x5f587
incl (%rcx)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x5f5b5
decl (%rax)
jne 0x5f5b5
movq %r15, %rdi
leaq 0xb6f11(%rip), %rsi     # 0x1164c1
callq 0xd4e3
cmpq -0x70(%rbp), %r12
jne 0x5f674
movq -0x30(%rbp), %rdx
movq %rdx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dl
setne %dl
orb %cl, %dl
jne 0x5f5fb
decl (%rax)
jne 0x5f5fb
shlq $0x30, %r13
orq -0x30(%rbp), %r13
movq %r13, %rdi
leaq 0xb5c83(%rip), %rsi     # 0x115279
callq 0xd4e3
movq %r15, %rdi
movq %rbx, %rsi
callq 0x95f6
movq %rdx, %rbx
movq -0x58(%rbp), %rsi
movq %rsi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x5f646
decl (%rax)
jne 0x5f646
movq -0x50(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xb5c80(%rip), %rsi     # 0x1152c1
callq 0xd4e3
movl -0x40(%rbp), %r13d
xorl %r15d, %r15d
movl $0x1, %eax
movq %rax, -0x50(%rbp)
movb $0x1, %al
movq -0x38(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq %rbx, -0x58(%rbp)
xorl %ebx, %ebx
jmp 0x5f69e
movl -0x40(%rbp), %r15d
movq -0x38(%rbp), %rbx
xorl %eax, %eax
jmp 0x5f69e
movq %r15, %rdi
movq %rbx, %rsi
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0xd592
movq %rdx, -0x68(%rbp)
movl -0x40(%rbp), %r15d
movl $0x1, %eax
movq %rax, -0x60(%rbp)
movb $0x1, %al
movq -0x38(%rbp), %rbx
testb %al, %al
jne 0x5f506
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x5f6dd
decl (%rax)
jne 0x5f6dd
shlq $0x30, %r15
orq %rbx, %r15
movq %r15, %rdi
leaq 0xb5ba1(%rip), %rsi     # 0x115279
callq 0xd4e3
leaq -0x40(%rbp), %rbx
movq -0x30(%rbp), %r15
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %r8
testl %r8d, %r8d
je 0x5f72a
cmpl $0x1, %r8d
jne 0x5f860
movq %rbx, %rsi
callq 0xd450
movq %rax, %rdi
movq %rdx, %rsi
movl %r13d, %edx
movq %r15, %rcx
callq 0xd592
movq %rdx, %r15
movl -0x40(%rbp), %r8d
movq -0x38(%rbp), %rdi
movl $0x1, %r13d
movb $0x1, %al
jmp 0x5f72e
xorl %eax, %eax
xorl %edi, %edi
testb %al, %al
jne 0x5f6ed
movq %rdi, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x5f76a
decl (%rax)
jne 0x5f76a
shlq $0x30, %r8
orq %rdi, %r8
movq %r8, %rdi
leaq 0xb5b14(%rip), %rsi     # 0x115279
callq 0xd4e3
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x435e5
movl $0x3, %edi
testl %eax, %eax
je 0x5f7af
cmpl $0x1, %eax
jne 0x5f860
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %rbx
movq %rax, %rdi
movq %rdx, %rsi
callq 0x33553
movl $0x3, %esi
movq %rbx, %rdi
callq 0xe8e2
movq %rax, %rdi
leaq 0xb595b(%rip), %rsi     # 0x115111
callq 0x95f6
movq %rdx, %rdi
callq 0xdaeb
movq %rdx, %rcx
leaq 0xb6afb(%rip), %rsi     # 0x1162c8
movq -0x70(%rbp), %rdi
movq %rax, %rdx
callq 0x42c64
andq %r15, -0x48(%rbp)
setne %cl
testb $0x3, %r15b
sete %r14b
andb %cl, %r14b
cmpb $0x1, %r14b
jne 0x5f7f7
movq -0x48(%rbp), %rcx
incl (%rcx)
leaq 0xb6cc3(%rip), %rsi     # 0x1164c1
movq %rax, %rdi
movl %r13d, %edx
movq %r15, %rcx
callq 0xd592
movq %rdx, %rbx
testb %r14b, %r14b
je 0x5f832
movq -0x48(%rbp), %rax
decl (%rax)
jne 0x5f832
shlq $0x30, %r13
orq %r15, %r13
movq %r13, %rdi
leaq 0xb5a4c(%rip), %rsi     # 0x115279
callq 0xd4e3
movq -0x78(%rbp), %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x5fa64
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %rdx
movq %rdx, (%rcx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x84ed4(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x84ed9(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5