I am currently reading CSAPP and I came across this figure, but there is something I just cannot figure out
In line 1, stack pointer is decremented by 16 and two 8-byte numbers are stored in the stack 0 and 8 byte relative to stack pointer separately, but in line 7, the return address of swap_add is pushed onto the stack, so the stack should look like this now:
And my question is: why in line 8 and 9, the stack pointer is still able to retrieve the correct value from offset 0 and 8? From what I understand, the stack pointer now points to the return address, so in order to get the value back it should be (%rsp), %rsi and 16(%rsp), %rdx, or doesn't the return address be pushed onto the stack? Please explain to me why it works this way, thank you