// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/lossless_sse2.c
// Function: ConvertBGRAToRGBA4444_SSE2
static void ConvertBGRAToRGBA4444_SSE2(const uint32_t* src,
                                       int num_pixels, uint8_t* dst) {
  const __m128i mask_0x0f = _mm_set1_epi8(0x0f);
  const __m128i mask_0xf0 = _mm_set1_epi8((char)0xf0);
  const __m128i* in = (const __m128i*)src;
  __m128i* out = (__m128i*)dst;
  while (num_pixels >= 8) {
    const __m128i bgra0 = _mm_loadu_si128(in++);     // bgra0|bgra1|bgra2|bgra3
    const __m128i bgra4 = _mm_loadu_si128(in++);     // bgra4|bgra5|bgra6|bgra7
    const __m128i v0l = _mm_unpacklo_epi8(bgra0, bgra4);  // b0b4g0g4r0r4a0a4...
    const __m128i v0h = _mm_unpackhi_epi8(bgra0, bgra4);  // b2b6g2g6r2r6a2a6...
    const __m128i v1l = _mm_unpacklo_epi8(v0l, v0h);    // b0b2b4b6g0g2g4g6...
    const __m128i v1h = _mm_unpackhi_epi8(v0l, v0h);    // b1b3b5b7g1g3g5g7...
    const __m128i v2l = _mm_unpacklo_epi8(v1l, v1h);    // b0...b7 | g0...g7
    const __m128i v2h = _mm_unpackhi_epi8(v1l, v1h);    // r0...r7 | a0...a7
    const __m128i ga0 = _mm_unpackhi_epi64(v2l, v2h);   // g0...g7 | a0...a7
    const __m128i rb0 = _mm_unpacklo_epi64(v2h, v2l);   // r0...r7 | b0...b7
    const __m128i ga1 = _mm_srli_epi16(ga0, 4);         // g0-|g1-|...|a6-|a7-
    const __m128i rb1 = _mm_and_si128(rb0, mask_0xf0);  // -r0|-r1|...|-b6|-a7
    const __m128i ga2 = _mm_and_si128(ga1, mask_0x0f);  // g0-|g1-|...|a6-|a7-
    const __m128i rgba0 = _mm_or_si128(ga2, rb1);       // rg0..rg7 | ba0..ba7
    const __m128i rgba1 = _mm_srli_si128(rgba0, 8);     // ba0..ba7 | 0
#if (WEBP_SWAP_16BIT_CSP == 1)
    const __m128i rgba = _mm_unpacklo_epi8(rgba1, rgba0);  // barg0...barg7
#else
    const __m128i rgba = _mm_unpacklo_epi8(rgba0, rgba1);  // rgba0...rgba7
#endif
    _mm_storeu_si128(out++, rgba);
    num_pixels -= 8;
  }
  // left-overs
  if (num_pixels > 0) {
    VP8LConvertBGRAToRGBA4444_C((const uint32_t*)in, num_pixels, (uint8_t*)out);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rdi, -0x228(%rbp)
movl %esi, -0x22c(%rbp)
movq %rdx, -0x238(%rbp)
movb $0xf, -0x171(%rbp)
movb -0x171(%rbp), %al
movb %al, -0x372(%rbp)
movb %al, -0x111(%rbp)
movb %al, -0x112(%rbp)
movb %al, -0x113(%rbp)
movb %al, -0x114(%rbp)
movb %al, -0x115(%rbp)
movb %al, -0x116(%rbp)
movb %al, -0x117(%rbp)
movb %al, -0x118(%rbp)
movb %al, -0x119(%rbp)
movb %al, -0x11a(%rbp)
movb %al, -0x11b(%rbp)
movb %al, -0x11c(%rbp)
movb %al, -0x11d(%rbp)
movb %al, -0x11e(%rbp)
movb %al, -0x11f(%rbp)
movb %al, -0x120(%rbp)
movzbl -0x111(%rbp), %eax
movd %eax, %xmm0
movzbl -0x112(%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 -0x113(%rbp), %eax
movd %eax, %xmm2
movzbl -0x114(%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 -0x115(%rbp), %eax
movd %eax, %xmm1
movzbl -0x116(%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 -0x117(%rbp), %eax
movd %eax, %xmm3
movzbl -0x118(%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 -0x119(%rbp), %eax
movd %eax, %xmm2
movzbl -0x11a(%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 -0x11b(%rbp), %eax
movd %eax, %xmm3
movzbl -0x11c(%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 -0x11d(%rbp), %eax
movd %eax, %xmm0
movzbl -0x11e(%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 -0x11f(%rbp), %eax
movd %eax, %xmm4
movzbl -0x120(%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, -0x130(%rbp)
movaps -0x130(%rbp), %xmm0
movaps %xmm0, -0x250(%rbp)
movb $-0x10, -0x172(%rbp)
movb -0x172(%rbp), %al
movb %al, -0x371(%rbp)
movb %al, -0xf1(%rbp)
movb %al, -0xf2(%rbp)
movb %al, -0xf3(%rbp)
movb %al, -0xf4(%rbp)
movb %al, -0xf5(%rbp)
movb %al, -0xf6(%rbp)
movb %al, -0xf7(%rbp)
movb %al, -0xf8(%rbp)
movb %al, -0xf9(%rbp)
movb %al, -0xfa(%rbp)
movb %al, -0xfb(%rbp)
movb %al, -0xfc(%rbp)
movb %al, -0xfd(%rbp)
movb %al, -0xfe(%rbp)
movb %al, -0xff(%rbp)
movb %al, -0x100(%rbp)
movzbl -0xf1(%rbp), %eax
movd %eax, %xmm0
movzbl -0xf2(%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 -0xf3(%rbp), %eax
movd %eax, %xmm2
movzbl -0xf4(%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 -0xf5(%rbp), %eax
movd %eax, %xmm1
movzbl -0xf6(%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 -0xf7(%rbp), %eax
movd %eax, %xmm3
movzbl -0xf8(%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 -0xf9(%rbp), %eax
movd %eax, %xmm2
movzbl -0xfa(%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 -0xfb(%rbp), %eax
movd %eax, %xmm3
movzbl -0xfc(%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 -0xfd(%rbp), %eax
movd %eax, %xmm0
movzbl -0xfe(%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 -0xff(%rbp), %eax
movd %eax, %xmm4
movzbl -0x100(%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, -0x110(%rbp)
movdqa -0x110(%rbp), %xmm0
movdqa %xmm0, -0x260(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x270(%rbp)
cmpl $0x8, -0x22c(%rbp)
jl 0x168d22
movq -0x268(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x268(%rbp)
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x280(%rbp)
movq -0x268(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x268(%rbp)
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x290(%rbp)
movaps -0x280(%rbp), %xmm1
movaps -0x290(%rbp), %xmm0
movaps %xmm1, -0x1b0(%rbp)
movaps %xmm0, -0x1c0(%rbp)
movaps -0x1b0(%rbp), %xmm0
movaps -0x1c0(%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, -0x2a0(%rbp)
movaps -0x280(%rbp), %xmm1
movaps -0x290(%rbp), %xmm0
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps -0x50(%rbp), %xmm0
movaps -0x60(%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]
movaps %xmm0, -0x2b0(%rbp)
movaps -0x2a0(%rbp), %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x1d0(%rbp)
movaps %xmm0, -0x1e0(%rbp)
movaps -0x1d0(%rbp), %xmm0
movaps -0x1e0(%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, -0x2c0(%rbp)
movaps -0x2a0(%rbp), %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x70(%rbp), %xmm0
movaps -0x80(%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]
movaps %xmm0, -0x2d0(%rbp)
movaps -0x2c0(%rbp), %xmm1
movaps -0x2d0(%rbp), %xmm0
movaps %xmm1, -0x1f0(%rbp)
movaps %xmm0, -0x200(%rbp)
movaps -0x1f0(%rbp), %xmm0
movaps -0x200(%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, -0x2e0(%rbp)
movaps -0x2c0(%rbp), %xmm1
movaps -0x2d0(%rbp), %xmm0
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%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]
movaps %xmm0, -0x2f0(%rbp)
movaps -0x2e0(%rbp), %xmm1
movaps -0x2f0(%rbp), %xmm0
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps -0x30(%rbp), %xmm0
movaps -0x40(%rbp), %xmm1
punpckhqdq %xmm1, %xmm0    # xmm0 = xmm0[1],xmm1[1]
movaps %xmm0, -0x300(%rbp)
movaps -0x2f0(%rbp), %xmm1
movaps -0x2e0(%rbp), %xmm0
movaps %xmm1, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
movaps -0x10(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x310(%rbp)
movaps -0x300(%rbp), %xmm0
movaps %xmm0, -0x190(%rbp)
movl $0x4, -0x194(%rbp)
movaps -0x190(%rbp), %xmm0
movd -0x194(%rbp), %xmm1
psrlw %xmm1, %xmm0
movaps %xmm0, -0x320(%rbp)
movaps -0x310(%rbp), %xmm1
movaps -0x260(%rbp), %xmm0
movaps %xmm1, -0x140(%rbp)
movaps %xmm0, -0x150(%rbp)
movaps -0x140(%rbp), %xmm0
movaps -0x150(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x330(%rbp)
movaps -0x320(%rbp), %xmm1
movaps -0x250(%rbp), %xmm0
movaps %xmm1, -0x160(%rbp)
movaps %xmm0, -0x170(%rbp)
movaps -0x160(%rbp), %xmm0
movaps -0x170(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x340(%rbp)
movaps -0x340(%rbp), %xmm1
movaps -0x330(%rbp), %xmm0
movaps %xmm1, -0xe0(%rbp)
movaps %xmm0, -0xf0(%rbp)
movaps -0xe0(%rbp), %xmm0
movaps -0xf0(%rbp), %xmm1
por %xmm1, %xmm0
movaps %xmm0, -0x350(%rbp)
movaps -0x350(%rbp), %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movaps %xmm0, -0x360(%rbp)
movaps -0x350(%rbp), %xmm1
movaps -0x360(%rbp), %xmm0
movaps %xmm1, -0x210(%rbp)
movaps %xmm0, -0x220(%rbp)
movaps -0x210(%rbp), %xmm0
movaps -0x220(%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]
movdqa %xmm0, -0x370(%rbp)
movq -0x270(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x270(%rbp)
movdqa -0x370(%rbp), %xmm0
movq %rax, -0xb8(%rbp)
movdqa %xmm0, -0xd0(%rbp)
movdqa -0xd0(%rbp), %xmm0
movq -0xb8(%rbp), %rax
movdqu %xmm0, (%rax)
movl -0x22c(%rbp), %eax
subl $0x8, %eax
movl %eax, -0x22c(%rbp)
jmp 0x1689d6
cmpl $0x0, -0x22c(%rbp)
jle 0x168d44
movq -0x268(%rbp), %rdi
movl -0x22c(%rbp), %esi
movq -0x270(%rbp), %rdx
callq 0x14f2d0
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
nopl (%rax)