/* fls.c */

#include <assert.h>
#include <sys/builtin.h>

int main (void)
{
  int i;

  assert (__fls (0) == 0);
  assert (__fls (-1) == 32);
  for (i = 0; i < 32; ++i)
    assert (__fls (1 << i) == i + 1);
  assert (__fls (6) == 3);
  return 0;
}
