// File: /workspace/github_cpp_makefile_star2_O3/TBody[P]atomicpp/atomicpp/Spline/BivariateBSpline.cpp
// Function: atomicpp::BivariateBSpline::call0D(double, double)
double BivariateBSpline::call0D(const double eval_x, const double eval_y){
  
  // Bounds checking -- make sure you haven't dropped off the end of the array
  if ((eval_x <= x_values.at(0)) or (eval_x >= x_values.at(x_values.size()-1))){
    // An easy error to make is supplying the function arguments already having taken the log10
    std::stringstream errMsg;
    errMsg << "BivariateBSpline call0D error: X value off grid - require (" << x_values.at(0) << " < " << eval_x << " < " << x_values.at(x_values.size()-1) << ")";
    throw std::runtime_error(errMsg.str());
  };
  if ((eval_y <= y_values.at(0)) or (eval_y >= y_values.at(y_values.size()-1))){
    // An easy error to make is supplying the function arguments already having taken the log10
    std::stringstream errMsg;
    errMsg << "BivariateBSpline call0D error: Y value off grid - require (" << y_values.at(0) << " < " << eval_y << " < " << y_values.at(y_values.size()-1) << ")";
    throw std::runtime_error(errMsg.str());
  };

  // __CALL__ BBSpline
  double eval_coeff = bispeu(tx,ty,C,eval_x,eval_y);

  return eval_coeff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movsd %xmm0, -0x20(%rbp)
movq %rdi, %rbx
movsd %xmm0, -0x50(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm1, -0x48(%rbp)
xorl %esi, %esi
callq 0x1d102
movsd (%rax), %xmm0
movsd -0x20(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jae 0x1c1dc
movq %rbx, %rdi
callq 0x12b22
leaq -0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x1d102
movsd -0x20(%rbp), %xmm0
ucomisd (%rax), %xmm0
jae 0x1c1dc
leaq 0x18(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x1d102
movsd (%rax), %xmm0
ucomisd -0x18(%rbp), %xmm0
jae 0x1c2b5
movq %r14, %rdi
callq 0x12b22
leaq -0x1(%rax), %rsi
movq %r14, %rdi
callq 0x1d102
movsd -0x18(%rbp), %xmm0
ucomisd (%rax), %xmm0
jae 0x1c2b5
leaq 0x48(%rbx), %rsi
leaq 0x60(%rbx), %rdx
leaq 0x78(%rbx), %rcx
leaq -0x50(%rbp), %r8
leaq -0x48(%rbp), %r9
movq %rbx, %rdi
callq 0x1c3d2
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x1d8(%rbp), %rdi
callq 0x4250
leaq -0x1c8(%rbp), %rdi
leaq 0x8b35(%rip), %rsi      # 0x24d2b
callq 0x4360
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1d102
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x45f0
leaq 0x87ba(%rip), %rsi      # 0x249d5
movq %rax, %rdi
callq 0x4360
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x45f0
leaq 0x879e(%rip), %rsi      # 0x249d5
movq %rax, %rdi
callq 0x4360
movq %rax, %r14
movq %rbx, %rdi
callq 0x12b22
leaq -0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x1d102
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x45f0
leaq 0x8110(%rip), %rsi      # 0x24379
movq %rax, %rdi
callq 0x4360
movl $0x10, %edi
callq 0x41b0
movq %rax, %r14
leaq -0x40(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x4350
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x4510
movq 0x1ed4f(%rip), %rsi     # 0x3aff0
movq 0x1ecf8(%rip), %rdx     # 0x3afa0
movq %r14, %rdi
callq 0x4560
jmp 0x1c389
leaq -0x1d8(%rbp), %rdi
callq 0x4250
leaq -0x1c8(%rbp), %rdi
leaq 0x8a98(%rip), %rsi      # 0x24d67
callq 0x4360
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1d102
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x45f0
leaq 0x86e1(%rip), %rsi      # 0x249d5
movq %rax, %rdi
callq 0x4360
movq %rax, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x45f0
leaq 0x86c5(%rip), %rsi      # 0x249d5
movq %rax, %rdi
callq 0x4360
movq %rax, %rbx
movq %r14, %rdi
callq 0x12b22
leaq -0x1(%rax), %rsi
movq %r14, %rdi
callq 0x1d102
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x45f0
leaq 0x8037(%rip), %rsi      # 0x24379
movq %rax, %rdi
callq 0x4360
movl $0x10, %edi
callq 0x41b0
movq %rax, %r14
leaq -0x40(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x4350
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x4510
movq 0x1ec76(%rip), %rsi     # 0x3aff0
movq 0x1ec1f(%rip), %rdx     # 0x3afa0
movq %r14, %rdi
callq 0x4560
jmp 0x1c38d
jmp 0x1c39b
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x41a0
jmp 0x1c3bd
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x41a0
jmp 0x1c3ae
jmp 0x1c3ab
movq %rax, %rbx
movq %r14, %rdi
callq 0x4270
jmp 0x1c3bd
jmp 0x1c3ba
movq %rax, %rbx
leaq -0x1d8(%rbp), %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x45a0
nop