#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 *, long long);
int prop(long long);
int three(long long, int);
int main(int argc, char *argv[]) {
  long long n;
  long long k = 1406357289;
  printf("%d\n", three(k, 8));
  printf("%d\n", prop(k));
  for (n = 0; n < 9999999999ll; n++) {
    if (prop(n)) {
      printf("%lld\n", n);
    }
  }
  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)
movq   $0x53d34f29,-0x20(%rbp)
53
mov    -0x20(%rbp),%rdi
mov    $0x8,%esi
call   1040 <three@plt>
movslq %eax,%rsi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1050 <prop@plt>
movslq %eax,%rsi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x18(%rbp)
movabs $0x2540be3ff,%rax
cmp    %rax,-0x18(%rbp)
jge    11d7 <main+0xa7>
mov    -0x18(%rbp),%rdi
call   1050 <prop@plt>
cmp    $0x0,%eax
je     11c1 <main+0x91>
mov    -0x18(%rbp),%rsi
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0x96>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    118b <main+0x5b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x53d34f29,%edi
mov    $0x8,%esi
call   1040 <three@plt>
movslq %eax,%rsi
lea    0xeb2(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x53d34f29,%edi
call   1050 <prop@plt>
movslq %eax,%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %ebx,%ebx
movabs $0x2540be3ff,%r15
lea    0xe86(%rip),%r14
jmp    1189 <main+0x59>
add    $0x1,%rbx
cmp    %r15,%rbx
je     11a2 <main+0x72>
mov    %rbx,%rdi
call   1050 <prop@plt>
test   %eax,%eax
je     1180 <main+0x50>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1180 <main+0x50>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

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