// File: /workspace/github_c_makefile_star2_O1/tvlabs[P]edge264/./edge264_residual.c
// Function: transform_dc4x4
static void transform_dc4x4(Edge264Context *ctx, int iYCbCr)
{
	// load matrix in column order and multiply right
	i32x4 x0 = ctx->c_v[0] + ctx->c_v[1];
	i32x4 x1 = ctx->c_v[2] + ctx->c_v[3];
	i32x4 x2 = ctx->c_v[0] - ctx->c_v[1];
	i32x4 x3 = ctx->c_v[2] - ctx->c_v[3];
	ctx->c_v[0] = ctx->c_v[1] = ctx->c_v[2] = ctx->c_v[3] = (i8x16){};
	i32x4 x4 = x0 + x1;
	i32x4 x5 = x0 - x1;
	i32x4 x6 = x2 - x3;
	i32x4 x7 = x2 + x3;
	
	// transpose
	i32x4 x8 = ziplo32(x4, x5);
	i32x4 x9 = ziplo32(x6, x7);
	i32x4 xA = ziphi32(x4, x5);
	i32x4 xB = ziphi32(x6, x7);
	i32x4 xC = ziplo64(x8, x9);
	i32x4 xD = ziphi64(x8, x9);
	i32x4 xE = ziplo64(xA, xB);
	i32x4 xF = ziphi64(xA, xB);
	
	// multiply left
	i32x4 xG = xC + xD;
	i32x4 xH = xE + xF;
	i32x4 xI = xC - xD;
	i32x4 xJ = xE - xF;
	i32x4 f0 = xG + xH;
	i32x4 f1 = xG - xH;
	i32x4 f2 = xI - xJ;
	i32x4 f3 = xI + xJ;
	
	// scale
	unsigned qP = ctx->t.QP[0]; // FIXME 4:4:4
	i32x4 s32 = set32(32);
	i32x4 LS = set32((ctx->t.pps.weightScale4x4[iYCbCr][0] * normAdjust4x4[qP % 6][0]) << (qP / 6));
	i32x4 dc0 = shrrs32(f0 * LS, 6, s32);
	i32x4 dc1 = shrrs32(f1 * LS, 6, s32);
	i32x4 dc2 = shrrs32(f2 * LS, 6, s32);
	i32x4 dc3 = shrrs32(f3 * LS, 6, s32);
	
	// store in zigzag order if needed later ...
	if (mb->bits[0] & 1 << 5) {
		ctx->c_v[4] = ziplo64(dc0, dc1);
		ctx->c_v[5] = ziphi64(dc0, dc1);
		ctx->c_v[6] = ziplo64(dc2, dc3);
		ctx->c_v[7] = ziphi64(dc2, dc3);
		
	// ... or prepare for storage in place
	} else {
		i32x4 r0 = (dc0 + s32) >> 6;
		i32x4 r1 = (dc1 + s32) >> 6;
		i32x4 r2 = (dc2 + s32) >> 6;
		i32x4 r3 = (dc3 + s32) >> 6;
		#if defined(__SSE2__)
			i16x8 lo0 = shuffle32(shufflelo(r0, 0, 0, 2, 2), 0, 0, 1, 1);
			i16x8 lo1 = shuffle32(shufflelo(r1, 0, 0, 2, 2), 0, 0, 1, 1);
			i16x8 lo2 = shuffle32(shufflelo(r2, 0, 0, 2, 2), 0, 0, 1, 1);
			i16x8 lo3 = shuffle32(shufflelo(r3, 0, 0, 2, 2), 0, 0, 1, 1);
			i16x8 hi0 = shuffle32(shufflehi(r0, 0, 0, 2, 2), 2, 2, 3, 3);
			i16x8 hi1 = shuffle32(shufflehi(r1, 0, 0, 2, 2), 2, 2, 3, 3);
			i16x8 hi2 = shuffle32(shufflehi(r2, 0, 0, 2, 2), 2, 2, 3, 3);
			i16x8 hi3 = shuffle32(shufflehi(r3, 0, 0, 2, 2), 2, 2, 3, 3);
		#elif defined(__ARM_NEON)
			i16x8 v0 = vtrn1q_s16(r0, r0);
			i16x8 v1 = vtrn1q_s16(r1, r1);
			i16x8 v2 = vtrn1q_s16(r2, r2);
			i16x8 v3 = vtrn1q_s16(r3, r3);
			i16x8 lo0 = ziplo32(v0, v0);
			i16x8 lo1 = ziplo32(v1, v1);
			i16x8 lo2 = ziplo32(v2, v2);
			i16x8 lo3 = ziplo32(v3, v3);
			i16x8 hi0 = ziphi32(v0, v0);
			i16x8 hi1 = ziphi32(v1, v1);
			i16x8 hi2 = ziphi32(v2, v2);
			i16x8 hi3 = ziphi32(v3, v3);
		#endif
		
		// add to predicted samples
		size_t stride = ctx->t.stride[iYCbCr];
		uint8_t *p = ctx->samples_mb[iYCbCr];
		if (ctx->t.samples_clip[iYCbCr][0] == 255) {
			i8x16 p0 = *(i8x16 *)(p             );
			i8x16 p1 = *(i8x16 *)(p + stride    );
			i8x16 p2 = *(i8x16 *)(p + stride * 2);
			i8x16 p3 = *(i8x16 *)(p + stride * 3);
			*(i8x16 *)(p             ) = packus16(addlou8s16(p0, lo0), addhiu8s16(p0, hi0));
			*(i8x16 *)(p + stride    ) = packus16(addlou8s16(p1, lo0), addhiu8s16(p1, hi0));
			*(i8x16 *)(p + stride * 2) = packus16(addlou8s16(p2, lo0), addhiu8s16(p2, hi0));
			*(i8x16 *)(p + stride * 3) = packus16(addlou8s16(p3, lo0), addhiu8s16(p3, hi0));
			i8x16 p4 = *(i8x16 *)(p += stride * 4);
			i8x16 p5 = *(i8x16 *)(p + stride    );
			i8x16 p6 = *(i8x16 *)(p + stride * 2);
			i8x16 p7 = *(i8x16 *)(p + stride * 3);
			*(i8x16 *)(p             ) = packus16(addlou8s16(p4, lo1), addhiu8s16(p4, hi1));
			*(i8x16 *)(p + stride    ) = packus16(addlou8s16(p5, lo1), addhiu8s16(p5, hi1));
			*(i8x16 *)(p + stride * 2) = packus16(addlou8s16(p6, lo1), addhiu8s16(p6, hi1));
			*(i8x16 *)(p + stride * 3) = packus16(addlou8s16(p7, lo1), addhiu8s16(p7, hi1));
			i8x16 p8 = *(i8x16 *)(p += stride * 4);
			i8x16 p9 = *(i8x16 *)(p + stride    );
			i8x16 pA = *(i8x16 *)(p + stride * 2);
			i8x16 pB = *(i8x16 *)(p + stride * 3);
			*(i8x16 *)(p             ) = packus16(addlou8s16(p8, lo2), addhiu8s16(p8, hi2));
			*(i8x16 *)(p + stride    ) = packus16(addlou8s16(p9, lo2), addhiu8s16(p9, hi2));
			*(i8x16 *)(p + stride * 2) = packus16(addlou8s16(pA, lo2), addhiu8s16(pA, hi2));
			*(i8x16 *)(p + stride * 3) = packus16(addlou8s16(pB, lo2), addhiu8s16(pB, hi2));
			i8x16 pC = *(i8x16 *)(p += stride * 4);
			i8x16 pD = *(i8x16 *)(p + stride    );
			i8x16 pE = *(i8x16 *)(p + stride * 2);
			i8x16 pF = *(i8x16 *)(p + stride * 3);
			*(i8x16 *)(p             ) = packus16(addlou8s16(pC, lo3), addhiu8s16(pC, hi3));
			*(i8x16 *)(p + stride    ) = packus16(addlou8s16(pD, lo3), addhiu8s16(pD, hi3));
			*(i8x16 *)(p + stride * 2) = packus16(addlou8s16(pE, lo3), addhiu8s16(pE, hi3));
			*(i8x16 *)(p + stride * 3) = packus16(addlou8s16(pF, lo3), addhiu8s16(pF, hi3));
		}
	}
}

// Assembly:
vmovdqa 0x1b60(%rdi), %xmm0
vmovdqa 0x1b70(%rdi), %xmm1
vpaddd %xmm0, %xmm1, %xmm2
vmovdqa 0x1b80(%rdi), %xmm3
vmovdqa 0x1b90(%rdi), %xmm4
vpaddd %xmm3, %xmm4, %xmm5
vpsubd %xmm1, %xmm0, %xmm0
vpsubd %xmm4, %xmm3, %xmm1
vpaddd %xmm2, %xmm5, %xmm3
vpsubd %xmm5, %xmm2, %xmm2
vpsubd %xmm1, %xmm0, %xmm4
vpaddd %xmm0, %xmm1, %xmm0
vpunpckldq %xmm2, %xmm3, %xmm1 # xmm1 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
vpunpckldq %xmm0, %xmm4, %xmm5 # xmm5 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
vpunpckhdq %xmm2, %xmm3, %xmm2 # xmm2 = xmm3[2],xmm2[2],xmm3[3],xmm2[3]
vpunpckhdq %xmm0, %xmm4, %xmm0 # xmm0 = xmm4[2],xmm0[2],xmm4[3],xmm0[3]
vpunpcklqdq %xmm5, %xmm1, %xmm3 # xmm3 = xmm1[0],xmm5[0]
vpunpckhqdq %xmm5, %xmm1, %xmm1 # xmm1 = xmm1[1],xmm5[1]
vpunpcklqdq %xmm0, %xmm2, %xmm4 # xmm4 = xmm2[0],xmm0[0]
vpunpckhqdq %xmm0, %xmm2, %xmm0 # xmm0 = xmm2[1],xmm0[1]
vpaddd %xmm1, %xmm3, %xmm2
vpaddd %xmm0, %xmm4, %xmm5
vpsubd %xmm1, %xmm3, %xmm1
vpsubd %xmm0, %xmm4, %xmm0
vpaddd %xmm5, %xmm2, %xmm3
vpsubd %xmm5, %xmm2, %xmm2
vpsubd %xmm0, %xmm1, %xmm6
vpxor %xmm4, %xmm4, %xmm4
vmovdqa %ymm4, 0x1b60(%rdi)
vmovdqa %ymm4, 0x1b80(%rdi)
movsbl 0x50(%rdi), %edx
movslq %esi, %rax
movq %rax, %rcx
shlq $0x4, %rcx
movzbl 0x230(%rdi,%rcx), %esi
movl $0xaaaaaaab, %r8d       # imm = 0xAAAAAAAB
imulq %rdx, %r8
shrq $0x22, %r8
leal (%r8,%r8), %r9d
leal (%r9,%r9,2), %r9d
subl %r9d, %edx
leaq 0x20efe(%rip), %r9      # 0x36b00
movsbl (%r9,%rdx,4), %edx
imull %esi, %edx
shlxl %r8d, %edx, %edx
vpbroadcastd %edx, %xmm7
vpmulld %xmm3, %xmm7, %xmm3
vpbroadcastd 0x21601(%rip), %xmm4 # 0x37224
vpaddd %xmm0, %xmm1, %xmm0
vpaddd %xmm4, %xmm3, %xmm1
vpsrad $0x6, %xmm1, %xmm1
vpmulld %xmm2, %xmm7, %xmm2
vpaddd %xmm4, %xmm2, %xmm2
vpsrad $0x6, %xmm2, %xmm5
vpmulld %xmm6, %xmm7, %xmm2
vpaddd %xmm4, %xmm2, %xmm2
vpmulld %xmm0, %xmm7, %xmm0
vpsrad $0x6, %xmm2, %xmm2
vpaddd %xmm4, %xmm0, %xmm0
vpsrad $0x6, %xmm0, %xmm0
movq 0x680(%rdi), %rdx
testb $0x20, 0x8(%rdx)
jne 0x15f0d
cmpw $0xff, 0x170(%rdi,%rcx)
jne 0x15f09
movq 0x668(%rdi,%rax,8), %r8
movzwl 0x34(%rdi,%rax,2), %eax
vpaddd %xmm4, %xmm0, %xmm0
vmovdqa 0x1db0c(%rip), %xmm7    # 0x337a0
vpsrad $0x6, %xmm0, %xmm6
vpshufb %xmm7, %xmm6, %xmm0
vpaddd %xmm4, %xmm2, %xmm2
vpsrad $0x6, %xmm2, %xmm3
vpshufb %xmm7, %xmm3, %xmm2
vpaddd %xmm4, %xmm5, %xmm5
vpsrad $0x6, %xmm5, %xmm8
vpshufb %xmm7, %xmm8, %xmm5
vpaddd %xmm4, %xmm1, %xmm1
vpsrad $0x6, %xmm1, %xmm1
vmovdqa 0x1dae5(%rip), %xmm4    # 0x337b0
vpshufb %xmm7, %xmm1, %xmm7
vpshufb %xmm4, %xmm1, %xmm9
vmovdqa (%r8), %xmm10
vmovdqa (%r8,%rax), %xmm11
leal (%rax,%rax), %edx
vmovdqa (%r8,%rdx), %xmm12
leaq (%rax,%rax,2), %rcx
vpmovzxbw %xmm10, %xmm1   # xmm1 = xmm10[0],zero,xmm10[1],zero,xmm10[2],zero,xmm10[3],zero,xmm10[4],zero,xmm10[5],zero,xmm10[6],zero,xmm10[7],zero
vpaddw %xmm1, %xmm9, %xmm13
vpxor %xmm1, %xmm1, %xmm1
vpunpckhbw %xmm1, %xmm10, %xmm10 # xmm10 = xmm10[8],xmm1[8],xmm10[9],xmm1[9],xmm10[10],xmm1[10],xmm10[11],xmm1[11],xmm10[12],xmm1[12],xmm10[13],xmm1[13],xmm10[14],xmm1[14],xmm10[15],xmm1[15]
vpaddw %xmm7, %xmm10, %xmm10
vpackuswb %xmm10, %xmm13, %xmm10
vmovdqa (%r8,%rcx), %xmm13
vpshufb %xmm4, %xmm8, %xmm8
vmovdqa %xmm10, (%r8)
vpmovzxbw %xmm11, %xmm10  # xmm10 = xmm11[0],zero,xmm11[1],zero,xmm11[2],zero,xmm11[3],zero,xmm11[4],zero,xmm11[5],zero,xmm11[6],zero,xmm11[7],zero
vpaddw %xmm10, %xmm9, %xmm10
vpunpckhbw %xmm1, %xmm11, %xmm11 # xmm11 = xmm11[8],xmm1[8],xmm11[9],xmm1[9],xmm11[10],xmm1[10],xmm11[11],xmm1[11],xmm11[12],xmm1[12],xmm11[13],xmm1[13],xmm11[14],xmm1[14],xmm11[15],xmm1[15]
vpaddw %xmm7, %xmm11, %xmm11
vpackuswb %xmm11, %xmm10, %xmm10
vmovdqa %xmm10, (%r8,%rax)
vpmovzxbw %xmm12, %xmm10  # xmm10 = xmm12[0],zero,xmm12[1],zero,xmm12[2],zero,xmm12[3],zero,xmm12[4],zero,xmm12[5],zero,xmm12[6],zero,xmm12[7],zero
vpaddw %xmm10, %xmm9, %xmm10
vpunpckhbw %xmm1, %xmm12, %xmm11 # xmm11 = xmm12[8],xmm1[8],xmm12[9],xmm1[9],xmm12[10],xmm1[10],xmm12[11],xmm1[11],xmm12[12],xmm1[12],xmm12[13],xmm1[13],xmm12[14],xmm1[14],xmm12[15],xmm1[15]
vpaddw %xmm7, %xmm11, %xmm11
vpackuswb %xmm11, %xmm10, %xmm10
vmovdqa %xmm10, (%r8,%rdx)
vpmovzxbw %xmm13, %xmm10  # xmm10 = xmm13[0],zero,xmm13[1],zero,xmm13[2],zero,xmm13[3],zero,xmm13[4],zero,xmm13[5],zero,xmm13[6],zero,xmm13[7],zero
vpaddw %xmm10, %xmm9, %xmm9
vpunpckhbw %xmm1, %xmm13, %xmm10 # xmm10 = xmm13[8],xmm1[8],xmm13[9],xmm1[9],xmm13[10],xmm1[10],xmm13[11],xmm1[11],xmm13[12],xmm1[12],xmm13[13],xmm1[13],xmm13[14],xmm1[14],xmm13[15],xmm1[15]
vpaddw %xmm7, %xmm10, %xmm7
vpackuswb %xmm7, %xmm9, %xmm7
vmovdqa %xmm7, (%r8,%rcx)
movl %eax, %esi
shll $0x2, %esi
leaq (%r8,%rsi), %rdi
vmovdqa (%r8,%rsi), %xmm7
vmovdqa (%rax,%rdi), %xmm9
vmovdqa (%rdx,%rdi), %xmm10
vmovdqa (%rdi,%rcx), %xmm11
vpmovzxbw %xmm7, %xmm12   # xmm12 = xmm7[0],zero,xmm7[1],zero,xmm7[2],zero,xmm7[3],zero,xmm7[4],zero,xmm7[5],zero,xmm7[6],zero,xmm7[7],zero
vpaddw %xmm12, %xmm8, %xmm12
vpunpckhbw %xmm1, %xmm7, %xmm7 # xmm7 = xmm7[8],xmm1[8],xmm7[9],xmm1[9],xmm7[10],xmm1[10],xmm7[11],xmm1[11],xmm7[12],xmm1[12],xmm7[13],xmm1[13],xmm7[14],xmm1[14],xmm7[15],xmm1[15]
vpaddw %xmm7, %xmm5, %xmm7
vpackuswb %xmm7, %xmm12, %xmm7
vmovdqa %xmm7, (%r8,%rsi)
vpmovzxbw %xmm9, %xmm7    # xmm7 = xmm9[0],zero,xmm9[1],zero,xmm9[2],zero,xmm9[3],zero,xmm9[4],zero,xmm9[5],zero,xmm9[6],zero,xmm9[7],zero
vpaddw %xmm7, %xmm8, %xmm7
vpunpckhbw %xmm1, %xmm9, %xmm9 # xmm9 = xmm9[8],xmm1[8],xmm9[9],xmm1[9],xmm9[10],xmm1[10],xmm9[11],xmm1[11],xmm9[12],xmm1[12],xmm9[13],xmm1[13],xmm9[14],xmm1[14],xmm9[15],xmm1[15]
vpaddw %xmm5, %xmm9, %xmm9
vpackuswb %xmm9, %xmm7, %xmm7
vmovdqa %xmm7, (%rax,%rdi)
vpshufb %xmm4, %xmm6, %xmm6
vpmovzxbw %xmm10, %xmm7   # xmm7 = xmm10[0],zero,xmm10[1],zero,xmm10[2],zero,xmm10[3],zero,xmm10[4],zero,xmm10[5],zero,xmm10[6],zero,xmm10[7],zero
vpaddw %xmm7, %xmm8, %xmm7
vpunpckhbw %xmm1, %xmm10, %xmm9 # xmm9 = xmm10[8],xmm1[8],xmm10[9],xmm1[9],xmm10[10],xmm1[10],xmm10[11],xmm1[11],xmm10[12],xmm1[12],xmm10[13],xmm1[13],xmm10[14],xmm1[14],xmm10[15],xmm1[15]
vpaddw %xmm5, %xmm9, %xmm9
vpackuswb %xmm9, %xmm7, %xmm7
vmovdqa %xmm7, (%rdx,%rdi)
vpmovzxbw %xmm11, %xmm7   # xmm7 = xmm11[0],zero,xmm11[1],zero,xmm11[2],zero,xmm11[3],zero,xmm11[4],zero,xmm11[5],zero,xmm11[6],zero,xmm11[7],zero
vpaddw %xmm7, %xmm8, %xmm7
vpunpckhbw %xmm1, %xmm11, %xmm8 # xmm8 = xmm11[8],xmm1[8],xmm11[9],xmm1[9],xmm11[10],xmm1[10],xmm11[11],xmm1[11],xmm11[12],xmm1[12],xmm11[13],xmm1[13],xmm11[14],xmm1[14],xmm11[15],xmm1[15]
vpaddw %xmm5, %xmm8, %xmm5
vpackuswb %xmm5, %xmm7, %xmm5
vmovdqa %xmm5, (%rdi,%rcx)
leaq (%rdi,%rsi), %r8
vmovdqa (%rsi,%rdi), %xmm5
vmovdqa (%rax,%r8), %xmm7
vmovdqa (%rdx,%r8), %xmm8
vmovdqa (%r8,%rcx), %xmm9
vpshufb %xmm4, %xmm3, %xmm3
vpmovzxbw %xmm5, %xmm4    # xmm4 = xmm5[0],zero,xmm5[1],zero,xmm5[2],zero,xmm5[3],zero,xmm5[4],zero,xmm5[5],zero,xmm5[6],zero,xmm5[7],zero
vpaddw %xmm4, %xmm3, %xmm4
vpunpckhbw %xmm1, %xmm5, %xmm5 # xmm5 = xmm5[8],xmm1[8],xmm5[9],xmm1[9],xmm5[10],xmm1[10],xmm5[11],xmm1[11],xmm5[12],xmm1[12],xmm5[13],xmm1[13],xmm5[14],xmm1[14],xmm5[15],xmm1[15]
vpaddw %xmm5, %xmm2, %xmm5
vpackuswb %xmm5, %xmm4, %xmm4
vmovdqa %xmm4, (%rsi,%rdi)
vpmovzxbw %xmm7, %xmm4    # xmm4 = xmm7[0],zero,xmm7[1],zero,xmm7[2],zero,xmm7[3],zero,xmm7[4],zero,xmm7[5],zero,xmm7[6],zero,xmm7[7],zero
vpaddw %xmm4, %xmm3, %xmm4
vpunpckhbw %xmm1, %xmm7, %xmm5 # xmm5 = xmm7[8],xmm1[8],xmm7[9],xmm1[9],xmm7[10],xmm1[10],xmm7[11],xmm1[11],xmm7[12],xmm1[12],xmm7[13],xmm1[13],xmm7[14],xmm1[14],xmm7[15],xmm1[15]
vpaddw %xmm5, %xmm2, %xmm5
vpackuswb %xmm5, %xmm4, %xmm4
vmovdqa %xmm4, (%rax,%r8)
vpmovzxbw %xmm8, %xmm4    # xmm4 = xmm8[0],zero,xmm8[1],zero,xmm8[2],zero,xmm8[3],zero,xmm8[4],zero,xmm8[5],zero,xmm8[6],zero,xmm8[7],zero
vpaddw %xmm4, %xmm3, %xmm4
vpunpckhbw %xmm1, %xmm8, %xmm5 # xmm5 = xmm8[8],xmm1[8],xmm8[9],xmm1[9],xmm8[10],xmm1[10],xmm8[11],xmm1[11],xmm8[12],xmm1[12],xmm8[13],xmm1[13],xmm8[14],xmm1[14],xmm8[15],xmm1[15]
vpaddw %xmm5, %xmm2, %xmm5
vpackuswb %xmm5, %xmm4, %xmm4
vmovdqa %xmm4, (%rdx,%r8)
vpmovzxbw %xmm9, %xmm4    # xmm4 = xmm9[0],zero,xmm9[1],zero,xmm9[2],zero,xmm9[3],zero,xmm9[4],zero,xmm9[5],zero,xmm9[6],zero,xmm9[7],zero
vpaddw %xmm4, %xmm3, %xmm3
vpunpckhbw %xmm1, %xmm9, %xmm4 # xmm4 = xmm9[8],xmm1[8],xmm9[9],xmm1[9],xmm9[10],xmm1[10],xmm9[11],xmm1[11],xmm9[12],xmm1[12],xmm9[13],xmm1[13],xmm9[14],xmm1[14],xmm9[15],xmm1[15]
vpaddw %xmm4, %xmm2, %xmm2
vpackuswb %xmm2, %xmm3, %xmm2
vmovdqa %xmm2, (%r8,%rcx)
leaq (%r8,%rsi), %rdi
vmovdqa (%rsi,%r8), %xmm2
vmovdqa (%rax,%rdi), %xmm3
vmovdqa (%rdx,%rdi), %xmm4
vmovdqa (%rdi,%rcx), %xmm5
vpmovzxbw %xmm2, %xmm7    # xmm7 = xmm2[0],zero,xmm2[1],zero,xmm2[2],zero,xmm2[3],zero,xmm2[4],zero,xmm2[5],zero,xmm2[6],zero,xmm2[7],zero
vpaddw %xmm7, %xmm6, %xmm7
vpunpckhbw %xmm1, %xmm2, %xmm2 # xmm2 = xmm2[8],xmm1[8],xmm2[9],xmm1[9],xmm2[10],xmm1[10],xmm2[11],xmm1[11],xmm2[12],xmm1[12],xmm2[13],xmm1[13],xmm2[14],xmm1[14],xmm2[15],xmm1[15]
vpaddw %xmm2, %xmm0, %xmm2
vpackuswb %xmm2, %xmm7, %xmm2
vmovdqa %xmm2, (%rsi,%r8)
vpmovzxbw %xmm3, %xmm2    # xmm2 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero,xmm3[4],zero,xmm3[5],zero,xmm3[6],zero,xmm3[7],zero
vpaddw %xmm2, %xmm6, %xmm2
vpunpckhbw %xmm1, %xmm3, %xmm3 # xmm3 = xmm3[8],xmm1[8],xmm3[9],xmm1[9],xmm3[10],xmm1[10],xmm3[11],xmm1[11],xmm3[12],xmm1[12],xmm3[13],xmm1[13],xmm3[14],xmm1[14],xmm3[15],xmm1[15]
vpaddw %xmm3, %xmm0, %xmm3
vpackuswb %xmm3, %xmm2, %xmm2
vmovdqa %xmm2, (%rax,%rdi)
vpmovzxbw %xmm4, %xmm2    # xmm2 = xmm4[0],zero,xmm4[1],zero,xmm4[2],zero,xmm4[3],zero,xmm4[4],zero,xmm4[5],zero,xmm4[6],zero,xmm4[7],zero
vpaddw %xmm2, %xmm6, %xmm2
vpunpckhbw %xmm1, %xmm4, %xmm3 # xmm3 = xmm4[8],xmm1[8],xmm4[9],xmm1[9],xmm4[10],xmm1[10],xmm4[11],xmm1[11],xmm4[12],xmm1[12],xmm4[13],xmm1[13],xmm4[14],xmm1[14],xmm4[15],xmm1[15]
vpaddw %xmm3, %xmm0, %xmm3
vpackuswb %xmm3, %xmm2, %xmm2
vmovdqa %xmm2, (%rdx,%rdi)
vpmovzxbw %xmm5, %xmm2    # xmm2 = xmm5[0],zero,xmm5[1],zero,xmm5[2],zero,xmm5[3],zero,xmm5[4],zero,xmm5[5],zero,xmm5[6],zero,xmm5[7],zero
vpaddw %xmm2, %xmm6, %xmm2
vpunpckhbw %xmm1, %xmm5, %xmm1 # xmm1 = xmm5[8],xmm1[8],xmm5[9],xmm1[9],xmm5[10],xmm1[10],xmm5[11],xmm1[11],xmm5[12],xmm1[12],xmm5[13],xmm1[13],xmm5[14],xmm1[14],xmm5[15],xmm1[15]
vpaddw %xmm1, %xmm0, %xmm0
vpackuswb %xmm0, %xmm2, %xmm0
vmovdqa %xmm0, (%rdi,%rcx)
vzeroupper
retq
vpunpcklqdq %xmm5, %xmm1, %xmm3 # xmm3 = xmm1[0],xmm5[0]
vmovdqa %xmm3, 0x1ba0(%rdi)
vpunpckhqdq %xmm5, %xmm1, %xmm1 # xmm1 = xmm1[1],xmm5[1]
vmovdqa %xmm1, 0x1bb0(%rdi)
vpunpcklqdq %xmm0, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm0[0]
vmovdqa %xmm1, 0x1bc0(%rdi)
vpunpckhqdq %xmm0, %xmm2, %xmm0 # xmm0 = xmm2[1],xmm0[1]
vmovdqa %xmm0, 0x1bd0(%rdi)
vzeroupper
retq