// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_forcezewithzelabelzyzx
static struct std_maybe_Maybe_1 mw_mirth_type_StackType_forcezewithzelabelzyzx (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Label_2, struct mirth_type_StackType in_StackType_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	struct mirth_mirth_zaMirth* v6;
	struct mirth_type_StackType v7 = mw_mirth_type_StackType_expand(in_zaMirth_1, in_StackType_3, &v6);
	struct mirth_mirth_zaMirth* branch_zaMirth_8;
	struct std_maybe_Maybe_1 branch_Maybe_9;
	switch ((v7).tag) {
		case mirth_type_StackType_Error: {
			struct mirth_type_StackType v10 = { .tag=mirth_type_StackType_Error };
			struct mirth_type_Type v11 = { .tag=mirth_type_Type_Error };
			PTUP r12 = PTRMK(0,tup_new(2),0);
			((TUP*)PTRPTR(r12))->size = 2;
			((TUP*)PTRPTR(r12))->cells[1] = MK_mirth_type_Type(v11);
			((TUP*)PTRPTR(r12))->cells[0] = MK_mirth_type_StackType(v10);
			struct std_maybe_Maybe_1 v13 = mtw_std_maybe_Maybe_1_Some(MKTUP(r12));
			branch_Maybe_9 = v13;
			branch_zaMirth_8 = v6;
		} break;
		case mirth_type_StackType_Ignore: {
			struct mirth_type_StackType v14 = { .tag=mirth_type_StackType_Ignore };
			struct mirth_type_Type v15 = { .tag=mirth_type_Type_Ignore };
			PTUP r16 = PTRMK(0,tup_new(2),0);
			((TUP*)PTRPTR(r16))->size = 2;
			((TUP*)PTRPTR(r16))->cells[1] = MK_mirth_type_Type(v15);
			((TUP*)PTRPTR(r16))->cells[0] = MK_mirth_type_StackType(v14);
			struct std_maybe_Maybe_1 v17 = mtw_std_maybe_Maybe_1_Some(MKTUP(r16));
			branch_Maybe_9 = v17;
			branch_zaMirth_8 = v6;
		} break;
		case mirth_type_StackType_Unit: {
			struct std_maybe_Maybe_1 v18 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_9 = v18;
			branch_zaMirth_8 = v6;
		} break;
		case mirth_type_StackType_Var: {
			uint64_t v19 = mtp_mirth_type_StackType_Var(v7);
			struct std_maybe_Maybe_1 v20 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_9 = v20;
			branch_zaMirth_8 = v6;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v21;
			struct mirth_type_StackType v22 = mtp_mirth_type_StackType_With(v7, &v21);
			struct mirth_mirth_zaMirth* v23;
			struct std_maybe_Maybe_1 v24 = mw_mirth_type_StackType_forcezewithzelabelzyzx(v6, in_Label_2, v22, &v23);
			struct std_maybe_Maybe_1 v25;
			struct mirth_type_Type v26 = mw_std_maybe_Maybe_1_map_1_sp12(v21, v24, &v25);
			decref(MK_mirth_type_Type(v26));
			branch_Maybe_9 = v25;
			branch_zaMirth_8 = v23;
		} break;
		case mirth_type_StackType_Cons: {
			struct mirth_type_Type v27;
			struct mirth_type_StackType v28 = mtp_mirth_type_StackType_Cons(v7, &v27);
			struct mirth_mirth_zaMirth* v29;
			struct std_maybe_Maybe_1 v30 = mw_mirth_type_StackType_forcezewithzelabelzyzx(v6, in_Label_2, v28, &v29);
			struct std_maybe_Maybe_1 v31;
			struct mirth_type_Type v32 = mw_std_maybe_Maybe_1_map_1_sp13(v27, v30, &v31);
			decref(MK_mirth_type_Type(v32));
			branch_Maybe_9 = v31;
			branch_zaMirth_8 = v29;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v33;
			uint64_t v34;
			struct mirth_type_StackType v35 = mtp_mirth_type_StackType_ConsLabel(v7, &v33, &v34);
			uint64_t v36 = v34;
			uint64_t v37 = in_Label_2;
			bool v38 = (v36 == v37);
			struct mirth_mirth_zaMirth* branch_zaMirth_39;
			struct std_maybe_Maybe_1 branch_Maybe_40;
			if (v38) {
				decref(MK_mirth_type_Type(v33));
				decref(MK_mirth_type_StackType(v35));
				struct std_maybe_Maybe_1 v41 = { .tag=std_maybe_Maybe_1_None };
				branch_Maybe_40 = v41;
				branch_zaMirth_39 = v6;
			} else {
				struct mirth_mirth_zaMirth* v42;
				struct std_maybe_Maybe_1 v43 = mw_mirth_type_StackType_forcezewithzelabelzyzx(v6, in_Label_2, v35, &v42);
				struct mirth_mirth_zaMirth* branch_zaMirth_44;
				struct std_maybe_Maybe_1 branch_Maybe_45;
				switch ((v43).tag) {
					case std_maybe_Maybe_1_Some: {
						VAL v46 = mtp_std_maybe_Maybe_1_Some(v43);
						VAL v47 = ((TUP*)PTRPTR(value_tup(v46)))->cells[0];
						VAL v48 = ((TUP*)PTRPTR(value_tup(v46)))->cells[1];
						tup_decref_outer(value_tup(v46));
						struct mirth_type_StackType v49 = mtw_mirth_type_StackType_ConsLabel(V_mirth_type_StackType(v47), v33, v34);
						PTUP r50 = PTRMK(0,tup_new(2),0);
						((TUP*)PTRPTR(r50))->size = 2;
						((TUP*)PTRPTR(r50))->cells[1] = v48;
						((TUP*)PTRPTR(r50))->cells[0] = MK_mirth_type_StackType(v49);
						struct std_maybe_Maybe_1 v51 = mtw_std_maybe_Maybe_1_Some(MKTUP(r50));
						branch_Maybe_45 = v51;
						branch_zaMirth_44 = v42;
					} break;
					case std_maybe_Maybe_1_None: {
						decref(MK_mirth_type_Type(v33));
						struct std_maybe_Maybe_1 v52 = { .tag=std_maybe_Maybe_1_None };
						branch_Maybe_45 = v52;
						branch_zaMirth_44 = v42;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				branch_Maybe_40 = branch_Maybe_45;
				branch_zaMirth_39 = branch_zaMirth_44;
			}
			branch_Maybe_9 = branch_Maybe_40;
			branch_zaMirth_8 = branch_zaMirth_39;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v53;
			uint64_t v54;
			struct mirth_type_StackType v55 = mtp_mirth_type_StackType_WithLabel(v7, &v53, &v54);
			uint64_t v56 = v54;
			uint64_t v57 = in_Label_2;
			bool v58 = (v56 == v57);
			struct mirth_mirth_zaMirth* branch_zaMirth_59;
			struct std_maybe_Maybe_1 branch_Maybe_60;
			if (v58) {
				PTUP r61 = PTRMK(0,tup_new(2),0);
				((TUP*)PTRPTR(r61))->size = 2;
				((TUP*)PTRPTR(r61))->cells[1] = MK_mirth_type_Type(v53);
				((TUP*)PTRPTR(r61))->cells[0] = MK_mirth_type_StackType(v55);
				struct std_maybe_Maybe_1 v62 = mtw_std_maybe_Maybe_1_Some(MKTUP(r61));
				branch_Maybe_60 = v62;
				branch_zaMirth_59 = v6;
			} else {
				struct mirth_mirth_zaMirth* v63;
				struct std_maybe_Maybe_1 v64 = mw_mirth_type_StackType_forcezewithzelabelzyzx(v6, in_Label_2, v55, &v63);
				struct mirth_mirth_zaMirth* branch_zaMirth_65;
				struct std_maybe_Maybe_1 branch_Maybe_66;
				switch ((v64).tag) {
					case std_maybe_Maybe_1_Some: {
						VAL v67 = mtp_std_maybe_Maybe_1_Some(v64);
						VAL v68 = ((TUP*)PTRPTR(value_tup(v67)))->cells[0];
						VAL v69 = ((TUP*)PTRPTR(value_tup(v67)))->cells[1];
						tup_decref_outer(value_tup(v67));
						struct mirth_type_StackType v70 = mtw_mirth_type_StackType_WithLabel(V_mirth_type_StackType(v68), v53, v54);
						PTUP r71 = PTRMK(0,tup_new(2),0);
						((TUP*)PTRPTR(r71))->size = 2;
						((TUP*)PTRPTR(r71))->cells[1] = v69;
						((TUP*)PTRPTR(r71))->cells[0] = MK_mirth_type_StackType(v70);
						struct std_maybe_Maybe_1 v72 = mtw_std_maybe_Maybe_1_Some(MKTUP(r71));
						branch_Maybe_66 = v72;
						branch_zaMirth_65 = v63;
					} break;
					case std_maybe_Maybe_1_None: {
						decref(MK_mirth_type_Type(v53));
						struct std_maybe_Maybe_1 v73 = { .tag=std_maybe_Maybe_1_None };
						branch_Maybe_66 = v73;
						branch_zaMirth_65 = v63;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				branch_Maybe_60 = branch_Maybe_66;
				branch_zaMirth_59 = branch_zaMirth_65;
			}
			branch_Maybe_9 = branch_Maybe_60;
			branch_zaMirth_8 = branch_zaMirth_59;
		} break;
		case mirth_type_StackType_Meta: {
			uint64_t v74 = mtp_mirth_type_StackType_Meta(v7);
			struct mirth_mirth_zaMirth* v75;
			struct mirth_type_StackType v76 = mw_mirth_type_StackType_Freshzx(v6, &v75);
			struct mirth_mirth_zaMirth* v77;
			struct mirth_type_Type v78 = mw_mirth_type_Resource_Freshzx(v75, &v77);
			incref(MK_mirth_type_StackType(v76));
			incref(MK_mirth_type_Type(v78));
			struct mirth_type_StackType v79 = mtw_mirth_type_StackType_WithLabel(v76, v78, in_Label_2);
			struct mirth_type_Type v80 = mw_mirth_type_StackType_zgType(v79);
			struct std_maybe_Maybe_1 v81 = mtw_std_maybe_Maybe_1_Some(MK_mirth_type_Type(v80));
			struct mirth_mirth_zaMirth* v82;
			mw_mirth_type_MetaVar_typezyzx(v77, v81, v74, &v82);
			PTUP r83 = PTRMK(0,tup_new(2),0);
			((TUP*)PTRPTR(r83))->size = 2;
			((TUP*)PTRPTR(r83))->cells[1] = MK_mirth_type_Type(v78);
			((TUP*)PTRPTR(r83))->cells[0] = MK_mirth_type_StackType(v76);
			struct std_maybe_Maybe_1 v84 = mtw_std_maybe_Maybe_1_Some(MKTUP(r83));
			branch_Maybe_9 = v84;
			branch_zaMirth_8 = v82;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_4 = branch_zaMirth_8;
	return branch_Maybe_9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rsi, %r14
leaq -0x30(%rbp), %rax
movl %edx, %esi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x34dd2
cmpl $0x8, %eax
ja 0x3a0e3
movl %eax, %eax
leaq 0x99021(%rip), %rcx     # 0xd2b50
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x2
popq %rdi
callq 0xd928
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
movw $0x2, 0x6(%rcx)
leaq 0xcef8f(%rip), %rdx     # 0x108ae9
andq $0x0, 0x18(%rcx)
movq %rdx, 0x20(%rcx)
andq $0x0, 0x8(%rcx)
leaq 0xcf052(%rip), %rdx     # 0x108bc1
jmp 0x39ea2
movq %rbx, -0x68(%rbp)
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
callq 0x34e20
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %r12
movq %r12, %rsi
callq 0x3a29b
movq %rax, %r13
movq (%r12), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a4de
movq %rax, %rcx
movq %r13, %rdx
andq %r15, %rdx
sete %sil
testb $0x3, %r13b
setne %dil
orb %sil, %dil
jne 0x39bca
incl (%rdx)
movq %r13, %r12
btsq $0x32, %r12
movabsq $0x3000000000000, %rbx  # imm = 0x3000000000000
orq %rax, %rbx
andq %r15, %rax
sete %dl
testb $0x3, %cl
setne %sil
orb %dl, %sil
jne 0x39bf3
incl (%rax)
pushq $0x4
popq %rdi
pushq $0x3
popq %rdx
movq %r13, %rsi
movq %r14, %r8
callq 0x39a7a
pushq $0x8
popq %rdi
movq %rdx, %rsi
callq 0x3883b
shlq $0x30, %rax
orq %rdx, %rax
movq %rax, %rdi
leaq 0xceec9(%rip), %r13     # 0x108ae9
movq %r13, %rsi
callq 0x8d0c
movq -0x60(%rbp), %rdi
leaq -0x38(%rbp), %r14
movq %rdx, %rsi
movq -0x50(%rbp), %rdx
movq %r14, %rcx
callq 0x2ab8f
pushq $0x2
popq %rdi
callq 0xd928
andq %rax, %r15
movw $0x2, 0x6(%r15)
movq %rbx, 0x18(%r15)
movq %r13, 0x20(%r15)
movq %r12, 0x8(%r15)
leaq 0xcef5d(%rip), %rcx     # 0x108bc1
movq %rcx, 0x10(%r15)
leaq 0xce72a(%rip), %rsi     # 0x108399
movq %rax, %rdi
callq 0x8d0c
movq (%r14), %rax
pushq $0x1
popq %r14
jmp 0x3a088
movq %rdx, %rdi
callq 0x34edb
xorl %r14d, %r14d
movq -0x30(%rbp), %rax
xorl %edx, %edx
jmp 0x3a08c
leaq -0x48(%rbp), %r15
movq %rdx, %rdi
movq %r15, %rsi
callq 0x34f7f
movq %rdx, %rcx
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %r8
movq %r14, %rsi
movl %eax, %edx
callq 0x39af5
movq %rdx, %rcx
movl (%r15), %edi
movq 0x8(%r15), %rsi
leaq -0x60(%rbp), %r8
movl %eax, %edx
callq 0x3a149
jmp 0x39d52
pushq $0x2
popq %rdi
callq 0xd928
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
movq %rax, %rdx
andq %rcx, %rdx
movw $0x2, 0x6(%rdx)
leaq 0xcedf0(%rip), %rsi     # 0x108ae9
addq $0x4, %rcx
movq %rcx, 0x18(%rdx)
movq %rsi, 0x20(%rdx)
leaq 0xceeb5(%rip), %rsi     # 0x108bc1
movq %rcx, 0x8(%rdx)
movq %rsi, 0x10(%rdx)
jmp 0x39ea6
leaq -0x48(%rbp), %r15
movq %rdx, %rdi
movq %r15, %rsi
callq 0x34ef8
movq %rdx, %rcx
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %r8
movq %r14, %rsi
movl %eax, %edx
callq 0x39af5
movq %rdx, %rcx
movl (%r15), %edi
movq 0x8(%r15), %rsi
leaq -0x60(%rbp), %r8
movl %eax, %edx
callq 0x3a38c
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x39d89
decl (%rcx)
jne 0x39d89
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xced68(%rip), %rsi     # 0x108ae9
movq %rax, %rdi
callq 0xce94
movl -0x60(%rbp), %r14d
movq -0x58(%rbp), %rdx
movq -0x38(%rbp), %rax
jmp 0x3a08c
leaq -0x48(%rbp), %rsi
leaq -0x38(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rdx
callq 0x3502f
movl %eax, %r15d
movq %rdx, %r12
cmpq %r14, (%r13)
jne 0x39ec2
movq %rbx, %r13
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
movq -0x40(%rbp), %rax
movq %rax, %rcx
andq %rbx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x39dfc
movl -0x48(%rbp), %edi
decl (%rcx)
jne 0x39dfc
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xcecf2(%rip), %rsi     # 0x108ae9
callq 0xce94
andq %r12, %rbx
sete %al
testb $0x3, %r12b
setne %cl
orb %al, %cl
jne 0x39e27
decl (%rbx)
jne 0x39e27
shlq $0x30, %r15
orq %r12, %r15
leaq 0xceda2(%rip), %rsi     # 0x108bc1
movq %r15, %rdi
callq 0xce94
xorl %r14d, %r14d
movq -0x30(%rbp), %rax
xorl %edx, %edx
movq %r13, %rbx
jmp 0x3a08c
leaq -0x48(%rbp), %rsi
leaq -0x38(%rbp), %r13
movq %rdx, %rdi
movq %r13, %rdx
callq 0x350d3
movl %eax, %r15d
movq %rdx, %r12
cmpq %r14, (%r13)
jne 0x39fa2
pushq $0x2
popq %rdi
callq 0xd928
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
movw $0x2, 0x6(%rcx)
movl -0x48(%rbp), %edx
shlq $0x30, %rdx
orq -0x40(%rbp), %rdx
leaq 0xcec61(%rip), %rsi     # 0x108ae9
movq %rdx, 0x18(%rcx)
movq %rsi, 0x20(%rcx)
shlq $0x30, %r15
orq %r12, %r15
leaq 0xced23(%rip), %rdx     # 0x108bc1
movq %r15, 0x8(%rcx)
movq %rdx, 0x10(%rcx)
leaq 0xce4ec(%rip), %rsi     # 0x108399
movq %rax, %rdi
callq 0x8d0c
pushq $0x1
popq %r14
movq -0x30(%rbp), %rax
jmp 0x3a08c
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %r8
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
callq 0x39af5
movl %eax, %r14d
testl %eax, %eax
je 0x3a0a1
movq %rbx, -0x68(%rbp)
cmpl $0x1, %r14d
jne 0x3a0e3
movq %rdx, %rdi
callq 0xd491
movq %rax, %r12
movq %rdx, -0x50(%rbp)
movq %rax, %rdi
movq %rdx, %rsi
callq 0x8a95
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
movq %r12, %r15
andq %rbx, %r15
movq 0x8(%r15), %r13
movq %r12, %rdi
movq -0x50(%rbp), %rsi
callq 0x8a95
movups 0x18(%r15), %xmm0
movaps %xmm0, -0x60(%rbp)
movq %r12, %rdi
movq -0x50(%rbp), %rsi
callq 0x8a95
movq %r12, %rdi
callq 0x8ae0
movq %r13, %rdi
shrq $0x30, %rdi
andq %rbx, %r13
movq -0x38(%rbp), %r8
movl -0x48(%rbp), %edx
movq -0x40(%rbp), %rcx
movq %r13, %rsi
callq 0x393fa
movq %rdx, %r15
pushq $0x2
popq %rdi
callq 0xd928
andq %rax, %rbx
movw $0x2, 0x6(%rbx)
movaps -0x60(%rbp), %xmm0
movups %xmm0, 0x18(%rbx)
movabsq $0x6000000000000, %rcx  # imm = 0x6000000000000
orq %r15, %rcx
leaq 0xcec2c(%rip), %rdx     # 0x108bc1
movq %rcx, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
jmp 0x3a075
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %r8
movq %r14, %rsi
movl %r15d, %edx
movq %r12, %rcx
callq 0x39af5
movl %eax, %r14d
testl %eax, %eax
je 0x3a0a1
movq %rbx, -0x68(%rbp)
cmpl $0x1, %r14d
jne 0x3a0e3
movq %rdx, %rdi
callq 0xd491
movq %rax, %r12
movq %rdx, -0x50(%rbp)
movq %rax, %rdi
movq %rdx, %rsi
callq 0x8a95
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
movq %r12, %r15
andq %rbx, %r15
movq 0x8(%r15), %r13
movq %r12, %rdi
movq -0x50(%rbp), %rsi
callq 0x8a95
movups 0x18(%r15), %xmm0
movaps %xmm0, -0x60(%rbp)
movq %r12, %rdi
movq -0x50(%rbp), %rsi
callq 0x8a95
movq %r12, %rdi
callq 0x8ae0
movq %r13, %rdi
shrq $0x30, %rdi
andq %rbx, %r13
movq -0x38(%rbp), %r8
movl -0x48(%rbp), %edx
movq -0x40(%rbp), %rcx
movq %r13, %rsi
callq 0x39a7a
movq %rdx, %r15
pushq $0x2
popq %rdi
callq 0xd928
andq %rax, %rbx
movw $0x2, 0x6(%rbx)
movaps -0x60(%rbp), %xmm0
movups %xmm0, 0x18(%rbx)
btsq $0x33, %r15
leaq 0xceb54(%rip), %rcx     # 0x108bc1
movq %r15, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
leaq 0xce31d(%rip), %rsi     # 0x108399
movq %rax, %rdi
callq 0x8d0c
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rbx
movq %rax, (%rbx)
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x3a0da
movl -0x48(%rbp), %edi
decl (%rcx)
jne 0x3a0da
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xcea14(%rip), %rsi     # 0x108ae9
callq 0xce94
movq -0x70(%rbp), %rax
jmp 0x39c92
leaq 0x9a723(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6