// File: /workspace/github_c_makefile_star2_O3/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, %r13
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xdc983(%rip), %rsi     # 0x111bc1
movq %rax, %rdi
callq 0x206fc
movq %rdx, %rbx
movl $0x1, %r14d
movq $0x0, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movq %rbx, %r15
andq %r12, %r15
setne %al
testb $0x3, %bl
sete %r12b
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x3527a
incl (%r15)
movl %r14d, %edi
movq %rbx, %rsi
callq 0x39e35
cmpl $0x1, %eax
jne 0x35493
movq %rbx, -0x70(%rbp)
movq %r14, %rbx
movq %r13, %r14
movq %rdx, %rdi
callq 0xd745
movq %rax, %r13
testb %r12b, %r12b
je 0x352c4
decl (%r15)
jne 0x352c4
shlq $0x30, %rbx
orq -0x70(%rbp), %rbx
movq %rbx, %rdi
leaq 0xdcc62(%rip), %rsi     # 0x111f21
callq 0xd13d
movq %r13, %rsi
shrq $0x30, %rsi
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
andq %r12, %r13
movq %r14, %rdi
movq %r13, %rdx
leaq -0x40(%rbp), %rcx
callq 0x37fe3
cmpl $0x8, %eax
ja 0x354eb
movl %eax, %eax
leaq 0xa9527(%rip), %rcx     # 0xde820
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r14d, %r14d
xorl %edi, %edi
leaq 0xdd003(%rip), %rsi     # 0x112311
callq 0x2069e
movq %rdx, %rbx
movq -0x40(%rbp), %r13
jmp 0x3525e
movq 0x8(%rdx), %r14
decl (%rdx)
jne 0x3532f
movq %rdx, %rdi
callq 0x5030
movq %r14, %rdi
callq 0x39f21
btsq $0x32, %rax
jmp 0x3536f
movabsq $0x2000000000000, %rdi  # imm = 0x2000000000000
jmp 0x353a9
movq 0x8(%rdx), %r14
decl (%rdx)
jne 0x3535a
movq %rdx, %rdi
callq 0x5030
movq %r14, %rdi
callq 0x39ece
movabsq $0x3000000000000, %rcx  # imm = 0x3000000000000
orq %rcx, %rax
movq %rax, %rdi
jmp 0x353a9
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x381ac
movl %eax, %r14d
movq %rdx, %r15
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x3dfc9
movq %rdx, %rdi
movabsq $0x2000000000000, %rax  # imm = 0x2000000000000
jmp 0x3544a
leaq 0x4(%r12), %rdi
leaq 0xdcf61(%rip), %rsi     # 0x112311
callq 0x2069e
movq %rdx, %rbx
xorl %r14d, %r14d
movq -0x40(%rbp), %r13
jmp 0x3525e
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x38125
movl %eax, %r14d
movq %rdx, %r15
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x201a2
movq %rdx, %rdi
jmp 0x3544d
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x38233
movl %eax, %r14d
movq %rdx, %r15
movq -0x58(%rbp), %rdx
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x3e02a
leaq 0x4(%r12), %rdi
orq %rdx, %rdi
jmp 0x3544d
movq %rdx, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x382d7
movl %eax, %r14d
movq %rdx, %r15
movq -0x58(%rbp), %rdx
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x3e09b
movq %rdx, %rdi
movabsq $0x3000000000000, %rax  # imm = 0x3000000000000
orq %rax, %rdi
leaq 0xdc88d(%rip), %rsi     # 0x111ce1
movl -0x2c(%rbp), %edx
movq -0x38(%rbp), %rcx
callq 0xd1ec
movq %rdx, -0x38(%rbp)
shlq $0x30, %r14
orq %r15, %r14
movq %r14, %rdi
leaq 0xdc74c(%rip), %rsi     # 0x111bc1
callq 0x206fc
movq %rdx, %rbx
movq -0x40(%rbp), %r13
movl $0x1, -0x2c(%rbp)
movl $0x1, %r14d
jmp 0x3525e
testl %eax, %eax
jne 0x354eb
movl %r14d, %edi
movq %rbx, %rsi
callq 0x39f74
movl %eax, %edi
movq %rdx, %rsi
callq 0x33ee8
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 %r13, (%rcx)
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
shrq $0x30, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xab1c9(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xab1ce(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302