// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/arrays.c
// Function: array_interpolate_spline_one_column
int array_interpolate_spline_one_column(
					double * x_array,
					int x_size,
					double * y_array, /* array of size x_size*y_size with elements
							   y_array[index_y*x_size+index_x] */
					int y_size,
					int index_y,
					double * ddy_array, /* array of size x_size*y_size */
					double x,   /* input */
					double * y, /* output */
					ErrorMsg errmsg
					) {


  int inf,sup,mid;
  double h,a,b;

  inf=0;
  sup=x_size-1;

  if (x_array[inf] < x_array[sup]){

    if (x < x_array[inf]) {
      class_sprintf(errmsg,"%s(L:%d) : x=%e < x_min=%e",__func__,__LINE__,x,x_array[inf]);
      return _FAILURE_;
    }

    if (x > x_array[sup]) {
      class_sprintf(errmsg,"%s(L:%d) : x=%e > x_max=%e",__func__,__LINE__,x,x_array[sup]);
      return _FAILURE_;
    }

    while (sup-inf > 1) {

      mid=(int)(0.5*(inf+sup));
      if (x < x_array[mid]) {sup=mid;}
      else {inf=mid;}

    }

  }

  else {

    if (x < x_array[sup]) {
      class_sprintf(errmsg,"%s(L:%d) : x=%e < x_min=%e",__func__,__LINE__,x,x_array[sup]);
      return _FAILURE_;
    }

    if (x > x_array[inf]) {
      class_sprintf(errmsg,"%s(L:%d) : x=%e > x_max=%e",__func__,__LINE__,x,x_array[inf]);
      return _FAILURE_;
    }

    while (sup-inf > 1) {

      mid=(int)(0.5*(inf+sup));
      if (x > x_array[mid]) {sup=mid;}
      else {inf=mid;}

    }

  }

  h = x_array[sup] - x_array[inf];
  b = (x-x_array[inf])/h;
  a = 1-b;

  *y =
    a * y_array[index_y * x_size + inf] +
    b * y_array[index_y * x_size + sup] +
    ((a*a*a-a)* ddy_array[index_y * x_size + inf] +
     (b*b*b-b)* ddy_array[index_y * x_size + sup])*h*h/6.;

  return _SUCCESS_;
}

// Assembly:
subq $0x78, %rsp
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rax
movq %rdi, 0x68(%rsp)
movl %esi, 0x64(%rsp)
movq %rdx, 0x58(%rsp)
movl %ecx, 0x54(%rsp)
movl %r8d, 0x50(%rsp)
movq %r9, 0x48(%rsp)
movsd %xmm0, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movl 0x64(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x25936
movsd 0x40(%rsp), %xmm1
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2582c
jmp 0x257a2
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
xorl %eax, %eax
movl %eax, %esi
leaq 0x1ae944(%rip), %rdx    # 0x1d4106
leaq 0x1aea41(%rip), %rcx    # 0x1d420a
movl $0x85b, %r8d            # imm = 0x85B
movq %rsi, %rdi
movb $0x2, %al
callq 0x8540
movl %eax, 0x14(%rsp)
movq 0x88(%rsp), %rdi
movl 0x14(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
leaq 0x1ae8fb(%rip), %rdx    # 0x1d4106
leaq 0x1ae9f8(%rip), %rcx    # 0x1d420a
movl $0x85b, %r8d            # imm = 0x85B
movb $0x2, %al
callq 0x8540
movl $0x1, 0x74(%rsp)
jmp 0x25c5f
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x258d3
jmp 0x25849
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
xorl %eax, %eax
movl %eax, %esi
leaq 0x1ae8ca(%rip), %rdx    # 0x1d4133
leaq 0x1ae99a(%rip), %rcx    # 0x1d420a
movl $0x860, %r8d            # imm = 0x860
movq %rsi, %rdi
movb $0x2, %al
callq 0x8540
movl %eax, 0x10(%rsp)
movq 0x88(%rsp), %rdi
movl 0x10(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
leaq 0x1ae881(%rip), %rdx    # 0x1d4133
leaq 0x1ae951(%rip), %rcx    # 0x1d420a
movl $0x860, %r8d            # imm = 0x860
movb $0x2, %al
callq 0x8540
movl $0x1, 0x74(%rsp)
jmp 0x25c5f
jmp 0x258d5
movl 0x38(%rsp), %eax
subl 0x3c(%rsp), %eax
cmpl $0x1, %eax
jle 0x25931
movl 0x3c(%rsp), %eax
addl 0x38(%rsp), %eax
cvtsi2sd %eax, %xmm1
movsd 0x1ad392(%rip), %xmm0   # 0x1d2c88
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x34(%rsp)
movsd 0x40(%rsp), %xmm1
movq 0x68(%rsp), %rax
movslq 0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x25927
movl 0x34(%rsp), %eax
movl %eax, 0x38(%rsp)
jmp 0x2592f
movl 0x34(%rsp), %eax
movl %eax, 0x3c(%rsp)
jmp 0x258d5
jmp 0x25ae4
movsd 0x40(%rsp), %xmm1
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x259e1
jmp 0x25957
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
xorl %eax, %eax
movl %eax, %esi
leaq 0x1ae78f(%rip), %rdx    # 0x1d4106
leaq 0x1ae88c(%rip), %rcx    # 0x1d420a
movl $0x871, %r8d            # imm = 0x871
movq %rsi, %rdi
movb $0x2, %al
callq 0x8540
movl %eax, 0xc(%rsp)
movq 0x88(%rsp), %rdi
movl 0xc(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
leaq 0x1ae746(%rip), %rdx    # 0x1d4106
leaq 0x1ae843(%rip), %rcx    # 0x1d420a
movl $0x871, %r8d            # imm = 0x871
movb $0x2, %al
callq 0x8540
movl $0x1, 0x74(%rsp)
jmp 0x25c5f
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x25a88
jmp 0x259fe
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
xorl %eax, %eax
movl %eax, %esi
leaq 0x1ae715(%rip), %rdx    # 0x1d4133
leaq 0x1ae7e5(%rip), %rcx    # 0x1d420a
movl $0x876, %r8d            # imm = 0x876
movq %rsi, %rdi
movb $0x2, %al
callq 0x8540
movl %eax, 0x8(%rsp)
movq 0x88(%rsp), %rdi
movl 0x8(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
leaq 0x1ae6cc(%rip), %rdx    # 0x1d4133
leaq 0x1ae79c(%rip), %rcx    # 0x1d420a
movl $0x876, %r8d            # imm = 0x876
movb $0x2, %al
callq 0x8540
movl $0x1, 0x74(%rsp)
jmp 0x25c5f
jmp 0x25a8a
movl 0x38(%rsp), %eax
subl 0x3c(%rsp), %eax
cmpl $0x1, %eax
jle 0x25ae2
movl 0x3c(%rsp), %eax
addl 0x38(%rsp), %eax
cvtsi2sd %eax, %xmm1
movsd 0x1ad1dd(%rip), %xmm0   # 0x1d2c88
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x34(%rsp)
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x34(%rsp), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x25ad8
movl 0x34(%rsp), %eax
movl %eax, 0x38(%rsp)
jmp 0x25ae0
movl 0x34(%rsp), %eax
movl %eax, 0x3c(%rsp)
jmp 0x25a8a
jmp 0x25ae4
movq 0x68(%rsp), %rax
movslq 0x38(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x40(%rsp), %xmm0
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
divsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x1ac717(%rip), %xmm0   # 0x1d2248
subsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movq 0x58(%rsp), %rax
movl 0x50(%rsp), %ecx
imull 0x64(%rsp), %ecx
addl 0x3c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x18(%rsp), %xmm1
movq 0x58(%rsp), %rax
movl 0x50(%rsp), %ecx
imull 0x64(%rsp), %ecx
addl 0x38(%rsp), %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x20(%rsp), %xmm3
movsd 0x20(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movq 0x48(%rsp), %rax
movl 0x50(%rsp), %ecx
imull 0x64(%rsp), %ecx
addl 0x3c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm3
movsd 0x18(%rsp), %xmm2
mulsd 0x18(%rsp), %xmm2
movsd 0x18(%rsp), %xmm5
movsd 0x18(%rsp), %xmm4
movq %xmm4, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm4
mulsd %xmm5, %xmm2
addsd %xmm4, %xmm2
movq 0x48(%rsp), %rax
movl 0x50(%rsp), %ecx
imull 0x64(%rsp), %ecx
addl 0x38(%rsp), %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd 0x28(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
movsd 0x1ada45(%rip), %xmm2   # 0x1d3688
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movq 0x80(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopl (%rax,%rax)