// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../tools/arrays.c
// Function: array_logspline_table_lines
int array_logspline_table_lines(
			     double * x, /* vector of size x_size */
			     int x_size,
			     double * y_array, /* array of size x_size*y_size with elements
						  y_array[index_x*y_size+index_y] */
			     int y_size,
			     double * ddlny_array, /* array of size x_size*y_size */
			     short spline_mode,
			     ErrorMsg errmsg
			     ) {

  double * p;
  double * qn;
  double * un;
  double * u;
  double sig;
  int index_x;
  int index_y;
  double dy_first;
  double dy_last;

  u = (double*)malloc((x_size-1) * y_size * sizeof(double));
  p = (double*)malloc(y_size * sizeof(double));
  qn = (double*)malloc(y_size * sizeof(double));
  un = (double*)malloc(y_size * sizeof(double));
  if (u == NULL) {
    class_sprintf(errmsg,"%s(L:%d) Cannot allocate u",__func__,__LINE__);
    return _FAILURE_;
  }
  if (p == NULL) {
    class_sprintf(errmsg,"%s(L:%d) Cannot allocate p",__func__,__LINE__);
    return _FAILURE_;
  }
  if (qn == NULL) {
    class_sprintf(errmsg,"%s(L:%d) Cannot allocate qn",__func__,__LINE__);
    return _FAILURE_;
  }
  if (un == NULL) {
    class_sprintf(errmsg,"%s(L:%d) Cannot allocate un",__func__,__LINE__);
    return _FAILURE_;
  }

  if (x_size==2) spline_mode = _SPLINE_NATURAL_; // in the case of only 2 x-values, only the natural spline method is appropriate, for _SPLINE_EST_DERIV_ at least 3 x-values are needed.

  index_x=0;

  if (spline_mode == _SPLINE_NATURAL_) {
    for (index_y=0; index_y < y_size; index_y++) {
      ddlny_array[index_x*y_size+index_y] = u[index_x*y_size+index_y] = 0.0;
    }
  }
  else {
    if (spline_mode == _SPLINE_EST_DERIV_) {

      for (index_y=0; index_y < y_size; index_y++) {

	dy_first =
	  ((log(x[2])-log(x[0]))*(log(x[2])-log(x[0]))*
	   (log(y_array[1*y_size+index_y])-log(y_array[0*y_size+index_y]))-
	   (log(x[1])-log(x[0]))*(log(x[1])-log(x[0]))*
	   (log(y_array[2*y_size+index_y])-log(y_array[0*y_size+index_y])))/
	  ((log(x[2])-log(x[0]))*(log(x[1])-log(x[0]))*(log(x[2])-log(x[1])));

	ddlny_array[index_x*y_size+index_y] = -0.5;

	u[index_x*y_size+index_y] =
	  (3./(log(x[1]) - log(x[0])))*
	  ((log(y_array[1*y_size+index_y])-log(y_array[0*y_size+index_y]))/
	   (log(x[1]) - log(x[0]))-dy_first);

      }
    }
    else {
      class_sprintf(errmsg,"%s(L:%d) Spline mode not identified: %d",__func__,__LINE__,spline_mode);
      return _FAILURE_;
    }
  }


  for (index_x=1; index_x < x_size-1; index_x++) {

    sig = (log(x[index_x]) - log(x[index_x-1]))/(log(x[index_x+1]) - log(x[index_x-1]));

    for (index_y=0; index_y < y_size; index_y++) {

      p[index_y] = sig * ddlny_array[(index_x-1)*y_size+index_y] + 2.0;

      ddlny_array[index_x*y_size+index_y] = (sig-1.0)/p[index_y];

      u[index_x*y_size+index_y] =
	(log(y_array[(index_x+1)*y_size+index_y]) - log(y_array[index_x*y_size+index_y]))
	/ (log(x[index_x+1]) - log(x[index_x]))
	- (log(y_array[index_x*y_size+index_y]) - log(y_array[(index_x-1)*y_size+index_y]))
	/ (log(x[index_x]) - log(x[index_x-1]));

      u[index_x*y_size+index_y] = (6.0 * u[index_x*y_size+index_y] /
				   (log(x[index_x+1]) - log(x[index_x-1]))
				   - sig * u[(index_x-1)*y_size+index_y]) / p[index_y];
    }

  }

  if (spline_mode == _SPLINE_NATURAL_) {

    for (index_y=0; index_y < y_size; index_y++) {
      qn[index_y]=un[index_y]=0.0;
    }

  }
  else {
    if (spline_mode == _SPLINE_EST_DERIV_) {

      for (index_y=0; index_y < y_size; index_y++) {

	dy_last =
	  ((log(x[x_size-3])-log(x[x_size-1]))*(log(x[x_size-3])-log(x[x_size-1]))*
	   (log(y_array[(x_size-2)*y_size+index_y])-log(y_array[(x_size-1)*y_size+index_y]))-
	   (log(x[x_size-2])-log(x[x_size-1]))*(log(x[x_size-2])-log(x[x_size-1]))*
	   (log(y_array[(x_size-3)*y_size+index_y])-log(y_array[(x_size-1)*y_size+index_y])))/
	  ((log(x[x_size-3])-log(x[x_size-1]))*(log(x[x_size-2])-log(x[x_size-1]))*(log(x[x_size-3])-log(x[x_size-2])));

	qn[index_y]=0.5;

	un[index_y]=
	  (3./(log(x[x_size-1]) - log(x[x_size-2])))*
	  (dy_last-(log(y_array[(x_size-1)*y_size+index_y]) - log(y_array[(x_size-2)*y_size+index_y]))/
	   (log(x[x_size-1]) - log(x[x_size-2])));

      }
    }
    else {
      class_sprintf(errmsg,"%s(L:%d) Spline mode not identified: %d",__func__,__LINE__,spline_mode);
      return _FAILURE_;
    }
  }

  index_x=x_size-1;


  for (index_y=0; index_y < y_size; index_y++) {
    ddlny_array[index_x*y_size+index_y] =
      (un[index_y] - qn[index_y] * u[(index_x-1)*y_size+index_y]) /
      (qn[index_y] * ddlny_array[(index_x-1)*y_size+index_y] + 1.0);
  }

  for (index_x=x_size-2; index_x >= 0; index_x--) {
    for (index_y=0; index_y < y_size; index_y++) {

      ddlny_array[index_x*y_size+index_y] = ddlny_array[index_x*y_size+index_y] *
	ddlny_array[(index_x+1)*y_size+index_y] + u[index_x*y_size+index_y];

    }
  }

  free(qn);
  free(un);
  free(p);
  free(u);

  return _SUCCESS_;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %r9d, 0x3c(%rsp)
movq %r8, %r12
movl %ecx, %ebx
movq %rdx, 0x80(%rsp)
movl %esi, %r13d
movq %rdi, %rbp
leal -0x1(%r13), %eax
movl %eax, 0x60(%rsp)
imull %ecx, %eax
cltq
movq %rax, 0xe8(%rsp)
leaq (,%rax,8), %rdi
callq 0x8490
movq %rax, %r14
movl %ebx, 0x38(%rsp)
movslq %ebx, %rax
movq %rax, 0xb0(%rsp)
leaq (,%rax,8), %rbx
movq %rbx, %rdi
callq 0x8490
movq %rax, %r15
movq %rbx, 0xc8(%rsp)
movq %rbx, %rdi
callq 0x8490
testq %r14, %r14
je 0x13066
movq %r15, 0xc0(%rsp)
testq %r15, %r15
je 0x130a6
testq %rax, %rax
movq 0x160(%rsp), %r15
je 0x130e6
xorl %ecx, %ecx
cmpl $0x2, %r13d
movl 0x3c(%rsp), %esi
cmovel %ecx, %esi
movswl %si, %edx
movl %edx, 0x6c(%rsp)
testw %dx, %dx
movq %r12, 0x78(%rsp)
je 0x1313b
cmpw $0x1, %si
jne 0x13170
movl %esi, 0x3c(%rsp)
movq %r13, 0x58(%rsp)
movq %rax, 0x70(%rsp)
movq 0xb0(%rsp), %rcx
leal (%rcx,%rcx), %eax
cltq
xorl %r15d, %r15d
testl %ecx, %ecx
movl $0x0, %ebx
cmovgl 0x38(%rsp), %ebx
movq 0x80(%rsp), %rdx
leaq (%rdx,%rcx,8), %r13
leaq (%rdx,%rax,8), %rax
movq %rax, 0xd0(%rsp)
movq 0x80(%rsp), %r12
cmpq %r15, %rbx
je 0x131b5
movsd 0x10(%rbp), %xmm0
callq 0x82e0
movsd %xmm0, 0x8(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x10(%rbp), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x10(%rsp)
movsd (%r13,%r15,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x8(%rsp)
movsd (%r12,%r15,8), %xmm0
callq 0x82e0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rbp), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x8(%rbp), %xmm0
callq 0x82e0
movsd %xmm0, 0x20(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x20(%rsp)
movq 0xd0(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%r12,%r15,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rbp), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x8(%rbp), %xmm0
callq 0x82e0
movsd %xmm0, 0x20(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x10(%rbp), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rbp), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x78(%rsp), %rax
movabsq $-0x4020000000000000, %rcx # imm = 0xBFE0000000000000
movq %rcx, (%rax,%r15,8)
movsd 0x8(%rbp), %xmm0
callq 0x82e0
movaps %xmm0, 0x10(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movaps %xmm0, 0x20(%rsp)
movsd (%r13,%r15,8), %xmm0
callq 0x82e0
movaps %xmm0, 0xa0(%rsp)
movsd (%r12,%r15,8), %xmm0
callq 0x82e0
movapd 0xa0(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd 0xd3757(%rip), %xmm0    # 0xe6750
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd %xmm0, 0xa0(%rsp)
movsd 0x8(%rbp), %xmm0
callq 0x82e0
movaps %xmm0, 0x40(%rsp)
movsd (%rbp), %xmm0
callq 0x82e0
movapd 0x10(%rsp), %xmm1
unpcklpd 0x40(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
movapd 0x20(%rsp), %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
subpd %xmm2, %xmm1
movapd 0xa0(%rsp), %xmm2
divpd %xmm1, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
subsd 0x8(%rsp), %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, (%r14,%r15,8)
incq %r15
jmp 0x12dcc
leaq 0xd3d70(%rip), %rbx     # 0xe6ddd
leaq 0xd3e70(%rip), %r14     # 0xe6ee4
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x2e7, %r8d            # imm = 0x2E7
xorl %eax, %eax
callq 0x8580
incl %eax
movslq %eax, %rsi
movq 0x160(%rsp), %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x2e7, %r8d            # imm = 0x2E7
jmp 0x1311f
leaq 0xd3dff(%rip), %rbx     # 0xe6eac
leaq 0xd3e30(%rip), %r14     # 0xe6ee4
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x2ef, %r8d            # imm = 0x2EF
xorl %eax, %eax
callq 0x8580
incl %eax
movslq %eax, %rsi
movq 0x160(%rsp), %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x2ef, %r8d            # imm = 0x2EF
jmp 0x1311f
leaq 0xd3ddb(%rip), %rbx     # 0xe6ec8
leaq 0xd3df0(%rip), %r14     # 0xe6ee4
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x2f3, %r8d            # imm = 0x2F3
xorl %eax, %eax
callq 0x8580
incl %eax
movslq %eax, %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x2f3, %r8d            # imm = 0x2F3
xorl %eax, %eax
callq 0x8580
pushq $0x1
popq %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x38(%rsp), %edx
testl %edx, %edx
movl $0x0, %ebx
cmovgl %edx, %ebx
cmpq %rcx, %rbx
je 0x1315d
andq $0x0, (%r14,%rcx,8)
andq $0x0, (%r12,%rcx,8)
incq %rcx
jmp 0x13149
movl %esi, 0x3c(%rsp)
movq %r13, 0x58(%rsp)
movq %rax, 0x70(%rsp)
movq %r14, %rax
jmp 0x131c5
leaq 0xd3c81(%rip), %rbx     # 0xe6df8
leaq 0xd3d66(%rip), %r14     # 0xe6ee4
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x316, %r8d            # imm = 0x316
movl 0x6c(%rsp), %ebp
movl %ebp, %r9d
xorl %eax, %eax
callq 0x8580
incl %eax
movslq %eax, %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x316, %r8d            # imm = 0x316
jmp 0x138c1
movq %r14, %rax
movq 0x78(%rsp), %r12
movq 0x160(%rsp), %r15
movslq 0x60(%rsp), %rcx
movq %rcx, 0xf0(%rsp)
movl %ebx, %edx
movq 0xb0(%rsp), %rcx
movq %rcx, %rdi
shlq $0x4, %rdi
movq 0x80(%rsp), %rsi
addq %rsi, %rdi
movq %rdi, 0xd0(%rsp)
movq %rdx, 0xb8(%rsp)
leaq (,%rdx,8), %rdx
movq %rdx, 0x60(%rsp)
leaq (%r12,%rcx,8), %rdx
movq %rdx, 0x98(%rsp)
leaq (%rsi,%rcx,8), %r14
leaq (%rax,%rcx,8), %rbx
pushq $0x1
popq %r13
movq %rax, 0xe0(%rsp)
movq %rax, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %r12, 0xf8(%rsp)
cmpq 0xf0(%rsp), %r13
jge 0x134cd
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movaps %xmm0, 0x40(%rsp)
movsd -0x8(%rbp,%r13,8), %xmm0
callq 0x82e0
movapd 0x40(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, 0x40(%rsp)
leaq 0x1(%r13), %r15
movsd 0x8(%rbp,%r13,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x8(%rsp)
movsd -0x8(%rbp,%r13,8), %xmm0
callq 0x82e0
movsd 0x8(%rsp), %xmm2
subsd %xmm0, %xmm2
movapd 0x40(%rsp), %xmm1
divsd %xmm2, %xmm1
movapd %xmm1, %xmm0
addsd 0xd2528(%rip), %xmm0    # 0xe57e8
movapd %xmm0, 0x110(%rsp)
movapd %xmm1, 0x40(%rsp)
movapd %xmm1, %xmm0
xorpd 0xd1f55(%rip), %xmm0    # 0xe5230
movapd %xmm0, 0x100(%rsp)
xorl %r12d, %r12d
cmpq %r12, 0x60(%rsp)
je 0x13487
movq 0xf8(%rsp), %rax
movsd (%rax,%r12), %xmm1
mulsd 0x40(%rsp), %xmm1
addsd 0xd29d2(%rip), %xmm1    # 0xe5ce0
movsd %xmm1, 0x20(%rsp)
movapd 0x110(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x98(%rsp), %rax
movsd %xmm0, (%rax,%r12)
movq 0xd0(%rsp), %rax
movsd (%rax,%r12), %xmm0
callq 0x82e0
movsd %xmm0, 0x8(%rsp)
movsd (%r14,%r12), %xmm0
callq 0x82e0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd (%rbp,%r15,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%r14,%r12), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movq 0x88(%rsp), %rax
movsd (%rax,%r12), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movsd %xmm0, 0xa0(%rsp)
movsd -0x8(%rbp,%r13,8), %xmm0
callq 0x82e0
movsd 0xa0(%rsp), %xmm2
subsd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm1
divsd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%r12)
mulsd 0xd3231(%rip), %xmm0    # 0xe6650
movsd %xmm0, 0x8(%rsp)
movsd (%rbp,%r15,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd -0x8(%rbp,%r13,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm2
subsd %xmm0, %xmm2
movsd 0x8(%rsp), %xmm1
divsd %xmm2, %xmm1
movq 0x90(%rsp), %rax
movsd (%rax,%r12), %xmm0
mulsd 0x100(%rsp), %xmm0
addsd %xmm1, %xmm0
divsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rbx,%r12)
addq $0x8, %r12
jmp 0x132e7
movq 0xc8(%rsp), %rax
addq %rax, 0xd0(%rsp)
addq %rax, 0xf8(%rsp)
addq %rax, 0x88(%rsp)
addq %rax, 0x90(%rsp)
addq %rax, 0x98(%rsp)
addq %rax, %r14
addq %rax, %rbx
movq %r15, %r13
movq 0x160(%rsp), %r15
jmp 0x13243
movl 0x3c(%rsp), %eax
testw %ax, %ax
je 0x13833
cmpw $0x1, %ax
movq 0x58(%rsp), %rcx
jne 0x13881
leal -0x3(%rcx), %eax
movslq %eax, %rsi
addl $-0x2, %ecx
movl %ecx, %eax
movl 0x38(%rsp), %edx
imull %edx, %eax
movq %rcx, 0x58(%rsp)
movslq %ecx, %r13
movq %rsi, 0x60(%rsp)
imull %esi, %edx
movslq %edx, %rcx
cltq
movq 0x80(%rsp), %rdx
movq %rax, 0x88(%rsp)
leaq (%rdx,%rax,8), %rax
movq %rax, 0xa0(%rsp)
movq 0xe8(%rsp), %rax
leaq (%rdx,%rax,8), %rax
movq %rax, 0x98(%rsp)
leaq (%rdx,%rcx,8), %rax
movq %rax, 0x90(%rsp)
xorl %r15d, %r15d
movq 0x60(%rsp), %r12
movq 0xf0(%rsp), %rbx
movq 0x98(%rsp), %r14
cmpq %r15, 0xb8(%rsp)
je 0x138d0
movsd (%rbp,%r12,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x8(%rsp)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd (%rbp,%r12,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x10(%rsp)
movq 0xa0(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x8(%rsp)
movsd (%r14,%r15,8), %xmm0
callq 0x82e0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x20(%rsp)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x20(%rsp)
movq 0x90(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%r14,%r15,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rbp,%r12,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x20(%rsp)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x20(%rsp)
movsd (%rbp,%r12,8), %xmm0
callq 0x82e0
movsd %xmm0, 0x10(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xc0(%rsp), %rax
movabsq $0x3fe0000000000000, %rcx # imm = 0x3FE0000000000000
movq %rcx, (%rax,%r15,8)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movaps %xmm0, 0x10(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movaps %xmm0, 0x20(%rsp)
movsd (%r14,%r15,8), %xmm0
callq 0x82e0
movaps %xmm0, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
callq 0x82e0
movapd 0x40(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd 0xd2f96(%rip), %xmm0    # 0xe6750
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd %xmm0, 0x40(%rsp)
movsd (%rbp,%rbx,8), %xmm0
callq 0x82e0
movaps %xmm0, 0xd0(%rsp)
movsd (%rbp,%r13,8), %xmm0
callq 0x82e0
movapd 0x10(%rsp), %xmm1
unpcklpd 0xd0(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
movapd 0x20(%rsp), %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
subpd %xmm2, %xmm1
movapd 0x40(%rsp), %xmm2
divpd %xmm1, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd %xmm2, %xmm1
movq 0x70(%rsp), %rax
movsd %xmm1, (%rax,%r15,8)
incq %r15
jmp 0x13564
xorl %eax, %eax
movq 0xe0(%rsp), %rbx
movq 0xc0(%rsp), %rdi
movq 0x70(%rsp), %r15
movq 0x78(%rsp), %r9
movq 0x58(%rsp), %r12
movq 0xb8(%rsp), %r8
cmpq %rax, %r8
je 0x13870
andq $0x0, (%r15,%rax,8)
andq $0x0, (%rdi,%rax,8)
incq %rax
jmp 0x1385c
addl $-0x2, %r12d
movl 0x38(%rsp), %eax
imull %r12d, %eax
movslq %eax, %rdx
jmp 0x138ff
leaq 0xd3570(%rip), %rbx     # 0xe6df8
leaq 0xd3655(%rip), %r14     # 0xe6ee4
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x350, %r8d            # imm = 0x350
movl 0x6c(%rsp), %ebp
movl %ebp, %r9d
xorl %eax, %eax
callq 0x8580
incl %eax
movslq %eax, %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x350, %r8d            # imm = 0x350
movl %ebp, %r9d
xorl %eax, %eax
callq 0x8580
jmp 0x13126
movq 0x70(%rsp), %r15
movq 0x78(%rsp), %r9
movq 0x58(%rsp), %r12
movq 0xb8(%rsp), %r8
movq 0xe0(%rsp), %rbx
movq 0x88(%rsp), %rdx
movq 0xc0(%rsp), %rdi
movq 0xe8(%rsp), %rax
leaq (%r9,%rax,8), %rax
leaq (%rbx,%rdx,8), %rcx
leaq (%r9,%rdx,8), %rdx
xorl %esi, %esi
movsd 0xd1943(%rip), %xmm0    # 0xe5260
cmpq %rsi, %r8
je 0x13951
movsd (%r15,%rsi,8), %xmm1
movsd (%rdi,%rsi,8), %xmm2
movsd (%rcx,%rsi,8), %xmm3
mulsd %xmm2, %xmm3
subsd %xmm3, %xmm1
mulsd (%rdx,%rsi,8), %xmm2
addsd %xmm0, %xmm2
divsd %xmm2, %xmm1
movsd %xmm1, (%rax,%rsi,8)
incq %rsi
jmp 0x1391d
movslq %r12d, %rax
leaq 0x1(%rax), %rcx
movq 0xb0(%rsp), %rsi
imulq %rsi, %rcx
leaq (%r9,%rcx,8), %rcx
negq 0xc8(%rsp)
imulq %rax, %rsi
leaq (%r9,%rsi,8), %rdx
leaq (%rbx,%rsi,8), %rsi
testq %rax, %rax
js 0x139bc
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x139a6
movsd (%rdx,%r9,8), %xmm0
mulsd (%rcx,%r9,8), %xmm0
addsd (%rsi,%r9,8), %xmm0
movsd %xmm0, (%rdx,%r9,8)
incq %r9
jmp 0x13984
decq %rax
movq 0xc8(%rsp), %r9
addq %r9, %rcx
addq %r9, %rdx
addq %r9, %rsi
jmp 0x1397c
callq 0x8430
movq %r15, %rdi
callq 0x8430
movq %rbx, %rdi
callq 0x8430
xorl %eax, %eax
jmp 0x13129