Source code of C-code generator is available here