how to initialize the stack pointer register in main c program
But with some processors (for example the Cortex-M3), the setup of the stack pointer etc can be done without any assembler involved. But that is covered in the documentation for the specific processor.
Another thing is that a processor can have multiple stacks, so main() may configure at least some of the stacks depending on processor and protection modes.