// File: /workspace/github_c_makefile_star2_O1/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 0xe78df
movd -0x4(%rcx), %xmm5
movl %edx, %eax
xorl %r9d, %r9d
movdqa 0x46252(%rip), %xmm0    # 0x12d9d0
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
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, %xmm7
pavgb %xmm9, %xmm7
pxor %xmm5, %xmm9
pand %xmm0, %xmm9
psubb %xmm9, %xmm7
paddb %xmm8, %xmm7
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 %xmm7, %xmm8
pavgb %xmm3, %xmm8
pxor %xmm7, %xmm3
pand %xmm0, %xmm3
psubb %xmm3, %xmm8
movdqa %xmm2, %xmm5
pavgb %xmm8, %xmm5
pxor %xmm2, %xmm8
pand %xmm0, %xmm8
psubb %xmm8, %xmm5
paddb %xmm1, %xmm5
punpckldq %xmm5, %xmm7    # xmm7 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
punpckldq %xmm6, %xmm4    # xmm4 = xmm4[0],xmm6[0],xmm4[1],xmm6[1]
punpcklqdq %xmm7, %xmm4    # xmm4 = xmm4[0],xmm7[0]
movdqu %xmm4, (%rcx,%r9,4)
addq $0x4, %r9
addq $0x8, %r8
cmpq %rax, %r8
jbe 0xe777e
subl %r9d, %edx
jne 0xe78e5
retq
leaq 0x94c64(%rip), %rax     # 0x17c550
movq 0x50(%rax), %rax
movl %r9d, %r8d
leaq (%rdi,%r8,4), %rdi
leaq (%rsi,%r8,4), %rsi
leaq (%rcx,%r8,4), %rcx
jmpq *%rax