msproul/Arduino-stk500v2-bootloader — comment on commit f157d7234c2ff679057861c40deab5aecaa471b1
File:  line 0
By WestfW:

You know you're now setting the stack up twice. Once here, and once in __jumpMain()
This one will reset the stack pointer after main() has pushed stuff on the old stack, effectively discarding it.
(consider using __attribute__((OS_main)) for main())