// File: /workspace/github_c_makefile_star2_O0/yui0[P]img2vec/./potracelib.h
// Function: opti_penalty
static int opti_penalty(privpath_t *pp, int i, int j, opti_t *res, double opttolerance, int *convc, double *areac) {
  int m = pp->curve.n;
  int k, k1, k2, conv, i1;
  double area, alpha, d, d1, d2;
  dpoint_t p0, p1, p2, p3, pt;
  double A, R, A1, A2, A3, A4;
  double s, t;
  /* check convexity, corner-freeness, and maximum bend < 179 degrees */
  if (i==j) {  /* sanity - a full loop can never be an opticurve */
    return 1;
  }
  k = i;
  i1 = mod(i+1, m);
  k1 = mod(k+1, m);
  conv = convc[k1];
  if (conv == 0) {
    return 1;
  }
  d = ddist(pp->curve.vertex[i], pp->curve.vertex[i1]);
  for (k=k1; k!=j; k=k1) {
    k1 = mod(k+1, m);
    k2 = mod(k+2, m);
    if (convc[k1] != conv) {
      return 1;
    }
    if (sign(cprod(pp->curve.vertex[i], pp->curve.vertex[i1], pp->curve.vertex[k1], pp->curve.vertex[k2])) != conv) {
      return 1;
    }
    if (iprod1(pp->curve.vertex[i], pp->curve.vertex[i1], pp->curve.vertex[k1], pp->curve.vertex[k2]) < d * ddist(pp->curve.vertex[k1], pp->curve.vertex[k2]) * COS179) {
      return 1;
    }
  }
  /* the curve we're working in: */
  p0 = pp->curve.c[mod(i,m)][2];
  p1 = pp->curve.vertex[mod(i+1,m)];
  p2 = pp->curve.vertex[mod(j,m)];
  p3 = pp->curve.c[mod(j,m)][2];
  /* determine its area */
  area = areac[j] - areac[i];
  area -= dpara(pp->curve.vertex[0], pp->curve.c[i][2], pp->curve.c[j][2])/2;
  if (i>=j) {
    area += areac[m];
  }
  /* find intersection o of p0p1 and p2p3. Let t,s such that o =
     interval(t,p0,p1) = interval(s,p3,p2). Let A be the area of the
     triangle (p0,o,p3). */
  A1 = dpara(p0, p1, p2);
  A2 = dpara(p0, p1, p3);
  A3 = dpara(p0, p2, p3);
  /* A4 = dpara(p1, p2, p3); */
  A4 = A1+A3-A2;    
  
  if (A2 == A1) {  /* this should never happen */
    return 1;
  }
  t = A3/(A3-A4);
  s = A2/(A2-A1);
  A = A2 * t / 2.0;
  
  if (A == 0.0) {  /* this should never happen */
    return 1;
  }
  R = area / A;	 /* relative area */
  alpha = 2 - sqrt(4 - R / 0.3);  /* overall alpha for p0-o-p3 curve */
  res->c[0] = interval(t * alpha, p0, p1);
  res->c[1] = interval(s * alpha, p3, p2);
  res->alpha = alpha;
  res->t = t;
  res->s = s;
  p1 = res->c[0];
  p2 = res->c[1];  /* the proposed curve is now (p0,p1,p2,p3) */
  res->pen = 0;
  /* calculate penalty */
  /* check tangency with edges */
  for (k=mod(i+1,m); k!=j; k=k1) {
    k1 = mod(k+1,m);
    t = tangent(p0, p1, p2, p3, pp->curve.vertex[k], pp->curve.vertex[k1]);
    if (t<-.5) {
      return 1;
    }
    pt = bezier(t, p0, p1, p2, p3);
    d = ddist(pp->curve.vertex[k], pp->curve.vertex[k1]);
    if (d == 0.0) {  /* this should never happen */
      return 1;
    }
    d1 = dpara(pp->curve.vertex[k], pp->curve.vertex[k1], pt) / d;
    if (fabs(d1) > opttolerance) {
      return 1;
    }
    if (iprod(pp->curve.vertex[k], pp->curve.vertex[k1], pt) < 0 || iprod(pp->curve.vertex[k1], pp->curve.vertex[k], pt) < 0) {
      return 1;
    }
    res->pen += sq(d1);
  }
  /* check corners */
  for (k=i; k!=j; k=k1) {
    k1 = mod(k+1,m);
    t = tangent(p0, p1, p2, p3, pp->curve.c[k][2], pp->curve.c[k1][2]);
    if (t<-.5) {
      return 1;
    }
    pt = bezier(t, p0, p1, p2, p3);
    d = ddist(pp->curve.c[k][2], pp->curve.c[k1][2]);
    if (d == 0.0) {  /* this should never happen */
      return 1;
    }
    d1 = dpara(pp->curve.c[k][2], pp->curve.c[k1][2], pt) / d;
    d2 = dpara(pp->curve.c[k][2], pp->curve.c[k1][2], pp->curve.vertex[k1]) / d;
    d2 *= 0.75 * pp->curve.alpha[k1];
    if (d2 < 0) {
      d1 = -d1;
      d2 = -d2;
    }
    if (d1 < d2 - opttolerance) {
      return 1;
    }
    if (d1 < d2) {
      res->pen += sq(d1 - d2);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x2d944
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movl -0x14(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x14(%rbp), %edi
addl $0x1, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, -0x50(%rbp)
movl -0x40(%rbp), %edi
addl $0x1, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x2d98c
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x14(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x50(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm3
callq 0x2e790
movsd %xmm0, -0x68(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x2dc5b
movl -0x40(%rbp), %edi
addl $0x1, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %edi
addl $0x2, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x4c(%rbp), %eax
je 0x2da1e
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movslq -0x14(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movslq -0x50(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x44(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x48(%rbp), %rdi
shlq $0x4, %rdi
addq %rdi, %rax
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd (%rdx), %xmm2
movsd 0x8(%rdx), %xmm3
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm5
movsd (%rax), %xmm6
movsd 0x8(%rax), %xmm7
callq 0x2e7f0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2daac
movl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0x2db3b
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movslq -0x14(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movslq -0x50(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x44(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x48(%rbp), %rdi
shlq $0x4, %rdi
addq %rdi, %rax
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd (%rdx), %xmm2
movsd 0x8(%rdx), %xmm3
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm5
movsd (%rax), %xmm6
movsd 0x8(%rax), %xmm7
callq 0x2e7f0
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
cmpl -0x4c(%rbp), %eax
je 0x2db52
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movslq -0x14(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movslq -0x50(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x44(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x48(%rbp), %rdi
shlq $0x4, %rdi
addq %rdi, %rax
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd (%rdx), %xmm2
movsd 0x8(%rdx), %xmm3
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm5
movsd (%rax), %xmm6
movsd 0x8(%rax), %xmm7
callq 0x2e890
movsd %xmm0, -0x160(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x158(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x44(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm3
callq 0x2e790
movsd -0x160(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x158(%rbp), %xmm0
mulsd %xmm2, %xmm0
movsd 0x4460(%rip), %xmm2     # 0x32098
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2dc4e
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
jmp 0x2dc50
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x2d9d4
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x180(%rbp)
movl -0x14(%rbp), %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, %ecx
movq -0x180(%rbp), %rax
movslq %ecx, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0x28(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x178(%rbp)
movl -0x14(%rbp), %edi
addl $0x1, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, %ecx
movq -0x178(%rbp), %rax
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x170(%rbp)
movl -0x18(%rbp), %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, %ecx
movq -0x170(%rbp), %rax
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x168(%rbp)
movl -0x18(%rbp), %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, %ecx
movq -0x168(%rbp), %rax
movslq %ecx, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x28(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq -0x14(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x18(%rbp), %rsi
imulq $0x30, %rsi, %rsi
addq %rsi, %rax
movsd (%rdx), %xmm0
movsd 0x8(%rdx), %xmm1
movsd 0x20(%rcx), %xmm2
movsd 0x28(%rcx), %xmm3
movsd 0x20(%rax), %xmm4
movsd 0x28(%rax), %xmm5
callq 0x2d7b0
movaps %xmm0, %xmm1
movsd 0x4269(%rip), %xmm0     # 0x32048
divsd %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jl 0x2de10
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x88(%rbp), %xmm0
movsd -0x80(%rbp), %xmm1
movsd -0x98(%rbp), %xmm2
movsd -0x90(%rbp), %xmm3
movsd -0xa8(%rbp), %xmm4
movsd -0xa0(%rbp), %xmm5
callq 0x2d7b0
movsd %xmm0, -0xe0(%rbp)
movsd -0x88(%rbp), %xmm0
movsd -0x80(%rbp), %xmm1
movsd -0x98(%rbp), %xmm2
movsd -0x90(%rbp), %xmm3
movsd -0xb8(%rbp), %xmm4
movsd -0xb0(%rbp), %xmm5
callq 0x2d7b0
movsd %xmm0, -0xe8(%rbp)
movsd -0x88(%rbp), %xmm0
movsd -0x80(%rbp), %xmm1
movsd -0xa8(%rbp), %xmm2
movsd -0xa0(%rbp), %xmm3
movsd -0xb8(%rbp), %xmm4
movsd -0xb0(%rbp), %xmm5
callq 0x2d7b0
movsd %xmm0, -0xf0(%rbp)
movsd -0xe0(%rbp), %xmm0
addsd -0xf0(%rbp), %xmm0
subsd -0xe8(%rbp), %xmm0
movsd %xmm0, -0xf8(%rbp)
movsd -0xe8(%rbp), %xmm0
ucomisd -0xe0(%rbp), %xmm0
jne 0x2defe
jp 0x2defe
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movsd -0xf0(%rbp), %xmm0
movsd -0xf0(%rbp), %xmm1
subsd -0xf8(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x108(%rbp)
movsd -0xe8(%rbp), %xmm0
movsd -0xe8(%rbp), %xmm1
subsd -0xe0(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x100(%rbp)
movsd -0xe8(%rbp), %xmm0
mulsd -0x108(%rbp), %xmm0
movsd 0x40ea(%rip), %xmm1     # 0x32048
divsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
movsd -0xd0(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2df89
jp 0x2df89
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movsd -0x58(%rbp), %xmm0
divsd -0xd0(%rbp), %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0xd8(%rbp), %xmm1
movsd 0x404a(%rip), %xmm0     # 0x31ff8
divsd %xmm0, %xmm1
movsd 0x4096(%rip), %xmm0     # 0x32050
subsd %xmm1, %xmm0
callq 0x1220
movaps %xmm0, %xmm1
movsd 0x407a(%rip), %xmm0     # 0x32048
subsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x190(%rbp)
movsd -0x108(%rbp), %xmm0
mulsd -0x60(%rbp), %xmm0
movsd -0x88(%rbp), %xmm1
movsd -0x80(%rbp), %xmm2
movsd -0x98(%rbp), %xmm3
movsd -0x90(%rbp), %xmm4
callq 0x2d6b0
movq -0x190(%rbp), %rax
movsd %xmm0, -0x118(%rbp)
movsd %xmm1, -0x110(%rbp)
movq -0x118(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x188(%rbp)
movsd -0x100(%rbp), %xmm0
mulsd -0x60(%rbp), %xmm0
movsd -0xb8(%rbp), %xmm1
movsd -0xb0(%rbp), %xmm2
movsd -0xa8(%rbp), %xmm3
movsd -0xa0(%rbp), %xmm4
callq 0x2d6b0
movq -0x188(%rbp), %rax
movsd %xmm0, -0x128(%rbp)
movsd %xmm1, -0x120(%rbp)
movq -0x128(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x120(%rbp), %rcx
movq %rcx, 0x20(%rax)
movsd -0x60(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x38(%rax)
movsd -0x108(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x28(%rax)
movsd -0x100(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x30(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x20(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movl -0x14(%rbp), %edi
addl $0x1, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x2e430
movl -0x40(%rbp), %edi
addl $0x1, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x40(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x44(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd -0x88(%rbp), %xmm0
movsd -0x80(%rbp), %xmm1
movsd -0x98(%rbp), %xmm2
movsd -0x90(%rbp), %xmm3
movsd -0xa8(%rbp), %xmm4
movsd -0xa0(%rbp), %xmm5
movsd -0xb8(%rbp), %xmm6
movsd -0xb0(%rbp), %xmm7
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2e920
movsd %xmm0, -0x108(%rbp)
movsd 0x3eb2(%rip), %xmm0     # 0x32090
ucomisd -0x108(%rbp), %xmm0
jbe 0x2e1f4
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movsd -0x108(%rbp), %xmm0
movsd -0x88(%rbp), %xmm1
movsd -0x80(%rbp), %xmm2
movsd -0x98(%rbp), %xmm3
movsd -0x90(%rbp), %xmm4
movsd -0xa8(%rbp), %xmm5
movsd -0xa0(%rbp), %xmm6
leaq -0xb8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x2ebe0
movsd %xmm0, -0x138(%rbp)
movsd %xmm1, -0x130(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x40(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x44(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm3
callq 0x2e790
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2e2cf
jp 0x2e2cf
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x40(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x44(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm3
movsd -0xc8(%rbp), %xmm4
movsd -0xc0(%rbp), %xmm5
callq 0x2d7b0
divsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movaps 0x3d7e(%rip), %xmm1     # 0x320b0
pand %xmm1, %xmm0
ucomisd -0x28(%rbp), %xmm0
jbe 0x2e349
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x40(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x44(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm3
movsd -0xc8(%rbp), %xmm4
movsd -0xc0(%rbp), %xmm5
callq 0x2ed10
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x2e3fb
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movslq -0x44(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x40(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm3
movsd -0xc8(%rbp), %xmm4
movsd -0xc0(%rbp), %xmm5
callq 0x2ed10
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2e407
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movsd -0x70(%rbp), %xmm0
movsd -0x70(%rbp), %xmm2
movq -0x20(%rbp), %rax
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x2e128
movl -0x14(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x2e777
movl -0x40(%rbp), %edi
addl $0x1, %edi
movl -0x3c(%rbp), %esi
callq 0x2ca20
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq -0x40(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rcx
addq $0x20, %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x44(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
addq $0x20, %rax
movsd -0x88(%rbp), %xmm0
movsd -0x80(%rbp), %xmm1
movsd -0x98(%rbp), %xmm2
movsd -0x90(%rbp), %xmm3
movsd -0xa8(%rbp), %xmm4
movsd -0xa0(%rbp), %xmm5
movsd -0xb8(%rbp), %xmm6
movsd -0xb0(%rbp), %xmm7
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2e920
movsd %xmm0, -0x108(%rbp)
movsd 0x3b9c(%rip), %xmm0     # 0x32090
ucomisd -0x108(%rbp), %xmm0
jbe 0x2e50a
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movsd -0x108(%rbp), %xmm0
movsd -0x88(%rbp), %xmm1
movsd -0x80(%rbp), %xmm2
movsd -0x98(%rbp), %xmm3
movsd -0x90(%rbp), %xmm4
movsd -0xa8(%rbp), %xmm5
movsd -0xa0(%rbp), %xmm6
leaq -0xb8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x2ebe0
movsd %xmm0, -0x148(%rbp)
movsd %xmm1, -0x140(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq -0x40(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x44(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movsd 0x20(%rcx), %xmm0
movsd 0x28(%rcx), %xmm1
movsd 0x20(%rax), %xmm2
movsd 0x28(%rax), %xmm3
callq 0x2e790
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2e5e7
jp 0x2e5e7
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq -0x40(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x44(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movsd 0x20(%rcx), %xmm0
movsd 0x28(%rcx), %xmm1
movsd 0x20(%rax), %xmm2
movsd 0x28(%rax), %xmm3
movsd -0xc8(%rbp), %xmm4
movsd -0xc0(%rbp), %xmm5
callq 0x2d7b0
divsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdx
movslq -0x40(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq -0x44(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x44(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movsd 0x20(%rdx), %xmm0
movsd 0x28(%rdx), %xmm1
movsd 0x20(%rcx), %xmm2
movsd 0x28(%rcx), %xmm3
movsd (%rax), %xmm4
movsd 0x8(%rax), %xmm5
callq 0x2d7b0
divsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x44(%rbp), %rcx
movsd 0x397f(%rip), %xmm0     # 0x32038
mulsd (%rax,%rcx,8), %xmm0
mulsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x78(%rbp), %xmm0
jbe 0x2e714
movsd -0x70(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x78(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x70(%rbp), %xmm1
movsd -0x78(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2e732
movl $0x1, -0x4(%rbp)
jmp 0x2e77e
movsd -0x70(%rbp), %xmm1
movsd -0x78(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2e76a
movsd -0x70(%rbp), %xmm0
subsd -0x78(%rbp), %xmm0
movsd -0x70(%rbp), %xmm2
subsd -0x78(%rbp), %xmm2
movq -0x20(%rbp), %rax
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
jmp 0x2e76c
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x2e436
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopw (%rax,%rax)