#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*/ getch();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x, y, sayac;
  for (x = 1; x <= 5; x++) {
    printf("1-30 arasinda bir sayi giriniz : ");
    scanf("%d", &y);
    for (sayac = 1; sayac <= y; sayac++)
      printf("*");
    printf("\n");
  }
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     11b3 <main+0x83>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1199 <main+0x69>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1173 <main+0x43>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
mov    $0x0,%al
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1183 <main+0x43>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1170 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
lea    0xe82(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11d3 <main+0x93>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     11c0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe1c(%rip),%rdi
call   1040 <printf@plt>
lea    0xe32(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1223 <main+0xe3>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1210 <main+0xd0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdcc(%rip),%rdi
call   1040 <printf@plt>
lea    0xde2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1273 <main+0x133>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1260 <main+0x120>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd7c(%rip),%rdi
call   1040 <printf@plt>
lea    0xd92(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    12c3 <main+0x183>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     12b0 <main+0x170>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"1-30 arasinda bir sayi giriniz : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"*\00"
@.str.3 = [2 x i8] c"\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* %2
br label %5
5: ; preds = %22, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 5
br i1 %7, label %8, label %25
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 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* %3)
store i32 1, i32* %4
br label %11
11: ; preds = %17, %8
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %15
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %11
20: ; preds = %11
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %5
25: ; preds = %5
%26 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"1-30 arasinda bir sayi giriniz : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 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 = icmp slt i32 %5, 1
br i1 %6, label %13, label %7
7: ; preds = %0, %7
%8 = phi i32 [ %10, %7 ], [ 1, %0 ]
%9 = call i32 @putchar(i32 42)
%10 = add nuw nsw i32 %8, 1
%11 = load i32, i32* %1
%12 = icmp slt i32 %8, %11
br i1 %12, label %7, label %13
13: ; preds = %7, %0
%14 = call i32 @putchar(i32 10)
%15 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%17 = load i32, i32* %1
%18 = icmp slt i32 %17, 1
br i1 %18, label %25, label %19
19: ; preds = %13, %19
%20 = phi i32 [ %22, %19 ], [ 1, %13 ]
%21 = call i32 @putchar(i32 42)
%22 = add nuw nsw i32 %20, 1
%23 = load i32, i32* %1
%24 = icmp slt i32 %20, %23
br i1 %24, label %19, label %25
25: ; preds = %19, %13
%26 = call i32 @putchar(i32 10)
%27 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%29 = load i32, i32* %1
%30 = icmp slt i32 %29, 1
br i1 %30, label %37, label %31
31: ; preds = %25, %31
%32 = phi i32 [ %34, %31 ], [ 1, %25 ]
%33 = call i32 @putchar(i32 42)
%34 = add nuw nsw i32 %32, 1
%35 = load i32, i32* %1
%36 = icmp slt i32 %32, %35
br i1 %36, label %31, label %37
37: ; preds = %31, %25
%38 = call i32 @putchar(i32 10)
%39 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%41 = load i32, i32* %1
%42 = icmp slt i32 %41, 1
br i1 %42, label %49, label %43
43: ; preds = %37, %43
%44 = phi i32 [ %46, %43 ], [ 1, %37 ]
%45 = call i32 @putchar(i32 42)
%46 = add nuw nsw i32 %44, 1
%47 = load i32, i32* %1
%48 = icmp slt i32 %44, %47
br i1 %48, label %43, label %49
49: ; preds = %43, %37
%50 = call i32 @putchar(i32 10)
%51 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%52 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%53 = load i32, i32* %1
%54 = icmp slt i32 %53, 1
br i1 %54, label %61, label %55
55: ; preds = %49, %55
%56 = phi i32 [ %58, %55 ], [ 1, %49 ]
%57 = call i32 @putchar(i32 42)
%58 = add nuw nsw i32 %56, 1
%59 = load i32, i32* %1
%60 = icmp slt i32 %56, %59
br i1 %60, label %55, label %61
61: ; preds = %55, %49
%62 = call i32 @putchar(i32 10)
%63 = call i32 (...) @getch()
ret i32 0
}