// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_splitzeparts
static struct mirth_type_StackTypeBase mw_mirth_type_StackType_splitzeparts (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, struct mirth_mirth_zaMirth* *out_zaMirth_3, struct std_list_List_1 *out_List_5) {
	struct std_list_List_1 v6 = { .tag=std_list_List_1_Nil };
	struct std_either_Either_2 v7 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(in_StackType_2));
	bool v8 = true;
	struct std_list_List_1 v9 = v6;
	struct mirth_mirth_zaMirth* r10 = in_zaMirth_1;
	struct std_either_Either_2 v11 = v7;
	bool v12 = v8;
	bool v13 = v8;
	while (v13) {
		struct std_list_List_1 v14 = v9;
		struct mirth_mirth_zaMirth* r15 = r10;
		struct std_either_Either_2 v16 = v11;
		bool v17 = v12;
		incref(MK_std_either_Either_2(v16));
		struct std_maybe_Maybe_1 v18 = mw_std_either_Either_2_rightzy(v16);
		struct std_list_List_1 branch_List_19;
		struct mirth_mirth_zaMirth* branch_zaMirth_20;
		struct std_either_Either_2 branch_Either_21;
		bool branch_Bool_22;
		switch ((v18).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v23 = mtp_std_maybe_Maybe_1_Some(v18);
				decref(MK_std_either_Either_2(v16));
				struct mirth_mirth_zaMirth* v24;
				struct mirth_type_StackType v25 = mw_mirth_type_StackType_expand(r15, V_mirth_type_StackType(v23), &v24);
				struct std_list_List_1 branch_List_26;
				struct mirth_mirth_zaMirth* branch_zaMirth_27;
				struct std_either_Either_2 branch_Either_28;
				switch ((v25).tag) {
					case mirth_type_StackType_Error: {
						struct mirth_type_StackTypeBase v29 = { .tag=mirth_type_StackTypeBase_Error };
						struct std_either_Either_2 v30 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v29));
						branch_Either_28 = v30;
						branch_zaMirth_27 = v24;
						branch_List_26 = v14;
					} break;
					case mirth_type_StackType_Ignore: {
						struct mirth_type_StackTypeBase v31 = { .tag=mirth_type_StackTypeBase_Ignore };
						struct std_either_Either_2 v32 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v31));
						branch_Either_28 = v32;
						branch_zaMirth_27 = v24;
						branch_List_26 = v14;
					} break;
					case mirth_type_StackType_Var: {
						uint64_t v33 = mtp_mirth_type_StackType_Var(v25);
						struct mirth_type_StackTypeBase v34 = mtw_mirth_type_StackTypeBase_Var(v33);
						struct std_either_Either_2 v35 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v34));
						branch_Either_28 = v35;
						branch_zaMirth_27 = v24;
						branch_List_26 = v14;
					} break;
					case mirth_type_StackType_Meta: {
						uint64_t v36 = mtp_mirth_type_StackType_Meta(v25);
						struct mirth_type_StackTypeBase v37 = mtw_mirth_type_StackTypeBase_Meta(v36);
						struct std_either_Either_2 v38 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v37));
						branch_Either_28 = v38;
						branch_zaMirth_27 = v24;
						branch_List_26 = v14;
					} break;
					case mirth_type_StackType_Unit: {
						struct mirth_type_StackTypeBase v39 = { .tag=mirth_type_StackTypeBase_Unit };
						struct std_either_Either_2 v40 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v39));
						branch_Either_28 = v40;
						branch_zaMirth_27 = v24;
						branch_List_26 = v14;
					} break;
					case mirth_type_StackType_Cons: {
						struct mirth_type_Type v41;
						struct mirth_type_StackType v42 = mtp_mirth_type_StackType_Cons(v25, &v41);
						struct mirth_type_StackTypePart v43 = mtw_mirth_type_StackTypePart_Cons(v41);
						struct std_list_List_1 v44 = mw_std_list_List_1_cons(MK_mirth_type_StackTypePart(v43), v14);
						struct std_either_Either_2 v45 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v42));
						branch_Either_28 = v45;
						branch_zaMirth_27 = v24;
						branch_List_26 = v44;
					} break;
					case mirth_type_StackType_With: {
						struct mirth_type_Type v46;
						struct mirth_type_StackType v47 = mtp_mirth_type_StackType_With(v25, &v46);
						struct mirth_type_StackTypePart v48 = mtw_mirth_type_StackTypePart_With(v46);
						struct std_list_List_1 v49 = mw_std_list_List_1_cons(MK_mirth_type_StackTypePart(v48), v14);
						struct std_either_Either_2 v50 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v47));
						branch_Either_28 = v50;
						branch_zaMirth_27 = v24;
						branch_List_26 = v49;
					} break;
					case mirth_type_StackType_ConsLabel: {
						struct mirth_type_Type v51;
						uint64_t v52;
						struct mirth_type_StackType v53 = mtp_mirth_type_StackType_ConsLabel(v25, &v51, &v52);
						struct mirth_type_StackTypePart v54 = mtw_mirth_type_StackTypePart_ConsLabel(v51, v52);
						struct std_list_List_1 v55 = mw_std_list_List_1_cons(MK_mirth_type_StackTypePart(v54), v14);
						struct std_either_Either_2 v56 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v53));
						branch_Either_28 = v56;
						branch_zaMirth_27 = v24;
						branch_List_26 = v55;
					} break;
					case mirth_type_StackType_WithLabel: {
						struct mirth_type_Type v57;
						uint64_t v58;
						struct mirth_type_StackType v59 = mtp_mirth_type_StackType_WithLabel(v25, &v57, &v58);
						struct mirth_type_StackTypePart v60 = mtw_mirth_type_StackTypePart_WithLabel(v57, v58);
						struct std_list_List_1 v61 = mw_std_list_List_1_cons(MK_mirth_type_StackTypePart(v60), v14);
						struct std_either_Either_2 v62 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v59));
						branch_Either_28 = v62;
						branch_zaMirth_27 = v24;
						branch_List_26 = v61;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				bool v63 = true;
				branch_Bool_22 = v63;
				branch_Either_21 = branch_Either_28;
				branch_zaMirth_20 = branch_zaMirth_27;
				branch_List_19 = branch_List_26;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v64 = false;
				branch_Bool_22 = v64;
				branch_Either_21 = v16;
				branch_zaMirth_20 = r15;
				branch_List_19 = v14;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v13 = branch_Bool_22;
		v12 = branch_Bool_22;
		v11 = branch_Either_21;
		r10 = branch_zaMirth_20;
		v9 = branch_List_19;
	}
	struct std_maybe_Maybe_1 v65 = mw_std_either_Either_2_leftzy(v11);
	VAL v66 = mw_std_maybe_Maybe_1_unwrap_1_sp3(v65);
	*out_List_5 = v9;
	*out_zaMirth_3 = r10;
	return V_mirth_type_StackTypeBase(v66);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x60(%rbp)
movq %rcx, -0x68(%rbp)
movl %esi, %eax
movq %rdi, %r15
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xdf7ca(%rip), %rsi     # 0x115bc1
movq %rax, %rdi
callq 0x20c67
movq %rdx, %r14
movl $0x1, %r12d
movq $0x0, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movq %r14, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x3642d
incl (%rax)
movl %r12d, %edi
movq %r14, %rsi
callq 0x3b176
testl %eax, %eax
je 0x364cf
cmpl $0x1, %eax
jne 0x3669a
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %r13
movq %r14, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x36482
decl (%rax)
jne 0x36482
shlq $0x30, %r12
orq %r14, %r12
movq %r12, %rdi
leaq 0xdfaa4(%rip), %rsi     # 0x115f21
callq 0xd4e3
movq %r13, %rsi
shrq $0x30, %rsi
andq %rbx, %r13
movq %r15, %rdi
movq %r13, %rdx
leaq -0x40(%rbp), %rcx
callq 0x3917b
cmpl $0x8, %eax
ja 0x3669a
movl %eax, %eax
leaq 0xac35f(%rip), %rcx     # 0xe280c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r12d, %r12d
xorl %edi, %edi
leaq 0xdfe4f(%rip), %rsi     # 0x116311
callq 0x20c09
movq %rdx, %r14
jmp 0x36571
xorl %eax, %eax
jmp 0x36645
movq 0x8(%rdx), %r14
decl (%rdx)
jne 0x364e6
movq %rdx, %rdi
callq 0x5030
movq %r14, %rdi
callq 0x3b262
btsq $0x32, %rax
jmp 0x36526
movabsq $0x2000000000000, %rdi  # imm = 0x2000000000000
jmp 0x3655f
movq 0x8(%rdx), %r14
decl (%rdx)
jne 0x36511
movq %rdx, %rdi
callq 0x5030
movq %r14, %rdi
callq 0x3b20f
movabsq $0x3000000000000, %rcx  # imm = 0x3000000000000
orq %rcx, %rax
movq %rax, %rdi
jmp 0x3655f
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x39346
movl %eax, %r14d
movq %rdx, %r15
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x3f310
movq %rdx, %rdi
movabsq $0x2000000000000, %rax  # imm = 0x2000000000000
jmp 0x365ff
leaq 0x4(%rbx), %rdi
leaq 0xdfdab(%rip), %rsi     # 0x116311
callq 0x20c09
movq %rdx, %r14
xorl %r12d, %r12d
movq -0x40(%rbp), %r15
jmp 0x36643
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x392bf
movl %eax, %r14d
movq %rdx, %r15
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x206d0
movq %rdx, %rdi
jmp 0x36602
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x393cd
movl %eax, %r14d
movq %rdx, %r15
movq -0x58(%rbp), %rdx
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x3f371
leaq 0x4(%rbx), %rdi
orq %rdx, %rdi
jmp 0x36602
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x39471
movl %eax, %r14d
movq %rdx, %r15
movq -0x58(%rbp), %rdx
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x3f3e2
movq %rdx, %rdi
movabsq $0x3000000000000, %rax  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xdf6d8(%rip), %rsi     # 0x115ce1
movl -0x2c(%rbp), %edx
movq -0x38(%rbp), %rcx
callq 0xd592
movq %rdx, -0x38(%rbp)
shlq $0x30, %r14
orq %r15, %r14
movq %r14, %rdi
leaq 0xdf597(%rip), %rsi     # 0x115bc1
callq 0x20c67
movq %rdx, %r14
movq -0x40(%rbp), %r15
movl $0x1, %r12d
movl $0x1, -0x2c(%rbp)
movb $0x1, %al
testb %al, %al
jne 0x36417
movl %r12d, %edi
movq %r14, %rsi
callq 0x3b2b5
movl %eax, %edi
movq %rdx, %rsi
callq 0x3502e
movq -0x60(%rbp), %rcx
movl -0x2c(%rbp), %edx
movl %edx, (%rcx)
movl $0x0, 0x4(%rcx)
movq -0x38(%rbp), %rdx
movq %rdx, 0x8(%rcx)
movq -0x68(%rbp), %rcx
movq %r15, (%rcx)
andq %rax, %rbx
shrq $0x30, %rax
movq %rbx, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xae09a(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xae09f(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5