// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/rescaler_sse2.c
// Function: ProcessRow_SSE2
static WEBP_INLINE void ProcessRow_SSE2(const __m128i* const A0,
                                        const __m128i* const A1,
                                        const __m128i* const A2,
                                        const __m128i* const A3,
                                        const __m128i* const mult,
                                        uint8_t* const dst) {
  const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER);
  const __m128i mask = _mm_set_epi32(~0, 0, ~0, 0);
  const __m128i B0 = _mm_mul_epu32(*A0, *mult);
  const __m128i B1 = _mm_mul_epu32(*A1, *mult);
  const __m128i B2 = _mm_mul_epu32(*A2, *mult);
  const __m128i B3 = _mm_mul_epu32(*A3, *mult);
  const __m128i C0 = _mm_add_epi64(B0, rounder);
  const __m128i C1 = _mm_add_epi64(B1, rounder);
  const __m128i C2 = _mm_add_epi64(B2, rounder);
  const __m128i C3 = _mm_add_epi64(B3, rounder);
  const __m128i D0 = _mm_srli_epi64(C0, WEBP_RESCALER_RFIX);
  const __m128i D1 = _mm_srli_epi64(C1, WEBP_RESCALER_RFIX);
#if (WEBP_RESCALER_RFIX < 32)
  const __m128i D2 =
      _mm_and_si128(_mm_slli_epi64(C2, 32 - WEBP_RESCALER_RFIX), mask);
  const __m128i D3 =
      _mm_and_si128(_mm_slli_epi64(C3, 32 - WEBP_RESCALER_RFIX), mask);
#else
  const __m128i D2 = _mm_and_si128(C2, mask);
  const __m128i D3 = _mm_and_si128(C3, mask);
#endif
  const __m128i E0 = _mm_or_si128(D0, D2);
  const __m128i E1 = _mm_or_si128(D1, D3);
  const __m128i F = _mm_packs_epi32(E0, E1);
  const __m128i G = _mm_packus_epi16(F, F);
  _mm_storel_epi64((__m128i*)dst, G);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
movq %rdi, -0x268(%rbp)
movq %rsi, -0x270(%rbp)
movq %rdx, -0x278(%rbp)
movq %rcx, -0x280(%rbp)
movq %r8, -0x288(%rbp)
movq %r9, -0x290(%rbp)
movl $0x0, -0x218(%rbp)
movl $0x80000000, -0x21c(%rbp) # imm = 0x80000000
movl $0x0, -0x220(%rbp)
movl $0x80000000, -0x224(%rbp) # imm = 0x80000000
movd -0x218(%rbp), %xmm0
movd -0x21c(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd -0x220(%rbp), %xmm2
movd -0x224(%rbp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x240(%rbp)
movaps -0x240(%rbp), %xmm0
movaps %xmm0, -0x2a0(%rbp)
movl $0xffffffff, -0x244(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x248(%rbp)
movl $0xffffffff, -0x24c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x250(%rbp)
movd -0x244(%rbp), %xmm0
movd -0x248(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd -0x24c(%rbp), %xmm2
movd -0x250(%rbp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x260(%rbp)
movaps -0x260(%rbp), %xmm0
movaps %xmm0, -0x2b0(%rbp)
movq -0x268(%rbp), %rax
movaps (%rax), %xmm1
movq -0x288(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x170(%rbp)
movaps %xmm0, -0x180(%rbp)
movaps -0x170(%rbp), %xmm0
movaps -0x180(%rbp), %xmm1
pmuludq %xmm1, %xmm0
movaps %xmm0, -0x2c0(%rbp)
movq -0x270(%rbp), %rax
movaps (%rax), %xmm1
movq -0x288(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x190(%rbp)
movaps %xmm0, -0x1a0(%rbp)
movaps -0x190(%rbp), %xmm0
movaps -0x1a0(%rbp), %xmm1
pmuludq %xmm1, %xmm0
movaps %xmm0, -0x2d0(%rbp)
movq -0x278(%rbp), %rax
movaps (%rax), %xmm1
movq -0x288(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x1b0(%rbp)
movaps %xmm0, -0x1c0(%rbp)
movaps -0x1b0(%rbp), %xmm0
movaps -0x1c0(%rbp), %xmm1
pmuludq %xmm1, %xmm0
movaps %xmm0, -0x2e0(%rbp)
movq -0x280(%rbp), %rax
movaps (%rax), %xmm1
movq -0x288(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x1d0(%rbp)
movaps %xmm0, -0x1e0(%rbp)
movaps -0x1d0(%rbp), %xmm0
movaps -0x1e0(%rbp), %xmm1
pmuludq %xmm1, %xmm0
movaps %xmm0, -0x2f0(%rbp)
movaps -0x2c0(%rbp), %xmm1
movaps -0x2a0(%rbp), %xmm0
movaps %xmm1, -0xf0(%rbp)
movaps %xmm0, -0x100(%rbp)
movaps -0xf0(%rbp), %xmm0
movaps -0x100(%rbp), %xmm1
paddq %xmm1, %xmm0
movaps %xmm0, -0x300(%rbp)
movaps -0x2d0(%rbp), %xmm1
movaps -0x2a0(%rbp), %xmm0
movaps %xmm1, -0x110(%rbp)
movaps %xmm0, -0x120(%rbp)
movaps -0x110(%rbp), %xmm0
movaps -0x120(%rbp), %xmm1
paddq %xmm1, %xmm0
movaps %xmm0, -0x310(%rbp)
movaps -0x2e0(%rbp), %xmm1
movaps -0x2a0(%rbp), %xmm0
movaps %xmm1, -0x130(%rbp)
movaps %xmm0, -0x140(%rbp)
movaps -0x130(%rbp), %xmm0
movaps -0x140(%rbp), %xmm1
paddq %xmm1, %xmm0
movaps %xmm0, -0x320(%rbp)
movaps -0x2f0(%rbp), %xmm1
movaps -0x2a0(%rbp), %xmm0
movaps %xmm1, -0x150(%rbp)
movaps %xmm0, -0x160(%rbp)
movaps -0x150(%rbp), %xmm0
movaps -0x160(%rbp), %xmm1
paddq %xmm1, %xmm0
movaps %xmm0, -0x330(%rbp)
movaps -0x300(%rbp), %xmm0
movaps %xmm0, -0x1f0(%rbp)
movl $0x20, -0x1f4(%rbp)
movaps -0x1f0(%rbp), %xmm0
movd -0x1f4(%rbp), %xmm1
psrlq %xmm1, %xmm0
movaps %xmm0, -0x340(%rbp)
movaps -0x310(%rbp), %xmm0
movaps %xmm0, -0x210(%rbp)
movl $0x20, -0x214(%rbp)
movaps -0x210(%rbp), %xmm0
movd -0x214(%rbp), %xmm1
psrlq %xmm1, %xmm0
movaps %xmm0, -0x350(%rbp)
movaps -0x320(%rbp), %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x360(%rbp)
movaps -0x330(%rbp), %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm1
pand %xmm1, %xmm0
movaps %xmm0, -0x370(%rbp)
movaps -0x340(%rbp), %xmm1
movaps -0x360(%rbp), %xmm0
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps -0x50(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
por %xmm1, %xmm0
movaps %xmm0, -0x380(%rbp)
movaps -0x350(%rbp), %xmm1
movaps -0x370(%rbp), %xmm0
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x70(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
por %xmm1, %xmm0
movaps %xmm0, -0x390(%rbp)
movaps -0x380(%rbp), %xmm1
movaps -0x390(%rbp), %xmm0
movaps %xmm1, -0xd0(%rbp)
movaps %xmm0, -0xe0(%rbp)
movaps -0xd0(%rbp), %xmm0
movaps -0xe0(%rbp), %xmm1
packssdw %xmm1, %xmm0
movaps %xmm0, -0x3a0(%rbp)
movaps -0x3a0(%rbp), %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps -0x30(%rbp), %xmm0
movaps -0x40(%rbp), %xmm1
packuswb %xmm1, %xmm0
movaps %xmm0, -0x3b0(%rbp)
movq -0x290(%rbp), %rax
movaps -0x3b0(%rbp), %xmm0
movq %rax, -0x8(%rbp)
movaps %xmm0, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
nopl (%rax,%rax)