// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec_sse2.c
// Function: VL4_SSE2
static void VL4_SSE2(uint8_t* dst) {   // Vertical-Left
  const __m128i one = _mm_set1_epi8(1);
  const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(dst - BPS));
  const __m128i BCDEFGH_ = _mm_srli_si128(ABCDEFGH, 1);
  const __m128i CDEFGH__ = _mm_srli_si128(ABCDEFGH, 2);
  const __m128i avg1 = _mm_avg_epu8(ABCDEFGH, BCDEFGH_);
  const __m128i avg2 = _mm_avg_epu8(CDEFGH__, BCDEFGH_);
  const __m128i avg3 = _mm_avg_epu8(avg1, avg2);
  const __m128i lsb1 = _mm_and_si128(_mm_xor_si128(avg1, avg2), one);
  const __m128i ab = _mm_xor_si128(ABCDEFGH, BCDEFGH_);
  const __m128i bc = _mm_xor_si128(CDEFGH__, BCDEFGH_);
  const __m128i abbc = _mm_or_si128(ab, bc);
  const __m128i lsb2 = _mm_and_si128(abbc, lsb1);
  const __m128i avg4 = _mm_subs_epu8(avg3, lsb2);
  const uint32_t extra_out =
      (uint32_t)_mm_cvtsi128_si32(_mm_srli_si128(avg4, 4));
  WebPInt32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(               avg1    ));
  WebPInt32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(               avg4    ));
  WebPInt32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg1, 1)));
  WebPInt32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg4, 1)));

  // these two are hard to get and irregular
  DST(3, 2) = (extra_out >> 0) & 0xff;
  DST(3, 3) = (extra_out >> 8) & 0xff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movq %rdi, -0x238(%rbp)
movb $0x1, -0x121(%rbp)
movb -0x121(%rbp), %al
movb %al, -0xc1(%rbp)
movb %al, -0xc2(%rbp)
movb %al, -0xc3(%rbp)
movb %al, -0xc4(%rbp)
movb %al, -0xc5(%rbp)
movb %al, -0xc6(%rbp)
movb %al, -0xc7(%rbp)
movb %al, -0xc8(%rbp)
movb %al, -0xc9(%rbp)
movb %al, -0xca(%rbp)
movb %al, -0xcb(%rbp)
movb %al, -0xcc(%rbp)
movb %al, -0xcd(%rbp)
movb %al, -0xce(%rbp)
movb %al, -0xcf(%rbp)
movb %al, -0xd0(%rbp)
movzbl -0xc1(%rbp), %eax
movd %eax, %xmm0
movzbl -0xc2(%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 -0xc3(%rbp), %eax
movd %eax, %xmm2
movzbl -0xc4(%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 -0xc5(%rbp), %eax
movd %eax, %xmm1
movzbl -0xc6(%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 -0xc7(%rbp), %eax
movd %eax, %xmm3
movzbl -0xc8(%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 -0xc9(%rbp), %eax
movd %eax, %xmm2
movzbl -0xca(%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 -0xcb(%rbp), %eax
movd %eax, %xmm3
movzbl -0xcc(%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 -0xcd(%rbp), %eax
movd %eax, %xmm0
movzbl -0xce(%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 -0xcf(%rbp), %eax
movd %eax, %xmm4
movzbl -0xd0(%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]
movaps %xmm0, -0xe0(%rbp)
movaps -0xe0(%rbp), %xmm0
movaps %xmm0, -0x250(%rbp)
movq -0x238(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x230(%rbp)
movaps -0x230(%rbp), %xmm0
movaps %xmm0, -0x260(%rbp)
movaps -0x260(%rbp), %xmm0
psrldq $0x1, %xmm0             # xmm0 = xmm0[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movaps %xmm0, -0x270(%rbp)
movaps -0x260(%rbp), %xmm0
psrldq $0x2, %xmm0             # xmm0 = xmm0[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movaps %xmm0, -0x280(%rbp)
movaps -0x260(%rbp), %xmm1
movaps -0x270(%rbp), %xmm0
movaps %xmm1, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
movaps -0x10(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
pavgb %xmm1, %xmm0
movaps %xmm0, -0x290(%rbp)
movaps -0x280(%rbp), %xmm1
movaps -0x270(%rbp), %xmm0
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps -0x30(%rbp), %xmm0
movaps -0x40(%rbp), %xmm1
pavgb %xmm1, %xmm0
movaps %xmm0, -0x2a0(%rbp)
movaps -0x290(%rbp), %xmm1
movaps -0x2a0(%rbp), %xmm0
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps -0x50(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
pavgb %xmm1, %xmm0
movaps %xmm0, -0x2b0(%rbp)
movaps -0x290(%rbp), %xmm1
movaps -0x2a0(%rbp), %xmm0
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x70(%rbp), %xmm1
movaps -0x80(%rbp), %xmm0
pxor %xmm0, %xmm1
movaps -0x250(%rbp), %xmm0
movaps %xmm1, -0xf0(%rbp)
movaps %xmm0, -0x100(%rbp)
movaps -0xf0(%rbp), %xmm0
movaps -0x100(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x2c0(%rbp)
movaps -0x260(%rbp), %xmm1
movaps -0x270(%rbp), %xmm0
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
pxor %xmm1, %xmm0
movaps %xmm0, -0x2d0(%rbp)
movaps -0x280(%rbp), %xmm1
movaps -0x270(%rbp), %xmm0
movaps %xmm1, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm1
pxor %xmm1, %xmm0
movaps %xmm0, -0x2e0(%rbp)
movaps -0x2d0(%rbp), %xmm1
movaps -0x2e0(%rbp), %xmm0
movaps %xmm1, -0x160(%rbp)
movaps %xmm0, -0x170(%rbp)
movaps -0x160(%rbp), %xmm0
movaps -0x170(%rbp), %xmm1
por %xmm1, %xmm0
movaps %xmm0, -0x2f0(%rbp)
movaps -0x2f0(%rbp), %xmm1
movaps -0x2c0(%rbp), %xmm0
movaps %xmm1, -0x110(%rbp)
movaps %xmm0, -0x120(%rbp)
movaps -0x110(%rbp), %xmm0
movaps -0x120(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x300(%rbp)
movaps -0x2b0(%rbp), %xmm1
movaps -0x300(%rbp), %xmm0
movaps %xmm1, -0x140(%rbp)
movaps %xmm0, -0x150(%rbp)
movaps -0x140(%rbp), %xmm0
movaps -0x150(%rbp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, -0x310(%rbp)
movaps -0x310(%rbp), %xmm0
psrldq $0x4, %xmm0             # xmm0 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movaps %xmm0, -0x180(%rbp)
movaps -0x180(%rbp), %xmm0
movaps %xmm0, -0x190(%rbp)
movl -0x190(%rbp), %eax
movl %eax, -0x314(%rbp)
movq -0x238(%rbp), %rdi
movaps -0x290(%rbp), %xmm0
movaps %xmm0, -0x1a0(%rbp)
movaps -0x1a0(%rbp), %xmm0
movaps %xmm0, -0x1b0(%rbp)
movl -0x1b0(%rbp), %esi
callq 0x15f7a0
movq -0x238(%rbp), %rdi
addq $0x20, %rdi
movaps -0x310(%rbp), %xmm0
movaps %xmm0, -0x1c0(%rbp)
movaps -0x1c0(%rbp), %xmm0
movaps %xmm0, -0x1d0(%rbp)
movl -0x1d0(%rbp), %esi
callq 0x15f7a0
movq -0x238(%rbp), %rdi
addq $0x40, %rdi
movaps -0x290(%rbp), %xmm0
psrldq $0x1, %xmm0             # xmm0 = xmm0[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movaps %xmm0, -0x1e0(%rbp)
movaps -0x1e0(%rbp), %xmm0
movaps %xmm0, -0x1f0(%rbp)
movl -0x1f0(%rbp), %esi
callq 0x15f7a0
movq -0x238(%rbp), %rdi
addq $0x60, %rdi
movaps -0x310(%rbp), %xmm0
psrldq $0x1, %xmm0             # xmm0 = xmm0[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movaps %xmm0, -0x200(%rbp)
movaps -0x200(%rbp), %xmm0
movaps %xmm0, -0x210(%rbp)
movl -0x210(%rbp), %esi
callq 0x15f7a0
movl -0x314(%rbp), %eax
shrl $0x0, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x238(%rbp), %rax
movb %cl, 0x43(%rax)
movl -0x314(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x238(%rbp), %rax
movb %cl, 0x63(%rax)
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
nopw %cs:(%rax,%rax)