title: x86-64 Assembly test - jle
body: <p>This:</p>
  
  <pre><code>testl   %esi, %esi
  jle .L3
  movl    %esi, %eax
  </code></pre>
  
  <p>If <code>testl</code> do a logical AND on <code>esi</code> the result can't never be <em>less</em> but only <em>equals</em>, either if <code>esi</code> is 0. In this way <code>movl</code> can't be reached. It's that true, or I'm missing somethings.</p>
  
  <p>Step two:</p>
  
  <pre><code>f1:
      pushq   %rbp
      movq    %rsp, %rbp
      testl   %esi, %esi
      jle .L3
      movl    %esi, %eax
  .L2:
      incb    (%rdi)
      incq    %rdi
      decq    %rax
      jne .L2
  .L3:
      popq    %rbp
      ret
  </code></pre>
  
  <p>In a hypothetical C translation if <code>.L3</code> consists of <code>pop</code> then <code>ret</code> and the branch take place it's possible to determine the value returned by the function?</p>