#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*/ clang_analyzer_eval(int);
void mixedComparisons4(signed char a) {
  clang_analyzer_eval((a - 5) > 0LL);
  if ((a - 5) > 0LL) {
    clang_analyzer_eval(a == 0);
    clang_analyzer_eval(a == 0x7F);
    clang_analyzer_eval(a == -0x80);
  }
}


x86 assembly (clang, -O0):
<mixedComparisons4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x5,%eax
cltq
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
movsbl -0x1(%rbp),%eax
sub    $0x5,%eax
cltq
cmp    $0x0,%rax
jle    1187 <mixedComparisons4+0x77>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x7f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
movsbl -0x1(%rbp),%eax
cmp    $0xffffff80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedComparisons4>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x6,%bl
setge  %dil
call   1030 <clang_analyzer_eval@plt>
cmp    $0x6,%bl
jl     1143 <mixedComparisons4+0x33>
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x7f,%bl
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
pop    %rbx
jmp    1030 <clang_analyzer_eval@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @mixedComparisons4(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 5
%6 = sext i32 %5 to i64
%7 = icmp sgt i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @clang_analyzer_eval(i32 %8)
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = sub nsw i32 %11, 5
%13 = sext i32 %12 to i64
%14 = icmp sgt i64 %13, 0
br i1 %14, label %15, label %31
15: ; preds = %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 127
%24 = zext i1 %23 to i32
%25 = call i32 @clang_analyzer_eval(i32 %24)
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, -128
%29 = zext i1 %28 to i32
%30 = call i32 @clang_analyzer_eval(i32 %29)
br label %31
31: ; preds = %15, %1
ret void
}

LLVM IR (-O2):
define void @mixedComparisons4(i8 signext %0) {
%2 = icmp sgt i8 %0, 5
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
br i1 %2, label %5, label %11
5: ; preds = %1
%6 = tail call i32 @clang_analyzer_eval(i32 0)
%7 = icmp eq i8 %0, 127
%8 = zext i1 %7 to i32
%9 = tail call i32 @clang_analyzer_eval(i32 %8)
%10 = tail call i32 @clang_analyzer_eval(i32 0)
br label %11
11: ; preds = %5, %1
ret void
}