#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*/ puts(char *);
void doit(void) {
  int p;
  if (p < 0)
    puts("p < 0");
  if (p > 0)
    puts("p > 0");
  if (p < 1)
    puts("p < 1");
  if (p > 1)
    puts("p > 1");
  if (p < -1)
    puts("p < -1");
  if (p > -1)
    puts("p > -1");
  if (p == 0)
    puts("p == 0");
  if (p == 1)
    puts("p == 1");
  if (p == -1)
    puts("p == -1");
}


x86 assembly (clang, -O0):
<doit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,-0x4(%rbp)
jge    112e <doit+0x1e>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1144 <doit+0x34>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x1,-0x4(%rbp)
jge    115a <doit+0x4a>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x1,-0x4(%rbp)
jle    1170 <doit+0x60>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0xffffffff,-0x4(%rbp)
jge    1186 <doit+0x76>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0xffffffff,-0x4(%rbp)
jle    119c <doit+0x8c>
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x4(%rbp)
jne    11b2 <doit+0xa2>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x1,-0x4(%rbp)
jne    11c8 <doit+0xb8>
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0xffffffff,-0x4(%rbp)
jne    11de <doit+0xce>
lea    0xe5b(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doit>:
ret

LLVM IR (-O0):
@.str = [6 x i8] c"p < 0\00"
@.str.1 = [6 x i8] c"p > 0\00"
@.str.2 = [6 x i8] c"p < 1\00"
@.str.3 = [6 x i8] c"p > 1\00"
@.str.4 = [7 x i8] c"p < -1\00"
@.str.5 = [7 x i8] c"p > -1\00"
@.str.6 = [7 x i8] c"p == 0\00"
@.str.7 = [7 x i8] c"p == 1\00"
@.str.8 = [8 x i8] c"p == -1\00"
define void @doit() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %1
%13 = icmp slt i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
%17 = load i32, i32* %1
%18 = icmp sgt i32 %17, 1
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
%22 = load i32, i32* %1
%23 = icmp slt i32 %22, -1
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %26
26: ; preds = %24, %21
%27 = load i32, i32* %1
%28 = icmp sgt i32 %27, -1
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
%32 = load i32, i32* %1
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
%37 = load i32, i32* %1
%38 = icmp eq i32 %37, 1
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %41
41: ; preds = %39, %36
%42 = load i32, i32* %1
%43 = icmp eq i32 %42, -1
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %46
46: ; preds = %44, %41
ret void
}

LLVM IR (-O2):
define void @doit() {
ret void
}