// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_Type_unifyzeblockzx
static struct mirth_type_Type mw_mirth_type_Type_unifyzeblockzx (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Block_2, struct mirth_type_Type in_Type_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	struct mirth_mirth_zaMirth* v6;
	struct mirth_type_Type v7 = mw_mirth_type_Type_expand(in_zaMirth_1, in_Type_3, &v6);
	struct mirth_mirth_zaMirth* branch_zaMirth_8;
	struct mirth_type_Type branch_Type_9;
	switch ((v7).tag) {
		case mirth_type_Type_Error: {
			struct mirth_type_StackType v10 = { .tag=mirth_type_StackType_Error };
			struct mirth_type_StackType v11 = { .tag=mirth_type_StackType_Error };
			struct mirth_type_ArrowType* v12 = mw_mirth_type_Tzezg(v10, v11);
			struct mirth_mirth_zaMirth* v13;
			struct mirth_type_ArrowType* v14 = mw_mirth_arrow_blockzeunifyzetypezx(v6, in_Block_2, v12, &v13);
			decref(MK_mirth_type_ArrowType(v14));
			struct mirth_type_Type v15 = { .tag=mirth_type_Type_Error };
			branch_Type_9 = v15;
			branch_zaMirth_8 = v13;
		} break;
		case mirth_type_Type_Meta: {
			uint64_t v16 = mtp_mirth_type_Type_Meta(v7);
			struct mirth_mirth_zaMirth* v17;
			struct mirth_type_ArrowType* v18 = mw_mirth_arrow_Block_type(v6, in_Block_2, &v17);
			struct mirth_type_Type v19 = mtw_mirth_type_Type_Arrow(v18);
			struct mirth_mirth_zaMirth* v20;
			struct mirth_type_Type v21 = mw_mirth_type_MetaVar_unifyzx(v17, v19, v16, &v20);
			decref(MK_mirth_type_Type(v21));
			struct mirth_mirth_zaMirth* v22;
			struct mirth_arrow_Arrow* v23 = mw_mirth_arrow_Block_arrow(v20, in_Block_2, &v22);
			struct mirth_type_ArrowType* v24 = mw_mirth_arrow_Arrow_type(v23);
			struct mirth_type_Type v25 = mtw_mirth_type_Type_Arrow(v24);
			branch_Type_9 = v25;
			branch_zaMirth_8 = v22;
		} break;
		case mirth_type_Type_Arrow: {
			struct mirth_type_ArrowType* v26 = mtp_mirth_type_Type_Arrow(v7);
			struct mirth_mirth_zaMirth* v27;
			struct mirth_type_ArrowType* v28 = mw_mirth_arrow_blockzeunifyzetypezx(v6, in_Block_2, v26, &v27);
			struct mirth_type_Type v29 = mtw_mirth_type_Type_Arrow(v28);
			branch_Type_9 = v29;
			branch_zaMirth_8 = v27;
		} break;
		default: {
			struct mirth_mirth_zaMirth* v30;
			struct mirth_type_ArrowType* v31 = mw_mirth_arrow_Block_type(v6, in_Block_2, &v30);
			struct mirth_type_Type v32 = mtw_mirth_type_Type_Arrow(v31);
			struct mirth_mirth_zaMirth* v33;
			struct mirth_type_Type v34 = mw_mirth_type_Type_unifyzx(v30, v32, v7, &v33);
			branch_Type_9 = v34;
			branch_zaMirth_8 = v33;
		} break;
	}
	*out_zaMirth_4 = branch_zaMirth_8;
	return branch_Type_9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rsi, %r15
leaq -0x38(%rbp), %rax
movl %edx, %esi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x2ab4b
movq %rdx, %r14
cmpl $0xa, %eax
je 0x379d2
movl %eax, %r12d
cmpl $0x3, %eax
je 0x37936
testl %r12d, %r12d
jne 0x37a01
xorl %r14d, %r14d
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1e896
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rcx
movq %r15, %rsi
movq %rax, %rdx
callq 0x37a50
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x3792b
decl (%rcx)
jne 0x3792b
leaq 0xd1256(%rip), %rsi     # 0x108b79
movq %rax, %rdi
callq 0xce94
movq -0x30(%rbp), %rax
xorl %edx, %edx
jmp 0x37a3b
movq %r14, %rdi
callq 0x2aabf
movq %rax, %r12
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x370ab
movq %rax, %rdi
callq 0x3233d
movq (%r14), %rdi
pushq $0xa
popq %r14
leaq -0x40(%rbp), %r8
movl %r14d, %esi
movq %r12, %rcx
callq 0x34708
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x379a9
decl (%rcx)
jne 0x379a9
shlq $0x30, %rax
orq %rdx, %rax
leaq 0xd1148(%rip), %rsi     # 0x108ae9
movq %rax, %rdi
callq 0xce94
movq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x37ae3
movq %rax, %rdi
callq 0x37b22
movq %rax, %rdi
callq 0x3233d
movq (%r12), %rax
jmp 0x37a3b
movq %r14, %rdi
callq 0x2ac85
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %r14
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x37a50
movq %rax, %rdi
callq 0x3233d
movq (%r14), %rax
pushq $0xa
popq %r14
jmp 0x37a3b
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %r13
movq %r15, %rsi
movq %r13, %rdx
callq 0x370ab
movq %rax, %rdi
callq 0x3233d
movq (%r13), %rdi
pushq $0xa
popq %rsi
leaq -0x40(%rbp), %r15
movl %r12d, %ecx
movq %r14, %r8
movq %r15, %r9
callq 0x32ede
movl %eax, %r14d
movq (%r15), %rax
movq %rax, (%rbx)
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq