#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 sayi, sayi_adeti, yildiz_sayisi;
  for (sayi_adeti = 1; sayi_adeti <= 5; sayi_adeti++) {
    printf("Basilacak olan yildizlarin sayisini giriniz(1-30 arasi):");
    scanf("%d", &sayi);
    if (sayi >= 1 && sayi <= 30) {
      printf("%d\t", sayi);
      for (yildiz_sayisi = 1; yildiz_sayisi <= sayi; yildiz_sayisi++) {
        printf("*");
      }
      printf("\n");
    } else {
      printf("1-30 arasi bir sayi giriniz.\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jg     11e6 <main+0xc6>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jl     11c5 <main+0xa5>
cmpl   $0x1e,-0x8(%rbp)
jg     11c5 <main+0xa5>
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11b2 <main+0x92>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    118a <main+0x6a>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d3 <main+0xb3>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0x1d,%eax
ja     11af <main+0x6f>
lea    0xec5(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11a3 <main+0x63>
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1190 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11bb <main+0x7b>
lea    0xe8a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe69(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0x1e,%eax
jae    121f <main+0xdf>
lea    0xe4f(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1213 <main+0xd3>
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1200 <main+0xc0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    122b <main+0xeb>
lea    0xe1a(%rip),%rdi
call   1040 <puts@plt>
lea    0xdce(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdf9(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0x1e,%eax
jae    128f <main+0x14f>
lea    0xddf(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1283 <main+0x143>
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1270 <main+0x130>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    129b <main+0x15b>
lea    0xdaa(%rip),%rdi
call   1040 <puts@plt>
lea    0xd5e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd89(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0x1e,%eax
jae    12ff <main+0x1bf>
lea    0xd6f(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    12f3 <main+0x1b3>
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     12e0 <main+0x1a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    130b <main+0x1cb>
lea    0xd3a(%rip),%rdi
call   1040 <puts@plt>
lea    0xcee(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd19(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0x1e,%eax
jae    136f <main+0x22f>
lea    0xcff(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1363 <main+0x223>
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1350 <main+0x210>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    137b <main+0x23b>
lea    0xcca(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [57 x i8] c"Basilacak olan yildizlarin sayisini giriniz(1-30 arasi):\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\09\00"
@.str.3 = [2 x i8] c"*\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [30 x i8] c"1-30 arasi bir sayi giriniz.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %3
br label %5
5: ; preds = %33, %0
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 5
br i1 %7, label %8, label %36
8: ; preds = %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %30
13: ; preds = %8
%14 = load i32, i32* %2
%15 = icmp sle i32 %14, 30
br i1 %15, label %16, label %30
16: ; preds = %13
%17 = load i32, i32* %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %17)
store i32 1, i32* %4
br label %19
19: ; preds = %25, %16
%20 = load i32, i32* %4
%21 = load i32, i32* %2
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %23
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %19
28: ; preds = %19
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %32
30: ; preds = %13, %8
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
br label %33
33: ; preds = %32
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %5
36: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [57 x i8] c"Basilacak olan yildizlarin sayisini giriniz(1-30 arasi):\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\09\00"
@str = [29 x i8] c"1-30 arasi bir sayi giriniz.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add i32 %5, -1
%7 = icmp ult i32 %6, 30
br i1 %7, label %8, label %20
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 1
br i1 %11, label %18, label %12
12: ; preds = %8, %12
%13 = phi i32 [ %15, %12 ], [ 1, %8 ]
%14 = call i32 @putchar(i32 42)
%15 = add nuw nsw i32 %13, 1
%16 = load i32, i32* %1
%17 = icmp slt i32 %13, %16
br i1 %17, label %12, label %18
18: ; preds = %12, %8
%19 = call i32 @putchar(i32 10)
br label %22
20: ; preds = %0
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %22
22: ; preds = %18, %20
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%25 = load i32, i32* %1
%26 = add i32 %25, -1
%27 = icmp ult i32 %26, 30
br i1 %27, label %30, label %28
28: ; preds = %22
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %42
30: ; preds = %22
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%32 = load i32, i32* %1
%33 = icmp slt i32 %32, 1
br i1 %33, label %40, label %34
34: ; preds = %30, %34
%35 = phi i32 [ %37, %34 ], [ 1, %30 ]
%36 = call i32 @putchar(i32 42)
%37 = add nuw nsw i32 %35, 1
%38 = load i32, i32* %1
%39 = icmp slt i32 %35, %38
br i1 %39, label %34, label %40
40: ; preds = %34, %30
%41 = call i32 @putchar(i32 10)
br label %42
42: ; preds = %40, %28
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%45 = load i32, i32* %1
%46 = add i32 %45, -1
%47 = icmp ult i32 %46, 30
br i1 %47, label %50, label %48
48: ; preds = %42
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %62
50: ; preds = %42
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %45)
%52 = load i32, i32* %1
%53 = icmp slt i32 %52, 1
br i1 %53, label %60, label %54
54: ; preds = %50, %54
%55 = phi i32 [ %57, %54 ], [ 1, %50 ]
%56 = call i32 @putchar(i32 42)
%57 = add nuw nsw i32 %55, 1
%58 = load i32, i32* %1
%59 = icmp slt i32 %55, %58
br i1 %59, label %54, label %60
60: ; preds = %54, %50
%61 = call i32 @putchar(i32 10)
br label %62
62: ; preds = %60, %48
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%64 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%65 = load i32, i32* %1
%66 = add i32 %65, -1
%67 = icmp ult i32 %66, 30
br i1 %67, label %70, label %68
68: ; preds = %62
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %82
70: ; preds = %62
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %65)
%72 = load i32, i32* %1
%73 = icmp slt i32 %72, 1
br i1 %73, label %80, label %74
74: ; preds = %70, %74
%75 = phi i32 [ %77, %74 ], [ 1, %70 ]
%76 = call i32 @putchar(i32 42)
%77 = add nuw nsw i32 %75, 1
%78 = load i32, i32* %1
%79 = icmp slt i32 %75, %78
br i1 %79, label %74, label %80
80: ; preds = %74, %70
%81 = call i32 @putchar(i32 10)
br label %82
82: ; preds = %80, %68
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%84 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%85 = load i32, i32* %1
%86 = add i32 %85, -1
%87 = icmp ult i32 %86, 30
br i1 %87, label %90, label %88
88: ; preds = %82
%89 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %102
90: ; preds = %82
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %85)
%92 = load i32, i32* %1
%93 = icmp slt i32 %92, 1
br i1 %93, label %100, label %94
94: ; preds = %90, %94
%95 = phi i32 [ %97, %94 ], [ 1, %90 ]
%96 = call i32 @putchar(i32 42)
%97 = add nuw nsw i32 %95, 1
%98 = load i32, i32* %1
%99 = icmp slt i32 %95, %98
br i1 %99, label %94, label %100
100: ; preds = %94, %90
%101 = call i32 @putchar(i32 10)
br label %102
102: ; preds = %100, %88
ret i32 0
}