// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec_sse2.c
// Function: TrueMotion_SSE2
static WEBP_INLINE void TrueMotion_SSE2(uint8_t* dst, int size) {
  const uint8_t* top = dst - BPS;
  const __m128i zero = _mm_setzero_si128();
  int y;
  if (size == 4) {
    const __m128i top_values = _mm_cvtsi32_si128(WebPMemToInt32(top));
    const __m128i top_base = _mm_unpacklo_epi8(top_values, zero);
    for (y = 0; y < 4; ++y, dst += BPS) {
      const int val = dst[-1] - top[-1];
      const __m128i base = _mm_set1_epi16(val);
      const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero);
      WebPInt32ToMem(dst, _mm_cvtsi128_si32(out));
    }
  } else if (size == 8) {
    const __m128i top_values = _mm_loadl_epi64((const __m128i*)top);
    const __m128i top_base = _mm_unpacklo_epi8(top_values, zero);
    for (y = 0; y < 8; ++y, dst += BPS) {
      const int val = dst[-1] - top[-1];
      const __m128i base = _mm_set1_epi16(val);
      const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero);
      _mm_storel_epi64((__m128i*)dst, out);
    }
  } else {
    const __m128i top_values = _mm_loadu_si128((const __m128i*)top);
    const __m128i top_base_0 = _mm_unpacklo_epi8(top_values, zero);
    const __m128i top_base_1 = _mm_unpackhi_epi8(top_values, zero);
    for (y = 0; y < 16; ++y, dst += BPS) {
      const int val = dst[-1] - top[-1];
      const __m128i base = _mm_set1_epi16(val);
      const __m128i out_0 = _mm_add_epi16(base, top_base_0);
      const __m128i out_1 = _mm_add_epi16(base, top_base_1);
      const __m128i out = _mm_packus_epi16(out_0, out_1);
      _mm_storeu_si128((__m128i*)dst, out);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3f0, %rsp            # imm = 0x3F0
movq %rdi, -0x290(%rbp)
movl %esi, -0x294(%rbp)
movq -0x290(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x2a0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x1e0(%rbp)
movdqa -0x1e0(%rbp), %xmm0
movdqa %xmm0, -0x2b0(%rbp)
cmpl $0x4, -0x294(%rbp)
jne 0x162e5d
movq -0x2a0(%rbp), %rdi
callq 0x15f780
movl %eax, -0x1b4(%rbp)
movd -0x1b4(%rbp), %xmm0
movaps %xmm0, -0x1d0(%rbp)
movaps -0x1d0(%rbp), %xmm0
movaps %xmm0, -0x2d0(%rbp)
movaps -0x2d0(%rbp), %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x160(%rbp)
movaps %xmm0, -0x170(%rbp)
movaps -0x160(%rbp), %xmm0
movaps -0x170(%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, -0x2e0(%rbp)
movl $0x0, -0x2b4(%rbp)
cmpl $0x4, -0x2b4(%rbp)
jge 0x162e58
movq -0x290(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0x2a0(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x2e4(%rbp)
movw -0x2e4(%rbp), %ax
movw %ax, -0x282(%rbp)
movw -0x282(%rbp), %ax
movw %ax, -0x3e2(%rbp)
movw %ax, -0x92(%rbp)
movw %ax, -0x94(%rbp)
movw %ax, -0x96(%rbp)
movw %ax, -0x98(%rbp)
movw %ax, -0x9a(%rbp)
movw %ax, -0x9c(%rbp)
movw %ax, -0x9e(%rbp)
movw %ax, -0xa0(%rbp)
movzwl -0x92(%rbp), %eax
movd %eax, %xmm1
movzwl -0x94(%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 -0x96(%rbp), %eax
movd %eax, %xmm2
movzwl -0x98(%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 -0x9a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x9c(%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 -0x9e(%rbp), %eax
movd %eax, %xmm3
movzwl -0xa0(%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, -0xb0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps %xmm0, -0x300(%rbp)
movaps -0x300(%rbp), %xmm1
movaps -0x2e0(%rbp), %xmm0
movaps %xmm1, -0x1f0(%rbp)
movaps %xmm0, -0x200(%rbp)
movaps -0x1f0(%rbp), %xmm1
movaps -0x200(%rbp), %xmm0
paddw %xmm0, %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x100(%rbp)
movaps %xmm0, -0x110(%rbp)
movaps -0x100(%rbp), %xmm0
movaps -0x110(%rbp), %xmm1
packuswb %xmm1, %xmm0
movaps %xmm0, -0x310(%rbp)
movq -0x290(%rbp), %rdi
movaps -0x310(%rbp), %xmm0
movaps %xmm0, -0xc0(%rbp)
movaps -0xc0(%rbp), %xmm0
movaps %xmm0, -0xd0(%rbp)
movl -0xd0(%rbp), %esi
callq 0x15f7a0
movl -0x2b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b4(%rbp)
movq -0x290(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x290(%rbp)
jmp 0x162ca0
jmp 0x1632be
cmpl $0x8, -0x294(%rbp)
jne 0x163064
movq -0x2a0(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x280(%rbp)
movaps -0x280(%rbp), %xmm0
movaps %xmm0, -0x320(%rbp)
movaps -0x320(%rbp), %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x180(%rbp)
movaps %xmm0, -0x190(%rbp)
movaps -0x180(%rbp), %xmm0
movaps -0x190(%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, -0x330(%rbp)
movl $0x0, -0x2b4(%rbp)
cmpl $0x8, -0x2b4(%rbp)
jge 0x16305f
movq -0x290(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0x2a0(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x334(%rbp)
movw -0x334(%rbp), %ax
movw %ax, -0x284(%rbp)
movw -0x284(%rbp), %ax
movw %ax, -0x3e4(%rbp)
movw %ax, -0x72(%rbp)
movw %ax, -0x74(%rbp)
movw %ax, -0x76(%rbp)
movw %ax, -0x78(%rbp)
movw %ax, -0x7a(%rbp)
movw %ax, -0x7c(%rbp)
movw %ax, -0x7e(%rbp)
movw %ax, -0x80(%rbp)
movzwl -0x72(%rbp), %eax
movd %eax, %xmm1
movzwl -0x74(%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 -0x76(%rbp), %eax
movd %eax, %xmm2
movzwl -0x78(%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 -0x7a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x7c(%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 -0x7e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x80(%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, -0x90(%rbp)
movaps -0x90(%rbp), %xmm0
movaps %xmm0, -0x350(%rbp)
movaps -0x350(%rbp), %xmm1
movaps -0x330(%rbp), %xmm0
movaps %xmm1, -0x210(%rbp)
movaps %xmm0, -0x220(%rbp)
movaps -0x210(%rbp), %xmm1
movaps -0x220(%rbp), %xmm0
paddw %xmm0, %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x120(%rbp)
movaps %xmm0, -0x130(%rbp)
movaps -0x120(%rbp), %xmm0
movaps -0x130(%rbp), %xmm1
packuswb %xmm1, %xmm0
movaps %xmm0, -0x360(%rbp)
movq -0x290(%rbp), %rax
movaps -0x360(%rbp), %xmm0
movq %rax, -0xd8(%rbp)
movaps %xmm0, -0xf0(%rbp)
movq -0xf0(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, (%rax)
movl -0x2b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b4(%rbp)
movq -0x290(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x290(%rbp)
jmp 0x162ed8
jmp 0x1632bc
movq -0x2a0(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x370(%rbp)
movaps -0x370(%rbp), %xmm1
movaps -0x2b0(%rbp), %xmm0
movaps %xmm1, -0x1a0(%rbp)
movaps %xmm0, -0x1b0(%rbp)
movaps -0x1a0(%rbp), %xmm0
movaps -0x1b0(%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, -0x380(%rbp)
movaps -0x370(%rbp), %xmm1
movaps -0x2b0(%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, -0x390(%rbp)
movl $0x0, -0x2b4(%rbp)
cmpl $0x10, -0x2b4(%rbp)
jge 0x1632ba
movq -0x290(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0x2a0(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x394(%rbp)
movw -0x394(%rbp), %ax
movw %ax, -0x286(%rbp)
movw -0x286(%rbp), %ax
movw %ax, -0x3e6(%rbp)
movw %ax, -0x4a(%rbp)
movw %ax, -0x4c(%rbp)
movw %ax, -0x4e(%rbp)
movw %ax, -0x50(%rbp)
movw %ax, -0x52(%rbp)
movw %ax, -0x54(%rbp)
movw %ax, -0x56(%rbp)
movw %ax, -0x58(%rbp)
movzwl -0x4a(%rbp), %eax
movd %eax, %xmm1
movzwl -0x4c(%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 -0x4e(%rbp), %eax
movd %eax, %xmm2
movzwl -0x50(%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 -0x52(%rbp), %eax
movd %eax, %xmm0
movzwl -0x54(%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 -0x56(%rbp), %eax
movd %eax, %xmm3
movzwl -0x58(%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]
movdqa %xmm0, -0x70(%rbp)
movdqa -0x70(%rbp), %xmm0
movdqa %xmm0, -0x3b0(%rbp)
movdqa -0x3b0(%rbp), %xmm1
movdqa -0x380(%rbp), %xmm0
movdqa %xmm1, -0x230(%rbp)
movdqa %xmm0, -0x240(%rbp)
movdqa -0x230(%rbp), %xmm0
movdqa -0x240(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x3c0(%rbp)
movdqa -0x3b0(%rbp), %xmm1
movdqa -0x390(%rbp), %xmm0
movdqa %xmm1, -0x250(%rbp)
movdqa %xmm0, -0x260(%rbp)
movdqa -0x250(%rbp), %xmm0
movdqa -0x260(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0x3d0(%rbp)
movdqa -0x3c0(%rbp), %xmm1
movdqa -0x3d0(%rbp), %xmm0
movdqa %xmm1, -0x140(%rbp)
movdqa %xmm0, -0x150(%rbp)
movdqa -0x140(%rbp), %xmm0
movdqa -0x150(%rbp), %xmm1
packuswb %xmm1, %xmm0
movdqa %xmm0, -0x3e0(%rbp)
movq -0x290(%rbp), %rax
movdqa -0x3e0(%rbp), %xmm0
movq %rax, -0x28(%rbp)
movdqa %xmm0, -0x40(%rbp)
movdqa -0x40(%rbp), %xmm0
movq -0x28(%rbp), %rax
movdqu %xmm0, (%rax)
movl -0x2b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b4(%rbp)
movq -0x290(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x290(%rbp)
jmp 0x1630e6
jmp 0x1632bc
jmp 0x1632be
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbp
retq
nopw (%rax,%rax)