Where is app_main() called on the ESP32 (ESP-IDF)?

app_main() is called from the FreeRTOS main_task() in port_common.c().

For version 4.4.1 of the ESP-IDF, this is the link to the location where it is called.