// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movsd %xmm0, -0x28(%rbp)
movq %rdi, %rbx
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x20(%rbp)
movsd %xmm1, -0x30(%rbp)
xorl %esi, %esi
callq 0x1c982
movsd (%rax), %xmm0
movsd -0x28(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jae 0x1bae6
movq %rbx, %rdi
callq 0x126f4
leaq -0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x1c982
movsd -0x28(%rbp), %xmm0
ucomisd (%rax), %xmm0
jae 0x1bae6
leaq 0x18(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x1c982
movsd (%rax), %xmm0
ucomisd -0x20(%rbp), %xmm0
jae 0x1bbc3
movq %r14, %rdi
callq 0x126f4
leaq -0x1(%rax), %rsi
movq %r14, %rdi
callq 0x1c982
movsd -0x20(%rbp), %xmm0
ucomisd (%rax), %xmm0
jae 0x1bbc3
leaq 0x48(%rbx), %rsi
leaq 0x60(%rbx), %rdx
leaq 0x78(%rbx), %rcx
leaq -0x38(%rbp), %r8
leaq -0x30(%rbp), %r9
movq %rbx, %rdi
callq 0x1bcd8
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1e0(%rbp), %rdi
callq 0x4250
leaq -0x1d0(%rbp), %rdi
leaq 0x822b(%rip), %rsi      # 0x23d2b
callq 0x4360
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1c982
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x45f0
leaq 0x7eb0(%rip), %rsi      # 0x239d5
movq %rax, %rdi
callq 0x4360
movq %rax, %rdi
movsd -0x28(%rbp), %xmm0
callq 0x45f0
leaq 0x7e94(%rip), %rsi      # 0x239d5
movq %rax, %rdi
callq 0x4360
movq %rax, %r14
movq %rbx, %rdi
callq 0x126f4
leaq -0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x1c982
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x45f0
leaq 0x7806(%rip), %rsi      # 0x23379
movq %rax, %rdi
callq 0x4360
pushq $0x10
popq %rdi
callq 0x41b0
movq %rax, %r14
leaq -0x58(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x4350
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %r14, %rdi
callq 0x4510
xorl %r15d, %r15d
movq 0x1e441(%rip), %rsi     # 0x39ff0
movq 0x1e3ea(%rip), %rdx     # 0x39fa0
movq %r14, %rdi
callq 0x4560
jmp 0x1bc9b
leaq -0x1e0(%rbp), %rdi
callq 0x4250
leaq -0x1d0(%rbp), %rdi
leaq 0x818a(%rip), %rsi      # 0x23d67
callq 0x4360
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1c982
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x45f0
leaq 0x7dd3(%rip), %rsi      # 0x239d5
movq %rax, %rdi
callq 0x4360
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x45f0
leaq 0x7db7(%rip), %rsi      # 0x239d5
movq %rax, %rdi
callq 0x4360
movq %rax, %rbx
movq %r14, %rdi
callq 0x126f4
leaq -0x1(%rax), %rsi
movq %r14, %rdi
callq 0x1c982
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x45f0
leaq 0x7729(%rip), %rsi      # 0x23379
movq %rax, %rdi
callq 0x4360
pushq $0x10
popq %rdi
callq 0x41b0
movq %rax, %r14
leaq -0x58(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x4350
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %r14, %rdi
callq 0x4510
xorl %r15d, %r15d
movq 0x1e364(%rip), %rsi     # 0x39ff0
movq 0x1e30d(%rip), %rdx     # 0x39fa0
movq %r14, %rdi
callq 0x4560
jmp 0x1bc9f
jmp 0x1bcb2
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x41a0
testb %r15b, %r15b
jne 0x1bcb5
jmp 0x1bcc4
movq %rax, %rbx
movq %r14, %rdi
callq 0x4270
jmp 0x1bcc4
jmp 0x1bcc1
movq %rax, %rbx
leaq -0x1e0(%rbp), %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x45a0