#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*/ assert(int /*<<< orphan*/);
scalar_t__ init_test();
int /*<<< orphan*/ print_for(int);
int main() {
  assert(init_test() == 0 && "Could not initialize.");
  for (size_t fs_bits = 12; fs_bits < 28; ++fs_bits) {
    print_for(1 << fs_bits);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init_test@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    1162 <main+0x32>
mov    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    1162 <main+0x32>
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movq   $0xc,-0x10(%rbp)
cmpq   $0x1c,-0x10(%rbp)
jae    11a5 <main+0x75>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%edi
shl    %cl,%edi
call   1030 <print_for@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1177 <main+0x47>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_test@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x1000,%edi
call   1030 <print_for@plt>
mov    $0x2000,%edi
call   1030 <print_for@plt>
mov    $0x4000,%edi
call   1030 <print_for@plt>
mov    $0x8000,%edi
call   1030 <print_for@plt>
mov    $0x10000,%edi
call   1030 <print_for@plt>
mov    $0x20000,%edi
call   1030 <print_for@plt>
mov    $0x40000,%edi
call   1030 <print_for@plt>
mov    $0x80000,%edi
call   1030 <print_for@plt>
mov    $0x100000,%edi
call   1030 <print_for@plt>
mov    $0x200000,%edi
call   1030 <print_for@plt>
mov    $0x400000,%edi
call   1030 <print_for@plt>
mov    $0x800000,%edi
call   1030 <print_for@plt>
mov    $0x1000000,%edi
call   1030 <print_for@plt>
mov    $0x2000000,%edi
call   1030 <print_for@plt>
mov    $0x4000000,%edi
call   1030 <print_for@plt>
mov    $0x8000000,%edi
call   1030 <print_for@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Could not initialize.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 (...) @init_test()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
%7 = phi i1 [ false, %0 ], [ true, %5 ]
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
store i64 12, i64* %2
br label %10
10: ; preds = %18, %6
%11 = load i64, i64* %2
%12 = icmp ult i64 %11, 28
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i64, i64* %2
%15 = trunc i64 %14 to i32
%16 = shl i32 1, %15
%17 = call i32 @print_for(i32 %16)
br label %18
18: ; preds = %13
%19 = load i64, i64* %2
%20 = add i64 %19, 1
store i64 %20, i64* %2
br label %10
21: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @init_test()
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @print_for(i32 4096)
%6 = tail call i32 @print_for(i32 8192)
%7 = tail call i32 @print_for(i32 16384)
%8 = tail call i32 @print_for(i32 32768)
%9 = tail call i32 @print_for(i32 65536)
%10 = tail call i32 @print_for(i32 131072)
%11 = tail call i32 @print_for(i32 262144)
%12 = tail call i32 @print_for(i32 524288)
%13 = tail call i32 @print_for(i32 1048576)
%14 = tail call i32 @print_for(i32 2097152)
%15 = tail call i32 @print_for(i32 4194304)
%16 = tail call i32 @print_for(i32 8388608)
%17 = tail call i32 @print_for(i32 16777216)
%18 = tail call i32 @print_for(i32 33554432)
%19 = tail call i32 @print_for(i32 67108864)
%20 = tail call i32 @print_for(i32 134217728)
ret i32 0
}