#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 mixedComparisons5(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);
  } else {
    clang_analyzer_eval(a == 0);
    clang_analyzer_eval(a == 0x7F);
    clang_analyzer_eval(a == -0x80);
  }
}


x86 assembly (clang, -O0):
<mixedComparisons5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x5,%eax
cltq
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
movsbl -0x1(%rbp),%eax
add    $0x5,%eax
cltq
cmp    $0x0,%rax
jne    118c <mixedComparisons5+0x7c>
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>
jmp    11c8 <mixedComparisons5+0xb8>
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):
<mixedComparisons5>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0xfb,%bl
sete   %dil
call   1030 <clang_analyzer_eval@plt>
cmp    $0xfb,%bl
jne    113a <mixedComparisons5+0x2a>
xor    %ebp,%ebp
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    115e <mixedComparisons5+0x4e>
xor    %edi,%edi
test   %bl,%bl
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x7f,%bl
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %ebp,%ebp
cmp    $0x80,%bl
sete   %bpl
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedComparisons5(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 5
%6 = sext i32 %5 to i64
%7 = icmp eq 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 = add nsw i32 %11, 5
%13 = sext i32 %12 to i64
%14 = icmp eq 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 %47
31: ; preds = %1
%32 = load i8, i8* %2
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 0
%35 = zext i1 %34 to i32
%36 = call i32 @clang_analyzer_eval(i32 %35)
%37 = load i8, i8* %2
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 127
%40 = zext i1 %39 to i32
%41 = call i32 @clang_analyzer_eval(i32 %40)
%42 = load i8, i8* %2
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, -128
%45 = zext i1 %44 to i32
%46 = call i32 @clang_analyzer_eval(i32 %45)
br label %47
47: ; preds = %31, %15
ret void
}

LLVM IR (-O2):
define void @mixedComparisons5(i8 signext %0) {
%2 = icmp eq i8 %0, -5
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
br i1 %2, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @clang_analyzer_eval(i32 0)
%7 = tail call i32 @clang_analyzer_eval(i32 0)
br label %17
8: ; preds = %1
%9 = icmp eq i8 %0, 0
%10 = zext i1 %9 to i32
%11 = tail call i32 @clang_analyzer_eval(i32 %10)
%12 = icmp eq i8 %0, 127
%13 = zext i1 %12 to i32
%14 = tail call i32 @clang_analyzer_eval(i32 %13)
%15 = icmp eq i8 %0, -128
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %8, %5
%18 = phi i32 [ %16, %8 ], [ 0, %5 ]
%19 = tail call i32 @clang_analyzer_eval(i32 %18)
ret void
}