#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 *);
void ucgen_ciz(int x) {
  int i, j;
  printf("\n");
  printf("Taban sayisini giriniz: ");
  scanf("%d", &x);
  for (i = 1; i <= x; i++) {
    for (j = 1; j <= i; j++) {
      printf("*");
    }
    printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<ucgen_ciz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     11ad <ucgen_ciz+0x8d>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1193 <ucgen_ciz+0x73>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <ucgen_ciz+0x4d>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115a <ucgen_ciz+0x3a>
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucgen_ciz>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,0x4(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11a4 <ucgen_ciz+0x74>
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1180 <ucgen_ciz+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
cmp    0x4(%rsp),%ebx
mov    %eax,%ebx
jl     1170 <ucgen_ciz+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [25 x i8] c"Taban sayisini giriniz: \00"
@.str.2 = [3 x i8] c"%d\00"
define void @ucgen_ciz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1
br i1 %7, label %22, label %8
8: ; preds = %1, %16
%9 = phi i32 [ %21, %16 ], [ 2, %1 ]
%10 = phi i32 [ %18, %16 ], [ 1, %1 ]
br label %11
11: ; preds = %8, %11
%12 = phi i32 [ 1, %8 ], [ %14, %11 ]
%13 = call i32 @putchar(i32 42)
%14 = add nuw i32 %12, 1
%15 = icmp eq i32 %14, %9
br i1 %15, label %16, label %11
16: ; preds = %11
%17 = call i32 @putchar(i32 10)
%18 = add nuw nsw i32 %10, 1
%19 = load i32, i32* %2
%20 = icmp slt i32 %10, %19
%21 = add nuw i32 %9, 1
br i1 %20, label %8, label %22
22: ; preds = %16, %1
%23 = call i32 @putchar(i32 10)
ret void
}