// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec_sse2.c
// Function: Transform_SSE2
static void Transform_SSE2(const int16_t* in, uint8_t* dst, int do_two) {
  // This implementation makes use of 16-bit fixed point versions of two
  // multiply constants:
  //    K1 = sqrt(2) * cos (pi/8) ~= 85627 / 2^16
  //    K2 = sqrt(2) * sin (pi/8) ~= 35468 / 2^16
  //
  // To be able to use signed 16-bit integers, we use the following trick to
  // have constants within range:
  // - Associated constants are obtained by subtracting the 16-bit fixed point
  //   version of one:
  //      k = K - (1 << 16)  =>  K = k + (1 << 16)
  //      K1 = 85267  =>  k1 =  20091
  //      K2 = 35468  =>  k2 = -30068
  // - The multiplication of a variable by a constant become the sum of the
  //   variable and the multiplication of that variable by the associated
  //   constant:
  //      (x * K) >> 16 = (x * (k + (1 << 16))) >> 16 = ((x * k ) >> 16) + x
  const __m128i k1 = _mm_set1_epi16(20091);
  const __m128i k2 = _mm_set1_epi16(-30068);
  __m128i T0, T1, T2, T3;

  // Load and concatenate the transform coefficients (we'll do two transforms
  // in parallel). In the case of only one transform, the second half of the
  // vectors will just contain random value we'll never use nor store.
  __m128i in0, in1, in2, in3;
  {
    in0 = _mm_loadl_epi64((const __m128i*)&in[0]);
    in1 = _mm_loadl_epi64((const __m128i*)&in[4]);
    in2 = _mm_loadl_epi64((const __m128i*)&in[8]);
    in3 = _mm_loadl_epi64((const __m128i*)&in[12]);
    // a00 a10 a20 a30   x x x x
    // a01 a11 a21 a31   x x x x
    // a02 a12 a22 a32   x x x x
    // a03 a13 a23 a33   x x x x
    if (do_two) {
      const __m128i inB0 = _mm_loadl_epi64((const __m128i*)&in[16]);
      const __m128i inB1 = _mm_loadl_epi64((const __m128i*)&in[20]);
      const __m128i inB2 = _mm_loadl_epi64((const __m128i*)&in[24]);
      const __m128i inB3 = _mm_loadl_epi64((const __m128i*)&in[28]);
      in0 = _mm_unpacklo_epi64(in0, inB0);
      in1 = _mm_unpacklo_epi64(in1, inB1);
      in2 = _mm_unpacklo_epi64(in2, inB2);
      in3 = _mm_unpacklo_epi64(in3, inB3);
      // a00 a10 a20 a30   b00 b10 b20 b30
      // a01 a11 a21 a31   b01 b11 b21 b31
      // a02 a12 a22 a32   b02 b12 b22 b32
      // a03 a13 a23 a33   b03 b13 b23 b33
    }
  }

  // Vertical pass and subsequent transpose.
  {
    // First pass, c and d calculations are longer because of the "trick"
    // multiplications.
    const __m128i a = _mm_add_epi16(in0, in2);
    const __m128i b = _mm_sub_epi16(in0, in2);
    // c = MUL(in1, K2) - MUL(in3, K1) = MUL(in1, k2) - MUL(in3, k1) + in1 - in3
    const __m128i c1 = _mm_mulhi_epi16(in1, k2);
    const __m128i c2 = _mm_mulhi_epi16(in3, k1);
    const __m128i c3 = _mm_sub_epi16(in1, in3);
    const __m128i c4 = _mm_sub_epi16(c1, c2);
    const __m128i c = _mm_add_epi16(c3, c4);
    // d = MUL(in1, K1) + MUL(in3, K2) = MUL(in1, k1) + MUL(in3, k2) + in1 + in3
    const __m128i d1 = _mm_mulhi_epi16(in1, k1);
    const __m128i d2 = _mm_mulhi_epi16(in3, k2);
    const __m128i d3 = _mm_add_epi16(in1, in3);
    const __m128i d4 = _mm_add_epi16(d1, d2);
    const __m128i d = _mm_add_epi16(d3, d4);

    // Second pass.
    const __m128i tmp0 = _mm_add_epi16(a, d);
    const __m128i tmp1 = _mm_add_epi16(b, c);
    const __m128i tmp2 = _mm_sub_epi16(b, c);
    const __m128i tmp3 = _mm_sub_epi16(a, d);

    // Transpose the two 4x4.
    VP8Transpose_2_4x4_16b(&tmp0, &tmp1, &tmp2, &tmp3, &T0, &T1, &T2, &T3);
  }

  // Horizontal pass and subsequent transpose.
  {
    // First pass, c and d calculations are longer because of the "trick"
    // multiplications.
    const __m128i four = _mm_set1_epi16(4);
    const __m128i dc = _mm_add_epi16(T0, four);
    const __m128i a =  _mm_add_epi16(dc, T2);
    const __m128i b =  _mm_sub_epi16(dc, T2);
    // c = MUL(T1, K2) - MUL(T3, K1) = MUL(T1, k2) - MUL(T3, k1) + T1 - T3
    const __m128i c1 = _mm_mulhi_epi16(T1, k2);
    const __m128i c2 = _mm_mulhi_epi16(T3, k1);
    const __m128i c3 = _mm_sub_epi16(T1, T3);
    const __m128i c4 = _mm_sub_epi16(c1, c2);
    const __m128i c = _mm_add_epi16(c3, c4);
    // d = MUL(T1, K1) + MUL(T3, K2) = MUL(T1, k1) + MUL(T3, k2) + T1 + T3
    const __m128i d1 = _mm_mulhi_epi16(T1, k1);
    const __m128i d2 = _mm_mulhi_epi16(T3, k2);
    const __m128i d3 = _mm_add_epi16(T1, T3);
    const __m128i d4 = _mm_add_epi16(d1, d2);
    const __m128i d = _mm_add_epi16(d3, d4);

    // Second pass.
    const __m128i tmp0 = _mm_add_epi16(a, d);
    const __m128i tmp1 = _mm_add_epi16(b, c);
    const __m128i tmp2 = _mm_sub_epi16(b, c);
    const __m128i tmp3 = _mm_sub_epi16(a, d);
    const __m128i shifted0 = _mm_srai_epi16(tmp0, 3);
    const __m128i shifted1 = _mm_srai_epi16(tmp1, 3);
    const __m128i shifted2 = _mm_srai_epi16(tmp2, 3);
    const __m128i shifted3 = _mm_srai_epi16(tmp3, 3);

    // Transpose the two 4x4.
    VP8Transpose_2_4x4_16b(&shifted0, &shifted1, &shifted2, &shifted3, &T0, &T1,
                           &T2, &T3);
  }

  // Add inverse transform to 'dst' and store.
  {
    const __m128i zero = _mm_setzero_si128();
    // Load the reference(s).
    __m128i dst0, dst1, dst2, dst3;
    if (do_two) {
      // Load eight bytes/pixels per line.
      dst0 = _mm_loadl_epi64((__m128i*)(dst + 0 * BPS));
      dst1 = _mm_loadl_epi64((__m128i*)(dst + 1 * BPS));
      dst2 = _mm_loadl_epi64((__m128i*)(dst + 2 * BPS));
      dst3 = _mm_loadl_epi64((__m128i*)(dst + 3 * BPS));
    } else {
      // Load four bytes/pixels per line.
      dst0 = _mm_cvtsi32_si128(WebPMemToInt32(dst + 0 * BPS));
      dst1 = _mm_cvtsi32_si128(WebPMemToInt32(dst + 1 * BPS));
      dst2 = _mm_cvtsi32_si128(WebPMemToInt32(dst + 2 * BPS));
      dst3 = _mm_cvtsi32_si128(WebPMemToInt32(dst + 3 * BPS));
    }
    // Convert to 16b.
    dst0 = _mm_unpacklo_epi8(dst0, zero);
    dst1 = _mm_unpacklo_epi8(dst1, zero);
    dst2 = _mm_unpacklo_epi8(dst2, zero);
    dst3 = _mm_unpacklo_epi8(dst3, zero);
    // Add the inverse transform(s).
    dst0 = _mm_add_epi16(dst0, T0);
    dst1 = _mm_add_epi16(dst1, T1);
    dst2 = _mm_add_epi16(dst2, T2);
    dst3 = _mm_add_epi16(dst3, T3);
    // Unsigned saturate to 8b.
    dst0 = _mm_packus_epi16(dst0, dst0);
    dst1 = _mm_packus_epi16(dst1, dst1);
    dst2 = _mm_packus_epi16(dst2, dst2);
    dst3 = _mm_packus_epi16(dst3, dst3);
    // Store the results.
    if (do_two) {
      // Store eight bytes/pixels per line.
      _mm_storel_epi64((__m128i*)(dst + 0 * BPS), dst0);
      _mm_storel_epi64((__m128i*)(dst + 1 * BPS), dst1);
      _mm_storel_epi64((__m128i*)(dst + 2 * BPS), dst2);
      _mm_storel_epi64((__m128i*)(dst + 3 * BPS), dst3);
    } else {
      // Store four bytes/pixels per line.
      WebPInt32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(dst0));
      WebPInt32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(dst1));
      WebPInt32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(dst2));
      WebPInt32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(dst3));
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe00, %rsp            # imm = 0xE00
movq %rdi, -0xa20(%rbp)
movq %rsi, -0xa28(%rbp)
movl %edx, -0xa2c(%rbp)
movw $0x4e7b, -0xa12(%rbp)   # imm = 0x4E7B
movw -0xa12(%rbp), %ax
movw %ax, -0xdc4(%rbp)
movw %ax, -0x42(%rbp)
movw %ax, -0x44(%rbp)
movw %ax, -0x46(%rbp)
movw %ax, -0x48(%rbp)
movw %ax, -0x4a(%rbp)
movw %ax, -0x4c(%rbp)
movw %ax, -0x4e(%rbp)
movw %ax, -0x50(%rbp)
movzwl -0x42(%rbp), %eax
movd %eax, %xmm1
movzwl -0x44(%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 -0x46(%rbp), %eax
movd %eax, %xmm2
movzwl -0x48(%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 -0x4a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x4c(%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 -0x4e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x50(%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, -0x60(%rbp)
movaps -0x60(%rbp), %xmm0
movaps %xmm0, -0xa40(%rbp)
movw $0x8a8c, -0xa14(%rbp)   # imm = 0x8A8C
movw -0xa14(%rbp), %ax
movw %ax, -0xdc2(%rbp)
movw %ax, -0x22(%rbp)
movw %ax, -0x24(%rbp)
movw %ax, -0x26(%rbp)
movw %ax, -0x28(%rbp)
movw %ax, -0x2a(%rbp)
movw %ax, -0x2c(%rbp)
movw %ax, -0x2e(%rbp)
movw %ax, -0x30(%rbp)
movzwl -0x22(%rbp), %eax
movd %eax, %xmm1
movzwl -0x24(%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 -0x26(%rbp), %eax
movd %eax, %xmm2
movzwl -0x28(%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 -0x2a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x2c(%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 -0x2e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x30(%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, -0x40(%rbp)
movaps -0x40(%rbp), %xmm0
movaps %xmm0, -0xa50(%rbp)
movq -0xa20(%rbp), %rax
movq %rax, -0x898(%rbp)
movq -0x898(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x8b0(%rbp)
movaps -0x8b0(%rbp), %xmm0
movaps %xmm0, -0xaa0(%rbp)
movq -0xa20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8b8(%rbp)
movq -0x8b8(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x8d0(%rbp)
movaps -0x8d0(%rbp), %xmm0
movaps %xmm0, -0xab0(%rbp)
movq -0xa20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8d8(%rbp)
movq -0x8d8(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x8f0(%rbp)
movaps -0x8f0(%rbp), %xmm0
movaps %xmm0, -0xac0(%rbp)
movq -0xa20(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x8f8(%rbp)
movq -0x8f8(%rbp), %rax
movq (%rax), %xmm0
movdqa %xmm0, -0x910(%rbp)
movdqa -0x910(%rbp), %xmm0
movdqa %xmm0, -0xad0(%rbp)
cmpl $0x0, -0xa2c(%rbp)
je 0x158754
movq -0xa20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x918(%rbp)
movq -0x918(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x930(%rbp)
movaps -0x930(%rbp), %xmm0
movaps %xmm0, -0xae0(%rbp)
movq -0xa20(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x938(%rbp)
movq -0x938(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x950(%rbp)
movaps -0x950(%rbp), %xmm0
movaps %xmm0, -0xaf0(%rbp)
movq -0xa20(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x958(%rbp)
movq -0x958(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x970(%rbp)
movaps -0x970(%rbp), %xmm0
movaps %xmm0, -0xb00(%rbp)
movq -0xa20(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x978(%rbp)
movq -0x978(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x990(%rbp)
movaps -0x990(%rbp), %xmm0
movaps %xmm0, -0xb10(%rbp)
movaps -0xaa0(%rbp), %xmm1
movaps -0xae0(%rbp), %xmm0
movaps %xmm1, -0x820(%rbp)
movaps %xmm0, -0x830(%rbp)
movaps -0x820(%rbp), %xmm0
movaps -0x830(%rbp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0xaa0(%rbp)
movaps -0xab0(%rbp), %xmm1
movaps -0xaf0(%rbp), %xmm0
movaps %xmm1, -0x840(%rbp)
movaps %xmm0, -0x850(%rbp)
movaps -0x840(%rbp), %xmm0
movaps -0x850(%rbp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0xab0(%rbp)
movaps -0xac0(%rbp), %xmm1
movaps -0xb00(%rbp), %xmm0
movaps %xmm1, -0x860(%rbp)
movaps %xmm0, -0x870(%rbp)
movaps -0x860(%rbp), %xmm0
movaps -0x870(%rbp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0xac0(%rbp)
movaps -0xad0(%rbp), %xmm1
movaps -0xb10(%rbp), %xmm0
movaps %xmm1, -0x880(%rbp)
movaps %xmm0, -0x890(%rbp)
movaps -0x880(%rbp), %xmm0
movaps -0x890(%rbp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0xad0(%rbp)
movaps -0xaa0(%rbp), %xmm1
movaps -0xac0(%rbp), %xmm0
movaps %xmm1, -0x5c0(%rbp)
movaps %xmm0, -0x5d0(%rbp)
movaps -0x5c0(%rbp), %xmm0
movaps -0x5d0(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xb20(%rbp)
movaps -0xaa0(%rbp), %xmm1
movaps -0xac0(%rbp), %xmm0
movaps %xmm1, -0x480(%rbp)
movaps %xmm0, -0x490(%rbp)
movaps -0x480(%rbp), %xmm0
movaps -0x490(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xb30(%rbp)
movaps -0xab0(%rbp), %xmm1
movaps -0xa50(%rbp), %xmm0
movaps %xmm1, -0x380(%rbp)
movaps %xmm0, -0x390(%rbp)
movaps -0x380(%rbp), %xmm0
movaps -0x390(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xb40(%rbp)
movaps -0xad0(%rbp), %xmm1
movaps -0xa40(%rbp), %xmm0
movaps %xmm1, -0x3a0(%rbp)
movaps %xmm0, -0x3b0(%rbp)
movaps -0x3a0(%rbp), %xmm0
movaps -0x3b0(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xb50(%rbp)
movaps -0xab0(%rbp), %xmm1
movaps -0xad0(%rbp), %xmm0
movaps %xmm1, -0x4a0(%rbp)
movaps %xmm0, -0x4b0(%rbp)
movaps -0x4a0(%rbp), %xmm0
movaps -0x4b0(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xb60(%rbp)
movaps -0xb40(%rbp), %xmm1
movaps -0xb50(%rbp), %xmm0
movaps %xmm1, -0x4c0(%rbp)
movaps %xmm0, -0x4d0(%rbp)
movaps -0x4c0(%rbp), %xmm0
movaps -0x4d0(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xb70(%rbp)
movaps -0xb60(%rbp), %xmm1
movaps -0xb70(%rbp), %xmm0
movaps %xmm1, -0x5e0(%rbp)
movaps %xmm0, -0x5f0(%rbp)
movaps -0x5e0(%rbp), %xmm0
movaps -0x5f0(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xb80(%rbp)
movaps -0xab0(%rbp), %xmm1
movaps -0xa40(%rbp), %xmm0
movaps %xmm1, -0x3c0(%rbp)
movaps %xmm0, -0x3d0(%rbp)
movaps -0x3c0(%rbp), %xmm0
movaps -0x3d0(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xb90(%rbp)
movaps -0xad0(%rbp), %xmm1
movaps -0xa50(%rbp), %xmm0
movaps %xmm1, -0x3e0(%rbp)
movaps %xmm0, -0x3f0(%rbp)
movaps -0x3e0(%rbp), %xmm0
movaps -0x3f0(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xba0(%rbp)
movaps -0xab0(%rbp), %xmm1
movaps -0xad0(%rbp), %xmm0
movaps %xmm1, -0x600(%rbp)
movaps %xmm0, -0x610(%rbp)
movaps -0x600(%rbp), %xmm0
movaps -0x610(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xbb0(%rbp)
movaps -0xb90(%rbp), %xmm1
movaps -0xba0(%rbp), %xmm0
movaps %xmm1, -0x620(%rbp)
movaps %xmm0, -0x630(%rbp)
movaps -0x620(%rbp), %xmm0
movaps -0x630(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xbc0(%rbp)
movaps -0xbb0(%rbp), %xmm1
movaps -0xbc0(%rbp), %xmm0
movaps %xmm1, -0x640(%rbp)
movaps %xmm0, -0x650(%rbp)
movaps -0x640(%rbp), %xmm0
movaps -0x650(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xbd0(%rbp)
movaps -0xb20(%rbp), %xmm1
movaps -0xbd0(%rbp), %xmm0
movaps %xmm1, -0x660(%rbp)
movaps %xmm0, -0x670(%rbp)
movaps -0x660(%rbp), %xmm0
movaps -0x670(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xbe0(%rbp)
movaps -0xb30(%rbp), %xmm1
movaps -0xb80(%rbp), %xmm0
movaps %xmm1, -0x680(%rbp)
movaps %xmm0, -0x690(%rbp)
movaps -0x680(%rbp), %xmm0
movaps -0x690(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xbf0(%rbp)
movaps -0xb30(%rbp), %xmm1
movaps -0xb80(%rbp), %xmm0
movaps %xmm1, -0x4e0(%rbp)
movaps %xmm0, -0x4f0(%rbp)
movaps -0x4e0(%rbp), %xmm0
movaps -0x4f0(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xc00(%rbp)
movaps -0xb20(%rbp), %xmm1
movaps -0xbd0(%rbp), %xmm0
movaps %xmm1, -0x500(%rbp)
movaps %xmm0, -0x510(%rbp)
movaps -0x500(%rbp), %xmm0
movaps -0x510(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xc10(%rbp)
movq %rsp, %rax
leaq -0xa90(%rbp), %rcx
movq %rcx, -0xde8(%rbp)
movq %rcx, 0x8(%rax)
leaq -0xa80(%rbp), %rcx
movq %rcx, -0xde0(%rbp)
movq %rcx, (%rax)
leaq -0xbe0(%rbp), %rdi
leaq -0xbf0(%rbp), %rsi
leaq -0xc00(%rbp), %rdx
leaq -0xc10(%rbp), %rcx
leaq -0xa60(%rbp), %r8
movq %r8, -0xdd8(%rbp)
leaq -0xa70(%rbp), %r9
movq %r9, -0xdd0(%rbp)
callq 0x15f4c0
movq -0xde8(%rbp), %rdx
movq -0xde0(%rbp), %rcx
movq -0xdd8(%rbp), %r8
movq -0xdd0(%rbp), %r9
movw $0x4, -0xa16(%rbp)
movw -0xa16(%rbp), %ax
movw %ax, -0xdc6(%rbp)
movw %ax, -0x2(%rbp)
movw %ax, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movw %ax, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movw %ax, -0x10(%rbp)
movzwl -0x2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x4(%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 -0x6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x8(%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 -0xa(%rbp), %eax
movd %eax, %xmm0
movzwl -0xc(%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 -0xe(%rbp), %eax
movd %eax, %xmm3
movzwl -0x10(%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, -0x20(%rbp)
movaps -0x20(%rbp), %xmm0
movaps %xmm0, -0xc20(%rbp)
movaps -0xa60(%rbp), %xmm1
movaps -0xc20(%rbp), %xmm0
movaps %xmm1, -0x6a0(%rbp)
movaps %xmm0, -0x6b0(%rbp)
movaps -0x6a0(%rbp), %xmm0
movaps -0x6b0(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xc30(%rbp)
movaps -0xc30(%rbp), %xmm1
movaps -0xa80(%rbp), %xmm0
movaps %xmm1, -0x6c0(%rbp)
movaps %xmm0, -0x6d0(%rbp)
movaps -0x6c0(%rbp), %xmm0
movaps -0x6d0(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xc40(%rbp)
movaps -0xc30(%rbp), %xmm1
movaps -0xa80(%rbp), %xmm0
movaps %xmm1, -0x520(%rbp)
movaps %xmm0, -0x530(%rbp)
movaps -0x520(%rbp), %xmm0
movaps -0x530(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xc50(%rbp)
movaps -0xa70(%rbp), %xmm1
movaps -0xa50(%rbp), %xmm0
movaps %xmm1, -0x400(%rbp)
movaps %xmm0, -0x410(%rbp)
movaps -0x400(%rbp), %xmm0
movaps -0x410(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xc60(%rbp)
movaps -0xa90(%rbp), %xmm1
movaps -0xa40(%rbp), %xmm0
movaps %xmm1, -0x420(%rbp)
movaps %xmm0, -0x430(%rbp)
movaps -0x420(%rbp), %xmm0
movaps -0x430(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xc70(%rbp)
movaps -0xa70(%rbp), %xmm1
movaps -0xa90(%rbp), %xmm0
movaps %xmm1, -0x540(%rbp)
movaps %xmm0, -0x550(%rbp)
movaps -0x540(%rbp), %xmm0
movaps -0x550(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xc80(%rbp)
movaps -0xc60(%rbp), %xmm1
movaps -0xc70(%rbp), %xmm0
movaps %xmm1, -0x560(%rbp)
movaps %xmm0, -0x570(%rbp)
movaps -0x560(%rbp), %xmm0
movaps -0x570(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xc90(%rbp)
movaps -0xc80(%rbp), %xmm1
movaps -0xc90(%rbp), %xmm0
movaps %xmm1, -0x6e0(%rbp)
movaps %xmm0, -0x6f0(%rbp)
movaps -0x6e0(%rbp), %xmm0
movaps -0x6f0(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xca0(%rbp)
movaps -0xa70(%rbp), %xmm1
movaps -0xa40(%rbp), %xmm0
movaps %xmm1, -0x440(%rbp)
movaps %xmm0, -0x450(%rbp)
movaps -0x440(%rbp), %xmm0
movaps -0x450(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xcb0(%rbp)
movaps -0xa90(%rbp), %xmm1
movaps -0xa50(%rbp), %xmm0
movaps %xmm1, -0x460(%rbp)
movaps %xmm0, -0x470(%rbp)
movaps -0x460(%rbp), %xmm0
movaps -0x470(%rbp), %xmm1
pmulhw %xmm1, %xmm0
movaps %xmm0, -0xcc0(%rbp)
movaps -0xa70(%rbp), %xmm1
movaps -0xa90(%rbp), %xmm0
movaps %xmm1, -0x700(%rbp)
movaps %xmm0, -0x710(%rbp)
movaps -0x700(%rbp), %xmm0
movaps -0x710(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xcd0(%rbp)
movaps -0xcb0(%rbp), %xmm1
movaps -0xcc0(%rbp), %xmm0
movaps %xmm1, -0x720(%rbp)
movaps %xmm0, -0x730(%rbp)
movaps -0x720(%rbp), %xmm0
movaps -0x730(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xce0(%rbp)
movaps -0xcd0(%rbp), %xmm1
movaps -0xce0(%rbp), %xmm0
movaps %xmm1, -0x740(%rbp)
movaps %xmm0, -0x750(%rbp)
movaps -0x740(%rbp), %xmm0
movaps -0x750(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xcf0(%rbp)
movaps -0xc40(%rbp), %xmm1
movaps -0xcf0(%rbp), %xmm0
movaps %xmm1, -0x760(%rbp)
movaps %xmm0, -0x770(%rbp)
movaps -0x760(%rbp), %xmm0
movaps -0x770(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xd00(%rbp)
movaps -0xc50(%rbp), %xmm1
movaps -0xca0(%rbp), %xmm0
movaps %xmm1, -0x780(%rbp)
movaps %xmm0, -0x790(%rbp)
movaps -0x780(%rbp), %xmm0
movaps -0x790(%rbp), %xmm1
paddw %xmm1, %xmm0
movaps %xmm0, -0xd10(%rbp)
movaps -0xc50(%rbp), %xmm1
movaps -0xca0(%rbp), %xmm0
movaps %xmm1, -0x580(%rbp)
movaps %xmm0, -0x590(%rbp)
movaps -0x580(%rbp), %xmm0
movaps -0x590(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xd20(%rbp)
movaps -0xc40(%rbp), %xmm1
movaps -0xcf0(%rbp), %xmm0
movaps %xmm1, -0x5a0(%rbp)
movaps %xmm0, -0x5b0(%rbp)
movaps -0x5a0(%rbp), %xmm0
movaps -0x5b0(%rbp), %xmm1
psubw %xmm1, %xmm0
movaps %xmm0, -0xd30(%rbp)
movaps -0xd00(%rbp), %xmm0
movaps %xmm0, -0x300(%rbp)
movl $0x3, -0x304(%rbp)
movaps -0x300(%rbp), %xmm0
movd -0x304(%rbp), %xmm1
psraw %xmm1, %xmm0
movaps %xmm0, -0xd40(%rbp)
movaps -0xd10(%rbp), %xmm0
movaps %xmm0, -0x320(%rbp)
movl $0x3, -0x324(%rbp)
movaps -0x320(%rbp), %xmm0
movd -0x324(%rbp), %xmm1
psraw %xmm1, %xmm0
movaps %xmm0, -0xd50(%rbp)
movaps -0xd20(%rbp), %xmm0
movaps %xmm0, -0x340(%rbp)
movl $0x3, -0x344(%rbp)
movaps -0x340(%rbp), %xmm0
movd -0x344(%rbp), %xmm1
psraw %xmm1, %xmm0
movaps %xmm0, -0xd60(%rbp)
movaps -0xd30(%rbp), %xmm0
movaps %xmm0, -0x360(%rbp)
movl $0x3, -0x364(%rbp)
movaps -0x360(%rbp), %xmm0
movd -0x364(%rbp), %xmm1
psraw %xmm1, %xmm0
movaps %xmm0, -0xd70(%rbp)
movq %rsp, %rax
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
leaq -0xd40(%rbp), %rdi
leaq -0xd50(%rbp), %rsi
leaq -0xd60(%rbp), %rdx
leaq -0xd70(%rbp), %rcx
callq 0x15f4c0
xorps %xmm0, %xmm0
movaps %xmm0, -0x2f0(%rbp)
movdqa -0x2f0(%rbp), %xmm0
movdqa %xmm0, -0xd80(%rbp)
cmpl $0x0, -0xa2c(%rbp)
je 0x159130
movq -0xa28(%rbp), %rax
movq %rax, -0x998(%rbp)
movq -0x998(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x9b0(%rbp)
movaps -0x9b0(%rbp), %xmm0
movaps %xmm0, -0xd90(%rbp)
movq -0xa28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x9b8(%rbp)
movq -0x9b8(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x9d0(%rbp)
movaps -0x9d0(%rbp), %xmm0
movaps %xmm0, -0xda0(%rbp)
movq -0xa28(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x9d8(%rbp)
movq -0x9d8(%rbp), %rax
movq (%rax), %xmm0
movaps %xmm0, -0x9f0(%rbp)
movaps -0x9f0(%rbp), %xmm0
movaps %xmm0, -0xdb0(%rbp)
movq -0xa28(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x9f8(%rbp)
movq -0x9f8(%rbp), %rax
movq (%rax), %xmm0
movdqa %xmm0, -0xa10(%rbp)
movdqa -0xa10(%rbp), %xmm0
movdqa %xmm0, -0xdc0(%rbp)
jmp 0x1591fb
movq -0xa28(%rbp), %rdi
callq 0x15f780
movl %eax, -0x264(%rbp)
movd -0x264(%rbp), %xmm0
movaps %xmm0, -0x280(%rbp)
movaps -0x280(%rbp), %xmm0
movaps %xmm0, -0xd90(%rbp)
movq -0xa28(%rbp), %rdi
addq $0x20, %rdi
callq 0x15f780
movl %eax, -0x284(%rbp)
movd -0x284(%rbp), %xmm0
movaps %xmm0, -0x2a0(%rbp)
movaps -0x2a0(%rbp), %xmm0
movaps %xmm0, -0xda0(%rbp)
movq -0xa28(%rbp), %rdi
addq $0x40, %rdi
callq 0x15f780
movl %eax, -0x2a4(%rbp)
movd -0x2a4(%rbp), %xmm0
movaps %xmm0, -0x2c0(%rbp)
movaps -0x2c0(%rbp), %xmm0
movaps %xmm0, -0xdb0(%rbp)
movq -0xa28(%rbp), %rdi
addq $0x60, %rdi
callq 0x15f780
movl %eax, -0x2c4(%rbp)
movd -0x2c4(%rbp), %xmm0
movdqa %xmm0, -0x2e0(%rbp)
movdqa -0x2e0(%rbp), %xmm0
movdqa %xmm0, -0xdc0(%rbp)
movaps -0xd90(%rbp), %xmm1
movaps -0xd80(%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, -0xd90(%rbp)
movaps -0xda0(%rbp), %xmm1
movaps -0xd80(%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]
movaps %xmm0, -0xda0(%rbp)
movaps -0xdb0(%rbp), %xmm1
movaps -0xd80(%rbp), %xmm0
movaps %xmm1, -0x230(%rbp)
movaps %xmm0, -0x240(%rbp)
movaps -0x230(%rbp), %xmm0
movaps -0x240(%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, -0xdb0(%rbp)
movaps -0xdc0(%rbp), %xmm1
movaps -0xd80(%rbp), %xmm0
movaps %xmm1, -0x250(%rbp)
movaps %xmm0, -0x260(%rbp)
movaps -0x250(%rbp), %xmm0
movaps -0x260(%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, -0xdc0(%rbp)
movdqa -0xd90(%rbp), %xmm1
movdqa -0xa60(%rbp), %xmm0
movdqa %xmm1, -0x7a0(%rbp)
movdqa %xmm0, -0x7b0(%rbp)
movdqa -0x7a0(%rbp), %xmm0
movdqa -0x7b0(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0xd90(%rbp)
movdqa -0xda0(%rbp), %xmm1
movdqa -0xa70(%rbp), %xmm0
movdqa %xmm1, -0x7c0(%rbp)
movdqa %xmm0, -0x7d0(%rbp)
movdqa -0x7c0(%rbp), %xmm0
movdqa -0x7d0(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0xda0(%rbp)
movdqa -0xdb0(%rbp), %xmm1
movdqa -0xa80(%rbp), %xmm0
movdqa %xmm1, -0x7e0(%rbp)
movdqa %xmm0, -0x7f0(%rbp)
movdqa -0x7e0(%rbp), %xmm0
movdqa -0x7f0(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0xdb0(%rbp)
movdqa -0xdc0(%rbp), %xmm1
movdqa -0xa90(%rbp), %xmm0
movdqa %xmm1, -0x800(%rbp)
movdqa %xmm0, -0x810(%rbp)
movdqa -0x800(%rbp), %xmm0
movdqa -0x810(%rbp), %xmm1
paddw %xmm1, %xmm0
movdqa %xmm0, -0xdc0(%rbp)
movdqa -0xd90(%rbp), %xmm1
movdqa -0xd90(%rbp), %xmm0
movdqa %xmm1, -0x170(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x170(%rbp), %xmm0
movdqa -0x180(%rbp), %xmm1
packuswb %xmm1, %xmm0
movdqa %xmm0, -0xd90(%rbp)
movdqa -0xda0(%rbp), %xmm1
movdqa -0xda0(%rbp), %xmm0
movdqa %xmm1, -0x190(%rbp)
movdqa %xmm0, -0x1a0(%rbp)
movdqa -0x190(%rbp), %xmm0
movdqa -0x1a0(%rbp), %xmm1
packuswb %xmm1, %xmm0
movdqa %xmm0, -0xda0(%rbp)
movdqa -0xdb0(%rbp), %xmm1
movdqa -0xdb0(%rbp), %xmm0
movdqa %xmm1, -0x1b0(%rbp)
movdqa %xmm0, -0x1c0(%rbp)
movdqa -0x1b0(%rbp), %xmm0
movdqa -0x1c0(%rbp), %xmm1
packuswb %xmm1, %xmm0
movdqa %xmm0, -0xdb0(%rbp)
movdqa -0xdc0(%rbp), %xmm1
movdqa -0xdc0(%rbp), %xmm0
movdqa %xmm1, -0x1d0(%rbp)
movdqa %xmm0, -0x1e0(%rbp)
movdqa -0x1d0(%rbp), %xmm0
movdqa -0x1e0(%rbp), %xmm1
packuswb %xmm1, %xmm0
movdqa %xmm0, -0xdc0(%rbp)
cmpl $0x0, -0xa2c(%rbp)
je 0x159582
movq -0xa28(%rbp), %rax
movaps -0xd90(%rbp), %xmm0
movq %rax, -0xe8(%rbp)
movaps %xmm0, -0x100(%rbp)
movq -0x100(%rbp), %rcx
movq -0xe8(%rbp), %rax
movq %rcx, (%rax)
movq -0xa28(%rbp), %rax
addq $0x20, %rax
movaps -0xda0(%rbp), %xmm0
movq %rax, -0x108(%rbp)
movaps %xmm0, -0x120(%rbp)
movq -0x120(%rbp), %rcx
movq -0x108(%rbp), %rax
movq %rcx, (%rax)
movq -0xa28(%rbp), %rax
addq $0x40, %rax
movaps -0xdb0(%rbp), %xmm0
movq %rax, -0x128(%rbp)
movaps %xmm0, -0x140(%rbp)
movq -0x140(%rbp), %rcx
movq -0x128(%rbp), %rax
movq %rcx, (%rax)
movq -0xa28(%rbp), %rax
addq $0x60, %rax
movaps -0xdc0(%rbp), %xmm0
movq %rax, -0x148(%rbp)
movaps %xmm0, -0x160(%rbp)
movq -0x160(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rcx, (%rax)
jmp 0x15963a
movq -0xa28(%rbp), %rdi
movaps -0xd90(%rbp), %xmm0
movaps %xmm0, -0x70(%rbp)
movaps -0x70(%rbp), %xmm0
movaps %xmm0, -0x80(%rbp)
movl -0x80(%rbp), %esi
callq 0x15f7a0
movq -0xa28(%rbp), %rdi
addq $0x20, %rdi
movaps -0xda0(%rbp), %xmm0
movaps %xmm0, -0x90(%rbp)
movaps -0x90(%rbp), %xmm0
movaps %xmm0, -0xa0(%rbp)
movl -0xa0(%rbp), %esi
callq 0x15f7a0
movq -0xa28(%rbp), %rdi
addq $0x40, %rdi
movaps -0xdb0(%rbp), %xmm0
movaps %xmm0, -0xb0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps %xmm0, -0xc0(%rbp)
movl -0xc0(%rbp), %esi
callq 0x15f7a0
movq -0xa28(%rbp), %rdi
addq $0x60, %rdi
movaps -0xdc0(%rbp), %xmm0
movaps %xmm0, -0xd0(%rbp)
movaps -0xd0(%rbp), %xmm0
movaps %xmm0, -0xe0(%rbp)
movl -0xe0(%rbp), %esi
callq 0x15f7a0
addq $0xe00, %rsp            # imm = 0xE00
popq %rbp
retq
nopw %cs:(%rax,%rax)