Concept Flow - Stack frame setup
Function call
Push return address (LR) onto stack
Push previous frame pointer (FP) onto stack
Set new FP to current SP
Allocate space for local variables by adjusting SP
Function body executes
Restore SP from FP
Pop FP from stack
Pop return address (LR) from stack
Return to caller
This flow shows how a function sets up its stack frame on ARM: saving return address and frame pointer, allocating space, then restoring on return.