Some quick assembly language notes required for the following. You'll need to understand three registers on the Intel CPU.
First, the rip register. On a 16-bit CPU, it's called IP (for Instruction Pointer), and on a 32-bit CPU, it's called eip (for extended instruction pointer), but on a 64-bit modern processor, it's called rip. It holds the index (or offset or number) of the memory location where the CPU is currently executing instructions from. As it reads instructions from memory, it increments to get to the next instruction and so on. Some instructions can cause it to jump to a non-sequential read, such as a branch, jump, call, or return, for example. You can also write to it directly but this is rarely done in practice.
Second, the rsp register (also sp on 16-bit and esp on 32-bit) is the stack pointer. It points to the top of the stack. The stack grows downward. In other words, if the rsp points to memory address 10000 and you push a 32-bit number (4 bytes) onto the stack, then afterward