// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_base
static struct mirth_type_StackTypeBase mw_mirth_type_StackType_base (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct std_either_Either_2 v5 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(in_StackType_2));
	bool v6 = true;
	struct mirth_mirth_zaMirth* r7 = in_zaMirth_1;
	struct std_either_Either_2 v8 = v5;
	bool v9 = v6;
	bool v10 = v6;
	while (v10) {
		struct mirth_mirth_zaMirth* r11 = r7;
		struct std_either_Either_2 v12 = v8;
		bool v13 = v9;
		incref(MK_std_either_Either_2(v12));
		struct std_maybe_Maybe_1 v14 = mw_std_either_Either_2_rightzy(v12);
		struct mirth_mirth_zaMirth* branch_zaMirth_15;
		struct std_either_Either_2 branch_Either_16;
		bool branch_Bool_17;
		switch ((v14).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v18 = mtp_std_maybe_Maybe_1_Some(v14);
				decref(MK_std_either_Either_2(v12));
				struct mirth_mirth_zaMirth* v19;
				struct mirth_type_StackType v20 = mw_mirth_type_StackType_expand(r11, V_mirth_type_StackType(v18), &v19);
				struct mirth_mirth_zaMirth* branch_zaMirth_21;
				struct std_either_Either_2 branch_Either_22;
				switch ((v20).tag) {
					case mirth_type_StackType_Error: {
						struct mirth_type_StackTypeBase v23 = { .tag=mirth_type_StackTypeBase_Error };
						struct std_either_Either_2 v24 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v23));
						branch_Either_22 = v24;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_Ignore: {
						struct mirth_type_StackTypeBase v25 = { .tag=mirth_type_StackTypeBase_Ignore };
						struct std_either_Either_2 v26 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v25));
						branch_Either_22 = v26;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_Var: {
						uint64_t v27 = mtp_mirth_type_StackType_Var(v20);
						struct mirth_type_StackTypeBase v28 = mtw_mirth_type_StackTypeBase_Var(v27);
						struct std_either_Either_2 v29 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v28));
						branch_Either_22 = v29;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_Meta: {
						uint64_t v30 = mtp_mirth_type_StackType_Meta(v20);
						struct mirth_type_StackTypeBase v31 = mtw_mirth_type_StackTypeBase_Meta(v30);
						struct std_either_Either_2 v32 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v31));
						branch_Either_22 = v32;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_Unit: {
						struct mirth_type_StackTypeBase v33 = { .tag=mirth_type_StackTypeBase_Unit };
						struct std_either_Either_2 v34 = mtw_std_either_Either_2_Left(MK_mirth_type_StackTypeBase(v33));
						branch_Either_22 = v34;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_Cons: {
						struct mirth_type_Type v35;
						struct mirth_type_StackType v36 = mtp_mirth_type_StackType_Cons(v20, &v35);
						decref(MK_mirth_type_Type(v35));
						struct std_either_Either_2 v37 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v36));
						branch_Either_22 = v37;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_With: {
						struct mirth_type_Type v38;
						struct mirth_type_StackType v39 = mtp_mirth_type_StackType_With(v20, &v38);
						decref(MK_mirth_type_Type(v38));
						struct std_either_Either_2 v40 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v39));
						branch_Either_22 = v40;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_ConsLabel: {
						struct mirth_type_Type v41;
						uint64_t v42;
						struct mirth_type_StackType v43 = mtp_mirth_type_StackType_ConsLabel(v20, &v41, &v42);
						decref(MK_mirth_type_Type(v41));
						struct std_either_Either_2 v44 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v43));
						branch_Either_22 = v44;
						branch_zaMirth_21 = v19;
					} break;
					case mirth_type_StackType_WithLabel: {
						struct mirth_type_Type v45;
						uint64_t v46;
						struct mirth_type_StackType v47 = mtp_mirth_type_StackType_WithLabel(v20, &v45, &v46);
						decref(MK_mirth_type_Type(v45));
						struct std_either_Either_2 v48 = mtw_std_either_Either_2_Right(MK_mirth_type_StackType(v47));
						branch_Either_22 = v48;
						branch_zaMirth_21 = v19;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				bool v49 = true;
				branch_Bool_17 = v49;
				branch_Either_16 = branch_Either_22;
				branch_zaMirth_15 = branch_zaMirth_21;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v50 = false;
				branch_Bool_17 = v50;
				branch_Either_16 = v12;
				branch_zaMirth_15 = r11;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v10 = branch_Bool_17;
		v9 = branch_Bool_17;
		v8 = branch_Either_16;
		r7 = branch_zaMirth_15;
	}
	struct std_maybe_Maybe_1 v51 = mw_std_either_Either_2_leftzy(v8);
	VAL v52 = mw_std_maybe_Maybe_1_unwrap_1_sp3(v51);
	*out_zaMirth_3 = r7;
	return V_mirth_type_StackTypeBase(v52);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x50(%rbp)
movl %esi, %eax
movq %rdi, -0x30(%rbp)
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xc1dcd(%rip), %rsi     # 0x111bc1
movq %rax, %rdi
callq 0x206fc
movq %rdx, %rbx
movl $0x1, %r13d
leaq 0x4(%r14), %rax
movq %rax, -0x58(%rbp)
movq %rbx, %r15
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r15
setne %al
testb $0x3, %bl
sete %r12b
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x4fe33
incl (%r15)
movl %r13d, %edi
movq %rbx, %rsi
callq 0x39e35
cmpl $0x1, %eax
jne 0x4ffeb
movq %rdx, %rdi
callq 0xd745
movq %rax, %r14
testb %r12b, %r12b
je 0x4fe72
decl (%r15)
jne 0x4fe72
shlq $0x30, %r13
orq %rbx, %r13
movq %r13, %rdi
leaq 0xc20b4(%rip), %rsi     # 0x111f21
callq 0xd13d
movq %r14, %rsi
shrq $0x30, %rsi
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r14
movq -0x30(%rbp), %rdi
movq %r14, %rdx
leaq -0x38(%rbp), %rcx
callq 0x37fe3
cmpl $0x8, %eax
ja 0x5002f
movl %eax, %eax
leaq 0x8ef9c(%rip), %rcx     # 0xdee44
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r13d, %r13d
xorl %edi, %edi
leaq 0xc2454(%rip), %rsi     # 0x112311
callq 0x2069e
movq %rdx, %rbx
jmp 0x4ff40
movq 0x8(%rdx), %r14
decl (%rdx)
jne 0x4fed7
movq %rdx, %rdi
callq 0x5030
movq %r14, %rdi
callq 0x39f21
btsq $0x32, %rax
jmp 0x4ff17
movabsq $0x2000000000000, %rdi  # imm = 0x2000000000000
jmp 0x4ff2e
movq 0x8(%rdx), %r14
decl (%rdx)
jne 0x4ff02
movq %rdx, %rdi
callq 0x5030
movq %r14, %rdi
callq 0x39ece
movabsq $0x3000000000000, %rcx  # imm = 0x3000000000000
orq %rcx, %rax
movq %rax, %rdi
jmp 0x4ff2e
movq %rdx, %rdi
leaq -0x48(%rbp), %rsi
callq 0x381ac
jmp 0x4ff7d
movq -0x58(%rbp), %rdi
leaq 0xc23dc(%rip), %rsi     # 0x112311
callq 0x2069e
movq %rdx, %rbx
xorl %r13d, %r13d
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x4fe0d
movq %rdx, %rdi
leaq -0x48(%rbp), %rsi
callq 0x38125
jmp 0x4ff7d
movq %rdx, %rdi
leaq -0x48(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x38233
jmp 0x4ff7d
movq %rdx, %rdi
leaq -0x48(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x382d7
movl %eax, %r15d
movq %rdx, %r12
movq -0x40(%rbp), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x4ffbf
movl -0x48(%rbp), %edi
decl (%rcx)
jne 0x4ffbf
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc1b2f(%rip), %rsi     # 0x111ae9
callq 0xd13d
shlq $0x30, %r15
orq %r12, %r15
movq %r15, %rdi
leaq 0xc1bf1(%rip), %rsi     # 0x111bc1
callq 0x206fc
movq %rdx, %rbx
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x1, %r13d
jmp 0x4fe0d
testl %eax, %eax
jne 0x5002f
movl %r13d, %edi
movq %rbx, %rsi
callq 0x39f74
movl %eax, %edi
movq %rdx, %rsi
callq 0x33ee8
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rdx
movq %rdx, (%rcx)
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
shrq $0x30, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x90685(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x9068a(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302