Need help on getting a while loop statement body

For example ,

while (a > 3) {

cout << “hello” << endl;

}

Will become

while (a>3){

goto label1;

}

label1:

cout << “hello” <<endl;

So i would need to take out the body of the loop and put it outside.

The reason i need to do this : control Flow Flattening