#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*/ abort();
void test8(unsigned long long l, int set) {
  if ((l & (0x7fffffffffffffffLL + 1ULL)) == 0) {
    if (set)
      abort();
  } else if (!set)
    abort();
  if ((l & (0x7fffffffffffffffLL + 1ULL)) != 0) {
    if (!set)
      abort();
  } else if (set)
    abort();
  if ((l & (0x7fffffffffffffffLL + 1ULL)) == (0x7fffffffffffffffLL + 1ULL)) {
    if (!set)
      abort();
  } else if (set)
    abort();
  if ((l & (0x7fffffffffffffffLL + 1ULL)) != (0x7fffffffffffffffLL + 1ULL)) {
    if (set)
      abort();
  } else if (!set)
    abort();
}


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movabs $0x8000000000000000,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
jne    114d <test8+0x3d>
cmpl   $0x0,-0xc(%rbp)
je     1148 <test8+0x38>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1163 <test8+0x53>
cmpl   $0x0,-0xc(%rbp)
jne    115e <test8+0x4e>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1163 <test8+0x53>
movabs $0x8000000000000000,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     1191 <test8+0x81>
cmpl   $0x0,-0xc(%rbp)
jne    118c <test8+0x7c>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11a7 <test8+0x97>
cmpl   $0x0,-0xc(%rbp)
je     11a2 <test8+0x92>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11a7 <test8+0x97>
movabs $0x8000000000000000,%rax
and    -0x8(%rbp),%rax
movabs $0x8000000000000000,%rcx
cmp    %rcx,%rax
jne    11de <test8+0xce>
cmpl   $0x0,-0xc(%rbp)
jne    11d9 <test8+0xc9>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11f4 <test8+0xe4>
cmpl   $0x0,-0xc(%rbp)
je     11ef <test8+0xdf>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11f4 <test8+0xe4>
movabs $0x8000000000000000,%rax
and    -0x8(%rbp),%rax
movabs $0x8000000000000000,%rcx
cmp    %rcx,%rax
je     122b <test8+0x11b>
cmpl   $0x0,-0xc(%rbp)
je     1226 <test8+0x116>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1241 <test8+0x131>
cmpl   $0x0,-0xc(%rbp)
jne    123c <test8+0x12c>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1241 <test8+0x131>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test8>:
push   %rax
test   %rdi,%rdi
js     111c <test8+0xc>
test   %esi,%esi
jne    1120 <test8+0x10>
pop    %rax
ret
test   %esi,%esi
jne    111a <test8+0xa>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test8(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = and i64 %5, -9223372036854775808
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %8
br label %20
14: ; preds = %2
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %14
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %14
br label %20
20: ; preds = %19, %13
%21 = load i64, i64* %3
%22 = and i64 %21, -9223372036854775808
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load i32, i32* %4
%26 = icmp ne i32 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %24
%28 = call i32 (...) @abort()
unreachable
29: ; preds = %24
br label %36
30: ; preds = %20
%31 = load i32, i32* %4
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 (...) @abort()
unreachable
35: ; preds = %30
br label %36
36: ; preds = %35, %29
%37 = load i64, i64* %3
%38 = and i64 %37, -9223372036854775808
%39 = icmp eq i64 %38, -9223372036854775808
br i1 %39, label %40, label %46
40: ; preds = %36
%41 = load i32, i32* %4
%42 = icmp ne i32 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = call i32 (...) @abort()
unreachable
45: ; preds = %40
br label %52
46: ; preds = %36
%47 = load i32, i32* %4
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 (...) @abort()
unreachable
51: ; preds = %46
br label %52
52: ; preds = %51, %45
%53 = load i64, i64* %3
%54 = and i64 %53, -9223372036854775808
%55 = icmp ne i64 %54, -9223372036854775808
br i1 %55, label %56, label %62
56: ; preds = %52
%57 = load i32, i32* %4
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 (...) @abort()
unreachable
61: ; preds = %56
br label %68
62: ; preds = %52
%63 = load i32, i32* %4
%64 = icmp ne i32 %63, 0
br i1 %64, label %67, label %65
65: ; preds = %62
%66 = call i32 (...) @abort()
unreachable
67: ; preds = %62
br label %68
68: ; preds = %67, %61
ret void
}

LLVM IR (-O2):
define void @test8(i64 %0, i32 %1) {
%3 = icmp sgt i64 %0, -1
%4 = icmp eq i32 %1, 0
br i1 %3, label %5, label %8
5: ; preds = %2
br i1 %4, label %11, label %6
6: ; preds = %5
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
br i1 %4, label %9, label %11
9: ; preds = %8
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %8, %5
ret void
}