// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec_sse2.c
// Function: DoFilter6_SSE2
static WEBP_INLINE void DoFilter6_SSE2(__m128i* const p2, __m128i* const p1,
                                       __m128i* const p0, __m128i* const q0,
                                       __m128i* const q1, __m128i* const q2,
                                       const __m128i* const mask,
                                       int hev_thresh) {
  const __m128i zero = _mm_setzero_si128();
  const __m128i sign_bit = _mm_set1_epi8((char)0x80);
  __m128i a, not_hev;

  // compute hev mask
  GetNotHEV_SSE2(p1, p0, q0, q1, hev_thresh, &not_hev);

  FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1);
  FLIP_SIGN_BIT2(*p2, *q2);
  GetBaseDelta_SSE2(p1, p0, q0, q1, &a);

  { // do simple filter on pixels with hev
    const __m128i m = _mm_andnot_si128(not_hev, *mask);
    const __m128i f = _mm_and_si128(a, m);
    DoSimpleFilter_SSE2(p0, q0, &f);
  }

  { // do strong filter on pixels with not hev
    const __m128i k9 = _mm_set1_epi16(0x0900);
    const __m128i k63 = _mm_set1_epi16(63);

    const __m128i m = _mm_and_si128(not_hev, *mask);
    const __m128i f = _mm_and_si128(a, m);

    const __m128i f_lo = _mm_unpacklo_epi8(zero, f);
    const __m128i f_hi = _mm_unpackhi_epi8(zero, f);

    const __m128i f9_lo = _mm_mulhi_epi16(f_lo, k9);    // Filter (lo) * 9
    const __m128i f9_hi = _mm_mulhi_epi16(f_hi, k9);    // Filter (hi) * 9

    const __m128i a2_lo = _mm_add_epi16(f9_lo, k63);    // Filter * 9 + 63
    const __m128i a2_hi = _mm_add_epi16(f9_hi, k63);    // Filter * 9 + 63

    const __m128i a1_lo = _mm_add_epi16(a2_lo, f9_lo);  // Filter * 18 + 63
    const __m128i a1_hi = _mm_add_epi16(a2_hi, f9_hi);  // Filter * 18 + 63

    const __m128i a0_lo = _mm_add_epi16(a1_lo, f9_lo);  // Filter * 27 + 63
    const __m128i a0_hi = _mm_add_epi16(a1_hi, f9_hi);  // Filter * 27 + 63

    Update2Pixels_SSE2(p2, q2, &a2_lo, &a2_hi);
    Update2Pixels_SSE2(p1, q1, &a1_lo, &a1_hi);
    Update2Pixels_SSE2(p0, q0, &a0_lo, &a0_hi);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x490, %rsp            # imm = 0x490
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x310(%rbp)
movq %rsi, -0x318(%rbp)
movq %rdx, -0x320(%rbp)
movq %rcx, -0x328(%rbp)
movq %r8, -0x330(%rbp)
movq %r9, -0x338(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x200(%rbp)
movaps -0x200(%rbp), %xmm0
movaps %xmm0, -0x350(%rbp)
movb $-0x80, -0x181(%rbp)
movb -0x181(%rbp), %al
movb %al, -0x481(%rbp)
movb %al, -0x101(%rbp)
movb %al, -0x102(%rbp)
movb %al, -0x103(%rbp)
movb %al, -0x104(%rbp)
movb %al, -0x105(%rbp)
movb %al, -0x106(%rbp)
movb %al, -0x107(%rbp)
movb %al, -0x108(%rbp)
movb %al, -0x109(%rbp)
movb %al, -0x10a(%rbp)
movb %al, -0x10b(%rbp)
movb %al, -0x10c(%rbp)
movb %al, -0x10d(%rbp)
movb %al, -0x10e(%rbp)
movb %al, -0x10f(%rbp)
movb %al, -0x110(%rbp)
movzbl -0x101(%rbp), %eax
movd %eax, %xmm0
movzbl -0x102(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
movzbl -0x103(%rbp), %eax
movd %eax, %xmm2
movzbl -0x104(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzbl -0x105(%rbp), %eax
movd %eax, %xmm1
movzbl -0x106(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
movzbl -0x107(%rbp), %eax
movd %eax, %xmm3
movzbl -0x108(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzbl -0x109(%rbp), %eax
movd %eax, %xmm2
movzbl -0x10a(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
movzbl -0x10b(%rbp), %eax
movd %eax, %xmm3
movzbl -0x10c(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzbl -0x10d(%rbp), %eax
movd %eax, %xmm0
movzbl -0x10e(%rbp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
movzbl -0x10f(%rbp), %eax
movd %eax, %xmm4
movzbl -0x110(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x120(%rbp)
movdqa -0x120(%rbp), %xmm0
movdqa %xmm0, -0x360(%rbp)
movq -0x318(%rbp), %rdi
movq -0x320(%rbp), %rsi
movq -0x328(%rbp), %rdx
movq -0x330(%rbp), %rcx
movl 0x18(%rbp), %r8d
leaq -0x380(%rbp), %r9
callq 0x1607e0
jmp 0x15fc19
movq -0x318(%rbp), %rax
movdqa (%rax), %xmm1
movdqa -0x360(%rbp), %xmm0
movdqa %xmm1, -0x50(%rbp)
movdqa %xmm0, -0x60(%rbp)
movdqa -0x50(%rbp), %xmm0
pxor -0x60(%rbp), %xmm0
movq -0x318(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0x320(%rbp), %rax
movdqa (%rax), %xmm1
movdqa -0x360(%rbp), %xmm0
movdqa %xmm1, -0x70(%rbp)
movdqa %xmm0, -0x80(%rbp)
movdqa -0x70(%rbp), %xmm0
pxor -0x80(%rbp), %xmm0
movq -0x320(%rbp), %rax
movdqa %xmm0, (%rax)
jmp 0x15fc7f
movq -0x328(%rbp), %rax
movdqa (%rax), %xmm1
movdqa -0x360(%rbp), %xmm0
movdqa %xmm1, -0x90(%rbp)
movdqa %xmm0, -0xa0(%rbp)
movdqa -0x90(%rbp), %xmm0
pxor -0xa0(%rbp), %xmm0
movq -0x328(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0x330(%rbp), %rax
movdqa (%rax), %xmm1
movdqa -0x360(%rbp), %xmm0
movdqa %xmm1, -0xb0(%rbp)
movdqa %xmm0, -0xc0(%rbp)
movdqa -0xb0(%rbp), %xmm0
pxor -0xc0(%rbp), %xmm0
movq -0x330(%rbp), %rax
movdqa %xmm0, (%rax)
jmp 0x15fcfd
jmp 0x15fcff
movq -0x310(%rbp), %rax
movdqa (%rax), %xmm1
movdqa -0x360(%rbp), %xmm0
movdqa %xmm1, -0xd0(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xd0(%rbp), %xmm0
pxor -0xe0(%rbp), %xmm0
movq -0x310(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0x338(%rbp), %rax
movdqa (%rax), %xmm1
movdqa -0x360(%rbp), %xmm0
movdqa %xmm1, -0xf0(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0xf0(%rbp), %xmm0
pxor -0x100(%rbp), %xmm0
movq -0x338(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0x318(%rbp), %rdi
movq -0x320(%rbp), %rsi
movq -0x328(%rbp), %rdx
movq -0x330(%rbp), %rcx
leaq -0x370(%rbp), %r8
callq 0x160ae0
movaps -0x380(%rbp), %xmm1
movq 0x10(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps -0x30(%rbp), %xmm0
movaps -0x40(%rbp), %xmm1
pandn %xmm1, %xmm0
movaps %xmm0, -0x390(%rbp)
movaps -0x370(%rbp), %xmm1
movaps -0x390(%rbp), %xmm0
movaps %xmm1, -0x130(%rbp)
movaps %xmm0, -0x140(%rbp)
movaps -0x130(%rbp), %xmm0
movaps -0x140(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x3a0(%rbp)
movq -0x320(%rbp), %rdi
movq -0x328(%rbp), %rsi
leaq -0x3a0(%rbp), %rdx
callq 0x160c40
movw $0x900, -0x302(%rbp)    # imm = 0x900
movw -0x302(%rbp), %ax
movw %ax, -0x1b2(%rbp)
movw %ax, -0x1b4(%rbp)
movw %ax, -0x1b6(%rbp)
movw %ax, -0x1b8(%rbp)
movw %ax, -0x1ba(%rbp)
movw %ax, -0x1bc(%rbp)
movw %ax, -0x1be(%rbp)
movw %ax, -0x1c0(%rbp)
movzwl -0x1b2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x1b4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x1b6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x1b8(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x1ba(%rbp), %eax
movd %eax, %xmm0
movzwl -0x1bc(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x1be(%rbp), %eax
movd %eax, %xmm3
movzwl -0x1c0(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x1d0(%rbp)
movaps -0x1d0(%rbp), %xmm0
movaps %xmm0, -0x3b0(%rbp)
movw $0x3f, -0x304(%rbp)
movw -0x304(%rbp), %ax
movw %ax, -0x184(%rbp)
movw %ax, -0x186(%rbp)
movw %ax, -0x188(%rbp)
movw %ax, -0x18a(%rbp)
movw %ax, -0x18c(%rbp)
movw %ax, -0x18e(%rbp)
movw %ax, -0x190(%rbp)
movw %ax, -0x192(%rbp)
movzwl -0x184(%rbp), %eax
movd %eax, %xmm1
movzwl -0x186(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x188(%rbp), %eax
movd %eax, %xmm2
movzwl -0x18a(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x18c(%rbp), %eax
movd %eax, %xmm0
movzwl -0x18e(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x190(%rbp), %eax
movd %eax, %xmm3
movzwl -0x192(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x1b0(%rbp)
movaps -0x1b0(%rbp), %xmm0
movaps %xmm0, -0x3c0(%rbp)
movaps -0x380(%rbp), %xmm1
movq 0x10(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x150(%rbp)
movaps %xmm0, -0x160(%rbp)
movaps -0x150(%rbp), %xmm0
movaps -0x160(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x3d0(%rbp)
movaps -0x370(%rbp), %xmm1
movaps -0x3d0(%rbp), %xmm0
movaps %xmm1, -0x170(%rbp)
movaps %xmm0, -0x180(%rbp)
movaps -0x170(%rbp), %xmm0
movaps -0x180(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x3e0(%rbp)
movaps -0x350(%rbp), %xmm1
movaps -0x3e0(%rbp), %xmm0
movaps %xmm1, -0x1e0(%rbp)
movaps %xmm0, -0x1f0(%rbp)
movaps -0x1e0(%rbp), %xmm0
movaps -0x1f0(%rbp), %xmm1
punpcklbw %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
movaps %xmm0, -0x3f0(%rbp)
movaps -0x350(%rbp), %xmm1
movaps -0x3e0(%rbp), %xmm0
movaps %xmm1, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
movaps -0x10(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
punpckhbw %xmm1, %xmm0    # xmm0 = xmm0[8],xmm1[8],xmm0[9],xmm1[9],xmm0[10],xmm1[10],xmm0[11],xmm1[11],xmm0[12],xmm1[12],xmm0[13],xmm1[13],xmm0[14],xmm1[14],xmm0[15],xmm1[15]
movdqa %xmm0, -0x400(%rbp)
movdqa -0x3f0(%rbp), %xmm1
movdqa -0x3b0(%rbp), %xmm0
movdqa %xmm1, -0x210(%rbp)
movdqa %xmm0, -0x220(%rbp)
movdqa -0x210(%rbp), %xmm0
movdqa -0x220(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movdqa %xmm0, -0x410(%rbp)
movdqa -0x400(%rbp), %xmm1
movdqa -0x3b0(%rbp), %xmm0
movdqa %xmm1, -0x230(%rbp)
movdqa %xmm0, -0x240(%rbp)
movdqa -0x230(%rbp), %xmm0
movdqa -0x240(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movdqa %xmm0, -0x420(%rbp)
movdqa -0x410(%rbp), %xmm1
movdqa -0x3c0(%rbp), %xmm0
movdqa %xmm1, -0x250(%rbp)
movdqa %xmm0, -0x260(%rbp)
movdqa -0x250(%rbp), %xmm0
movdqa -0x260(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x430(%rbp)
movdqa -0x420(%rbp), %xmm1
movdqa -0x3c0(%rbp), %xmm0
movdqa %xmm1, -0x270(%rbp)
movdqa %xmm0, -0x280(%rbp)
movdqa -0x270(%rbp), %xmm0
movdqa -0x280(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x440(%rbp)
movdqa -0x430(%rbp), %xmm1
movdqa -0x410(%rbp), %xmm0
movdqa %xmm1, -0x290(%rbp)
movdqa %xmm0, -0x2a0(%rbp)
movdqa -0x290(%rbp), %xmm0
movdqa -0x2a0(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x450(%rbp)
movdqa -0x440(%rbp), %xmm1
movdqa -0x420(%rbp), %xmm0
movdqa %xmm1, -0x2b0(%rbp)
movdqa %xmm0, -0x2c0(%rbp)
movdqa -0x2b0(%rbp), %xmm0
movdqa -0x2c0(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x460(%rbp)
movdqa -0x450(%rbp), %xmm1
movdqa -0x410(%rbp), %xmm0
movdqa %xmm1, -0x2d0(%rbp)
movdqa %xmm0, -0x2e0(%rbp)
movdqa -0x2d0(%rbp), %xmm0
movdqa -0x2e0(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x470(%rbp)
movdqa -0x460(%rbp), %xmm1
movdqa -0x420(%rbp), %xmm0
movdqa %xmm1, -0x2f0(%rbp)
movdqa %xmm0, -0x300(%rbp)
movdqa -0x2f0(%rbp), %xmm0
movdqa -0x300(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x480(%rbp)
movq -0x310(%rbp), %rdi
movq -0x338(%rbp), %rsi
leaq -0x430(%rbp), %rdx
leaq -0x440(%rbp), %rcx
callq 0x161040
movq -0x318(%rbp), %rdi
movq -0x330(%rbp), %rsi
leaq -0x450(%rbp), %rdx
leaq -0x460(%rbp), %rcx
callq 0x161040
movq -0x320(%rbp), %rdi
movq -0x328(%rbp), %rsi
leaq -0x470(%rbp), %rdx
leaq -0x480(%rbp), %rcx
callq 0x161040
addq $0x490, %rsp            # imm = 0x490
popq %rbp
retq
nopw %cs:(%rax,%rax)