// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/arrays.c
// Function: array_derive2_order2_table_line_to_line
int array_derive2_order2_table_line_to_line(
				       double * x_array,
				       int n_lines,
				       double * array,
				       int n_columns,
				       int index_y,
				       int index_dy,
				       int index_ddy,
				       ErrorMsg errmsg) {

  int i;
  double dxp,dxm,dyp,dym;

  for (i=1; i<n_lines-1; i++) {

    dxp = x_array[i+1] - x_array[i];
    dxm = x_array[i-1] - x_array[i];
    dyp = *(array+(i+1)*n_columns+index_y) - *(array+i*n_columns+index_y);
    dym = *(array+(i-1)*n_columns+index_y) - *(array+i*n_columns+index_y);

    if ((dxp*dxm*(dxm-dxp)) == 0.) {
      class_sprintf(errmsg,"%s(L:%d) stop to avoid division by zero",__func__,__LINE__);
      return _FAILURE_;
    }

    *(array+i*n_columns+index_dy) = (dyp*dxm*dxm-dym*dxp*dxp)/(dxp*dxm*(dxm-dxp));
    *(array+i*n_columns+index_ddy) = 2.*(dyp*dxm-dym*dxp)/(dxp*dxm*(dxp-dxm));

  }

  *(array+0*n_columns+index_dy) = *(array+1*n_columns+index_dy)
    - (x_array[1] - x_array[0]) * *(array+1*n_columns+index_ddy);
  *(array+0*n_columns+index_ddy) = *(array+1*n_columns+index_ddy);

  *(array+(n_lines-1)*n_columns+index_dy) = *(array+(n_lines-2)*n_columns+index_dy)
    + (x_array[n_lines-1] - x_array[n_lines-2]) * *(array+(n_lines-2)*n_columns+index_ddy);
  *(array+(n_lines-1)*n_columns+index_ddy) = *(array+(n_lines-2)*n_columns+index_ddy);

  return _SUCCESS_;

}

// Assembly:
subq $0x58, %rsp
movq 0x68(%rsp), %rax
movl 0x60(%rsp), %eax
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movl %r8d, 0x30(%rsp)
movl %r9d, 0x2c(%rsp)
movl $0x1, 0x28(%rsp)
movl 0x28(%rsp), %eax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1aa90
movq 0x48(%rsp), %rax
movl 0x28(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x48(%rsp), %rax
movslq 0x28(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x48(%rsp), %rax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x48(%rsp), %rax
movslq 0x28(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
addl $0x1, %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x30(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x30(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x30(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x30(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
subsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1a976
jp 0x1a976
jmp 0x1a919
xorl %eax, %eax
movl %eax, %esi
leaq 0x1b93f7(%rip), %rdx    # 0x1d3d1b
leaq 0x1b9418(%rip), %rcx    # 0x1d3d43
movl $0xe7, %r8d
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, 0x4(%rsp)
movq 0x68(%rsp), %rdi
movl 0x4(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x1b93c6(%rip), %rdx    # 0x1d3d1b
leaq 0x1b93e7(%rip), %rcx    # 0x1d3d43
movl $0xe7, %r8d
movb $0x0, %al
callq 0x8540
movl $0x1, 0x54(%rsp)
jmp 0x1ac4f
movsd 0x10(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd 0x18(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
subsd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x2c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movsd 0x8(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1b8246(%rip), %xmm0   # 0x1d2c80
mulsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
subsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x60(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x1a7f1
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x48(%rsp), %rax
movsd 0x8(%rax), %xmm0
movq 0x48(%rsp), %rax
subsd (%rax), %xmm0
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x60(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x38(%rsp), %rax
imull $0x0, 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x2c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x60(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
imull $0x0, 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x60(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
subl $0x2, %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x48(%rsp), %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x48(%rsp), %rax
movl 0x44(%rsp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
subl $0x2, %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x60(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x2c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
subl $0x2, %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x60(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
imull 0x34(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x60(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax,%rax)