// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_c99_reversezepopzevalueszetozeenvzx
static void mw_mirth_c99_reversezepopzevalueszetozeenvzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_c99_zaC99Branch* in_zaC99Branch_2, struct std_list_List_1 in_List_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_c99_zaC99Branch* *out_zaC99Branch_5) {
	struct mirth_mirth_zaMirth* branch_zaMirth_6;
	struct mirth_c99_zaC99Branch* branch_zaC99Branch_7;
	switch ((in_List_3).tag) {
		case std_list_List_1_Nil: {
			branch_zaC99Branch_7 = in_zaC99Branch_2;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case std_list_List_1_Cons: {
			struct std_list_List_1 v8;
			VAL v9 = mtp_std_list_List_1_Cons(in_List_3, &v8);
			incref(v9);
			struct mirth_mirth_zaMirth* v10;
			struct mirth_type_Type v11 = mw_mirth_var_Var_type(in_zaMirth_1, V_mirth_var_Var(v9), &v10);
			struct mirth_mirth_zaMirth* v12;
			struct mirth_c99_zaC99Branch* v13;
			struct mirth_c99_C99ReprType v14 = mw_mirth_c99_zaC99Branch_typezetozec99zerepr(v10, in_zaC99Branch_2, v11, &v12, &v13);
			struct mirth_mirth_zaMirth* v15;
			struct mirth_c99_zaC99Branch* v16;
			struct mirth_c99_zaC99Value* v17;
			mw_mirth_c99_zaC99Branch_popzevaluezx(v12, v13, v14, &v15, &v16, &v17);
			struct mirth_mirth_zaMirth* v18;
			struct mirth_c99_zaC99Branch* v19;
			mw_mirth_c99_reversezepopzevalueszetozeenvzx(v15, v16, v8, &v18, &v19);
			struct mirth_mirth_zaMirth* v20;
			struct mirth_c99_zaC99Branch* v21;
			mw_mirth_c99_zaC99Value_pushzetozeenvzx(v18, v19, V_mirth_var_Var(v9), v17, &v20, &v21);
			branch_zaC99Branch_7 = v21;
			branch_zaMirth_6 = v20;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaC99Branch_5 = branch_zaC99Branch_7;
	*out_zaMirth_4 = branch_zaMirth_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r14
movq %rsi, %r12
movq %rdi, %r13
testl %edx, %edx
je 0xcff9b
cmpl $0x1, %edx
jne 0xcffb0
movq %r8, -0x30(%rbp)
leaq -0x50(%rbp), %rsi
movq %rcx, %rdi
callq 0xce01
movq %rax, %r15
testb $0x1, %dl
je 0xcff06
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
movq %r15, %rax
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0xcff06
incl (%rax)
leaq -0x80(%rbp), %rbx
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x32ea4
movq (%rbx), %rdi
leaq -0x40(%rbp), %rbx
movl %eax, %esi
movq %rbx, %rcx
callq 0x93a82
movq %rdx, %rcx
movq (%rbx), %rdi
leaq -0x38(%rbp), %rdx
movq %rdx, (%rsp)
leaq -0x78(%rbp), %r13
movq %r12, %rsi
movl %eax, %edx
movq %rbx, %r8
movq %r13, %r9
callq 0xa638d
movq (%rbx), %rdi
movq (%r13), %rsi
movl -0x50(%rbp), %edx
movq -0x48(%rbp), %rcx
leaq -0x70(%rbp), %rbx
leaq -0x68(%rbp), %r12
movq %rbx, %r8
movq %r12, %r9
callq 0xcfea3
movq (%rbx), %rdi
movq (%r12), %rsi
leaq -0x38(%rbp), %rax
movq (%rax), %rcx
leaq -0x60(%rbp), %rbx
leaq -0x58(%rbp), %r12
movq %r15, %rdx
movq %rbx, %r8
movq %r12, %r9
callq 0xcffc7
movq (%r12), %r12
movq (%rbx), %r13
movq -0x30(%rbp), %r8
movq %r12, (%r14)
movq %r13, (%r8)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4856(%rip), %rdi      # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6