#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;
  printf("Lutfen sayi giiniz: ");
  scanf("%d", &sayi);
  if (sayi > 0) {
    printf("Bu sayi pozitifdir...");
  }
  if (sayi < 0) {
    printf("Bu sayi negatifdir...");
  }
  if (sayi == 0) {
    printf("Bu sayi sifirdir...");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1161 <main+0x41>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    1177 <main+0x57>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    118d <main+0x6d>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1156 <main+0x36>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
js     1162 <main+0x42>
test   %eax,%eax
je     1176 <main+0x56>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jne    115e <main+0x3e>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    115e <main+0x3e>

LLVM IR (-O0):
@.str = [21 x i8] c"Lutfen sayi giiniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"Bu sayi pozitifdir...\00"
@.str.3 = [22 x i8] c"Bu sayi negatifdir...\00"
@.str.4 = [20 x i8] c"Bu sayi sifirdir...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 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* %2)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %19
19: ; preds = %17, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Lutfen sayi giiniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"Bu sayi pozitifdir...\00"
@.str.3 = [22 x i8] c"Bu sayi negatifdir...\00"
@.str.4 = [20 x i8] c"Bu sayi sifirdir...\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 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 sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %1
br label %10
10: ; preds = %7, %0
%11 = phi i32 [ %9, %7 ], [ %5, %0 ]
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%15 = load i32, i32* %1
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %15, %13 ], [ %11, %10 ]
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
ret i32 0
}