// File: /workspace/github_c_makefile_star2_O2/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:
movd -0x4(%rcx), %xmm5
movslq %edx, %r8
xorl %eax, %eax
movdqa 0x42c17(%rip), %xmm0    # 0x11c900
xorl %r10d, %r10d
leaq 0x4(%r10), %r9
cmpq %r8, %r9
jg 0xd9e46
movdqu (%rdi,%rax), %xmm1
movdqu -0x4(%rsi,%rax), %xmm3
movdqu (%rsi,%rax), %xmm4
movdqu 0x4(%rsi,%rax), %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,%rax)
addq $0x10, %rax
movq %r9, %r10
jmp 0xd9cec
cmpl %r10d, %edx
jne 0xd9e4c
retq
leaq 0x978bd(%rip), %r8      # 0x171710
movq 0x50(%r8), %r8
addq %rax, %rdi
addq %rax, %rsi
subl %r10d, %edx
addq %rax, %rcx
jmpq *%r8