For C the first approach I would try is just using a general software verification tool. Write a test driver which feeds the two functions two different non-deterministic inputs and assert that their results are the same. A verification tool will attempt to prove that the assertion can not be violated. The yearly software verification competition (SV-COMP) [1] has some very capable tools for verifying C programs. If I remember correctly, SMACK [2] and Ultimate Automizer [3] both do very well over all.
[1] https://sv-comp.sosy-lab.org/2017/index.php
[2] https://github.com/smackers/smack
[3] https://monteverdi.informatik.uni-freiburg.de/tomcat/Website...