cookast: catch empty function definitions
codegen: fix prototype of memcpy
codegen: start migrating out of C functions for arith ops

Fix the failing tests, then tackle the cmp ops.