The assembler code to return from a function is:
movl %ebp, %esp
popl %ebp
ret
There is also a leave assembly instruction. It is equivalent to the first two instructions. So you may also see the code for returning from a function as:
leave
ret