Finally a simple function call works. Needs more cleanup for temp stack size and code generated