main function is generated by inserting some bootstrap codegen now.