// File: Luthaf[P]zeopp/rmsd.cc
// Function: jacobi3(double (*) [3], double*, double (*) [3], int*)
int jacobi3(double a[3][3], double d[3], double v[3][3], int* n_rot)
{
  int count, k, i, j;
  double tresh, theta, tau, t, sum, s, h, g, c, b[3], z[3];

  /*Initialize v to the identity matrix.*/
  for (i=0; i<3; i++) 
  { 
    for (j=0; j<3; j++) 
      v[i][j] = 0.0;
    v[i][i] = 1.0;
  }

  /* Initialize b and d to the diagonal of a */
  for (i=0; i<3; i++) 
    b[i] = d[i] = a[i][i];

  /* z will accumulate terms */
  for (i=0; i<3; i++) 
    z[i] = 0.0; 
  
  *n_rot = 0;

  /* 50 tries */
  for (count=0; count<50; count++)     
  {

    /* sum off-diagonal elements */
    sum = 0.0;
    for (i=0; i<2; i++) 
    {
      for (j=i+1; j<3; j++)
         sum += fabs(a[i][j]);
    }

    /* if converged to machine underflow */
    if (sum == 0.0) 
      return(1);

    /* on 1st three sweeps... */
    if (count < 3) 
      tresh = sum * 0.2 / 9.0;    
    else       
      tresh = 0.0;      

    for (i=0; i<2; i++) 
    {
      for (j=i+1; j<3; j++) 
      {
        g = 100.0 * fabs(a[i][j]);

        /*  after four sweeps, skip the rotation if
         *   the off-diagonal element is small 
         */
        if ( count > 3  &&  fabs(d[i])+g == fabs(d[i])
              &&  fabs(d[j])+g == fabs(d[j]) ) 
        {
          a[i][j] = 0.0;
        } 
        else if (fabs(a[i][j]) > tresh) 
        {
          h = d[j] - d[i];
          
          if (fabs(h)+g == fabs(h))
          {
            t = a[i][j] / h;
          }
          else 
          {
            theta = 0.5 * h / (a[i][j]);
            t = 1.0 / ( fabs(theta) +
                        (double)sqrt(1.0 + theta*theta) );
            if (theta < 0.0) 
              t = -t;
          }
          
          c = 1.0 / (double) sqrt(1 + t*t);
          s = t * c;
          tau = s / (1.0 + c);
          h = t * a[i][j];

          z[i] -= h;
          z[j] += h;
          d[i] -= h;
          d[j] += h;

          a[i][j] = 0.0;

          for (k=0; k<=i-1; k++) 
            ROTATE(a, k, i, k, j)

          for (k=i+1; k<=j-1; k++) 
            ROTATE(a, i, k, k, j)

          for (k=j+1; k<3; k++) 
            ROTATE(a, i, k, j, k)

          for (k=0; k<3; k++) 
            ROTATE(v, k, i, k, j)

          ++(*n_rot);
        }
      }
    }

    for (i=0; i<3; i++) 
    {
      b[i] += z[i];
      d[i] = b[i];
      z[i] = 0.0;
    }
  }

  printf("Too many iterations in jacobi3\n");
  return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0x1157f6
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x1157cb
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x11579f
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movsd 0xdc86a(%rip), %xmm0    # 0x1f2050
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x115792
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0x115840
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movslq -0x34(%rbp), %rax
movsd %xmm0, -0xa0(%rbp,%rax,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1157fd
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0x115868
movslq -0x34(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0xc0(%rbp,%rax,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x115847
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x2c(%rbp)
cmpl $0x32, -0x2c(%rbp)
jge 0x11615c
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x2, -0x34(%rbp)
jge 0x1158ec
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x1158df
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0xdc7ba(%rip), %xmm1    # 0x1f2080
pand %xmm1, %xmm0
addsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x1158a1
jmp 0x1158e1
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x115892
movsd -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x115908
jp 0x115908
movl $0x1, -0x4(%rbp)
jmp 0x116171
cmpl $0x3, -0x2c(%rbp)
jge 0x11592e
movsd 0xe8212(%rip), %xmm0    # 0x1fdb28
mulsd -0x60(%rbp), %xmm0
movsd 0xdc705(%rip), %xmm1    # 0x1f2028
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0x115936
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x2, -0x34(%rbp)
jge 0x1160e7
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x1160d7
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movaps 0xdc707(%rip), %xmm0    # 0x1f2080
pand %xmm0, %xmm1
movsd 0xdc6bb(%rip), %xmm0    # 0x1f2040
mulsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
cmpl $0x3, -0x2c(%rbp)
jle 0x115a32
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0xdc6d4(%rip), %xmm1    # 0x1f2080
pand %xmm1, %xmm0
addsd -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movaps 0xdc6b7(%rip), %xmm2    # 0x1f2080
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jne 0x115a32
jp 0x115a32
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0xdc697(%rip), %xmm1    # 0x1f2080
pand %xmm1, %xmm0
addsd -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movaps 0xdc67a(%rip), %xmm2    # 0x1f2080
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jne 0x115a32
jp 0x115a32
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1160c7
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0xdc62f(%rip), %xmm1    # 0x1f2080
pand %xmm1, %xmm0
ucomisd -0x40(%rbp), %xmm0
jbe 0x1160c5
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movaps 0xdc5f5(%rip), %xmm1    # 0x1f2080
pand %xmm1, %xmm0
addsd -0x78(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
movaps 0xdc5e0(%rip), %xmm2    # 0x1f2080
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jne 0x115ad3
jp 0x115ad3
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x115b7e
movsd 0xdc59d(%rip), %xmm0    # 0x1f2078
mulsd -0x70(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
movaps 0xdc577(%rip), %xmm1    # 0x1f2080
pand %xmm1, %xmm0
movsd %xmm0, -0xc8(%rbp)
movsd -0x48(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xdc525(%rip), %xmm1    # 0x1f2050
addsd %xmm1, %xmm0
callq 0x53f0
movsd -0xc8(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd 0xdc508(%rip), %xmm0    # 0x1f2050
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x48(%rbp), %xmm0
jbe 0x115b7c
movsd -0x58(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x115b7e
movsd -0x58(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xdc4bc(%rip), %xmm1    # 0x1f2050
addsd %xmm1, %xmm0
callq 0x53f0
movaps %xmm0, %xmm1
movsd 0xdc4a8(%rip), %xmm0    # 0x1f2050
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x58(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movsd 0xdc483(%rip), %xmm1    # 0x1f2050
addsd -0x80(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x58(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm1
movslq -0x34(%rbp), %rax
movsd -0xc0(%rbp,%rax,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0xc0(%rbp,%rax,8)
movsd -0x70(%rbp), %xmm0
movslq -0x38(%rbp), %rax
addsd -0xc0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xc0(%rbp,%rax,8)
movsd -0x70(%rbp), %xmm1
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x115d94
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x78(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x70(%rbp), %xmm3
movsd -0x78(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x78(%rbp), %xmm3
movsd -0x70(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x115c8b
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x115ea6
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x78(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x70(%rbp), %xmm3
movsd -0x78(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x78(%rbp), %xmm3
movsd -0x70(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x115d9d
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
cmpl $0x3, -0x30(%rbp)
jge 0x115fb1
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x78(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x70(%rbp), %xmm3
movsd -0x78(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x78(%rbp), %xmm3
movsd -0x70(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x115eaf
movl $0x0, -0x30(%rbp)
cmpl $0x3, -0x30(%rbp)
jge 0x1160ba
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x78(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x70(%rbp), %xmm3
movsd -0x78(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x78(%rbp), %xmm3
movsd -0x70(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x115fb8
movq -0x28(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1160c7
jmp 0x1160c9
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x115950
jmp 0x1160d9
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x11593d
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0x11614c
movslq -0x34(%rbp), %rax
movsd -0xc0(%rbp,%rax,8), %xmm0
movslq -0x34(%rbp), %rax
addsd -0xa0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xa0(%rbp,%rax,8)
movslq -0x34(%rbp), %rax
movsd -0xa0(%rbp,%rax,8), %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movslq -0x34(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0xc0(%rbp,%rax,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1160ee
jmp 0x11614e
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x115879
leaq 0xe79e5(%rip), %rdi     # 0x1fdb48
movb $0x0, %al
callq 0x5070
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)