// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/lossless_sse2.c
// Function: PredictorAdd10_SSE2
static void PredictorAdd10_SSE2(const uint32_t* in, const uint32_t* upper,
                                int num_pixels, uint32_t* out) {
  int i;
  __m128i L = _mm_cvtsi32_si128((int)out[-1]);
  for (i = 0; i + 4 <= num_pixels; i += 4) {
    __m128i src = _mm_loadu_si128((const __m128i*)&in[i]);
    __m128i TL = _mm_loadu_si128((const __m128i*)&upper[i - 1]);
    const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]);
    const __m128i TR = _mm_loadu_si128((const __m128i*)&upper[i + 1]);
    __m128i avgTTR;
    Average2_m128i(&T, &TR, &avgTTR);
    DO_PRED10(0);
    DO_PRED10_SHIFT;
    DO_PRED10(1);
    DO_PRED10_SHIFT;
    DO_PRED10(2);
    DO_PRED10_SHIFT;
    DO_PRED10(3);
  }
  if (i != num_pixels) {
    VP8LPredictorsAdd_C[10](in + i, upper + i, num_pixels - i, out + i);
  }
}

// Assembly:
xorl %r9d, %r9d
cmpl $0x4, %edx
jl 0xe6b08
movd -0x4(%rcx), %xmm5
movl %edx, %eax
xorl %r9d, %r9d
movdqa 0x46272(%rip), %xmm0    # 0x12cc20
movq %r9, %r8
movdqu (%rdi,%r9,4), %xmm1
movdqu -0x4(%rsi,%r9,4), %xmm3
movdqu (%rsi,%r9,4), %xmm4
movdqu 0x4(%rsi,%r9,4), %xmm6
movdqa %xmm4, %xmm2
pavgb %xmm6, %xmm2
pxor %xmm4, %xmm6
pand %xmm0, %xmm6
psubb %xmm6, %xmm2
movdqa %xmm3, %xmm4
pxor %xmm5, %xmm4
pavgb %xmm3, %xmm5
pand %xmm0, %xmm4
psubb %xmm4, %xmm5
movdqa %xmm2, %xmm4
pavgb %xmm5, %xmm4
pxor %xmm2, %xmm5
pand %xmm0, %xmm5
psubb %xmm5, %xmm4
paddb %xmm1, %xmm4
movdqa %xmm2, %xmm5
psrldq $0x4, %xmm5             # xmm5 = xmm5[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movdqa %xmm3, %xmm6
psrldq $0x4, %xmm6             # xmm6 = xmm6[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movdqa %xmm1, %xmm7
psrldq $0x4, %xmm7             # xmm7 = xmm7[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movdqa %xmm4, %xmm8
pavgb %xmm6, %xmm8
pxor %xmm4, %xmm6
pand %xmm0, %xmm6
psubb %xmm6, %xmm8
movdqa %xmm5, %xmm6
pavgb %xmm8, %xmm6
pxor %xmm5, %xmm8
pand %xmm0, %xmm8
psubb %xmm8, %xmm6
paddb %xmm7, %xmm6
punpckldq %xmm6, %xmm4    # xmm4 = xmm4[0],xmm6[0],xmm4[1],xmm6[1]
movdqa %xmm2, %xmm5
psrldq $0x8, %xmm5             # xmm5 = xmm5[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm3, %xmm7
psrldq $0x8, %xmm7             # xmm7 = xmm7[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm1, %xmm8
psrldq $0x8, %xmm8             # xmm8 = xmm8[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm6, %xmm9
pavgb %xmm7, %xmm9
pxor %xmm6, %xmm7
pand %xmm0, %xmm7
psubb %xmm7, %xmm9
movdqa %xmm5, %xmm6
pavgb %xmm9, %xmm6
pxor %xmm5, %xmm9
pand %xmm0, %xmm9
psubb %xmm9, %xmm6
paddb %xmm8, %xmm6
psrldq $0xc, %xmm2             # xmm2 = xmm2[12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
psrldq $0xc, %xmm3             # xmm3 = xmm3[12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
psrldq $0xc, %xmm1             # xmm1 = xmm1[12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm6, %xmm7
pavgb %xmm3, %xmm7
pxor %xmm6, %xmm3
pand %xmm0, %xmm3
psubb %xmm3, %xmm7
movdqa %xmm2, %xmm5
pavgb %xmm7, %xmm5
pxor %xmm2, %xmm7
pand %xmm0, %xmm7
psubb %xmm7, %xmm5
paddb %xmm1, %xmm5
punpckldq %xmm5, %xmm6    # xmm6 = xmm6[0],xmm5[0],xmm6[1],xmm5[1]
punpcklqdq %xmm6, %xmm4    # xmm4 = xmm4[0],xmm6[0]
movdqu %xmm4, (%rcx,%r9,4)
addq $0x4, %r9
addq $0x8, %r8
cmpq %rax, %r8
jbe 0xe69ae
subl %r9d, %edx
jne 0xe6b0e
retq
leaq 0x94a3b(%rip), %rax     # 0x17b550
movq 0x50(%rax), %rax
movl %r9d, %r8d
leaq (%rdi,%r8,4), %rdi
leaq (%rsi,%r8,4), %rsi
leaq (%rcx,%r8,4), %rcx
jmpq *%rax