john, the arduino hides main(), under the cover is this code:
int main(void)
{
init();
setup();
for (;;)
loop();
return 0;
}
The user is expected to provide the setup and loop functions. The implimentation for the init function can be found in wiring.c This along with the other Arduino core source code files are in the directory: hardware/cores/arduino