#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int n = 0;
  printf("Type a int: ");
  scanf("%i", &n);
  if (n > 0) {
    printf("Positive\n");
  }
  printf("\n");
  if (n > 0) {
    printf("Positive\n");
  } else {
    printf("Not positive\n");
  }
  printf("\n");
  if (n > 0) {
    printf("Positive\n");
  } else if (n == 0) {
    printf("Neutral\n");
  } else {
    printf("Not positive\n");
  }
  if (n > 0)
    printf("Positive\n");
  else if (n == 0)
    printf("Neutral\n");
  else
    printf("Not positive\n");
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
jle    116f <main+0x4f>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
jle    1196 <main+0x76>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
jmp    11a2 <main+0x82>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
jle    11c9 <main+0xa9>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
jmp    11f5 <main+0xd5>
cmpl   $0x0,-0x14(%rbp)
jne    11e4 <main+0xc4>
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
jmp    11f0 <main+0xd0>
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    11f5 <main+0xd5>
cmpl   $0x0,-0x14(%rbp)
jle    1210 <main+0xf0>
lea    0xe0a(%rip),%rdi
call   1030 <printf@plt>
jmp    123c <main+0x11c>
cmpl   $0x0,-0x14(%rbp)
jne    122b <main+0x10b>
lea    0xe07(%rip),%rdi
call   1030 <printf@plt>
jmp    1237 <main+0x117>
lea    0xde8(%rip),%rdi
call   1030 <printf@plt>
jmp    123c <main+0x11c>
mov    0x2d9d(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xea8(%rip),%rdi
call   1050 <printf@plt>
lea    0xea9(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1181 <main+0x41>
lea    0xea9(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0xc(%rsp)
lea    0xe8e(%rip),%r14
lea    0xe72(%rip),%rbx
mov    %rbx,%rdi
cmovg  %r14,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0xc(%rsp)
lea    0xe5d(%rip),%r15
mov    %rbx,%rdi
cmove  %r15,%rdi
cmovg  %r14,%rdi
call   1040 <puts@plt>
cmpl   $0x0,0xc(%rsp)
cmove  %r15,%rbx
cmovg  %r14,%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Type a int: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [10 x i8] c"Positive\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [14 x i8] c"Not positive\0A\00"
@.str.5 = [9 x i8] c"Neutral\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%9 = load i32, i32* %6
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%15 = load i32, i32* %6
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %21
19: ; preds = %13
%20 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%23 = load i32, i32* %6
%24 = icmp sgt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %35
27: ; preds = %21
%28 = load i32, i32* %6
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %34
32: ; preds = %27
%33 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
br label %35
35: ; preds = %34, %25
%36 = load i32, i32* %6
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %48
40: ; preds = %35
%41 = load i32, i32* %6
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %47
45: ; preds = %40
%46 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %47
47: ; preds = %45, %43
br label %48
48: ; preds = %47, %38
%49 = load i32, i32* @EXIT_SUCCESS
ret i32 %49
}

LLVM IR (-O2):
@.str = [13 x i8] c"Type a int: \00"
@.str.1 = [3 x i8] c"%i\00"
@EXIT_SUCCESS = global i32 0
@str.7 = [13 x i8] c"Not positive\00"
@str.10 = [8 x i8] c"Neutral\00"
@str.13 = [9 x i8] c"Positive\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.13, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = call i32 @putchar(i32 10)
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.13, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0)
%16 = call i32 @puts(i8* dereferenceable(1) %15)
%17 = call i32 @putchar(i32 10)
%18 = load i32, i32* %3
%19 = icmp sgt i32 %18, 0
%20 = icmp eq i32 %18, 0
%21 = select i1 %20, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0)
%22 = select i1 %19, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.13, i64 0, i64 0), i8* %21
%23 = call i32 @puts(i8* dereferenceable(1) %22)
%24 = load i32, i32* %3
%25 = icmp sgt i32 %24, 0
%26 = icmp eq i32 %24, 0
%27 = select i1 %26, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0)
%28 = select i1 %25, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.13, i64 0, i64 0), i8* %27
%29 = call i32 @puts(i8* dereferenceable(1) %28)
%30 = load i32, i32* @EXIT_SUCCESS
ret i32 %30
}