Hi.
How can I find some ready tool or how can I find a proper way to
develop a tool which will convert such code:

if (a>b+2+2)
{
f1();
f2(a*3*2);} else
{
f1();
f3(a);}

To something like that:

f1();
if (a>b+4)
f2(a*6)
else
f3(a);

In another words, this is what is done by modern compiler at
optimization phase, right? (that's why I post here) But I need to have
C-source at the input and C-source at the output. Could please anyone
point me to any ideas or ready works.