// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_Value_applyzesubst
static struct mirth_type_Type mw_mirth_type_Value_applyzesubst (struct mirth_mirth_zaMirth* in_zaMirth_1, struct std_list_List_1 in_Subst_2, struct mirth_type_Value in_Value_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct std_list_List_1 *out_Subst_5) {
	struct mirth_mirth_zaMirth* branch_zaMirth_7;
	struct std_list_List_1 branch_Subst_8;
	struct mirth_type_Type branch_Type_9;
	switch ((in_Value_3).tag) {
		case mirth_type_Value_Int: {
			INT v10 = mtp_mirth_type_Value_Int(in_Value_3);
			struct mirth_type_Value v11 = mtw_mirth_type_Value_Int(v10);
			struct mirth_type_Type v12 = mtw_mirth_type_Type_Value(v11);
			branch_Type_9 = v12;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Value_Str: {
			STR* v13 = mtp_mirth_type_Value_Str(in_Value_3);
			struct mirth_type_Value v14 = mtw_mirth_type_Value_Str(v13);
			struct mirth_type_Type v15 = mtw_mirth_type_Type_Value(v14);
			branch_Type_9 = v15;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Value_F64: {
			double v16 = mtp_mirth_type_Value_F64(in_Value_3);
			struct mirth_type_Value v17 = mtw_mirth_type_Value_F64(v16);
			struct mirth_type_Type v18 = mtw_mirth_type_Type_Value(v17);
			branch_Type_9 = v18;
			branch_Subst_8 = in_Subst_2;
			branch_zaMirth_7 = in_zaMirth_1;
		} break;
		case mirth_type_Value_Block: {
			uint64_t v19 = mtp_mirth_type_Value_Block(in_Value_3);
			struct mirth_mirth_zaMirth* v20;
			struct mirth_type_ArrowType* v21 = mw_mirth_arrow_Block_type(in_zaMirth_1, v19, &v20);
			struct mirth_mirth_zaMirth* v22;
			struct std_list_List_1 v23;
			struct mirth_type_ArrowType* v24 = mw_mirth_type_ArrowType_applyzesubst(v20, in_Subst_2, v21, &v22, &v23);
			struct mirth_type_Type v25 = mtw_mirth_type_Type_Arrow(v24);
			branch_Type_9 = v25;
			branch_Subst_8 = v23;
			branch_zaMirth_7 = v22;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_Subst_5 = branch_Subst_8;
	*out_zaMirth_4 = branch_zaMirth_7;
	return branch_Type_9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
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)
movl -0x30(%rbp), %eax
movq %rax, -0x120(%rbp)
subq $0x3, %rax
ja 0xdbf20
movq -0x120(%rbp), %rax
leaq 0x276275(%rip), %rcx    # 0x351f7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x88310
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0xce280
movl %eax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movl -0x70(%rbp), %edi
movq -0x68(%rbp), %rsi
callq 0xb5300
movl %eax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xdbf39
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x88460
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0xce310
movl %eax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0xb5300
movl %eax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xdbf39
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x88410
movsd %xmm0, -0xb0(%rbp)
movsd -0xb0(%rbp), %xmm0
callq 0xce3a0
movl %eax, -0xc0(%rbp)
movq %rdx, -0xb8(%rbp)
movl -0xc0(%rbp), %edi
movq -0xb8(%rbp), %rsi
callq 0xb5300
movl %eax, -0xd0(%rbp)
movq %rdx, -0xc8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xdbf39
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x88560
movq %rax, -0xd8(%rbp)
movq -0x38(%rbp), %rdi
movq -0xd8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0xc26a0
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
movq -0xe8(%rbp), %rcx
movl -0x20(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq -0xf0(%rbp), %r8
leaq -0x100(%rbp), %r9
callq 0xdbbd0
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
callq 0xaf380
movl %eax, -0x118(%rbp)
movq %rdx, -0x110(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xdbf39
leaq 0x277f5a(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq 0x10(%rbp), %rax
movups -0x58(%rbp), %xmm0
movups %xmm0, (%rax)
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop