#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 /*<<< orphan*/ scanf(char *, int *);
int soru_sor();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  int carpim_sonucu;
  carpim_sonucu = soru_sor();
  int sonsuz_dongu = 0;
  while (sonsuz_dongu < 1) {
    int girilen_cevap;
    printf("Sonuc = ");
    scanf("%d", &girilen_cevap);
    if (girilen_cevap == carpim_sonucu) {
      printf("Cok Guzel Dogru Bildin :)");
      break;
    } else {
      printf("Yanlis Cevap Verdiniz Tekrar Deneyiniz :(\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1070 <soru_sor@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    11d4 <main+0x84>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe6c(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11c3 <main+0x73>
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
jmp    11d4 <main+0x84>
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1080 <soru_sor@plt>
mov    %eax,%ebx
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
lea    0xe72(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1070 <scanf@plt>
cmp    %ebx,0xc(%rsp)
je     11f1 <main+0x91>
lea    0xe78(%rip),%r14
lea    0xe4b(%rip),%r15
lea    0xe4d(%rip),%r12
lea    0xc(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1070 <scanf@plt>
cmp    %ebx,0xc(%rsp)
jne    11d0 <main+0x70>
lea    0xe14(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Sonuc = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Cok Guzel Dogru Bildin :)\00"
@.str.3 = [43 x i8] c"Yanlis Cevap Verdiniz Tekrar Deneyiniz :(\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @time(i32* null)
%6 = call i32 @srand(i32 %5)
%7 = call i32 (...) @soru_sor()
store i32 %7, i32* %2
store i32 0, i32* %3
br label %8
8: ; preds = %21, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %22
19: ; preds = %11
%20 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19
br label %8
22: ; preds = %17, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Sonuc = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Cok Guzel Dogru Bildin :)\00"
@str = [42 x i8] c"Yanlis Cevap Verdiniz Tekrar Deneyiniz :(\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @soru_sor()
%5 = bitcast i32* %1 to i8*
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, %4
br i1 %9, label %16, label %10
10: ; preds = %0, %10
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, %4
br i1 %15, label %16, label %10
16: ; preds = %10, %0
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}