// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec_sse2.c
// Function: Load16x4_SSE2
static WEBP_INLINE void Load16x4_SSE2(const uint8_t* const r0,
                                      const uint8_t* const r8,
                                      int stride,
                                      __m128i* const p1, __m128i* const p0,
                                      __m128i* const q0, __m128i* const q1) {
  // Assume the pixels around the edge (|) are numbered as follows
  //                00 01 | 02 03
  //                10 11 | 12 13
  //                 ...  |  ...
  //                e0 e1 | e2 e3
  //                f0 f1 | f2 f3
  //
  // r0 is pointing to the 0th row (00)
  // r8 is pointing to the 8th row (80)

  // Load
  // p1 = 71 61 51 41 31 21 11 01 70 60 50 40 30 20 10 00
  // q0 = 73 63 53 43 33 23 13 03 72 62 52 42 32 22 12 02
  // p0 = f1 e1 d1 c1 b1 a1 91 81 f0 e0 d0 c0 b0 a0 90 80
  // q1 = f3 e3 d3 c3 b3 a3 93 83 f2 e2 d2 c2 b2 a2 92 82
  Load8x4_SSE2(r0, stride, p1, q0);
  Load8x4_SSE2(r8, stride, p0, q1);

  {
    // p1 = f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00
    // p0 = f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01
    // q0 = f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02
    // q1 = f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03
    const __m128i t1 = *p1;
    const __m128i t2 = *q0;
    *p1 = _mm_unpacklo_epi64(t1, *p0);
    *p0 = _mm_unpackhi_epi64(t1, *p0);
    *q0 = _mm_unpacklo_epi64(t2, *q1);
    *q1 = _mm_unpackhi_epi64(t2, *q1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x88(%rbp)
movq %rsi, -0x90(%rbp)
movl %edx, -0x94(%rbp)
movq %rcx, -0xa0(%rbp)
movq %r8, -0xa8(%rbp)
movq %r9, -0xb0(%rbp)
movq -0x88(%rbp), %rdi
movl -0x94(%rbp), %esi
movq -0xa0(%rbp), %rdx
movq -0xb0(%rbp), %rcx
callq 0x161880
movq -0x90(%rbp), %rdi
movl -0x94(%rbp), %esi
movq -0xa8(%rbp), %rdx
movq 0x10(%rbp), %rcx
callq 0x161880
movq -0xa0(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0xc0(%rbp)
movq -0xb0(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0xd0(%rbp)
movaps -0xc0(%rbp), %xmm1
movq -0xa8(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps -0x50(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq -0xa0(%rbp), %rax
movaps %xmm0, (%rax)
movaps -0xc0(%rbp), %xmm1
movq -0xa8(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
movaps -0x10(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
punpckhqdq %xmm1, %xmm0    # xmm0 = xmm0[1],xmm1[1]
movq -0xa8(%rbp), %rax
movaps %xmm0, (%rax)
movaps -0xd0(%rbp), %xmm1
movq 0x10(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x70(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq -0xb0(%rbp), %rax
movaps %xmm0, (%rax)
movaps -0xd0(%rbp), %xmm1
movq 0x10(%rbp), %rax
movaps (%rax), %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]
movq 0x10(%rbp), %rax
movdqa %xmm0, (%rax)
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)