// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_semifreshen
static struct mirth_type_StackType mw_mirth_type_StackType_semifreshen (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, struct mirth_type_StackType in_StackType_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_type_StackType *out_StackType_6) {
	struct mirth_mirth_zaMirth* v7;
	struct mirth_type_StackType v8 = mw_mirth_type_StackType_expand(in_zaMirth_1, in_StackType_3, &v7);
	struct mirth_mirth_zaMirth* branch_zaMirth_9;
	struct mirth_type_StackType branch_StackType_10;
	struct mirth_type_StackType branch_StackType_11;
	switch ((v8).tag) {
		case mirth_type_StackType_Unit: {
			incref(MK_mirth_type_StackType(in_StackType_2));
			branch_StackType_11 = in_StackType_2;
			branch_StackType_10 = in_StackType_2;
			branch_zaMirth_9 = v7;
		} break;
		case mirth_type_StackType_Cons: {
			struct mirth_type_Type v12;
			struct mirth_type_StackType v13 = mtp_mirth_type_StackType_Cons(v8, &v12);
			struct mirth_mirth_zaMirth* v14;
			struct mirth_type_StackType v15;
			struct mirth_type_StackType v16 = mw_mirth_type_StackType_semifreshen(v7, in_StackType_2, v13, &v14, &v15);
			struct mirth_type_StackType v17 = mtw_mirth_type_StackType_Cons(v15, v12);
			branch_StackType_11 = v17;
			branch_StackType_10 = v16;
			branch_zaMirth_9 = v14;
		} break;
		case mirth_type_StackType_With: {
			struct mirth_type_Type v18;
			struct mirth_type_StackType v19 = mtp_mirth_type_StackType_With(v8, &v18);
			struct mirth_mirth_zaMirth* v20;
			struct mirth_type_StackType v21;
			struct mirth_type_StackType v22 = mw_mirth_type_StackType_semifreshen(v7, in_StackType_2, v19, &v20, &v21);
			struct mirth_type_StackType v23 = mtw_mirth_type_StackType_With(v21, v18);
			branch_StackType_11 = v23;
			branch_StackType_10 = v22;
			branch_zaMirth_9 = v20;
		} break;
		case mirth_type_StackType_ConsLabel: {
			struct mirth_type_Type v24;
			uint64_t v25;
			struct mirth_type_StackType v26 = mtp_mirth_type_StackType_ConsLabel(v8, &v24, &v25);
			struct mirth_mirth_zaMirth* v27;
			struct mirth_type_StackType v28;
			struct mirth_type_StackType v29 = mw_mirth_type_StackType_semifreshen(v7, in_StackType_2, v26, &v27, &v28);
			struct mirth_type_StackType v30 = mtw_mirth_type_StackType_ConsLabel(v28, v24, v25);
			branch_StackType_11 = v30;
			branch_StackType_10 = v29;
			branch_zaMirth_9 = v27;
		} break;
		case mirth_type_StackType_WithLabel: {
			struct mirth_type_Type v31;
			uint64_t v32;
			struct mirth_type_StackType v33 = mtp_mirth_type_StackType_WithLabel(v8, &v31, &v32);
			struct mirth_mirth_zaMirth* v34;
			struct mirth_type_StackType v35;
			struct mirth_type_StackType v36 = mw_mirth_type_StackType_semifreshen(v7, in_StackType_2, v33, &v34, &v35);
			struct mirth_type_StackType v37 = mtw_mirth_type_StackType_WithLabel(v35, v31, v32);
			branch_StackType_11 = v37;
			branch_StackType_10 = v36;
			branch_zaMirth_9 = v34;
		} break;
		default: {
			STR* v38;
			STRLIT(v38, "expected unit-based stack in semifreshen!", 41);
			do_panic(v38);
		} break;
	}
	*out_StackType_6 = branch_StackType_11;
	*out_zaMirth_4 = branch_zaMirth_9;
	return branch_StackType_10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq 0x10(%rbp), %rax
movl %esi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x30(%rbp)
movq %r8, -0x28(%rbp)
movq %rdi, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movl -0x30(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0xba1d0
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movl -0x58(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x270(%rbp)
subl $0x6, %eax
ja 0x14f3d0
movq -0x270(%rbp), %rax
leaq 0x20365e(%rip), %rcx    # 0x352614
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x14efc1
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6f140
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
movq -0x78(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x14f075
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6f140
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x90(%rbp), %rax
cmpq $0x0, %rax
je 0x14f075
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6f140
movq %rax, -0xa0(%rbp)
movq %rdx, -0x98(%rbp)
movq -0xa0(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x14f075
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6f140
movq %rax, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xb0(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x14f077
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x14f4e7
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0xba570
movl %eax, -0xd0(%rbp)
movq %rdx, -0xc8(%rbp)
movq -0x48(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0xd0(%rbp), %ecx
movq -0xc8(%rbp), %r8
leaq -0xd8(%rbp), %r9
leaq -0xe8(%rbp), %rax
movq %rax, (%rsp)
callq 0x14ef50
movl %eax, -0xf8(%rbp)
movq %rdx, -0xf0(%rbp)
movl -0xe8(%rbp), %edi
movq -0xe0(%rbp), %rsi
movl -0xc0(%rbp), %edx
movq -0xb8(%rbp), %rcx
callq 0x73df0
movl %eax, -0x108(%rbp)
movq %rdx, -0x100(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x14f4e7
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0xba740
movl %eax, -0x128(%rbp)
movq %rdx, -0x120(%rbp)
movq -0x48(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x128(%rbp), %ecx
movq -0x120(%rbp), %r8
leaq -0x130(%rbp), %r9
leaq -0x140(%rbp), %rax
movq %rax, (%rsp)
callq 0x14ef50
movl %eax, -0x150(%rbp)
movq %rdx, -0x148(%rbp)
movl -0x140(%rbp), %edi
movq -0x138(%rbp), %rsi
movl -0x118(%rbp), %edx
movq -0x110(%rbp), %rcx
callq 0x749e0
movl %eax, -0x160(%rbp)
movq %rdx, -0x158(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x14f4e7
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rsi
leaq -0x170(%rbp), %rdx
leaq -0x178(%rbp), %rcx
callq 0xba980
movl %eax, -0x188(%rbp)
movq %rdx, -0x180(%rbp)
movq -0x48(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x188(%rbp), %ecx
movq -0x180(%rbp), %r8
leaq -0x190(%rbp), %r9
leaq -0x1a0(%rbp), %rax
movq %rax, (%rsp)
callq 0x14ef50
movl %eax, -0x1b0(%rbp)
movq %rdx, -0x1a8(%rbp)
movq -0x178(%rbp), %r8
movl -0x1a0(%rbp), %edi
movq -0x198(%rbp), %rsi
movl -0x170(%rbp), %edx
movq -0x168(%rbp), %rcx
callq 0xc9e90
movl %eax, -0x1c0(%rbp)
movq %rdx, -0x1b8(%rbp)
movq -0x1c0(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x14f4e7
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
leaq -0x1d8(%rbp), %rcx
callq 0xbab70
movl %eax, -0x1e8(%rbp)
movq %rdx, -0x1e0(%rbp)
movq -0x48(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1e8(%rbp), %ecx
movq -0x1e0(%rbp), %r8
leaq -0x1f0(%rbp), %r9
leaq -0x200(%rbp), %rax
movq %rax, (%rsp)
callq 0x14ef50
movl %eax, -0x210(%rbp)
movq %rdx, -0x208(%rbp)
movq -0x1d8(%rbp), %r8
movl -0x200(%rbp), %edi
movq -0x1f8(%rbp), %rsi
movl -0x1d0(%rbp), %edx
movq -0x1c8(%rbp), %rcx
callq 0xcb770
movl %eax, -0x220(%rbp)
movq %rdx, -0x218(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x210(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x208(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x14f4e7
jmp 0x14f3d2
cmpq $0x0, 0x1246ace(%rip)   # 0x1395ea8
jne 0x14f3f4
leaq 0x20ad5c(%rip), %rdi    # 0x35a13f
movl $0x29, %esi
callq 0xb6c0
movq %rax, 0x1246ab4(%rip)   # 0x1395ea8
jmp 0x14f3f6
movq 0x1246aab(%rip), %rax   # 0x1395ea8
movq %rax, -0x238(%rbp)
leaq 0x241d4d(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x14f4cb
movq 0x1246a76(%rip), %rax   # 0x1395ea8
movq %rax, -0x248(%rbp)
leaq 0x241d18(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x240(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x248(%rbp), %rax
cmpq $0x0, %rax
je 0x14f4cb
movq 0x1246a3f(%rip), %rax   # 0x1395ea8
movq %rax, -0x258(%rbp)
leaq 0x241ce1(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x250(%rbp)
movq -0x258(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x14f4cb
movq 0x1246a0e(%rip), %rax   # 0x1395ea8
movq %rax, -0x268(%rbp)
leaq 0x241cb0(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x260(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x268(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x14f4cd
movq 0x12469d4(%rip), %rax   # 0x1395ea8
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rdi
callq 0xc620
movq 0x10(%rbp), %rax
movups -0x70(%rbp), %xmm0
movups %xmm0, (%rax)
movq -0x60(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
nopl (%rax)