#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 *);
main() {
  char c = -64;
  int i = -32;
  unsigned int u = -16;
  if (c > i) {
    printf("pass1");
    if (c < u)
      printf("pass 2");
    else
      printf("fail 2");
  } else
    printf("fail 1");
  if (i < u)
    printf("pass2");
  else
    printf("fail2");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xc0,-0x5(%rbp)
movl   $0xffffffe0,-0xc(%rbp)
movl   $0xfffffff0,-0x10(%rbp)
movsbl -0x5(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1179 <main+0x69>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1168 <main+0x58>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    1174 <main+0x64>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    1185 <main+0x75>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    11a2 <main+0x92>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    11ae <main+0x9e>
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"pass1\00"
@.str.1 = [7 x i8] c"pass 2\00"
@.str.2 = [7 x i8] c"fail 2\00"
@.str.3 = [7 x i8] c"fail 1\00"
@.str.4 = [6 x i8] c"pass2\00"
@.str.5 = [6 x i8] c"fail2\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i8 -64, i8* %2
store i32 -32, i32* %3
store i32 -16, i32* %4
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %20
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = load i32, i32* %4
%14 = icmp ult i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %19
17: ; preds = %9
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %22
20: ; preds = %0
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %19
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = icmp ult i32 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %30
28: ; preds = %22
%29 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
@.str.3 = [7 x i8] c"fail 1\00"
@.str.4 = [6 x i8] c"pass2\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}