#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 *, int);
int main() {
  int asal, index;
  bool kontrol = false;
  for (asal = 2; asal < 100; asal++) {
    for (index = 2; index < asal; index++) {
      if (asal % index == 0) {
        kontrol = true;
        break;
      }
    }
    if (kontrol) {
      kontrol = false;
      continue;
    } else {
      printf("%d bir asal sayidir.\n", asal);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11b1 <main+0xa1>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1179 <main+0x69>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1166 <main+0x56>
movl   $0x1,-0x10(%rbp)
jmp    1179 <main+0x69>
jmp    116b <main+0x5b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113e <main+0x2e>
cmpl   $0x0,-0x10(%rbp)
je     118f <main+0x7f>
movl   $0x0,-0x10(%rbp)
jmp    11a3 <main+0x93>
mov    -0x8(%rbp),%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
jmp    11a3 <main+0x93>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x2,%ebx
xor    %r15d,%r15d
lea    0xedc(%rip),%r14
jmp    1146 <main+0x36>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
add    $0xffffffff,%r15d
cmp    $0x64,%ebx
je     1168 <main+0x58>
cmp    $0x3,%ebx
jb     1130 <main+0x20>
mov    $0x2,%ecx
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
test   %edx,%edx
je     113a <main+0x2a>
add    $0x1,%ecx
lea    (%r15,%rcx,1),%eax
cmp    $0x2,%eax
jne    1150 <main+0x40>
jmp    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

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