// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/yuv_sse2.c
// Function: ConvertRGBToY_SSE2
static WEBP_INLINE void ConvertRGBToY_SSE2(const __m128i* const R,
                                           const __m128i* const G,
                                           const __m128i* const B,
                                           __m128i* const Y) {
  const __m128i kRG_y = MK_CST_16(16839, 33059 - 16384);
  const __m128i kGB_y = MK_CST_16(16384, 6420);
  const __m128i kHALF_Y = _mm_set1_epi32((16 << YUV_FIX) + YUV_HALF);

  const __m128i RG_lo = _mm_unpacklo_epi16(*R, *G);
  const __m128i RG_hi = _mm_unpackhi_epi16(*R, *G);
  const __m128i GB_lo = _mm_unpacklo_epi16(*G, *B);
  const __m128i GB_hi = _mm_unpackhi_epi16(*G, *B);
  TRANSFORM(RG_lo, RG_hi, GB_lo, GB_hi, kRG_y, kGB_y, kHALF_Y, YUV_FIX, *Y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x258(%rbp)
movq %rsi, -0x260(%rbp)
movq %rdx, -0x268(%rbp)
movq %rcx, -0x270(%rbp)
movw $0x4123, -0x212(%rbp)   # imm = 0x4123
movw $0x41c7, -0x214(%rbp)   # imm = 0x41C7
movw $0x4123, -0x216(%rbp)   # imm = 0x4123
movw $0x41c7, -0x218(%rbp)   # imm = 0x41C7
movw $0x4123, -0x21a(%rbp)   # imm = 0x4123
movw $0x41c7, -0x21c(%rbp)   # imm = 0x41C7
movw $0x4123, -0x21e(%rbp)   # imm = 0x4123
movw $0x41c7, -0x220(%rbp)   # imm = 0x41C7
movzwl -0x212(%rbp), %eax
movd %eax, %xmm1
movzwl -0x214(%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 -0x216(%rbp), %eax
movd %eax, %xmm2
movzwl -0x218(%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 -0x21a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x21c(%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 -0x21e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x220(%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, -0x230(%rbp)
movaps -0x230(%rbp), %xmm0
movaps %xmm0, -0x280(%rbp)
movw $0x1914, -0x232(%rbp)   # imm = 0x1914
movw $0x4000, -0x234(%rbp)   # imm = 0x4000
movw $0x1914, -0x236(%rbp)   # imm = 0x1914
movw $0x4000, -0x238(%rbp)   # imm = 0x4000
movw $0x1914, -0x23a(%rbp)   # imm = 0x1914
movw $0x4000, -0x23c(%rbp)   # imm = 0x4000
movw $0x1914, -0x23e(%rbp)   # imm = 0x1914
movw $0x4000, -0x240(%rbp)   # imm = 0x4000
movzwl -0x232(%rbp), %eax
movd %eax, %xmm1
movzwl -0x234(%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 -0x236(%rbp), %eax
movd %eax, %xmm2
movzwl -0x238(%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 -0x23a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x23c(%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 -0x23e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x240(%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, -0x250(%rbp)
movaps -0x250(%rbp), %xmm0
movaps %xmm0, -0x290(%rbp)
movl $0x108000, -0x184(%rbp) # imm = 0x108000
movl -0x184(%rbp), %eax
movl %eax, -0x4(%rbp)
movl %eax, -0x8(%rbp)
movl %eax, -0xc(%rbp)
movl %eax, -0x10(%rbp)
movd -0x4(%rbp), %xmm0
movd -0x8(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd -0xc(%rbp), %xmm2
movd -0x10(%rbp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x20(%rbp)
movaps -0x20(%rbp), %xmm0
movaps %xmm0, -0x2a0(%rbp)
movq -0x258(%rbp), %rax
movaps (%rax), %xmm1
movq -0x260(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x1e0(%rbp)
movaps %xmm0, -0x1f0(%rbp)
movaps -0x1e0(%rbp), %xmm0
movaps -0x1f0(%rbp), %xmm1
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movaps %xmm0, -0x2b0(%rbp)
movq -0x258(%rbp), %rax
movaps (%rax), %xmm1
movq -0x260(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x1a0(%rbp)
movaps %xmm0, -0x1b0(%rbp)
movaps -0x1a0(%rbp), %xmm0
movaps -0x1b0(%rbp), %xmm1
punpckhwd %xmm1, %xmm0    # xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
movaps %xmm0, -0x2c0(%rbp)
movq -0x260(%rbp), %rax
movaps (%rax), %xmm1
movq -0x268(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x200(%rbp)
movaps %xmm0, -0x210(%rbp)
movaps -0x200(%rbp), %xmm0
movaps -0x210(%rbp), %xmm1
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movaps %xmm0, -0x2d0(%rbp)
movq -0x260(%rbp), %rax
movaps (%rax), %xmm1
movq -0x268(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x1c0(%rbp)
movaps %xmm0, -0x1d0(%rbp)
movaps -0x1c0(%rbp), %xmm0
movaps -0x1d0(%rbp), %xmm1
punpckhwd %xmm1, %xmm0    # xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
movdqa %xmm0, -0x2e0(%rbp)
movdqa -0x2b0(%rbp), %xmm1
movdqa -0x280(%rbp), %xmm0
movdqa %xmm1, -0x110(%rbp)
movdqa %xmm0, -0x120(%rbp)
movdqa -0x110(%rbp), %xmm0
movdqa -0x120(%rbp), %xmm1
pmaddwd %xmm1, %xmm0
movdqa %xmm0, -0x2f0(%rbp)
movdqa -0x2c0(%rbp), %xmm1
movdqa -0x280(%rbp), %xmm0
movdqa %xmm1, -0x130(%rbp)
movdqa %xmm0, -0x140(%rbp)
movdqa -0x130(%rbp), %xmm0
movdqa -0x140(%rbp), %xmm1
pmaddwd %xmm1, %xmm0
movdqa %xmm0, -0x300(%rbp)
movdqa -0x2d0(%rbp), %xmm1
movdqa -0x290(%rbp), %xmm0
movdqa %xmm1, -0x150(%rbp)
movdqa %xmm0, -0x160(%rbp)
movdqa -0x150(%rbp), %xmm0
movdqa -0x160(%rbp), %xmm1
pmaddwd %xmm1, %xmm0
movdqa %xmm0, -0x310(%rbp)
movdqa -0x2e0(%rbp), %xmm1
movdqa -0x290(%rbp), %xmm0
movdqa %xmm1, -0x170(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x170(%rbp), %xmm0
movdqa -0x180(%rbp), %xmm1
pmaddwd %xmm1, %xmm0
movdqa %xmm0, -0x320(%rbp)
movdqa -0x2f0(%rbp), %xmm1
movdqa -0x310(%rbp), %xmm0
movdqa %xmm1, -0x90(%rbp)
movdqa %xmm0, -0xa0(%rbp)
movdqa -0x90(%rbp), %xmm0
movdqa -0xa0(%rbp), %xmm1
paddd %xmm1, %xmm0
movdqa %xmm0, -0x330(%rbp)
movdqa -0x300(%rbp), %xmm1
movdqa -0x320(%rbp), %xmm0
movdqa %xmm1, -0xb0(%rbp)
movdqa %xmm0, -0xc0(%rbp)
movdqa -0xb0(%rbp), %xmm0
movdqa -0xc0(%rbp), %xmm1
paddd %xmm1, %xmm0
movdqa %xmm0, -0x340(%rbp)
movdqa -0x330(%rbp), %xmm1
movdqa -0x2a0(%rbp), %xmm0
movdqa %xmm1, -0xd0(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xd0(%rbp), %xmm0
movdqa -0xe0(%rbp), %xmm1
paddd %xmm1, %xmm0
movdqa %xmm0, -0x350(%rbp)
movdqa -0x340(%rbp), %xmm1
movdqa -0x2a0(%rbp), %xmm0
movdqa %xmm1, -0xf0(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0xf0(%rbp), %xmm0
movdqa -0x100(%rbp), %xmm1
paddd %xmm1, %xmm0
movdqa %xmm0, -0x360(%rbp)
movdqa -0x350(%rbp), %xmm0
movdqa %xmm0, -0x50(%rbp)
movl $0x10, -0x54(%rbp)
movdqa -0x50(%rbp), %xmm0
movl -0x54(%rbp), %eax
movd %eax, %xmm1
psrad %xmm1, %xmm0
movdqa %xmm0, -0x370(%rbp)
movdqa -0x360(%rbp), %xmm0
movdqa %xmm0, -0x70(%rbp)
movl $0x10, -0x74(%rbp)
movdqa -0x70(%rbp), %xmm0
movl -0x74(%rbp), %eax
movd %eax, %xmm1
psrad %xmm1, %xmm0
movdqa %xmm0, -0x380(%rbp)
movdqa -0x370(%rbp), %xmm1
movdqa -0x380(%rbp), %xmm0
movdqa %xmm1, -0x30(%rbp)
movdqa %xmm0, -0x40(%rbp)
movdqa -0x30(%rbp), %xmm0
movdqa -0x40(%rbp), %xmm1
packssdw %xmm1, %xmm0
movq -0x270(%rbp), %rax
movdqa %xmm0, (%rax)
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
nopw %cs:(%rax,%rax)