// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_c99_zaC99Stack_popzeresourcezelabelzy
static uint64_t mw_mirth_c99_zaC99Stack_popzeresourcezelabelzy (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_c99_zaC99Stack in_zaC99Stack_2, uint64_t in_Label_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_c99_zaC99Stack *out_zaC99Stack_5, struct std_maybe_zaMaybe_1 *out_zaMaybe_7) {
	struct mirth_mirth_zaMirth* branch_zaMirth_8;
	struct mirth_c99_zaC99Stack branch_zaC99Stack_9;
	uint64_t branch_Label_10;
	struct std_maybe_zaMaybe_1 branch_zaMaybe_11;
	switch ((in_zaC99Stack_2).tag) {
		case mirth_c99_zaC99Stack_zaNil: {
			struct std_maybe_zaMaybe_1 v12 = { .tag=std_maybe_zaMaybe_1_zaNone };
			struct mirth_c99_zaC99Stack v13 = { .tag=mirth_c99_zaC99Stack_zaNil };
			branch_zaMaybe_11 = v12;
			branch_Label_10 = in_Label_3;
			branch_zaC99Stack_9 = v13;
			branch_zaMirth_8 = in_zaMirth_1;
		} break;
		case mirth_c99_zaC99Stack_zaCons: {
			struct mirth_c99_zaC99Stack v14;
			struct mirth_c99_zaC99Value* v15;
			mtp_mirth_c99_zaC99Stack_zaCons(in_zaC99Stack_2, &v14, &v15);
			struct mirth_mirth_zaMirth* v16;
			struct mirth_c99_zaC99Stack v17;
			struct std_maybe_zaMaybe_1 v18;
			uint64_t v19 = mw_mirth_c99_zaC99Stack_popzeresourcezelabelzy(in_zaMirth_1, v14, in_Label_3, &v16, &v17, &v18);
			struct mirth_c99_zaC99Stack v20;
			mtw_mirth_c99_zaC99Stack_zaCons(v17, v15, &v20);
			branch_zaMaybe_11 = v18;
			branch_Label_10 = v19;
			branch_zaC99Stack_9 = v20;
			branch_zaMirth_8 = v16;
		} break;
		case mirth_c99_zaC99Stack_zaWith: {
			struct mirth_c99_zaC99Stack v21;
			struct mirth_c99_zaC99Resource* v22;
			mtp_mirth_c99_zaC99Stack_zaWith(in_zaC99Stack_2, &v21, &v22);
			struct mirth_mirth_zaMirth* v23;
			struct mirth_c99_zaC99Stack v24;
			struct std_maybe_zaMaybe_1 v25;
			uint64_t v26 = mw_mirth_c99_zaC99Stack_popzeresourcezelabelzy(in_zaMirth_1, v21, in_Label_3, &v23, &v24, &v25);
			struct mirth_c99_zaC99Stack v27;
			mtw_mirth_c99_zaC99Stack_zaWith(v24, v22, &v27);
			branch_zaMaybe_11 = v25;
			branch_Label_10 = v26;
			branch_zaC99Stack_9 = v27;
			branch_zaMirth_8 = v23;
		} break;
		case mirth_c99_zaC99Stack_zaConsLabel: {
			struct mirth_c99_zaC99Stack v28;
			struct mirth_c99_zaC99Value* v29;
			uint64_t v30 = mtp_mirth_c99_zaC99Stack_zaConsLabel(in_zaC99Stack_2, &v28, &v29);
			struct mirth_mirth_zaMirth* v31;
			struct mirth_c99_zaC99Stack v32;
			struct std_maybe_zaMaybe_1 v33;
			uint64_t v34 = mw_mirth_c99_zaC99Stack_popzeresourcezelabelzy(in_zaMirth_1, v28, in_Label_3, &v31, &v32, &v33);
			struct mirth_c99_zaC99Stack v35;
			mtw_mirth_c99_zaC99Stack_zaConsLabel(v32, v29, v30, &v35);
			branch_zaMaybe_11 = v33;
			branch_Label_10 = v34;
			branch_zaC99Stack_9 = v35;
			branch_zaMirth_8 = v31;
		} break;
		case mirth_c99_zaC99Stack_zaWithLabel: {
			struct mirth_c99_zaC99Stack v36;
			struct mirth_c99_zaC99Resource* v37;
			uint64_t v38 = mtp_mirth_c99_zaC99Stack_zaWithLabel(in_zaC99Stack_2, &v36, &v37);
			uint64_t v39 = v38;
			uint64_t v40 = in_Label_3;
			bool v41 = (v39 == v40);
			struct mirth_mirth_zaMirth* branch_zaMirth_42;
			struct mirth_c99_zaC99Stack branch_zaC99Stack_43;
			uint64_t branch_Label_44;
			struct std_maybe_zaMaybe_1 branch_zaMaybe_45;
			if (v41) {
				struct std_maybe_zaMaybe_1 v46;
				mtw_std_maybe_zaMaybe_1_zaSome(MK_mirth_c99_zaC99Resource(v37), &v46);
				branch_zaMaybe_45 = v46;
				branch_Label_44 = in_Label_3;
				branch_zaC99Stack_43 = v36;
				branch_zaMirth_42 = in_zaMirth_1;
			} else {
				struct mirth_mirth_zaMirth* v47;
				struct mirth_c99_zaC99Stack v48;
				struct std_maybe_zaMaybe_1 v49;
				uint64_t v50 = mw_mirth_c99_zaC99Stack_popzeresourcezelabelzy(in_zaMirth_1, v36, in_Label_3, &v47, &v48, &v49);
				struct mirth_c99_zaC99Stack v51;
				mtw_mirth_c99_zaC99Stack_zaWithLabel(v48, v37, v38, &v51);
				branch_zaMaybe_45 = v49;
				branch_Label_44 = v50;
				branch_zaC99Stack_43 = v51;
				branch_zaMirth_42 = v47;
			}
			branch_zaMaybe_11 = branch_zaMaybe_45;
			branch_Label_10 = branch_Label_44;
			branch_zaC99Stack_9 = branch_zaC99Stack_43;
			branch_zaMirth_8 = branch_zaMirth_42;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMaybe_7 = branch_zaMaybe_11;
	*out_zaC99Stack_5 = branch_zaC99Stack_9;
	*out_zaMirth_4 = branch_zaMirth_8;
	return branch_Label_10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpl $0x4, %esi
ja 0xa8728
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r12
movq 0x10(%rbp), %rdi
movl %esi, %eax
leaq 0x2ba80(%rip), %rcx     # 0xd3fac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
jmp 0xa8704
leaq -0x70(%rbp), %rsi
leaq -0x30(%rbp), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0xa70b2
cmpq %r15, %rax
jne 0xa86b2
movq -0x30(%rbp), %rdi
leaq 0x61c8c(%rip), %rsi     # 0x10a1f8
leaq -0x50(%rbp), %rdx
callq 0x726ad
movups -0x70(%rbp), %xmm0
movaps %xmm0, -0x60(%rbp)
jmp 0xa8700
leaq -0x70(%rbp), %r13
leaq -0x30(%rbp), %rax
movq %rdx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xa7079
movl (%r13), %esi
movq 0x8(%r13), %rdx
leaq -0x50(%rbp), %rax
movq %rax, (%rsp)
leaq -0x38(%rbp), %r8
leaq -0x88(%rbp), %r13
movq %r12, %rdi
movq %r15, %rcx
movq %r8, %r12
movq %r13, %r9
callq 0xa84f9
movq %rax, %r15
leaq -0x30(%rbp), %rax
movq (%rax), %rdx
movl (%r13), %edi
movq 0x8(%r13), %rsi
leaq -0x60(%rbp), %rcx
callq 0xa4ceb
jmp 0xa86a8
leaq -0x70(%rbp), %r13
leaq -0x30(%rbp), %rax
movq %rdx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xa70f6
movq %rax, -0x78(%rbp)
movl (%r13), %esi
movq 0x8(%r13), %rdx
leaq -0x50(%rbp), %rax
movq %rax, (%rsp)
leaq -0x38(%rbp), %r8
leaq -0x88(%rbp), %r13
movq %r12, %rdi
movq %r15, %rcx
movq %r8, %r12
movq %r13, %r9
callq 0xa84f9
movq %rax, %r15
leaq -0x30(%rbp), %rax
movq (%rax), %rdx
movl (%r13), %edi
movq 0x8(%r13), %rsi
leaq -0x60(%rbp), %r8
movq -0x78(%rbp), %rcx
callq 0xa4be1
jmp 0xa86a8
leaq -0x70(%rbp), %r13
leaq -0x30(%rbp), %rax
movq %rdx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xa7040
movl (%r13), %esi
movq 0x8(%r13), %rdx
leaq -0x50(%rbp), %rax
movq %rax, (%rsp)
leaq -0x38(%rbp), %r8
leaq -0x88(%rbp), %r13
movq %r12, %rdi
movq %r15, %rcx
movq %r8, %r12
movq %r13, %r9
callq 0xa84f9
movq %rax, %r15
leaq -0x30(%rbp), %rax
movq (%rax), %rdx
movl (%r13), %edi
movq 0x8(%r13), %rsi
leaq -0x60(%rbp), %rcx
callq 0xa4b7d
movq 0x10(%rbp), %rdi
movq (%r12), %r12
jmp 0xa8704
movq %rax, %r13
movl -0x70(%rbp), %esi
movq -0x68(%rbp), %rdx
leaq -0x50(%rbp), %rax
movq %rax, (%rsp)
leaq -0x38(%rbp), %r8
leaq -0x88(%rbp), %r9
movq %r12, %rdi
movq %r15, %rcx
movq %r9, %r12
callq 0xa84f9
movq %rax, %r15
movq -0x30(%rbp), %rdx
movl (%r12), %edi
movq 0x8(%r12), %rsi
leaq -0x60(%rbp), %r8
movq %r13, %rcx
callq 0xa4d4f
leaq -0x38(%rbp), %rax
movq (%rax), %r12
movq 0x10(%rbp), %rdi
movaps -0x50(%rbp), %xmm0
movups %xmm0, (%rdi)
movaps -0x60(%rbp), %xmm0
movups %xmm0, (%r14)
movq %r12, (%rbx)
movq %r15, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c0de(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6