construct new function

What are the steps to construct a function of some basic blocks without any arguments and void return with new control flow graph that is different from the original function

thanks

Rasha Salah Omar
Msc Student at E-JUST
Demonestrator at Faculty of Computers and Informatics
Benha University