#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 */
double CLOCKS_PER_SEC;
double clock();
scalar_t__ is_concjecture_find(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  double start, end;
  unsigned int number = 3;
  printf("Algorithm Starts, please wait...\n");
  start = clock();
  while (is_concjecture_find(number)) {
    number += 2;
  }
  end = clock();
  printf("Algorithm end.\n");
  printf("%d\n", number);
  printf("Total time: %f\n", (end - start) / CLOCKS_PER_SEC);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x24(%rbp)
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x24(%rbp),%edi
call   1050 <is_concjecture_find@plt>
cmp    $0x0,%rax
je     1187 <main+0x57>
mov    -0x24(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x24(%rbp)
jmp    1167 <main+0x37>
mov    $0x0,%al
call   1030 <clock@plt>
movsd  %xmm0,-0x20(%rbp)
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    0x2e25(%rip),%rax
divsd  (%rax),%xmm0
lea    0xe68(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <clock@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x2,%ebx
mov    %ebx,%edi
call   1060 <is_concjecture_find@plt>
test   %rax,%rax
jne    1170 <main+0x30>
xor    %eax,%eax
call   1040 <clock@plt>
movsd  %xmm0,(%rsp)
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
lea    0xe62(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
mov    0x2e2f(%rip),%rax
divsd  (%rax),%xmm0
lea    0xe40(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Algorithm Starts, please wait...\0A\00"
@.str.1 = [16 x i8] c"Algorithm end.\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [16 x i8] c"Total time: %f\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%10 = call double (...) @clock()
store double %10, double* %6
br label %11
11: ; preds = %15, %2
%12 = load i32, i32* %8
%13 = call i64 @is_concjecture_find(i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %8
%17 = add i32 %16, 2
store i32 %17, i32* %8
br label %11
18: ; preds = %11
%19 = call double (...) @clock()
store double %19, double* %7
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %8
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %21)
%23 = load double, double* %7
%24 = load double, double* %6
%25 = fsub double %23, %24
%26 = load double, double* @CLOCKS_PER_SEC
%27 = fdiv double %25, %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double %27)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [16 x i8] c"Total time: %f\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@str = [33 x i8] c"Algorithm Starts, please wait...\00"
@str.4 = [15 x i8] c"Algorithm end.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%4 = tail call double (...) @clock()
br label %5
5: ; preds = %5, %2
%6 = phi i32 [ 3, %2 ], [ %9, %5 ]
%7 = tail call i64 @is_concjecture_find(i32 %6)
%8 = icmp eq i64 %7, 0
%9 = add i32 %6, 2
br i1 %8, label %10, label %5
10: ; preds = %5
%11 = tail call double (...) @clock()
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.4, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%14 = fsub double %11, %4
%15 = load double, double* @CLOCKS_PER_SEC
%16 = fdiv double %14, %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double %16)
ret i32 0
}