// File: ingowald[P]closestSurfacePointQueries/examples/benchmark.cpp
// Function: loadDennis(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void loadDennis(const std::string &fileName)
{
  FILE *file = fopen(fileName.c_str(),"r");
  if (!file) throw std::runtime_error("could not open "+fileName);

  for (int i=0;i<point_x.size();i++) {
    double s;
    if (fscanf(file,"%lf\n",&s) != 1)
      throw std::runtime_error("could not read dennis result from "+fileName);
    dennis_dist.push_back(s);
  }
  std::cout << "loaded " << dennis_dist.size() << " reference distances" << std::endl;
  fclose(file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x30f0
movq %rax, %rdi
leaq 0xcb0e(%rip), %rsi      # 0x11040
callq 0x3300
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x45d6
movb $0x1, -0x3d(%rbp)
movl $0x10, %edi
callq 0x3130
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rdx
leaq 0xcadf(%rip), %rsi      # 0x11042
leaq -0x30(%rbp), %rdi
callq 0x5b70
jmp 0x456e
movq -0x80(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3390
jmp 0x457d
movq -0x80(%rbp), %rdi
movb $0x0, -0x3d(%rbp)
movq 0x13a64(%rip), %rsi     # 0x17ff0
movq 0x13a35(%rip), %rdx     # 0x17fc8
callq 0x33c0
jmp 0x474e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x45c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3180
testb $0x1, -0x3d(%rbp)
jne 0x45c8
jmp 0x45d1
movq -0x80(%rbp), %rdi
callq 0x31d0
jmp 0x4745
movl $0x0, -0x44(%rbp)
movslq -0x44(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x13c81(%rip), %rdi     # 0x18270
callq 0x5e60
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0x46e0
movq -0x10(%rbp), %rdi
leaq 0xcb4e(%rip), %rsi      # 0x11160
leaq -0x50(%rbp), %rdx
movb $0x0, %al
callq 0x3420
cmpl $0x1, %eax
je 0x46c2
movb $0x1, -0x71(%rbp)
movl $0x10, %edi
callq 0x3130
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rdx
leaq 0xcb5a(%rip), %rsi      # 0x111a0
leaq -0x70(%rbp), %rdi
callq 0x5b70
jmp 0x4651
movq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3390
jmp 0x4663
movq -0x90(%rbp), %rdi
movb $0x0, -0x71(%rbp)
movq 0x1397b(%rip), %rsi     # 0x17ff0
movq 0x1394c(%rip), %rdx     # 0x17fc8
callq 0x33c0
jmp 0x474e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x46a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3180
testb $0x1, -0x71(%rbp)
jne 0x46b1
jmp 0x46bd
movq -0x90(%rbp), %rdi
callq 0x31d0
jmp 0x4745
leaq 0x13d3f(%rip), %rdi     # 0x18408
leaq -0x50(%rbp), %rsi
callq 0x5df0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x45dd
movq 0x138e9(%rip), %rdi     # 0x17fd0
leaq 0xca0b(%rip), %rsi      # 0x110f9
callq 0x3260
movq %rax, -0x98(%rbp)
leaq 0x13d07(%rip), %rdi     # 0x18408
callq 0x5e60
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x3080
movq %rax, %rdi
leaq 0xca6c(%rip), %rsi      # 0x1118b
callq 0x3260
movq %rax, %rdi
movq 0x1388a(%rip), %rsi     # 0x17fb8
callq 0x32a0
movq -0x10(%rbp), %rdi
callq 0x3270
addq $0xa0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x33e0
nop