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

  int i;

  double h;

  class_test(index_ddy == index_y,
	     errmsg,
	     "Output column %d must differ from input columns %d",
	     index_ddy,
	     index_y);

  class_test(index_ddy == index_dy,
	     errmsg,
	     "Output column %d must differ from input columns %d",
	     index_ddy,
	     index_dy);

  class_test(n_lines<2,
	     errmsg,
	     "no possible derivation with less than two lines");

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

    h = x_array[i+1] - x_array[i];
    if (h == 0) {
      class_sprintf(errmsg,"%s(L:%d) h=0, stop to avoid division by zero",__func__,__LINE__);
      return _FAILURE_;
    }

    array[i*n_columns+index_dy] =
      (array[(i+1)*n_columns+index_y] - array[i*n_columns+index_y])/h
      - h / 6. * (array[(i+1)*n_columns+index_ddy] + 2. * array[i*n_columns+index_ddy]);

  }

  h = x_array[n_lines-1] - x_array[n_lines-2];

  array[(n_lines-1)*n_columns+index_dy] =
    (array[(n_lines-1)*n_columns+index_y] - array[(n_lines-2)*n_columns+index_y])/h
    + h / 6. * (2. * array[(n_lines-1)*n_columns+index_ddy] + array[(n_lines-2)*n_columns+index_ddy]);

  return _SUCCESS_;
}

// Assembly:
subq $0x3048, %rsp           # imm = 0x3048
movq 0x3058(%rsp), %rax
movl 0x3050(%rsp), %eax
movq %rdi, 0x3038(%rsp)
movl %esi, 0x3034(%rsp)
movq %rdx, 0x3028(%rsp)
movl %ecx, 0x3024(%rsp)
movl %r8d, 0x3020(%rsp)
movl %r9d, 0x301c(%rsp)
movl 0x301c(%rsp), %eax
cmpl 0x3020(%rsp), %eax
jne 0x19d2b
leaq 0x2810(%rsp), %rdi
movl 0x301c(%rsp), %edx
movl 0x3020(%rsp), %ecx
leaq 0x1b9eda(%rip), %rsi    # 0x1d3b9f
movb $0x0, %al
callq 0x5b9c0
leaq 0x2010(%rsp), %rdi
leaq 0x2810(%rsp), %rcx
leaq 0x1b839f(%rip), %rsi    # 0x1d2082
leaq 0x1b9f79(%rip), %rdx    # 0x1d3c63
movb $0x0, %al
callq 0x5b9c0
movq 0x3058(%rsp), %rdi
leaq 0x2010(%rsp), %r8
leaq 0x1b832c(%rip), %rsi    # 0x1d2034
leaq 0x1b9f69(%rip), %rdx    # 0x1d3c78
movl $0x78, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3044(%rsp)
jmp 0x1a172
movl 0x301c(%rsp), %eax
cmpl 0x3050(%rsp), %eax
jne 0x19dc2
leaq 0x1810(%rsp), %rdi
movl 0x301c(%rsp), %edx
movl 0x3050(%rsp), %ecx
leaq 0x1b9e43(%rip), %rsi    # 0x1d3b9f
movb $0x0, %al
callq 0x5b9c0
leaq 0x1010(%rsp), %rdi
leaq 0x1810(%rsp), %rcx
leaq 0x1b8308(%rip), %rsi    # 0x1d2082
leaq 0x1b9f1e(%rip), %rdx    # 0x1d3c9f
movb $0x0, %al
callq 0x5b9c0
movq 0x3058(%rsp), %rdi
leaq 0x1010(%rsp), %r8
leaq 0x1b8295(%rip), %rsi    # 0x1d2034
leaq 0x1b9ed2(%rip), %rdx    # 0x1d3c78
movl $0x7e, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3044(%rsp)
jmp 0x1a172
cmpl $0x2, 0x3034(%rsp)
jge 0x19e3b
leaq 0x810(%rsp), %rdi
leaq 0x1b9e21(%rip), %rsi    # 0x1d3bfc
movb $0x0, %al
callq 0x5b9c0
leaq 0x10(%rsp), %rdi
leaq 0x810(%rsp), %rcx
leaq 0x1b828c(%rip), %rsi    # 0x1d2082
leaq 0x1b9e2f(%rip), %rdx    # 0x1d3c2c
movb $0x0, %al
callq 0x5b9c0
movq 0x3058(%rsp), %rdi
leaq 0x10(%rsp), %r8
leaq 0x1b821c(%rip), %rsi    # 0x1d2034
leaq 0x1b9e59(%rip), %rdx    # 0x1d3c78
movl $0x82, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3044(%rsp)
jmp 0x1a172
movl $0x0, 0x3018(%rsp)
movl 0x3018(%rsp), %eax
movl 0x3034(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1a02f
movq 0x3038(%rsp), %rax
movl 0x3018(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x3038(%rsp), %rax
movslq 0x3018(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3010(%rsp)
movsd 0x3010(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x19f10
jp 0x19f10
jmp 0x19ead
xorl %eax, %eax
movl %eax, %esi
leaq 0x1b9d7e(%rip), %rdx    # 0x1d3c36
leaq 0x1b9db9(%rip), %rcx    # 0x1d3c78
movl $0x88, %r8d
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, 0xc(%rsp)
movq 0x3058(%rsp), %rdi
movl 0xc(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x1b9d4a(%rip), %rdx    # 0x1d3c36
leaq 0x1b9d85(%rip), %rcx    # 0x1d3c78
movl $0x88, %r8d
movb $0x0, %al
callq 0x8540
movl $0x1, 0x3044(%rsp)
jmp 0x1a172
movq 0x3028(%rsp), %rax
movl 0x3018(%rsp), %ecx
addl $0x1, %ecx
imull 0x3024(%rsp), %ecx
addl 0x3020(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x3028(%rsp), %rax
movl 0x3018(%rsp), %ecx
imull 0x3024(%rsp), %ecx
addl 0x3020(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm1
divsd 0x3010(%rsp), %xmm1
movsd 0x3010(%rsp), %xmm0
movsd 0x1b970f(%rip), %xmm2   # 0x1d3688
divsd %xmm2, %xmm0
movq 0x3028(%rsp), %rax
movl 0x3018(%rsp), %ecx
addl $0x1, %ecx
imull 0x3024(%rsp), %ecx
addl 0x301c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm3
movq 0x3028(%rsp), %rax
movl 0x3018(%rsp), %ecx
imull 0x3024(%rsp), %ecx
addl 0x301c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
addsd %xmm2, %xmm2
addsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x3028(%rsp), %rax
movl 0x3018(%rsp), %ecx
imull 0x3024(%rsp), %ecx
addl 0x3050(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x3018(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3018(%rsp)
jmp 0x19e46
movq 0x3038(%rsp), %rax
movl 0x3034(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x3038(%rsp), %rax
movl 0x3034(%rsp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3010(%rsp)
movq 0x3028(%rsp), %rax
movl 0x3034(%rsp), %ecx
subl $0x1, %ecx
imull 0x3024(%rsp), %ecx
addl 0x3020(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x3028(%rsp), %rax
movl 0x3034(%rsp), %ecx
subl $0x2, %ecx
imull 0x3024(%rsp), %ecx
addl 0x3020(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm1
divsd 0x3010(%rsp), %xmm1
movsd 0x3010(%rsp), %xmm0
movsd 0x1b95b0(%rip), %xmm2   # 0x1d3688
divsd %xmm2, %xmm0
movq 0x3028(%rsp), %rax
movl 0x3034(%rsp), %ecx
subl $0x1, %ecx
imull 0x3024(%rsp), %ecx
addl 0x301c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movq 0x3028(%rsp), %rax
movl 0x3034(%rsp), %ecx
subl $0x2, %ecx
imull 0x3024(%rsp), %ecx
addl 0x301c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm3
addsd %xmm2, %xmm2
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x3028(%rsp), %rax
movl 0x3034(%rsp), %ecx
subl $0x1, %ecx
imull 0x3024(%rsp), %ecx
addl 0x3050(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, 0x3044(%rsp)
movl 0x3044(%rsp), %eax
addq $0x3048, %rsp           # imm = 0x3048
retq
nopw %cs:(%rax,%rax)