// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec_sse2.c
// Function: VFilter8_SSE2
static void VFilter8_SSE2(uint8_t* u, uint8_t* v, int stride,
                          int thresh, int ithresh, int hev_thresh) {
  __m128i mask;
  __m128i t1, p2, p1, p0, q0, q1, q2;

  // Load p3, p2, p1, p0
  LOADUV_H_EDGES4(u - 4 * stride, v - 4 * stride, stride, t1, p2, p1, p0);
  MAX_DIFF1(t1, p2, p1, p0, mask);

  // Load q0, q1, q2, q3
  LOADUV_H_EDGES4(u, v, stride, q0, q1, q2, t1);
  MAX_DIFF2(t1, q2, q1, q0, mask);

  ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask);
  DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);

  // Store
  STOREUV(p2, u, v, -3 * stride);
  STOREUV(p1, u, v, -2 * stride);
  STOREUV(p0, u, v, -1 * stride);
  STOREUV(q0, u, v, 0 * stride);
  STOREUV(q1, u, v, 1 * stride);
  STOREUV(q2, u, v, 2 * stride);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, 0x8(%rsp)
movl %r8d, %r9d
movl %ecx, %r8d
movq %rsi, %rbx
movq %rdi, %r14
leal (,%rdx,4), %eax
cltq
movq %rdi, %rcx
subq %rax, %rcx
subq %rax, %rsi
movq (%rsi), %xmm1
movq (%rcx), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movslq %edx, %r12
movq (%rsi,%r12), %xmm2
movq (%rcx,%r12), %xmm1
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
leaq 0x20(%rsp), %rax
movdqa %xmm1, (%rax)
leaq (%r12,%r12), %rax
movq %rax, (%rsp)
movq (%rsi,%r12,2), %xmm2
movq (%rcx,%r12,2), %xmm3
punpcklqdq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0]
leaq 0x70(%rsp), %r13
movdqa %xmm3, (%r13)
leaq (%r12,%r12,2), %rax
movq (%rsi,%rax), %xmm2
movq (%rcx,%rax), %xmm4
punpcklqdq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0]
leaq 0x60(%rsp), %r15
movdqa %xmm4, (%r15)
movdqa %xmm3, %xmm2
psubusb %xmm4, %xmm2
psubusb %xmm3, %xmm4
por %xmm2, %xmm4
movdqa %xmm1, %xmm2
psubusb %xmm0, %xmm2
psubusb %xmm1, %xmm0
por %xmm2, %xmm0
pmaxub %xmm4, %xmm0
movdqa %xmm3, %xmm2
psubusb %xmm1, %xmm2
psubusb %xmm3, %xmm1
por %xmm2, %xmm1
movq (%rbx), %xmm3
movq (%rdi), %xmm2
punpcklqdq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0]
leaq 0x40(%rsp), %rbp
movdqa %xmm2, (%rbp)
movq (%rbx,%r12), %xmm3
movq (%rdi,%r12), %xmm4
punpcklqdq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0]
leaq 0x10(%rsp), %rsi
movdqa %xmm4, (%rsi)
movq %rsi, %r11
movq (%rbx,%r12,2), %xmm5
movq (%rdi,%r12,2), %xmm3
punpcklqdq %xmm5, %xmm3    # xmm3 = xmm3[0],xmm5[0]
leaq 0x30(%rsp), %rsi
movdqa %xmm3, (%rsi)
movq (%rbx,%rax), %xmm5
movq (%rdi,%rax), %xmm6
punpcklqdq %xmm5, %xmm6    # xmm6 = xmm6[0],xmm5[0]
movdqa %xmm4, %xmm5
psubusb %xmm2, %xmm5
psubusb %xmm4, %xmm2
por %xmm5, %xmm2
pmaxub %xmm1, %xmm2
pmaxub %xmm0, %xmm2
movdqa %xmm3, %xmm0
psubusb %xmm6, %xmm0
psubusb %xmm3, %xmm6
por %xmm0, %xmm6
movdqa %xmm4, %xmm0
psubusb %xmm3, %xmm0
psubusb %xmm4, %xmm3
por %xmm0, %xmm3
pmaxub %xmm6, %xmm3
pmaxub %xmm2, %xmm3
leaq 0x50(%rsp), %rax
movdqa %xmm3, (%rax)
subq $0x8, %rsp
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r11, %rcx
pushq %rax
callq 0xd8554
popq %rax
popq %rcx
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbp, %rcx
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %rbp
movq %rbp, %r9
pushq 0x8(%rsp)
leaq 0x58(%rsp), %rax
pushq %rax
callq 0xd85a5
popq %rax
popq %rcx
imulq $-0x3, %r12, %rax
leaq 0x20(%rsp), %rcx
movdqa (%rcx), %xmm0
movq %xmm0, (%r14,%rax)
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, (%rbx,%rax)
movq %r14, %rax
movq (%rsp), %rcx
subq %rcx, %rax
movdqa (%r13), %xmm0
movq %xmm0, (%rax)
movq %rbx, %rax
subq %rcx, %rax
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, (%rax)
movq %r14, %rax
subq %r12, %rax
movdqa (%r15), %xmm0
movq %xmm0, (%rax)
movq %rbx, %rax
subq %r12, %rax
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, (%rax)
leaq 0x40(%rsp), %rax
movdqa (%rax), %xmm0
movq %xmm0, (%r14)
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, (%rbx)
leaq 0x10(%rsp), %rax
movdqa (%rax), %xmm0
movq %xmm0, (%r14,%r12)
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, (%rbx,%r12)
movdqa (%rbp), %xmm0
movq %xmm0, (%r14,%r12,2)
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, (%rbx,%r12,2)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq