// File: /workspace/github_c_makefile_star2_O3/tvlabs[P]edge264/./edge264_intra.c
// Function: decode_intraChroma
static void decode_intraChroma(int mode, uint8_t * restrict p, size_t stride, i16x8 clip) {
	#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
		static const i8x16 shufDC = {0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12};
		static const i8x16 shufDCA = {0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 12, 12, 12, 12};
		static const i8x16 shufDCB = {0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12};
	#else
		static const i8x16 shufDC = {1, 1, 1, 1, 5, 5, 5, 5, 9, 9, 9, 9, 13, 13, 13, 13};
		static const i8x16 shufDCA = {1, 1, 1, 1, 13, 13, 13, 13, 1, 1, 1, 1, 13, 13, 13, 13};
		static const i8x16 shufDCB = {1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13};
	#endif
	INIT_P();
	i8x16 bt, rt, bl, rl, shuf;
	i64x2 bpred, rpred;
	switch (mode) {
	default: __builtin_unreachable();
	
	case IC8x8_DC_8:
		bt = load64(P(0, -2));
		rt = load64(P(0, -1));
		bl = ldleft8(0, 2, 4, 6, 8, 10, 12, 14);
		rl = ldleft8(1, 3, 5, 7, 9, 11, 13, 15);
		shuf = shufDC;
	chroma_dc_8x8_sum: {
		#if defined(__SSE2__)
			i8x16 b = ziplo64(bt, bl);
			i8x16 r = ziplo64(rt, rl);
			i16x8 b01 = sumh8(shuffle32(b, 0, 2, 1, 1));
			i16x8 r01 = sumh8(shuffle32(r, 0, 2, 1, 1));
			i16x8 b23 = sumh8(shuffle32(b, 3, 3, 1, 3));
			i16x8 r23 = sumh8(shuffle32(r, 3, 3, 1, 3));
			bpred = shuffle(shrru16(packs32(b01, b23), 3), shuf);
			rpred = shuffle(shrru16(packs32(r01, r23), 3), shuf);
		#elif defined(__ARM_NEON)
			i8x16 t = ziplo64(bt, rt);
			i8x16 l = ziplo64(bl, rl);
			i16x8 v0 = vpaddlq_u8(vtrn1q_s32(t, l)); // top-left sums
			i16x8 v1 = vpaddlq_u8(vtrn2q_s32(t, t)); // top-right sums
			i16x8 v2 = vpaddlq_u8(vtrn2q_s32(l, l)); // bottom-left sums
			i16x8 v3 = vpaddlq_u8(vtrn2q_s32(t, l)); // bottom-right sums
			i8x16 v4 = shrru16(vpaddq_u16(vpaddq_u16(v0, v1), vpaddq_u16(v2, v3)), 3);
			bpred = shuffle(v4, shuf);
			rpred = shuffle(shr128(v4, 2), shuf);
		#endif
		} break;
	case IC8x8_DCA_8:
		bt = bl = load64(P(0, -2));
		rt = rl = load64(P(0, -1));
		shuf = shufDCA;
		goto chroma_dc_8x8_sum;
	case IC8x8_DCB_8:
		bt = bl = ldleft8(0, 2, 4, 6, 8, 10, 12, 14);
		rt = rl = ldleft8(1, 3, 5, 7, 9, 11, 13, 15);
		shuf = shufDCB;
		goto chroma_dc_8x8_sum;
	case IC8x8_DCAB_8:
		bpred = rpred = set8(-128);
		break;
	
	case IC8x8_H_8:
		*(int64_t *)P(0, 0) = ((i64x2)set8(*P(-1, 0)))[0];
		*(int64_t *)P(0, 1) = ((i64x2)set8(*P(-1, 1)))[0];
		*(int64_t *)P(0, 2) = ((i64x2)set8(*P(-1, 2)))[0];
		*(int64_t *)P(0, 3) = ((i64x2)set8(*P(-1, 3)))[0];
		*(int64_t *)P(0, 4) = ((i64x2)set8(*P(-1, 4)))[0];
		*(int64_t *)P(0, 5) = ((i64x2)set8(*P(-1, 5)))[0];
		*(int64_t *)P(0, 6) = ((i64x2)set8(*P(-1, 6)))[0];
		*(int64_t *)P(0, 7) = ((i64x2)set8(*P(-1, 7)))[0];
		*(int64_t *)P(0, 8) = ((i64x2)set8(*P(-1, 8)))[0];
		*(int64_t *)P(0, 9) = ((i64x2)set8(*P(-1, 9)))[0];
		*(int64_t *)P(0, 10) = ((i64x2)set8(*P(-1, 10)))[0];
		*(int64_t *)P(0, 11) = ((i64x2)set8(*P(-1, 11)))[0];
		*(int64_t *)P(0, 12) = ((i64x2)set8(*P(-1, 12)))[0];
		*(int64_t *)P(0, 13) = ((i64x2)set8(*P(-1, 13)))[0];
		*(int64_t *)P(0, 14) = ((i64x2)set8(*P(-1, 14)))[0];
		*(int64_t *)P(0, 15) = ((i64x2)set8(*P(-1, 15)))[0];
		return;
	
	case IC8x8_V_8: {
		i64x2 t = {*(int64_t *)P(0, -2), *(int64_t *)P(0, -1)};
		bpred = ziplo64(t, t);
		rpred = ziphi64(t, t);
		} break;
	
	case IC8x8_P_8: {
		i8x16 btl = load128(P(-1, -2));
		i8x16 rtl = load128(P(-1, -1));
		i8x16 btr = shr128(btl, 5);
		i8x16 rtr = shr128(rtl, 5);
		i8x16 blt = ldleft3(btl, 0, 2, 4);
		i8x16 rlt = ldleft3(rtl, 1, 3, 5);
		i8x16 blb = ldleft4(8, 10, 12, 14);
		i8x16 rlb = ldleft4(9, 11, 13, 15);
		#if defined(__SSE2__)
			i8x16 n = {-4, -3, -2, -1, -4, -3, -2, -1, -4, -3, -2, -1, -4, -3, -2, -1};
			i8x16 m = {1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4};
			i8x16 v0 = ziplo32(btr, rtr);
			i8x16 v1 = ziplo32(blb, rlb);
			i16x8 v2 = maddubs(ziplo64(ziplo32(btl, rtl), ziplo32(blt, rlt)), n);
			i16x8 v3 = maddubs(ziplo64(v0, v1), m);
			i16x8 v4 = v2 + v3;
			i16x8 v5 = (((u32x4)v0 >> 24) + ((u32x4)v1 >> 24) - -1) << 4;
			i16x8 HV = v4 + shufflelo(shufflehi(v4, 1, 0, 3, 2), 1, 0, 3, 2); // Hb,Hb,Hr,Hr,Vb,Vb,Vr,Vr
			i16x8 ba = broadcast16(v5, 0); // 16..8176
			i16x8 ra = broadcast16(v5, 2); // 16..8176
		#elif defined(__ARM_NEON)
			i16x8 v0 = sublou8(ziplo32(btr, rtr), vrev32q_s8(ziplo32(btl, rtl)));
			i16x8 v1 = sublou8(ziplo32(blb, rlb), vrev32q_s8(ziplo32(blt, rlt)));
			i16x8 m = {1, 2, 3, 4, 1, 2, 3, 4};
			i16x8 v4 = vpaddq_s16(v0 * m, v1 * m);
			i16x8 HV = (i16x8)vtrn1q_s16(v4, v4) + (i16x8)vtrn2q_s16(v4, v4);
			i16x8 ba = (broadcast16((i16x8)addlou8(btr, blb) - -1, 3)) << 4;
			i16x8 ra = (broadcast16((i16x8)addlou8(rtr, rlb) - -1, 3)) << 4;
		#endif
		i16x8 hv = shrrs16(HV + (HV >> 4), 1); // (17 * HV + 16) >> 5
		i16x8 bb = broadcast32(hv, 0);
		i16x8 rb = broadcast32(hv, 1);
		i16x8 bc = broadcast32(hv, 2);
		i16x8 rc = broadcast32(hv, 3);
		i16x8 bp = ba - bc - bc - bc + bb * (i16x8){-3, -2, -1, 0, 1, 2, 3, 4};
		i16x8 rp = ra - rc - rc - rc + rb * (i16x8){-3, -2, -1, 0, 1, 2, 3, 4};
		for (int i = 8; i--; bp += bc, rp += rc, p += stride * 2) {
			i64x2 v6 = shrpus16(bp, rp, 5);
			*(int64_t *)p = v6[0];
			*(int64_t *)(p + stride) = v6[1];
		}
		} return;
	}
	*(int64_t *)P(0, 0) = bpred[0];
	*(int64_t *)P(0, 1) = rpred[0];
	*(int64_t *)P(0, 2) = bpred[0];
	*(int64_t *)P(0, 3) = rpred[0];
	*(int64_t *)P(0, 4) = bpred[0];
	*(int64_t *)P(0, 5) = rpred[0];
	*(int64_t *)P(0, 6) = bpred[0];
	*(int64_t *)P(0, 7) = rpred[0];
	*(int64_t *)P(0, 8) = bpred[1];
	*(int64_t *)P(0, 9) = rpred[1];
	*(int64_t *)P(0, 10) = bpred[1];
	*(int64_t *)P(0, 11) = rpred[1];
	*(int64_t *)P(0, 12) = bpred[1];
	*(int64_t *)P(0, 13) = rpred[1];
	*(int64_t *)P(0, 14) = bpred[1];
	*(int64_t *)P(0, 15) = rpred[1];
}

// Assembly:
movq %rdx, %rax
negq %rax
leaq (%rsi,%rdx,8), %r10
movq %r10, %r8
subq %rdx, %r8
leaq (%r8,%rdx,8), %r9
movq %r9, %rcx
subq %rdx, %rcx
movl %edi, %edi
leaq 0x1e26f(%rip), %r11     # 0x33cac
movslq (%r11,%rdi,4), %rdi
addq %r11, %rdi
jmpq *%rdi
vmovsd (%rsi,%rax,2), %xmm2
vmovsd (%rsi,%rax), %xmm1
vmovd -0x4(%rsi), %xmm0
vmovd -0x4(%rsi,%rdx,2), %xmm3
vmovd -0x4(%rsi,%rdx,4), %xmm4
vmovd -0x4(%r8,%rax), %xmm5
vpunpcklbw %xmm3, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3],xmm0[4],xmm3[4],xmm0[5],xmm3[5],xmm0[6],xmm3[6],xmm0[7],xmm3[7]
vpunpcklbw %xmm5, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm5[0],xmm4[1],xmm5[1],xmm4[2],xmm5[2],xmm4[3],xmm5[3],xmm4[4],xmm5[4],xmm4[5],xmm5[5],xmm4[6],xmm5[6],xmm4[7],xmm5[7]
vmovd -0x4(%r8,%rdx), %xmm4
vmovd -0x4(%rcx,%rax,4), %xmm5
vpunpcklwd %xmm3, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
vpunpcklbw %xmm5, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm5[0],xmm4[1],xmm5[1],xmm4[2],xmm5[2],xmm4[3],xmm5[3],xmm4[4],xmm5[4],xmm4[5],xmm5[5],xmm4[6],xmm5[6],xmm4[7],xmm5[7]
vmovd -0x4(%rcx,%rax,2), %xmm4
vmovd -0x4(%rcx), %xmm5
vpunpcklbw %xmm5, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1],xmm4[2],xmm5[2],xmm4[3],xmm5[3],xmm4[4],xmm5[4],xmm4[5],xmm5[5],xmm4[6],xmm5[6],xmm4[7],xmm5[7]
vpunpcklwd %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3]
vpunpckhdq %xmm3, %xmm0, %xmm0 # xmm0 = xmm0[2],xmm3[2],xmm0[3],xmm3[3]
vpsrldq $0x8, %xmm0, %xmm0      # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
vmovd -0x4(%rsi,%rdx), %xmm3
vmovd -0x4(%r8,%rax,4), %xmm4
vmovd -0x4(%r8,%rax,2), %xmm5
vmovd -0x4(%r8), %xmm6
vpunpcklbw %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3],xmm3[4],xmm4[4],xmm3[5],xmm4[5],xmm3[6],xmm4[6],xmm3[7],xmm4[7]
vpunpcklbw %xmm6, %xmm5, %xmm4 # xmm4 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3],xmm5[4],xmm6[4],xmm5[5],xmm6[5],xmm5[6],xmm6[6],xmm5[7],xmm6[7]
vmovd -0x4(%r8,%rdx,2), %xmm5
vmovd -0x4(%r8,%rdx,4), %xmm6
vpunpcklwd %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3]
vpunpcklbw %xmm6, %xmm5, %xmm4 # xmm4 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3],xmm5[4],xmm6[4],xmm5[5],xmm6[5],xmm5[6],xmm6[6],xmm5[7],xmm6[7]
vmovd -0x4(%rcx,%rax), %xmm5
vmovd -0x4(%rcx,%rdx), %xmm6
vpunpcklbw %xmm6, %xmm5, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3],xmm5[4],xmm6[4],xmm5[5],xmm6[5],xmm5[6],xmm6[6],xmm5[7],xmm6[7]
vpunpcklwd %xmm5, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1],xmm4[2],xmm5[2],xmm4[3],xmm5[3]
vpunpckhdq %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[2],xmm4[2],xmm3[3],xmm4[3]
vpsrldq $0x8, %xmm3, %xmm4      # xmm4 = xmm3[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
vmovdqa 0x1dea2(%rip), %xmm3    # 0x339a0
jmp 0x15ca4
vpbroadcastb -0x1(%rsi), %xmm0
vmovq %xmm0, (%rsi)
vpbroadcastb -0x1(%rsi,%rdx), %xmm0
vmovq %xmm0, (%rsi,%rdx)
vpbroadcastb -0x1(%rsi,%rdx,2), %xmm0
vmovq %xmm0, (%rsi,%rdx,2)
vpbroadcastb -0x1(%r8,%rax,4), %xmm0
vmovq %xmm0, (%r8,%rax,4)
vpbroadcastb -0x1(%rsi,%rdx,4), %xmm0
vmovq %xmm0, (%rsi,%rdx,4)
vpbroadcastb -0x1(%r8,%rax,2), %xmm0
vmovq %xmm0, (%r8,%rax,2)
vpbroadcastb -0x1(%r8,%rax), %xmm0
vmovq %xmm0, (%r8,%rax)
vpbroadcastb -0x1(%r10,%rax), %xmm0
vmovq %xmm0, (%r10,%rax)
vpbroadcastb -0x1(%r8,%rdx), %xmm0
vmovq %xmm0, (%rsi,%rdx,8)
vpbroadcastb -0x1(%r8,%rdx,2), %xmm0
vmovq %xmm0, (%r8,%rdx,2)
vpbroadcastb -0x1(%rcx,%rax,4), %xmm0
vmovq %xmm0, (%rcx,%rax,4)
vpbroadcastb -0x1(%r8,%rdx,4), %xmm0
vmovq %xmm0, (%r8,%rdx,4)
vpbroadcastb -0x1(%rcx,%rax,2), %xmm0
vmovq %xmm0, (%rcx,%rax,2)
vpbroadcastb -0x1(%rcx,%rax), %xmm0
vmovq %xmm0, (%rcx,%rax)
vpbroadcastb -0x1(%rcx), %xmm0
vmovq %xmm0, (%rcx)
vpbroadcastb -0x1(%rcx,%rdx), %xmm0
vmovq %xmm0, %rsi
jmp 0x15d67
vmovd -0x4(%rsi), %xmm0
vmovd -0x4(%rsi,%rdx,2), %xmm1
vmovd -0x4(%rsi,%rdx,4), %xmm2
vmovd -0x4(%r8,%rax), %xmm3
vpunpcklbw %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
vpunpcklbw %xmm3, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
vmovd -0x4(%r8,%rdx), %xmm2
vmovd -0x4(%rcx,%rax,4), %xmm3
vpunpcklwd %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
vpunpcklbw %xmm3, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
vmovd -0x4(%rcx,%rax,2), %xmm2
vmovd -0x4(%rcx), %xmm3
vpunpcklbw %xmm3, %xmm2, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
vpunpcklwd %xmm2, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
vpunpckhdq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
vpsrldq $0x8, %xmm0, %xmm0      # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
vmovd -0x4(%rsi,%rdx), %xmm1
vmovd -0x4(%r8,%rax,4), %xmm2
vmovd -0x4(%r8,%rax,2), %xmm3
vmovd -0x4(%r8), %xmm4
vpunpcklbw %xmm2, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
vpunpcklbw %xmm4, %xmm3, %xmm2 # xmm2 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3],xmm3[4],xmm4[4],xmm3[5],xmm4[5],xmm3[6],xmm4[6],xmm3[7],xmm4[7]
vmovd -0x4(%r8,%rdx,2), %xmm3
vmovd -0x4(%r8,%rdx,4), %xmm4
vpunpcklwd %xmm2, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
vpunpcklbw %xmm4, %xmm3, %xmm2 # xmm2 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3],xmm3[4],xmm4[4],xmm3[5],xmm4[5],xmm3[6],xmm4[6],xmm3[7],xmm4[7]
vmovd -0x4(%rcx,%rax), %xmm3
vmovd -0x4(%rcx,%rdx), %xmm4
vpunpcklbw %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3],xmm3[4],xmm4[4],xmm3[5],xmm4[5],xmm3[6],xmm4[6],xmm3[7],xmm4[7]
vpunpcklwd %xmm3, %xmm2, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3]
vpunpckhdq %xmm2, %xmm1, %xmm1 # xmm1 = xmm1[2],xmm2[2],xmm1[3],xmm2[3]
vpsrldq $0x8, %xmm1, %xmm4      # xmm4 = xmm1[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
vmovdqa 0x1dd08(%rip), %xmm3    # 0x33980
jmp 0x15c9c
vpbroadcastq 0x21725(%rip), %xmm1 # 0x373a8
vmovdqa %xmm1, %xmm0
jmp 0x15d06
vmovsd (%rsi,%rax,2), %xmm0
vmovsd (%rsi,%rax), %xmm4
vpbroadcastq 0x2171c(%rip), %xmm3 # 0x373b8
vmovapd %xmm4, %xmm1
vmovapd %xmm0, %xmm2
vunpcklpd %xmm4, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm4[0]
vunpcklpd %xmm0, %xmm2, %xmm0 # xmm0 = xmm2[0],xmm0[0]
vshufps $0x58, %xmm0, %xmm0, %xmm2 # xmm2 = xmm0[0,2,1,1]
vxorpd %xmm4, %xmm4, %xmm4
vpsadbw %xmm4, %xmm2, %xmm2
vshufps $0x58, %xmm1, %xmm1, %xmm5 # xmm5 = xmm1[0,2,1,1]
vpsadbw %xmm4, %xmm5, %xmm5
vshufps $0xdf, %xmm0, %xmm0, %xmm0 # xmm0 = xmm0[3,3,1,3]
vpsadbw %xmm4, %xmm0, %xmm0
vpackssdw %xmm0, %xmm2, %xmm0
vshufps $0xdf, %xmm1, %xmm1, %xmm1 # xmm1 = xmm1[3,3,1,3]
vpsadbw %xmm4, %xmm1, %xmm1
vpackssdw %xmm1, %xmm5, %xmm1
vpsraw $0x2, %xmm0, %xmm0
vpavgw %xmm4, %xmm0, %xmm0
vpshufb %xmm3, %xmm0, %xmm0
vpsraw $0x2, %xmm1, %xmm1
vpavgw %xmm4, %xmm1, %xmm1
vpshufb %xmm3, %xmm1, %xmm1
jmp 0x15d06
vpbroadcastq (%rsi,%rax,2), %xmm0
vpbroadcastq (%rsi,%rax), %xmm1
vmovq %xmm0, (%rsi)
vmovq %xmm1, (%rsi,%rdx)
vmovq %xmm0, (%rsi,%rdx,2)
vmovq %xmm1, (%r8,%rax,4)
vmovq %xmm0, (%rsi,%rdx,4)
vmovq %xmm1, (%r8,%rax,2)
vmovq %xmm0, (%r8,%rax)
vmovq %xmm1, (%r10,%rax)
vpextrq $0x1, %xmm0, (%rsi,%rdx,8)
vpextrq $0x1, %xmm1, %rsi
vpextrq $0x1, %xmm1, (%r8,%rdx,2)
vpextrq $0x1, %xmm0, (%rcx,%rax,4)
vpextrq $0x1, %xmm1, (%r8,%rdx,4)
vpextrq $0x1, %xmm0, (%rcx,%rax,2)
vpextrq $0x1, %xmm1, (%rcx,%rax)
vpextrq $0x1, %xmm0, (%rcx)
movq %rsi, (%r9)
retq
vmovupd -0x1(%rsi,%rax,2), %xmm0
vmovupd -0x1(%rsi,%rax), %xmm1
vpsrldq $0x5, %xmm0, %xmm2      # xmm2 = xmm0[5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero
vpsrldq $0x5, %xmm1, %xmm3      # xmm3 = xmm1[5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero
vunpcklps %xmm3, %xmm2, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
vmovd -0x4(%rsi), %xmm3
vpslld $0x18, %xmm0, %xmm4
vpunpcklbw %xmm3, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm3[0],xmm4[1],xmm3[1],xmm4[2],xmm3[2],xmm4[3],xmm3[3],xmm4[4],xmm3[4],xmm4[5],xmm3[5],xmm4[6],xmm3[6],xmm4[7],xmm3[7]
vmovd -0x4(%rsi,%rdx,2), %xmm4
vmovd -0x4(%rsi,%rdx,4), %xmm5
leaq (%rdx,%rdx), %rdi
vpunpcklbw %xmm5, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1],xmm4[2],xmm5[2],xmm4[3],xmm5[3],xmm4[4],xmm5[4],xmm4[5],xmm5[5],xmm4[6],xmm5[6],xmm4[7],xmm5[7]
vpunpcklwd %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3]
vpslld $0x18, %xmm1, %xmm4
vmovd -0x4(%rsi,%rdx), %xmm5
vpunpcklbw %xmm5, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1],xmm4[2],xmm5[2],xmm4[3],xmm5[3],xmm4[4],xmm5[4],xmm4[5],xmm5[5],xmm4[6],xmm5[6],xmm4[7],xmm5[7]
vmovd -0x4(%r8,%rax,4), %xmm5
vmovd -0x4(%r8,%rax,2), %xmm6
vpunpcklbw %xmm6, %xmm5, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3],xmm5[4],xmm6[4],xmm5[5],xmm6[5],xmm5[6],xmm6[6],xmm5[7],xmm6[7]
vpunpcklwd %xmm5, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1],xmm4[2],xmm5[2],xmm4[3],xmm5[3]
vmovd -0x4(%r8,%rdx), %xmm5
vmovd -0x4(%rcx,%rax,4), %xmm6
vpunpcklbw %xmm6, %xmm5, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3],xmm5[4],xmm6[4],xmm5[5],xmm6[5],xmm5[6],xmm6[6],xmm5[7],xmm6[7]
vmovd -0x4(%rcx,%rax,2), %xmm6
vmovd -0x4(%rcx), %xmm7
vpunpcklbw %xmm7, %xmm6, %xmm6 # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1],xmm6[2],xmm7[2],xmm6[3],xmm7[3],xmm6[4],xmm7[4],xmm6[5],xmm7[5],xmm6[6],xmm7[6],xmm6[7],xmm7[7]
vpunpcklwd %xmm6, %xmm5, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3]
vpsrldq $0xc, %xmm5, %xmm5      # xmm5 = xmm5[12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
vmovd -0x4(%r8,%rdx,2), %xmm6
vmovd -0x4(%r8,%rdx,4), %xmm7
vpunpcklbw %xmm7, %xmm6, %xmm6 # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1],xmm6[2],xmm7[2],xmm6[3],xmm7[3],xmm6[4],xmm7[4],xmm6[5],xmm7[5],xmm6[6],xmm7[6],xmm6[7],xmm7[7]
vmovd -0x4(%rcx,%rax), %xmm7
vmovd -0x4(%rcx,%rdx), %xmm8
vpunpcklbw %xmm8, %xmm7, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1],xmm7[2],xmm8[2],xmm7[3],xmm8[3],xmm7[4],xmm8[4],xmm7[5],xmm8[5],xmm7[6],xmm8[6],xmm7[7],xmm8[7]
vpunpcklwd %xmm7, %xmm6, %xmm6 # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1],xmm6[2],xmm7[2],xmm6[3],xmm7[3]
vpsrldq $0xc, %xmm6, %xmm6      # xmm6 = xmm6[12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
vunpcklps %xmm6, %xmm5, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
vpunpckldq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
vpbroadcastq 0x2157a(%rip), %xmm1 # 0x373b0
vpermi2d %xmm4, %xmm3, %xmm1
vpunpcklqdq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vpmaddubsw 0x1db07(%rip), %xmm0, %xmm0 # 0x33950
vunpcklpd %xmm5, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm5[0]
vpmaddubsw 0x1db0a(%rip), %xmm1, %xmm1 # 0x33960
vpsrld $0x18, %xmm2, %xmm2
vpsrld $0x18, %xmm5, %xmm3
vpaddd %xmm2, %xmm3, %xmm2
vpslld $0x4, %xmm2, %xmm2
vpaddd 0x21511(%rip){1to4}, %xmm2, %xmm2 # 0x37384
vpaddw %xmm0, %xmm1, %xmm0
vphaddw %xmm0, %xmm0, %xmm0
vpunpcklwd %xmm0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3]
vpbroadcastw %xmm2, %xmm3
vpshufb 0x1d9c2(%rip), %xmm2, %xmm4 # 0x33850
vpsraw $0x4, %xmm0, %xmm1
vpaddw %xmm1, %xmm0, %xmm0
vpcmpeqd %xmm1, %xmm1, %xmm1
vpsubw %xmm1, %xmm0, %xmm0
vpsraw $0x1, %xmm0, %xmm1
vpbroadcastd %xmm1, %xmm2
vpshufd $0x55, %xmm1, %xmm5     # xmm5 = xmm1[1,1,1,1]
vpshufd $0xaa, %xmm1, %xmm0     # xmm0 = xmm1[2,2,2,2]
vpshufd $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
vpaddw %xmm0, %xmm0, %xmm6
vpaddw %xmm6, %xmm0, %xmm6
vpmovsxbw 0x214f7(%rip), %xmm7 # 0x373c0
vpmullw %xmm7, %xmm2, %xmm2
vpsubw %xmm6, %xmm2, %xmm2
vpaddw %xmm3, %xmm2, %xmm2
vpaddw %xmm1, %xmm1, %xmm3
vpaddw %xmm3, %xmm1, %xmm3
vpmullw %xmm7, %xmm5, %xmm5
vpsubw %xmm3, %xmm5, %xmm3
vpaddw %xmm4, %xmm3, %xmm3
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
vpsraw $0x5, %xmm2, %xmm4
vpsraw $0x5, %xmm3, %xmm5
vpackuswb %xmm5, %xmm4, %xmm4
vmovq %xmm4, (%rsi)
vpextrq $0x1, %xmm4, (%rsi,%rdx)
vpaddw %xmm0, %xmm2, %xmm2
vpaddw %xmm1, %xmm3, %xmm3
addq %rdi, %rsi
incl %eax
jne 0x15eee
jmp 0x15d6a