title: Why do all C functions converted to assembler start and end with some identical operations?
body: <p>When I compile a simple C code into assembler (x86-64 under gcc, but it doesn't matter), the labels corresponding to the C functions each have the same construction :</p>
  
  <pre><code>void foo() {
  
  }
  </code></pre>
  
  <p>Is compiled in :</p>
  
  <pre><code>foo:
          push    rbp
          mov     rbp, rsp
          nop
          pop     rbp
          ret
  </code></pre>
  
  <p>Why? This function does nothing. I thought I understood that these assembler instructions are "stack pointers". But I still don't grasp their uses in the program. Could you explain that to me?</p>