sub $0x10,%rsp
allocates space on the stack, it’s the same as doing pushq 0
twice except that the value in the allocated stack space will not necessarily be zero, but this is ok since the mov
instructions used later replace the garbage with real data.
As Michael rightly stated the mov $0x0,%eax
is because printf
(as well as any other varargs function) takes the number of arguments in rax
.
solved I need help understanding what some instructions mean