gcc -O0 -c -mabm -mbmi retard.c -o retard.o
           ^
           |
           |
           |

int code(unsigned long long number) {
    return (int) _tzcnt_u64(number);
}

objdump --disassemble-all retard.o

0000000000000000 <code>:
   0:   55                      push   %rbp
   1:   48 89 e5                mov    %rsp,%rbp
   4:   48 83 ec 10             sub    $0x10,%rsp
   8:   48 89 4d 10             mov    %rcx,0x10(%rbp)
   c:   48 8b 45 10             mov    0x10(%rbp),%rax
  10:   48 89 45 f8             mov    %rax,-0x8(%rbp)
  14:   31 c0                   xor    %eax,%eax
  16:   f3 48 0f bc 45 f8       tzcnt  -0x8(%rbp),%rax
 <---------------------
  1c:   48 83 c4 10             add    $0x10,%rsp
  20:   5d                      pop    %rbp

Moron.

Reply via email to