#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int i;
  for (i = 0; i < 65; i++)
    if (i >= 8 && (i & (i - 1)) == 0)
      printf("%d\n", i);
  printf("%d\n", sizeof(size_t));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x41,-0x14(%rbp)
jge    1177 <main+0x67>
cmpl   $0x8,-0x14(%rbp)
jl     1164 <main+0x54>
mov    -0x14(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jne    1164 <main+0x54>
mov    -0x14(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
jmp    1169 <main+0x59>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
lea    0xe82(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
jmp    1128 <main+0x18>
nop
add    $0x1,%ebx
cmp    $0x41,%ebx
je     1172 <main+0x62>
cmp    $0x8,%ebx
jb     1120 <main+0x10>
mov    %ebx,%eax
shr    %eax
and    $0x55555555,%eax
mov    %ebx,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
cmp    $0x1,%eax
ja     1120 <main+0x10>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1120 <main+0x10>
lea    0xe87(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 65
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load i32, i32* %6
%12 = icmp sge i32 %11, 8
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i32, i32* %6
%15 = load i32, i32* %6
%16 = sub nsw i32 %15, 1
%17 = and i32 %14, %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %13
%20 = load i32, i32* %6
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %19, %13, %10
br label %23
23: ; preds = %22
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %7
26: ; preds = %7
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %11
%4 = phi i32 [ 0, %2 ], [ %12, %11 ]
%5 = icmp ugt i32 %4, 7
%6 = tail call i32 @llvm.ctpop.i32(i32 %4)
%7 = icmp ult i32 %6, 2
%8 = and i1 %5, %7
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %11
11: ; preds = %3, %9
%12 = add nuw nsw i32 %4, 1
%13 = icmp eq i32 %12, 65
br i1 %13, label %14, label %3
14: ; preds = %11
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}