#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 */
scalar_t__ enable(int);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ search(int, int, int, int, int, int);
int main(void) {
  int count = 0;
  int i = 0;
  for (i = 0; i < (1 << 5 * 5); i++) {
    if (enable(i) > 0) {
      if (search(i, 1 << (5 * 5 - 1), 3, 1, 1, 1) > 0)
        count++;
    }
  }
  printf("%d", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2000000,-0xc(%rbp)
jge    11bc <main+0x8c>
mov    -0xc(%rbp),%edi
call   1050 <enable@plt>
cmp    $0x0,%rax
jle    11a9 <main+0x79>
mov    -0xc(%rbp),%edi
mov    $0x1000000,%esi
mov    $0x3,%edx
mov    $0x1,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1040 <search@plt>
cmp    $0x0,%rax
jle    11a4 <main+0x74>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a9 <main+0x79>
jmp    11ae <main+0x7e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <main+0x24>
mov    -0x8(%rbp),%esi
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    114b <main+0x1b>
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x2000000,%ebx
je     1185 <main+0x55>
mov    %ebx,%edi
call   1050 <enable@plt>
test   %rax,%rax
jle    1140 <main+0x10>
mov    %ebx,%edi
mov    $0x1000000,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <search@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
add    %ecx,%ebp
jmp    1140 <main+0x10>
lea    0xe74(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %11
%2 = phi i32 [ 0, %0 ], [ %13, %11 ]
%3 = phi i32 [ 0, %0 ], [ %12, %11 ]
%4 = tail call i64 @enable(i32 %2)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = tail call i64 @search(i32 %2, i32 16777216, i32 3, i32 1, i32 1, i32 1)
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
%10 = add nsw i32 %3, %9
br label %11
11: ; preds = %6, %1
%12 = phi i32 [ %3, %1 ], [ %10, %6 ]
%13 = add nuw nsw i32 %2, 1
%14 = icmp eq i32 %13, 33554432
br i1 %14, label %15, label %1
15: ; preds = %11
%16 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}