#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 main() {
  int minumum, sayici, sayi_limiti, sayi;
  printf("Girdiginiz sayi hem karsilastirilir\nhemde kendinden sonra kac sayi "
         "girilcegini belirler.\n");
  printf("Sayi giriniz:");
  scanf("%d", &minumum);
  if (minumum >= 1) {
    sayi_limiti = minumum;
    for (sayici = 1; sayici <= sayi_limiti; sayici++) {
      printf("Sayi giriniz:");
      scanf("%d", &sayi);
      if (sayi <= minumum) {
        minumum = sayi;
      }
    }
    printf("%d minumum sayidir.", minumum);
  } else {
    printf("Ilk sayi olarak sifir veya Negatif bir sayi girdiniz.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jl     11d7 <main+0xb7>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11c1 <main+0xa1>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ae <main+0x8e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    11b3 <main+0x93>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1172 <main+0x52>
mov    -0x8(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e5 <main+0xc5>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xf1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%ebp
test   %ebp,%ebp
jle    11bc <main+0x8c>
lea    0xe92(%rip),%r14
lea    0xe99(%rip),%r15
lea    0x4(%rsp),%rbx
jmp    1185 <main+0x55>
nopl   0x0(%rax)
add    $0xffffffff,%ebp
je     11ac <main+0x7c>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%esi
cmp    %esi,%eax
jg     1180 <main+0x50>
mov    %eax,(%rsp)
mov    %eax,%esi
jmp    1180 <main+0x50>
lea    0xe5e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11ca <main+0x9a>
lea    0xe62(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [90 x i8] c"Girdiginiz sayi hem karsilastirilir\0Ahemde kendinden sonra kac sayi girilcegini belirler.\0A\00"
@.str.1 = [14 x i8] c"Sayi giriniz:\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [20 x i8] c"%d minumum sayidir.\00"
@.str.4 = [54 x i8] c"Ilk sayi olarak sifir veya Negatif bir sayi girdiniz.\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 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 1
br i1 %10, label %11, label %32
11: ; preds = %0
%12 = load i32, i32* %2
store i32 %12, i32* %4
store i32 1, i32* %3
br label %13
13: ; preds = %26, %11
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %29
17: ; preds = %13
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%20 = load i32, i32* %5
%21 = load i32, i32* %2
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %17
%24 = load i32, i32* %5
store i32 %24, i32* %2
br label %25
25: ; preds = %23, %17
br label %26
26: ; preds = %25
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %13
29: ; preds = %13
%30 = load i32, i32* %2
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %30)
br label %34
32: ; preds = %0
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
br label %34
34: ; preds = %32, %29
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sayi giriniz:\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [20 x i8] c"%d minumum sayidir.\00"
@.str.4 = [54 x i8] c"Ilk sayi olarak sifir veya Negatif bir sayi girdiniz.\00"
@str = [89 x i8] c"Girdiginiz sayi hem karsilastirilir\0Ahemde kendinden sonra kac sayi girilcegini belirler.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %24
10: ; preds = %0, %18
%11 = phi i32 [ %20, %18 ], [ 1, %0 ]
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%14 = load i32, i32* %2
%15 = load i32, i32* %1
%16 = icmp sgt i32 %14, %15
br i1 %16, label %18, label %17
17: ; preds = %10
store i32 %14, i32* %1
br label %18
18: ; preds = %10, %17
%19 = phi i32 [ %15, %10 ], [ %14, %17 ]
%20 = add nuw i32 %11, 1
%21 = icmp eq i32 %11, %8
br i1 %21, label %22, label %10
22: ; preds = %18
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %19)
br label %26
24: ; preds = %0
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
ret i32 0
}