C-code auto-generation functionality