// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/jpeg/jfdctflt.c
// Function: jpeg_fdct_float
GLOBAL(void)
jpeg_fdct_float (FAST_FLOAT * data)
{
  FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
  FAST_FLOAT tmp10, tmp11, tmp12, tmp13;
  FAST_FLOAT z1, z2, z3, z4, z5, z11, z13;
  FAST_FLOAT *dataptr;
  int ctr;

  /* Pass 1: process rows. */

  dataptr = data;
  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
    tmp0 = dataptr[0] + dataptr[7];
    tmp7 = dataptr[0] - dataptr[7];
    tmp1 = dataptr[1] + dataptr[6];
    tmp6 = dataptr[1] - dataptr[6];
    tmp2 = dataptr[2] + dataptr[5];
    tmp5 = dataptr[2] - dataptr[5];
    tmp3 = dataptr[3] + dataptr[4];
    tmp4 = dataptr[3] - dataptr[4];
    
    /* Even part */
    
    tmp10 = tmp0 + tmp3;	/* phase 2 */
    tmp13 = tmp0 - tmp3;
    tmp11 = tmp1 + tmp2;
    tmp12 = tmp1 - tmp2;
    
    dataptr[0] = tmp10 + tmp11; /* phase 3 */
    dataptr[4] = tmp10 - tmp11;
    
    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
    dataptr[2] = tmp13 + z1;	/* phase 5 */
    dataptr[6] = tmp13 - z1;
    
    /* Odd part */

    tmp10 = tmp4 + tmp5;	/* phase 2 */
    tmp11 = tmp5 + tmp6;
    tmp12 = tmp6 + tmp7;

    /* The rotator is modified from fig 4-8 to avoid extra negations. */
    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */
    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */
    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */

    z11 = tmp7 + z3;		/* phase 5 */
    z13 = tmp7 - z3;

    dataptr[5] = z13 + z2;	/* phase 6 */
    dataptr[3] = z13 - z2;
    dataptr[1] = z11 + z4;
    dataptr[7] = z11 - z4;

    dataptr += DCTSIZE;		/* advance pointer to next row */
  }

  /* Pass 2: process columns. */

  dataptr = data;
  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
    
    /* Even part */
    
    tmp10 = tmp0 + tmp3;	/* phase 2 */
    tmp13 = tmp0 - tmp3;
    tmp11 = tmp1 + tmp2;
    tmp12 = tmp1 - tmp2;
    
    dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
    dataptr[DCTSIZE*4] = tmp10 - tmp11;
    
    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
    dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
    dataptr[DCTSIZE*6] = tmp13 - z1;
    
    /* Odd part */

    tmp10 = tmp4 + tmp5;	/* phase 2 */
    tmp11 = tmp5 + tmp6;
    tmp12 = tmp6 + tmp7;

    /* The rotator is modified from fig 4-8 to avoid extra negations. */
    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */
    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */
    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */

    z11 = tmp7 + z3;		/* phase 5 */
    z13 = tmp7 - z3;

    dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */
    dataptr[DCTSIZE*3] = z13 - z2;
    dataptr[DCTSIZE*1] = z11 + z4;
    dataptr[DCTSIZE*7] = z11 - z4;

    dataptr++;			/* advance pointer to next column */
  }
}

// Assembly:
xorl %eax, %eax
movaps 0x2fd97(%rip), %xmm0    # 0xaa690
movups 0x50(%rdi,%rax), %xmm6
movups 0x70(%rdi,%rax), %xmm10
movups (%rdi,%rax), %xmm12
movups 0x10(%rdi,%rax), %xmm11
movups 0x20(%rdi,%rax), %xmm5
movups 0x30(%rdi,%rax), %xmm9
movups 0x40(%rdi,%rax), %xmm13
movups 0x60(%rdi,%rax), %xmm14
movaps %xmm14, %xmm7
movlhps %xmm13, %xmm7           # xmm7 = xmm7[0],xmm13[0]
movaps %xmm12, %xmm4
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
shufps $0x24, %xmm7, %xmm4     # xmm4 = xmm4[0,1],xmm7[2,0]
movaps %xmm13, %xmm8
unpcklps %xmm14, %xmm8           # xmm8 = xmm8[0],xmm14[0],xmm8[1],xmm14[1]
movaps %xmm5, %xmm7
shufps $0x11, %xmm12, %xmm7    # xmm7 = xmm7[1,0],xmm12[1,0]
shufps $0xe2, %xmm8, %xmm7     # xmm7 = xmm7[2,0],xmm8[2,3]
movaps %xmm14, %xmm15
unpckhpd %xmm13, %xmm15          # xmm15 = xmm15[1],xmm13[1]
movaps %xmm12, %xmm8
unpckhps %xmm5, %xmm8            # xmm8 = xmm8[2],xmm5[2],xmm8[3],xmm5[3]
shufps $0x24, %xmm15, %xmm8    # xmm8 = xmm8[0,1],xmm15[2,0]
unpckhps %xmm14, %xmm13          # xmm13 = xmm13[2],xmm14[2],xmm13[3],xmm14[3]
shufps $0x33, %xmm12, %xmm5    # xmm5 = xmm5[3,0],xmm12[3,0]
shufps $0xe2, %xmm13, %xmm5    # xmm5 = xmm5[2,0],xmm13[2,3]
movaps %xmm10, %xmm13
movlhps %xmm6, %xmm13           # xmm13 = xmm13[0],xmm6[0]
movaps %xmm11, %xmm12
unpcklps %xmm9, %xmm12           # xmm12 = xmm12[0],xmm9[0],xmm12[1],xmm9[1]
shufps $0x24, %xmm13, %xmm12   # xmm12 = xmm12[0,1],xmm13[2,0]
movaps %xmm6, %xmm13
unpcklps %xmm10, %xmm13          # xmm13 = xmm13[0],xmm10[0],xmm13[1],xmm10[1]
movaps %xmm9, %xmm14
shufps $0x11, %xmm11, %xmm14   # xmm14 = xmm14[1,0],xmm11[1,0]
shufps $0xe2, %xmm13, %xmm14   # xmm14 = xmm14[2,0],xmm13[2,3]
movaps %xmm10, %xmm13
unpckhpd %xmm6, %xmm13           # xmm13 = xmm13[1],xmm6[1]
movaps %xmm11, %xmm15
unpckhps %xmm9, %xmm15           # xmm15 = xmm15[2],xmm9[2],xmm15[3],xmm9[3]
shufps $0x24, %xmm13, %xmm15   # xmm15 = xmm15[0,1],xmm13[2,0]
unpckhps %xmm10, %xmm6           # xmm6 = xmm6[2],xmm10[2],xmm6[3],xmm10[3]
shufps $0x33, %xmm11, %xmm9    # xmm9 = xmm9[3,0],xmm11[3,0]
shufps $0xe2, %xmm6, %xmm9     # xmm9 = xmm9[2,0],xmm6[2,3]
movaps %xmm4, %xmm6
addps %xmm9, %xmm6
subps %xmm9, %xmm4
movaps %xmm7, %xmm13
addps %xmm15, %xmm13
subps %xmm15, %xmm7
movaps %xmm8, %xmm10
addps %xmm14, %xmm10
subps %xmm14, %xmm8
movaps %xmm5, %xmm11
addps %xmm12, %xmm11
subps %xmm12, %xmm5
movaps %xmm6, %xmm2
addps %xmm11, %xmm2
subps %xmm11, %xmm6
movaps %xmm13, %xmm11
addps %xmm10, %xmm11
subps %xmm10, %xmm13
movaps %xmm11, %xmm3
addps %xmm2, %xmm3
subps %xmm11, %xmm2
addps %xmm6, %xmm13
mulps %xmm0, %xmm13
movaps %xmm6, %xmm11
addps %xmm13, %xmm11
subps %xmm13, %xmm6
addps %xmm8, %xmm5
addps %xmm7, %xmm8
addps %xmm4, %xmm7
movaps %xmm5, %xmm12
subps %xmm7, %xmm12
mulps 0x2fc5f(%rip), %xmm12   # 0xaa6a0
mulps 0x2fc68(%rip), %xmm5    # 0xaa6b0
addps %xmm12, %xmm5
mulps 0x2fc6d(%rip), %xmm7    # 0xaa6c0
addps %xmm12, %xmm7
mulps %xmm0, %xmm8
movaps %xmm4, %xmm13
addps %xmm8, %xmm13
subps %xmm8, %xmm4
movaps %xmm4, %xmm8
addps %xmm5, %xmm8
subps %xmm5, %xmm4
movaps %xmm13, %xmm12
addps %xmm7, %xmm12
subps %xmm7, %xmm13
movaps %xmm13, %xmm7
movlhps %xmm6, %xmm7            # xmm7 = xmm7[0],xmm6[0]
movaps %xmm2, %xmm5
unpcklps %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0],xmm5[1],xmm8[1]
shufps $0x24, %xmm7, %xmm5     # xmm5 = xmm5[0,1],xmm7[2,0]
movaps %xmm4, %xmm14
movlhps %xmm11, %xmm14          # xmm14 = xmm14[0],xmm11[0]
movaps %xmm3, %xmm7
unpcklps %xmm12, %xmm7           # xmm7 = xmm7[0],xmm12[0],xmm7[1],xmm12[1]
shufps $0x24, %xmm14, %xmm7    # xmm7 = xmm7[0,1],xmm14[2,0]
movaps %xmm6, %xmm15
unpcklps %xmm13, %xmm15          # xmm15 = xmm15[0],xmm13[0],xmm15[1],xmm13[1]
movaps %xmm8, %xmm14
shufps $0x11, %xmm2, %xmm14    # xmm14 = xmm14[1,0],xmm2[1,0]
shufps $0xe2, %xmm15, %xmm14   # xmm14 = xmm14[2,0],xmm15[2,3]
movaps %xmm11, %xmm15
unpcklps %xmm4, %xmm15           # xmm15 = xmm15[0],xmm4[0],xmm15[1],xmm4[1]
movaps %xmm12, %xmm1
shufps $0x11, %xmm3, %xmm1     # xmm1 = xmm1[1,0],xmm3[1,0]
shufps $0xe2, %xmm15, %xmm1    # xmm1 = xmm1[2,0],xmm15[2,3]
movaps %xmm13, %xmm15
unpckhpd %xmm6, %xmm15           # xmm15 = xmm15[1],xmm6[1]
movaps %xmm2, %xmm9
unpckhps %xmm8, %xmm9            # xmm9 = xmm9[2],xmm8[2],xmm9[3],xmm8[3]
shufps $0x24, %xmm15, %xmm9    # xmm9 = xmm9[0,1],xmm15[2,0]
movaps %xmm4, %xmm15
unpckhpd %xmm11, %xmm15          # xmm15 = xmm15[1],xmm11[1]
movaps %xmm3, %xmm10
unpckhps %xmm12, %xmm10          # xmm10 = xmm10[2],xmm12[2],xmm10[3],xmm12[3]
shufps $0x24, %xmm15, %xmm10   # xmm10 = xmm10[0,1],xmm15[2,0]
unpckhps %xmm13, %xmm6           # xmm6 = xmm6[2],xmm13[2],xmm6[3],xmm13[3]
shufps $0x33, %xmm2, %xmm8     # xmm8 = xmm8[3,0],xmm2[3,0]
shufps $0xe2, %xmm6, %xmm8     # xmm8 = xmm8[2,0],xmm6[2,3]
unpckhps %xmm4, %xmm11           # xmm11 = xmm11[2],xmm4[2],xmm11[3],xmm4[3]
shufps $0x33, %xmm3, %xmm12    # xmm12 = xmm12[3,0],xmm3[3,0]
shufps $0xe2, %xmm11, %xmm12   # xmm12 = xmm12[2,0],xmm11[2,3]
movups %xmm12, 0x60(%rdi,%rax)
movups %xmm8, 0x70(%rdi,%rax)
movups %xmm10, 0x40(%rdi,%rax)
movups %xmm9, 0x50(%rdi,%rax)
movups %xmm1, 0x20(%rdi,%rax)
movups %xmm14, 0x30(%rdi,%rax)
movups %xmm7, (%rdi,%rax)
movups %xmm5, 0x10(%rdi,%rax)
subq $-0x80, %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x7a8f9
movq $-0x8, %rax
movaps 0x2fb3e(%rip), %xmm10   # 0xaa6a0
movaps 0x2fb46(%rip), %xmm11   # 0xaa6b0
movaps 0x2fb4e(%rip), %xmm12   # 0xaa6c0
movups 0x100(%rdi,%rax,4), %xmm1
movups 0x20(%rdi,%rax,4), %xmm5
movups 0x40(%rdi,%rax,4), %xmm4
movups 0x60(%rdi,%rax,4), %xmm7
movups 0x80(%rdi,%rax,4), %xmm6
movaps %xmm5, %xmm8
addps %xmm1, %xmm8
subps %xmm1, %xmm5
movups 0xe0(%rdi,%rax,4), %xmm1
movaps %xmm4, %xmm9
addps %xmm1, %xmm9
subps %xmm1, %xmm4
movups 0xc0(%rdi,%rax,4), %xmm1
movaps %xmm7, %xmm2
addps %xmm1, %xmm2
subps %xmm1, %xmm7
movups 0xa0(%rdi,%rax,4), %xmm1
movaps %xmm6, %xmm3
addps %xmm1, %xmm3
subps %xmm1, %xmm6
movaps %xmm8, %xmm1
addps %xmm3, %xmm1
subps %xmm3, %xmm8
movaps %xmm9, %xmm3
addps %xmm2, %xmm3
subps %xmm2, %xmm9
movaps %xmm3, %xmm2
addps %xmm1, %xmm2
movups %xmm2, 0x20(%rdi,%rax,4)
subps %xmm3, %xmm1
movups %xmm1, 0xa0(%rdi,%rax,4)
addps %xmm8, %xmm9
mulps %xmm0, %xmm9
movaps %xmm8, %xmm1
addps %xmm9, %xmm1
movups %xmm1, 0x60(%rdi,%rax,4)
subps %xmm9, %xmm8
movups %xmm8, 0xe0(%rdi,%rax,4)
addps %xmm7, %xmm6
addps %xmm4, %xmm7
addps %xmm5, %xmm4
movaps %xmm6, %xmm1
subps %xmm4, %xmm1
mulps %xmm10, %xmm1
mulps %xmm11, %xmm6
addps %xmm1, %xmm6
mulps %xmm12, %xmm4
addps %xmm1, %xmm4
mulps %xmm0, %xmm7
movaps %xmm5, %xmm1
addps %xmm7, %xmm1
subps %xmm7, %xmm5
movaps %xmm5, %xmm2
addps %xmm6, %xmm2
movups %xmm2, 0xc0(%rdi,%rax,4)
subps %xmm6, %xmm5
movups %xmm5, 0x80(%rdi,%rax,4)
movaps %xmm1, %xmm2
addps %xmm4, %xmm2
movups %xmm2, 0x40(%rdi,%rax,4)
subps %xmm4, %xmm1
movups %xmm1, 0x100(%rdi,%rax,4)
addq $0x4, %rax
jne 0x7ab72
retq
nop