Instead of templating the `main` function, check if there exists a function `main` already initialized. If not, then make one and add the module body to it.
Instead of templating the
mainfunction, check if there exists a functionmainalready initialized.If not, then make one and add the module body to it.