#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 */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double difftime(int /*<<< orphan*/, int /*<<< orphan*/);
int mukemmel_sayi_bul(int);
int /*<<< orphan*/ mukemmel_sayi_yazdir(int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int mukemmel_sayi;
  time_t baslangic;
  time_t son;
  time(&baslangic);
  for (mukemmel_sayi = 1; mukemmel_sayi <= 100000; mukemmel_sayi++) {
    int sonuc;
    sonuc = mukemmel_sayi_bul(mukemmel_sayi);
    if (sonuc == 1) {
      mukemmel_sayi_yazdir(mukemmel_sayi);
    }
  }
  time(&son);
  printf("***Programin toplam suresi*** = %.3f", difftime(son, baslangic));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <time@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x186a0,-0x8(%rbp)
jg     11ac <main+0x5c>
mov    -0x8(%rbp),%edi
call   1060 <mukemmel_sayi_bul@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1199 <main+0x49>
mov    -0x8(%rbp),%edi
call   1070 <mukemmel_sayi_yazdir@plt>
jmp    119e <main+0x4e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116f <main+0x1f>
lea    -0x10(%rbp),%rdi
call   1050 <time@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <difftime@plt>
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
call   1050 <time@plt>
mov    $0x1,%ebx
jmp    117b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x186a1,%ebx
je     1190 <main+0x40>
mov    %ebx,%edi
call   1060 <mukemmel_sayi_bul@plt>
cmp    $0x1,%eax
jne    1170 <main+0x20>
mov    %ebx,%edi
call   1070 <mukemmel_sayi_yazdir@plt>
jmp    1170 <main+0x20>
lea    0x8(%rsp),%rdi
call   1050 <time@plt>
mov    0x8(%rsp),%edi
mov    0xc(%rsp),%esi
call   1040 <difftime@plt>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"***Programin toplam suresi*** = %.3f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @time(i32* %3)
store i32 1, i32* %2
br label %7
7: ; preds = %19, %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 100000
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = load i32, i32* %2
%12 = call i32 @mukemmel_sayi_bul(i32 %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i32, i32* %2
%17 = call i32 @mukemmel_sayi_yazdir(i32 %16)
br label %18
18: ; preds = %15, %10
br label %19
19: ; preds = %18
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %7
22: ; preds = %7
%23 = call i32 @time(i32* %4)
%24 = load i32, i32* %4
%25 = load i32, i32* %3
%26 = call double @difftime(i32 %24, i32 %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"***Programin toplam suresi*** = %.3f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @time(i32* %1)
br label %6
6: ; preds = %0, %12
%7 = phi i32 [ 1, %0 ], [ %13, %12 ]
%8 = call i32 @mukemmel_sayi_bul(i32 %7)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 @mukemmel_sayi_yazdir(i32 %7)
br label %12
12: ; preds = %10, %6
%13 = add nuw nsw i32 %7, 1
%14 = icmp eq i32 %13, 100001
br i1 %14, label %15, label %6
15: ; preds = %12
%16 = call i32 @time(i32* %2)
%17 = load i32, i32* %2
%18 = load i32, i32* %1
%19 = call double @difftime(i32 %17, i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %19)
ret i32 0
}