// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_MetaVar_unifyzx
static struct mirth_type_Type mw_mirth_type_MetaVar_unifyzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_Type in_Type_2, uint64_t in_MetaVar_3, struct mirth_mirth_zaMirth* *out_zaMirth_4) {
	struct mirth_mirth_zaMirth* v6;
	struct std_maybe_Maybe_1 v7 = mw_mirth_type_MetaVar_typezy(in_zaMirth_1, in_MetaVar_3, &v6);
	struct mirth_mirth_zaMirth* branch_zaMirth_8;
	struct mirth_type_Type branch_Type_9;
	switch ((v7).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v10 = mtp_std_maybe_Maybe_1_Some(v7);
			struct mirth_mirth_zaMirth* v11;
			struct mirth_type_Type v12 = mw_mirth_type_Type_unifyzx(v6, in_Type_2, V_mirth_type_Type(v10), &v11);
			branch_Type_9 = v12;
			branch_zaMirth_8 = v11;
		} break;
		case std_maybe_Maybe_1_None: {
			incref(MK_mirth_type_Type(in_Type_2));
			struct mirth_mirth_zaMirth* v13;
			bool v14 = mw_mirth_type_Type_metazd(v6, in_MetaVar_3, in_Type_2, &v13);
			struct mirth_type_Type branch_Type_15;
			struct mirth_mirth_zaMirth* branch_zaMirth_16;
			if (v14) {
				branch_zaMirth_16 = v13;
				branch_Type_15 = in_Type_2;
			} else {
				incref(MK_mirth_type_Type(in_Type_2));
				struct mirth_mirth_zaMirth* v17;
				bool v18 = mw_mirth_type_Type_haszemetazy(v13, in_MetaVar_3, in_Type_2, &v17);
				struct mirth_mirth_zaMirth* branch_zaMirth_19;
				struct mirth_type_Type branch_Type_20;
				if (v18) {
					struct mirth_type_Type v21 = mtw_mirth_type_Type_Meta(in_MetaVar_3);
					struct mirth_mirth_zaMirth* v22;
					struct mirth_type_Type v23 = mw_mirth_type_Type_unifyzefailedzx(v17, in_Type_2, v21, &v22);
					branch_Type_20 = v23;
					branch_zaMirth_19 = v22;
				} else {
					incref(MK_mirth_type_Type(in_Type_2));
					struct std_maybe_Maybe_1 v24 = mtw_std_maybe_Maybe_1_Some(MK_mirth_type_Type(in_Type_2));
					struct mirth_mirth_zaMirth* v25;
					mw_mirth_type_MetaVar_typezyzx(v17, v24, in_MetaVar_3, &v25);
					branch_Type_20 = in_Type_2;
					branch_zaMirth_19 = v25;
				}
				branch_zaMirth_16 = branch_zaMirth_19;
				branch_Type_15 = branch_Type_20;
			}
			branch_Type_9 = branch_Type_15;
			branch_zaMirth_8 = branch_zaMirth_16;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*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, %r14
movq %rcx, %r12
movq %rdx, %r15
movl %esi, %r13d
leaq -0x40(%rbp), %rdx
movq %rcx, %rsi
callq 0x2e11b
testl %eax, %eax
je 0x389f0
cmpl $0x1, %eax
jne 0x38b67
movq %rdx, %rdi
callq 0xdaeb
movq -0x40(%rbp), %rdi
movabsq $0xfffffffffffc, %r8    # imm = 0xFFFFFFFFFFFC
andq %rax, %r8
movq %rax, %rcx
shrq $0x30, %rcx
leaq -0x38(%rbp), %rbx
movl %r13d, %esi
movq %r15, %rdx
movq %rbx, %r9
callq 0x36df1
movl %eax, %r13d
movq %rdx, %r15
movq (%rbx), %rbx
jmp 0x38b4f
movq %r14, -0x30(%rbp)
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
movq %r13, %r14
shlq $0x30, %r14
movq %r15, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x38a1b
incl (%rax)
orq %r15, %r14
movq -0x40(%rbp), %rbx
cmpl $0x3, %r13d
jne 0x38a55
movq 0x8(%r15), %rax
decl (%r15)
jne 0x38a4b
movq %r15, %rdi
movq %rax, -0x48(%rbp)
callq 0x5030
movq -0x48(%rbp), %rax
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
cmpq %r12, %rax
jne 0x38a86
jmp 0x38b4b
movq %r15, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x38a86
decl (%rax)
jne 0x38a86
movq %r14, %rdi
leaq 0xdd072(%rip), %rsi     # 0x115ae9
callq 0xd4e3
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
movq %r15, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x38a9c
incl (%rax)
leaq -0x38(%rbp), %r8
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %edx
movq %r15, %rcx
callq 0x3b74b
testb %al, %al
je 0x38ae6
movq %r12, %rdi
callq 0x2e4c2
movq %rdx, %r8
movq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rbx
movl %r13d, %esi
movq %r15, %rdx
movl $0x3, %ecx
movq %rbx, %r9
callq 0x3b9e2
movq (%rbx), %rbx
xorl %r13d, %r13d
xorl %r15d, %r15d
jmp 0x38b4b
movq %r15, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x38b06
incl (%rax)
movq %r14, %rdi
leaq 0xdcfd9(%rip), %rsi     # 0x115ae9
callq 0x95f6
movq %rdx, %r14
movq -0x38(%rbp), %rbx
leaq 0x10e0905(%rip), %rdi   # 0x1119428
movq %r12, %rsi
callq 0x13ff0
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
addq $0x4, %rdi
orq %r14, %rdi
leaq 0xdc77e(%rip), %rsi     # 0x1152c1
movq %rax, %rdx
callq 0x14ab5
movq -0x30(%rbp), %r14
movq %rbx, (%r14)
movl %r13d, %eax
movq %r15, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0xabbcd(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0xabbd2(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5