For C code, you can use existing C profiling tools. It will not reflect the performances you will get on a real device but it should still be useful to make your game perform better.
On macOS, I like to use Apple Instruments to measure CPU usage and check for memory leaks.
For example, here is the CPU usage of my game (search for "pd_update", it's where your code is called):