// File: philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::finalizeAlignment(bool)
bool Calc::finalizeAlignment(bool optimize_z3)
{
  int I, J, L, M, N;
  double A;
  double E;
  bool status;

  if (optimize_z3) {
    Z3 = 0.0;   // If optimization fails, leave Z3 set to 0.0
    status = optimizeZ3();
  } else
    status = true;

  // Keep going even if the Z3 optimization fails.

  // Initialize columns 1 and 2 of YY with the alignment az/el data,
  // corrected with Z123.

  F = alignAz[1];
  H = alignEl[1];
  AzEltoYY0();
  YY[1][1] = YY[1][0]; YY[2][1] = YY[2][0]; YY[3][1] = YY[3][0];

  F = alignAz[2];
  H = alignEl[2];
  AzEltoYY0();
  YY[1][2] = YY[1][0]; YY[2][2] = YY[2][0]; YY[3][2] = YY[3][0];

  // Set third column of array YY.
  YY[1][3]=YY[2][1]*YY[3][2]-YY[3][1]*YY[2][2];
  YY[2][3]=YY[3][1]*YY[1][2]-YY[1][1]*YY[3][2];
  YY[3][3]=YY[1][1]*YY[2][2]-YY[2][1]*YY[1][2];

  // Normalize third column of array YY.
  A=MathLib::sqrt(sqr(YY[1][3])+sqr(YY[2][3])+sqr(YY[3][3]));
  if (A > 0.0) {
    // Avoid 0/0 error if third column is all zeros
    for (I=1; I<=3; I++) {
      YY[I][3] /= A;
    }
  }


  // Initialize columns 1 and 2 of XX with the star RA/Dec data.
  XX[1][1] = MathLib::cos(alignDec[1])*MathLib::cos(alignRA[1]);
  XX[2][1] = MathLib::cos(alignDec[1])*MathLib::sin(alignRA[1]);
  XX[3][1] = MathLib::sin(alignDec[1]);
  XX[1][2] = MathLib::cos(alignDec[2])*MathLib::cos(alignRA[2]);
  XX[2][2] = MathLib::cos(alignDec[2])*MathLib::sin(alignRA[2]);
  XX[3][2] = MathLib::sin(alignDec[2]);

  // Set third column of array XX.
  XX[1][3]=XX[2][1]*XX[3][2]-XX[3][1]*XX[2][2];
  XX[2][3]=XX[3][1]*XX[1][2]-XX[1][1]*XX[3][2];
  XX[3][3]=XX[1][1]*XX[2][2]-XX[2][1]*XX[1][2];

  // Normalize third column of array XX.
  A=MathLib::sqrt(sqr(XX[1][3])+sqr(XX[2][3])+sqr(XX[3][3]));
  if (A > 0.0) {
    // Avoid 0/0 error if third column is all zeros
    for (I=1; I<=3; I++) {
      XX[I][3] /= A;
    }
  }



  //       TRANSFORM MATRIX
  for (I=1; I<=3; I++) {
    for (J=1; J<=3; J++) {
      VV[I][J]=XX[I][J];
    }
  }
  VVtoW(); E=W;

  for (M=1; M<=3; M++) {

    for (I=1; I<=3; I++) {
      for (J=1; J<=3; J++) {
	 VV[I][J]=XX[I][J];
      }
    }

    for (N=1; N<= 3; N++) {
      VV[1][M]=0; VV[2][M]=0; VV[3][M]=0; VV[N][M]=1;
      VVtoW();

      // Avoid problems with divide-by-zero.  Am not sure
      // under what conditions this could actually happen...
      if (W==0 && E==0) {
        QQ[M][N]=1;
      } else if (E==0) {
        QQ[M][N]=1;
        status = false;
      } else {
        QQ[M][N]=W/E;
      }
    }
  }


  for (I=1; I<=3; I++) {
    for (J=1; J<=3; J++) {
       RR[I][J]=0;
    }
  }

  for (I=1; I<=3; I++) {
    for (J=1; J<=3; J++) {
      for (L=1; L<=3; L++) {
	RR[I][J] += (YY[I][L]*QQ[L][J]);
      }
    }
  }

  for (M=1; M<=3; M++) {

     for (I=1; I<=3; I++) {
       for (J=1; J<=3; J++) {
	 VV[I][J]=RR[I][J];
       }
     }

     VVtoW(); E=W;
     for (N=1; N<=3; N++) {
       VV[1][M]=0; VV[2][M]=0; VV[3][M]=0; VV[N][M]=1;
       VVtoW();
       // Avoid problems with divide-by-zero.  Am not sure
       // under what conditions this could actually happen...
       if (W==0 && E==0) {
	 QQ[M][N]=1;
       } else if (E==0) {
	 QQ[M][N]=1;
	 status = false;
       } else {
	 QQ[M][N]=W/E;
       }
     }
  }

  return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
testb $0x1, -0x9(%rbp)
je 0x4c50
movq -0x40(%rbp), %rdi
xorps %xmm0, %xmm0
movsd %xmm0, 0x308(%rdi)
callq 0x43c0
andb $0x1, %al
movb %al, -0x31(%rbp)
jmp 0x4c54
movb $0x1, -0x31(%rbp)
movq -0x40(%rbp), %rdi
movsd 0x2a0(%rdi), %xmm0
movsd %xmm0, 0x280(%rdi)
movsd 0x2b8(%rdi), %xmm0
movsd %xmm0, 0x288(%rdi)
callq 0x3d90
movq -0x40(%rbp), %rdi
movsd 0x220(%rdi), %xmm0
movsd %xmm0, 0x228(%rdi)
movsd 0x240(%rdi), %xmm0
movsd %xmm0, 0x248(%rdi)
movsd 0x260(%rdi), %xmm0
movsd %xmm0, 0x268(%rdi)
movsd 0x2a8(%rdi), %xmm0
movsd %xmm0, 0x280(%rdi)
movsd 0x2c0(%rdi), %xmm0
movsd %xmm0, 0x288(%rdi)
callq 0x3d90
movq -0x40(%rbp), %rax
movsd 0x220(%rax), %xmm0
movsd %xmm0, 0x230(%rax)
movsd 0x240(%rax), %xmm0
movsd %xmm0, 0x250(%rax)
movsd 0x260(%rax), %xmm0
movsd %xmm0, 0x270(%rax)
movsd 0x248(%rax), %xmm0
movsd 0x270(%rax), %xmm2
movsd 0x268(%rax), %xmm1
mulsd 0x250(%rax), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x238(%rax)
movsd 0x268(%rax), %xmm0
movsd 0x230(%rax), %xmm2
movsd 0x228(%rax), %xmm1
mulsd 0x270(%rax), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x258(%rax)
movsd 0x228(%rax), %xmm0
movsd 0x250(%rax), %xmm2
movsd 0x248(%rax), %xmm1
mulsd 0x230(%rax), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x278(%rax)
movsd 0x238(%rax), %xmm0
callq 0x3a10
movq -0x40(%rbp), %rax
movsd %xmm0, -0x50(%rbp)
movsd 0x258(%rax), %xmm0
callq 0x3a10
movq -0x40(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x50(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd 0x278(%rax), %xmm0
callq 0x3a10
movaps %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
addsd %xmm1, %xmm0
callq 0x78a0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4e8a
movl $0x1, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jg 0x4e88
movq -0x40(%rbp), %rax
movsd -0x28(%rbp), %xmm1
addq $0x200, %rax            # imm = 0x200
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4e4f
jmp 0x4e8a
movq -0x40(%rbp), %rax
movsd 0x2e8(%rax), %xmm0
callq 0x75e0
movq -0x40(%rbp), %rax
movsd %xmm0, -0x80(%rbp)
movsd 0x2d0(%rax), %xmm0
callq 0x75e0
movq -0x40(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x80(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1a8(%rax)
movsd 0x2e8(%rax), %xmm0
callq 0x75e0
movq -0x40(%rbp), %rax
movsd %xmm0, -0x78(%rbp)
movsd 0x2d0(%rax), %xmm0
callq 0x7600
movq -0x40(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1c8(%rax)
movsd 0x2e8(%rax), %xmm0
callq 0x7600
movq -0x40(%rbp), %rax
movsd %xmm0, 0x1e8(%rax)
movsd 0x2f0(%rax), %xmm0
callq 0x75e0
movq -0x40(%rbp), %rax
movsd %xmm0, -0x70(%rbp)
movsd 0x2d8(%rax), %xmm0
callq 0x75e0
movq -0x40(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x70(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rax)
movsd 0x2f0(%rax), %xmm0
callq 0x75e0
movq -0x40(%rbp), %rax
movsd %xmm0, -0x68(%rbp)
movsd 0x2d8(%rax), %xmm0
callq 0x7600
movq -0x40(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x68(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1d0(%rax)
movsd 0x2f0(%rax), %xmm0
callq 0x7600
movq -0x40(%rbp), %rax
movsd %xmm0, 0x1f0(%rax)
movsd 0x1c8(%rax), %xmm0
movsd 0x1f0(%rax), %xmm2
movsd 0x1e8(%rax), %xmm1
mulsd 0x1d0(%rax), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1b8(%rax)
movsd 0x1e8(%rax), %xmm0
movsd 0x1b0(%rax), %xmm2
movsd 0x1a8(%rax), %xmm1
mulsd 0x1f0(%rax), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1d8(%rax)
movsd 0x1a8(%rax), %xmm0
movsd 0x1d0(%rax), %xmm2
movsd 0x1c8(%rax), %xmm1
mulsd 0x1b0(%rax), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1f8(%rax)
movsd 0x1b8(%rax), %xmm0
callq 0x3a10
movq -0x40(%rbp), %rax
movsd %xmm0, -0x60(%rbp)
movsd 0x1d8(%rax), %xmm0
callq 0x3a10
movq -0x40(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd 0x1f8(%rax), %xmm0
callq 0x3a10
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
addsd %xmm1, %xmm0
callq 0x78a0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x512c
movl $0x1, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jg 0x512a
movq -0x40(%rbp), %rax
movsd -0x28(%rbp), %xmm1
addq $0x180, %rax            # imm = 0x180
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x50f1
jmp 0x512c
movl $0x1, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jg 0x519a
movl $0x1, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jg 0x518d
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x180, %rcx            # imm = 0x180
movslq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq -0x14(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
addq $0x80, %rax
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5140
jmp 0x518f
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x5133
movq -0x40(%rbp), %rdi
callq 0x3a70
movq -0x40(%rbp), %rax
movsd 0x290(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x1, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jg 0x5368
movl $0x1, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jg 0x5233
movl $0x1, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jg 0x5226
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x180, %rcx            # imm = 0x180
movslq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq -0x14(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
addq $0x80, %rax
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x51d9
jmp 0x5228
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x51cc
movl $0x1, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jg 0x5358
movq -0x40(%rbp), %rdi
movslq -0x1c(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xa0(%rdi,%rax,8)
movslq -0x1c(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xc0(%rdi,%rax,8)
movslq -0x1c(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xe0(%rdi,%rax,8)
movq %rdi, %rax
addq $0x80, %rax
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movsd 0x32d78(%rip), %xmm0    # 0x38010
movsd %xmm0, (%rax,%rcx,8)
callq 0x3a70
movq -0x40(%rbp), %rax
movsd 0x290(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x52eb
jp 0x52eb
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x52eb
jp 0x52eb
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd 0x32d2c(%rip), %xmm0    # 0x38010
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5348
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5321
jp 0x5321
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd 0x32cfa(%rip), %xmm0    # 0x38010
movsd %xmm0, (%rax,%rcx,8)
movb $0x0, -0x31(%rbp)
jmp 0x5346
movq -0x40(%rbp), %rax
movsd 0x290(%rax), %xmm0
divsd -0x30(%rbp), %xmm0
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5348
jmp 0x534a
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x523a
jmp 0x535a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x51bb
movl $0x1, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jg 0x53bb
movl $0x1, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jg 0x53ae
movq -0x40(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x537c
jmp 0x53b0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x536f
movl $0x1, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jg 0x5475
movl $0x1, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jg 0x5465
movl $0x1, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jg 0x5455
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x200, %rcx            # imm = 0x200
movslq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movslq -0x18(%rbp), %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movslq -0x14(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm2
addq $0x100, %rax            # imm = 0x100
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x53e4
jmp 0x5457
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x53d3
jmp 0x5467
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x53c2
movl $0x1, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jg 0x5643
movl $0x1, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jg 0x54f4
movl $0x1, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jg 0x54e7
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x100, %rcx            # imm = 0x100
movslq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq -0x14(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
addq $0x80, %rax
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x549a
jmp 0x54e9
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x548d
movq -0x40(%rbp), %rdi
callq 0x3a70
movq -0x40(%rbp), %rax
movsd 0x290(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x1, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jg 0x5633
movq -0x40(%rbp), %rdi
movslq -0x1c(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xa0(%rdi,%rax,8)
movslq -0x1c(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xc0(%rdi,%rax,8)
movslq -0x1c(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xe0(%rdi,%rax,8)
movq %rdi, %rax
addq $0x80, %rax
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movsd 0x32a9d(%rip), %xmm0    # 0x38010
movsd %xmm0, (%rax,%rcx,8)
callq 0x3a70
movq -0x40(%rbp), %rax
movsd 0x290(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x55c6
jp 0x55c6
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x55c6
jp 0x55c6
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd 0x32a51(%rip), %xmm0    # 0x38010
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5623
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x55fc
jp 0x55fc
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd 0x32a1f(%rip), %xmm0    # 0x38010
movsd %xmm0, (%rax,%rcx,8)
movb $0x0, -0x31(%rbp)
jmp 0x5621
movq -0x40(%rbp), %rax
movsd 0x290(%rax), %xmm0
divsd -0x30(%rbp), %xmm0
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5623
jmp 0x5625
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x5515
jmp 0x5635
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x547c
movb -0x31(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)