export a function from gnu assembly to c++