#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 n_distinct_prime_factors(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  bool done = false;
  int i, n;
  i = 1;
  while (!done) {
    for (n = 0; n < 4; n++) {
      if (n_distinct_prime_factors(i + n) == 4) {
      } else {
        break;
      }
    }
    if (n == 4) {
      printf("%d\n", i);
      done = true;
    }
    i += n + 1;
  }
  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)
movl   $0x1,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    115a <main+0x3a>
jmp    11cd <main+0xad>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    119c <main+0x7c>
mov    -0x18(%rbp),%edi
add    -0x1c(%rbp),%edi
call   1040 <n_distinct_prime_factors@plt>
cmp    $0x4,%eax
jne    1184 <main+0x64>
jmp    1189 <main+0x69>
jmp    119c <main+0x7c>
jmp    118e <main+0x6e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1161 <main+0x41>
cmpl   $0x4,-0x1c(%rbp)
jne    11bc <main+0x9c>
mov    -0x18(%rbp),%esi
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ebx
jmp    1135 <main+0x15>
nopl   0x0(%rax,%rax,1)
add    %ecx,%ebx
add    $0x1,%ebx
mov    %ebx,%edi
call   1040 <n_distinct_prime_factors@plt>
xor    %ecx,%ecx
cmp    $0x4,%eax
jne    1130 <main+0x10>
lea    0x1(%rbx),%edi
call   1040 <n_distinct_prime_factors@plt>
mov    $0x1,%ecx
cmp    $0x4,%eax
jne    1130 <main+0x10>
lea    0x2(%rbx),%edi
call   1040 <n_distinct_prime_factors@plt>
mov    $0x2,%ecx
cmp    $0x4,%eax
jne    1130 <main+0x10>
lea    0x3(%rbx),%edi
call   1040 <n_distinct_prime_factors@plt>
mov    $0x3,%ecx
cmp    $0x4,%eax
jne    1130 <main+0x10>
lea    0xe80(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
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
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
br label %9
9: ; preds = %35, %2
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br i1 %12, label %13, label %40
13: ; preds = %9
store i32 0, i32* %8
br label %14
14: ; preds = %26, %13
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 4
br i1 %16, label %17, label %29
17: ; preds = %14
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = add nsw i32 %18, %19
%21 = call i32 @n_distinct_prime_factors(i32 %20)
%22 = icmp eq i32 %21, 4
br i1 %22, label %23, label %24
23: ; preds = %17
br label %25
24: ; preds = %17
br label %29
25: ; preds = %23
br label %26
26: ; preds = %25
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %14
29: ; preds = %24, %14
%30 = load i32, i32* %8
%31 = icmp eq i32 %30, 4
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* %7
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %33)
store i32 1, i32* %6
br label %35
35: ; preds = %32, %29
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
%38 = load i32, i32* %7
%39 = add nsw i32 %38, %37
store i32 %39, i32* %7
br label %9
40: ; preds = %9
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 = %19, %2
%4 = phi i32 [ 1, %2 ], [ %22, %19 ]
%5 = tail call i32 @n_distinct_prime_factors(i32 %4)
%6 = icmp eq i32 %5, 4
br i1 %6, label %7, label %19
7: ; preds = %3
%8 = add nuw nsw i32 %4, 1
%9 = tail call i32 @n_distinct_prime_factors(i32 %8)
%10 = icmp eq i32 %9, 4
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = add nuw nsw i32 %4, 2
%13 = tail call i32 @n_distinct_prime_factors(i32 %12)
%14 = icmp eq i32 %13, 4
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = add nuw nsw i32 %4, 3
%17 = tail call i32 @n_distinct_prime_factors(i32 %16)
%18 = icmp eq i32 %17, 4
br i1 %18, label %23, label %19
19: ; preds = %3, %7, %11, %15
%20 = phi i32 [ 0, %3 ], [ 1, %7 ], [ 2, %11 ], [ 3, %15 ]
%21 = add i32 %20, %4
%22 = add i32 %21, 1
br label %3
23: ; preds = %15
%24 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}