cpp because of stupid name mangling problems that prevent ccall from seeing the anneal function, stupid C++, grr