How does IDE2 compile multiple in files

That explained how the double ino situation is compiled but I did not find how it gets from setup() and loop() to main.c

Where is that explained? Maybe I just missed it.
Thanks.