#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 */
char __VERIFIER_nondet_char();
int main() {
  signed char a = __VERIFIER_nondet_char();
  if (a < 0) {
    a = -a;
  }
  unsigned char b = a;
  a = a | 128;
  b = b | 128;
  if (a == b) {
    goto ERROR;
  }
  a = a >> 1;
  b = b >> 1;
  if (a == b) {
  ERROR:
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_char@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jge    1141 <main+0x31>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x5(%rbp)
movzbl -0x6(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movzbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jne    1174 <main+0x64>
jmp    119d <main+0x8d>
movsbl -0x5(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x5(%rbp)
movzbl -0x6(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movzbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jne    11a9 <main+0x99>
jmp    119d <main+0x8d>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b0 <main+0xa0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_char@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call signext i8 (...) @__VERIFIER_nondet_char()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = sub nsw i32 0, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %13
13: ; preds = %8, %0
%14 = load i8, i8* %2
store i8 %14, i8* %3
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = or i32 %16, 128
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
%19 = load i8, i8* %3
%20 = zext i8 %19 to i32
%21 = or i32 %20, 128
%22 = trunc i32 %21 to i8
store i8 %22, i8* %3
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = load i8, i8* %3
%26 = zext i8 %25 to i32
%27 = icmp eq i32 %24, %26
br i1 %27, label %28, label %29
28: ; preds = %13
br label %44
29: ; preds = %13
%30 = load i8, i8* %2
%31 = sext i8 %30 to i32
%32 = ashr i32 %31, 1
%33 = trunc i32 %32 to i8
store i8 %33, i8* %2
%34 = load i8, i8* %3
%35 = zext i8 %34 to i32
%36 = ashr i32 %35, 1
%37 = trunc i32 %36 to i8
store i8 %37, i8* %3
%38 = load i8, i8* %2
%39 = sext i8 %38 to i32
%40 = load i8, i8* %3
%41 = zext i8 %40 to i32
%42 = icmp eq i32 %39, %41
br i1 %42, label %43, label %45
43: ; preds = %29
br label %44
44: ; preds = %43, %28
store i32 -1, i32* %1
br label %46
45: ; preds = %29
store i32 0, i32* %1
br label %46
46: ; preds = %45, %44
%47 = load i32, i32* %1
ret i32 %47
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 (...) @__VERIFIER_nondet_char()
ret i32 0
}