#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 ABS_X;
int ABS_Y;
int BTN_1;
int BTN_A;
int BTN_MOUSE;
int BTN_STYLUS;
int BTN_TOOL_FINGER;
int BTN_TOOL_PEN;
int BTN_TOUCH;
int BTN_TRIGGER;
int EV_ABS;
int EV_KEY;
int EV_REL;
int REL_X;
int REL_Y;
int /*<<< orphan*/ puts(char *);
void test_pointers(const unsigned long *bitmask_ev,
                   const unsigned long *bitmask_abs,
                   const unsigned long *bitmask_key,
                   const unsigned long *bitmask_rel) {
  int is_mouse = 0;
  int is_touchpad = 0;
  if (!((bitmask_ev[((EV_KEY) / (sizeof(unsigned long) * 8))] >>
         ((EV_KEY) % (sizeof(unsigned long) * 8))) &
        1))
    return;
  if (((bitmask_ev[((EV_ABS) / (sizeof(unsigned long) * 8))] >>
        ((EV_ABS) % (sizeof(unsigned long) * 8))) &
       1) &&
      ((bitmask_abs[((ABS_X) / (sizeof(unsigned long) * 8))] >>
        ((ABS_X) % (sizeof(unsigned long) * 8))) &
       1) &&
      ((bitmask_abs[((ABS_Y) / (sizeof(unsigned long) * 8))] >>
        ((ABS_Y) % (sizeof(unsigned long) * 8))) &
       1)) {
    if (((bitmask_key[((BTN_STYLUS) / (sizeof(unsigned long) * 8))] >>
          ((BTN_STYLUS) % (sizeof(unsigned long) * 8))) &
         1) ||
        ((bitmask_key[((BTN_TOOL_PEN) / (sizeof(unsigned long) * 8))] >>
          ((BTN_TOOL_PEN) % (sizeof(unsigned long) * 8))) &
         1))
      puts("ID_INPUT_TABLET=1");
    else if (((bitmask_key[((BTN_TOOL_FINGER) / (sizeof(unsigned long) * 8))] >>
               ((BTN_TOOL_FINGER) % (sizeof(unsigned long) * 8))) &
              1) &&
             !((bitmask_key[((BTN_TOOL_PEN) / (sizeof(unsigned long) * 8))] >>
                ((BTN_TOOL_PEN) % (sizeof(unsigned long) * 8))) &
               1))
      is_touchpad = 1;
    else if (((bitmask_key[((BTN_TRIGGER) / (sizeof(unsigned long) * 8))] >>
               ((BTN_TRIGGER) % (sizeof(unsigned long) * 8))) &
              1) ||
             ((bitmask_key[((BTN_A) / (sizeof(unsigned long) * 8))] >>
               ((BTN_A) % (sizeof(unsigned long) * 8))) &
              1) ||
             ((bitmask_key[((BTN_1) / (sizeof(unsigned long) * 8))] >>
               ((BTN_1) % (sizeof(unsigned long) * 8))) &
              1))
      puts("ID_INPUT_JOYSTICK=1");
    else if (((bitmask_key[((BTN_MOUSE) / (sizeof(unsigned long) * 8))] >>
               ((BTN_MOUSE) % (sizeof(unsigned long) * 8))) &
              1))
      is_mouse = 1;
    else if (((bitmask_key[((BTN_TOUCH) / (sizeof(unsigned long) * 8))] >>
               ((BTN_TOUCH) % (sizeof(unsigned long) * 8))) &
              1))
      puts("ID_INPUT_TOUCHSCREEN=1");
  }
  if (((bitmask_ev[((EV_REL) / (sizeof(unsigned long) * 8))] >>
        ((EV_REL) % (sizeof(unsigned long) * 8))) &
       1) &&
      ((bitmask_rel[((REL_X) / (sizeof(unsigned long) * 8))] >>
        ((REL_X) % (sizeof(unsigned long) * 8))) &
       1) &&
      ((bitmask_rel[((REL_Y) / (sizeof(unsigned long) * 8))] >>
        ((REL_Y) % (sizeof(unsigned long) * 8))) &
       1) &&
      ((bitmask_key[((BTN_MOUSE) / (sizeof(unsigned long) * 8))] >>
        ((BTN_MOUSE) % (sizeof(unsigned long) * 8))) &
       1))
    is_mouse = 1;
  if (is_mouse)
    puts("ID_INPUT_MOUSE=1");
  if (is_touchpad)
    puts("ID_INPUT_TOUCHPAD=1");
}


x86 assembly (clang, -O0):
<test_pointers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2e87(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2e75(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1170 <test_pointers+0x60>
jmp    1552 <test_pointers+0x442>
mov    -0x8(%rbp),%rax
mov    0x2ded(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2ddb(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     144b <test_pointers+0x33b>
mov    -0x10(%rbp),%rax
mov    0x2df8(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2de6(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     144b <test_pointers+0x33b>
mov    -0x10(%rbp),%rax
mov    0x2e0b(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2df9(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     144b <test_pointers+0x33b>
mov    -0x18(%rbp),%rax
mov    0x2d56(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2d44(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1279 <test_pointers+0x169>
mov    -0x18(%rbp),%rax
mov    0x2d41(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2d2f(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     128a <test_pointers+0x17a>
lea    0xd80(%rip),%rdi
call   1030 <puts@plt>
jmp    1446 <test_pointers+0x336>
mov    -0x18(%rbp),%rax
mov    0x2d03(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2cf1(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1300 <test_pointers+0x1f0>
mov    -0x18(%rbp),%rax
mov    0x2cc6(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2cb4(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1300 <test_pointers+0x1f0>
movl   $0x1,-0x28(%rbp)
jmp    1441 <test_pointers+0x331>
mov    -0x18(%rbp),%rax
mov    0x2ccd(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2cbb(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    139f <test_pointers+0x28f>
mov    -0x18(%rbp),%rax
mov    0x2c38(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2c26(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    139f <test_pointers+0x28f>
mov    -0x18(%rbp),%rax
mov    0x2c13(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2c01(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     13b0 <test_pointers+0x2a0>
lea    0xc6c(%rip),%rdi
call   1030 <puts@plt>
jmp    143c <test_pointers+0x32c>
mov    -0x18(%rbp),%rax
mov    0x2be5(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2bd3(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     13f1 <test_pointers+0x2e1>
movl   $0x1,-0x24(%rbp)
jmp    1437 <test_pointers+0x327>
mov    -0x18(%rbp),%rax
mov    0x2bd4(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2bc2(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1432 <test_pointers+0x322>
lea    0xbf9(%rip),%rdi
call   1030 <puts@plt>
jmp    1437 <test_pointers+0x327>
jmp    143c <test_pointers+0x32c>
jmp    1441 <test_pointers+0x331>
jmp    1446 <test_pointers+0x336>
jmp    144b <test_pointers+0x33b>
mov    -0x8(%rbp),%rax
mov    0x2b6a(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2b58(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1526 <test_pointers+0x416>
mov    -0x20(%rbp),%rax
mov    0x2b2d(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2b1b(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1526 <test_pointers+0x416>
mov    -0x20(%rbp),%rax
mov    0x2b38(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2b26(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1526 <test_pointers+0x416>
mov    -0x18(%rbp),%rax
mov    0x2aab(%rip),%rcx
movslq (%rcx),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2a99(%rip),%rcx
movslq (%rcx),%rcx
and    $0x3f,%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1526 <test_pointers+0x416>
movl   $0x1,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     153c <test_pointers+0x42c>
lea    0xb06(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x28(%rbp)
je     1552 <test_pointers+0x442>
lea    0xb01(%rip),%rdi
call   1030 <puts@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_pointers>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r15
mov    0x2ea7(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%rdi,%rcx,8),%rcx
bt     %rax,%rcx
jae    1263 <test_pointers+0x153>
mov    %rdx,%r14
mov    %rdi,%rbx
mov    0x2e22(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%rdi,%rcx,8),%rcx
mov    $0x1,%bpl
bt     %rax,%rcx
jae    11d9 <test_pointers+0xc9>
mov    0x2e44(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%rsi,%rcx,8),%rcx
bt     %rax,%rcx
jae    11d9 <test_pointers+0xc9>
mov    0x2e71(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%rsi,%rcx,8),%rcx
bt     %rax,%rcx
jae    11d9 <test_pointers+0xc9>
mov    0x2dd6(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
lea    0xe51(%rip),%rdi
bt     %rax,%rcx
jb     11d4 <test_pointers+0xc4>
mov    0x2dd4(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
bt     %rax,%rcx
jae    1284 <test_pointers+0x174>
call   1030 <puts@plt>
mov    $0x1,%al
mov    0x2dde(%rip),%rcx
movslq (%rcx),%rcx
mov    %rcx,%rdx
shr    $0x6,%rdx
mov    (%rbx,%rdx,8),%rdx
bt     %rcx,%rdx
jae    124e <test_pointers+0x13e>
mov    0x2dbb(%rip),%rcx
movslq (%rcx),%rcx
mov    %rcx,%rdx
shr    $0x6,%rdx
mov    (%r15,%rdx,8),%rdx
bt     %rcx,%rdx
jae    124e <test_pointers+0x13e>
mov    0x2de0(%rip),%rcx
movslq (%rcx),%rcx
mov    %rcx,%rdx
shr    $0x6,%rdx
mov    (%r15,%rdx,8),%rdx
bt     %rcx,%rdx
jae    124e <test_pointers+0x13e>
mov    0x2d6d(%rip),%rcx
movslq (%rcx),%rcx
mov    %rcx,%rdx
shr    $0x6,%rdx
mov    (%r14,%rdx,8),%rdx
bt     %rcx,%rdx
setae  %cl
test   %cl,%al
je     1252 <test_pointers+0x142>
jmp    125e <test_pointers+0x14e>
test   %al,%al
jne    125e <test_pointers+0x14e>
lea    0xde4(%rip),%rdi
call   1030 <puts@plt>
test   %bpl,%bpl
je     126e <test_pointers+0x15e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdd9(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
mov    0x2d0d(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
bt     %rax,%rcx
jae    12a6 <test_pointers+0x196>
xor    %ebp,%ebp
jmp    11d9 <test_pointers+0xc9>
mov    0x2d2b(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
lea    0xd50(%rip),%rdi
bt     %rax,%rcx
jb     11d4 <test_pointers+0xc4>
mov    0x2ca5(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
bt     %rax,%rcx
jb     11d4 <test_pointers+0xc4>
mov    0x2c96(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
bt     %rax,%rcx
jb     11d4 <test_pointers+0xc4>
mov    0x2c8f(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
bt     %rax,%rcx
jae    132c <test_pointers+0x21c>
xor    %eax,%eax
jmp    11db <test_pointers+0xcb>
mov    0x2c9d(%rip),%rax
movslq (%rax),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
mov    (%r14,%rcx,8),%rcx
bt     %rax,%rcx
jae    11d9 <test_pointers+0xc9>
lea    0xcd4(%rip),%rdi
jmp    11d4 <test_pointers+0xc4>

LLVM IR (-O0):
@EV_KEY = global i32 0
@EV_ABS = global i32 0
@ABS_X = global i32 0
@ABS_Y = global i32 0
@BTN_STYLUS = global i32 0
@BTN_TOOL_PEN = global i32 0
@.str = [18 x i8] c"ID_INPUT_TABLET=1\00"
@BTN_TOOL_FINGER = global i32 0
@BTN_TRIGGER = global i32 0
@BTN_A = global i32 0
@BTN_1 = global i32 0
@.str.1 = [20 x i8] c"ID_INPUT_JOYSTICK=1\00"
@BTN_MOUSE = global i32 0
@BTN_TOUCH = global i32 0
@.str.2 = [23 x i8] c"ID_INPUT_TOUCHSCREEN=1\00"
@EV_REL = global i32 0
@REL_X = global i32 0
@REL_Y = global i32 0
@.str.3 = [17 x i8] c"ID_INPUT_MOUSE=1\00"
@.str.4 = [20 x i8] c"ID_INPUT_TOUCHPAD=1\00"
define void @test_pointers(i64* %0, i64* %1, i64* %2, i64* %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i64*
%9 = alloca i32
%10 = alloca i32
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i64* %3, i64** %8
store i32 0, i32* %9
store i32 0, i32* %10
%11 = load i64*, i64** %5
%12 = load i32, i32* @EV_KEY
%13 = sext i32 %12 to i64
%14 = udiv i64 %13, 64
%15 = getelementptr inbounds i64, i64* %11, i64 %14
%16 = load i64, i64* %15
%17 = load i32, i32* @EV_KEY
%18 = sext i32 %17 to i64
%19 = urem i64 %18, 64
%20 = lshr i64 %16, %19
%21 = and i64 %20, 1
%22 = icmp ne i64 %21, 0
br i1 %22, label %24, label %23
23: ; preds = %4
br label %256
24: ; preds = %4
%25 = load i64*, i64** %5
%26 = load i32, i32* @EV_ABS
%27 = sext i32 %26 to i64
%28 = udiv i64 %27, 64
%29 = getelementptr inbounds i64, i64* %25, i64 %28
%30 = load i64, i64* %29
%31 = load i32, i32* @EV_ABS
%32 = sext i32 %31 to i64
%33 = urem i64 %32, 64
%34 = lshr i64 %30, %33
%35 = and i64 %34, 1
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %193
37: ; preds = %24
%38 = load i64*, i64** %6
%39 = load i32, i32* @ABS_X
%40 = sext i32 %39 to i64
%41 = udiv i64 %40, 64
%42 = getelementptr inbounds i64, i64* %38, i64 %41
%43 = load i64, i64* %42
%44 = load i32, i32* @ABS_X
%45 = sext i32 %44 to i64
%46 = urem i64 %45, 64
%47 = lshr i64 %43, %46
%48 = and i64 %47, 1
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %193
50: ; preds = %37
%51 = load i64*, i64** %6
%52 = load i32, i32* @ABS_Y
%53 = sext i32 %52 to i64
%54 = udiv i64 %53, 64
%55 = getelementptr inbounds i64, i64* %51, i64 %54
%56 = load i64, i64* %55
%57 = load i32, i32* @ABS_Y
%58 = sext i32 %57 to i64
%59 = urem i64 %58, 64
%60 = lshr i64 %56, %59
%61 = and i64 %60, 1
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %193
63: ; preds = %50
%64 = load i64*, i64** %7
%65 = load i32, i32* @BTN_STYLUS
%66 = sext i32 %65 to i64
%67 = udiv i64 %66, 64
%68 = getelementptr inbounds i64, i64* %64, i64 %67
%69 = load i64, i64* %68
%70 = load i32, i32* @BTN_STYLUS
%71 = sext i32 %70 to i64
%72 = urem i64 %71, 64
%73 = lshr i64 %69, %72
%74 = and i64 %73, 1
%75 = icmp ne i64 %74, 0
br i1 %75, label %89, label %76
76: ; preds = %63
%77 = load i64*, i64** %7
%78 = load i32, i32* @BTN_TOOL_PEN
%79 = sext i32 %78 to i64
%80 = udiv i64 %79, 64
%81 = getelementptr inbounds i64, i64* %77, i64 %80
%82 = load i64, i64* %81
%83 = load i32, i32* @BTN_TOOL_PEN
%84 = sext i32 %83 to i64
%85 = urem i64 %84, 64
%86 = lshr i64 %82, %85
%87 = and i64 %86, 1
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %76, %63
%90 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %192
91: ; preds = %76
%92 = load i64*, i64** %7
%93 = load i32, i32* @BTN_TOOL_FINGER
%94 = sext i32 %93 to i64
%95 = udiv i64 %94, 64
%96 = getelementptr inbounds i64, i64* %92, i64 %95
%97 = load i64, i64* %96
%98 = load i32, i32* @BTN_TOOL_FINGER
%99 = sext i32 %98 to i64
%100 = urem i64 %99, 64
%101 = lshr i64 %97, %100
%102 = and i64 %101, 1
%103 = icmp ne i64 %102, 0
br i1 %103, label %104, label %118
104: ; preds = %91
%105 = load i64*, i64** %7
%106 = load i32, i32* @BTN_TOOL_PEN
%107 = sext i32 %106 to i64
%108 = udiv i64 %107, 64
%109 = getelementptr inbounds i64, i64* %105, i64 %108
%110 = load i64, i64* %109
%111 = load i32, i32* @BTN_TOOL_PEN
%112 = sext i32 %111 to i64
%113 = urem i64 %112, 64
%114 = lshr i64 %110, %113
%115 = and i64 %114, 1
%116 = icmp ne i64 %115, 0
br i1 %116, label %118, label %117
117: ; preds = %104
store i32 1, i32* %10
br label %191
118: ; preds = %104, %91
%119 = load i64*, i64** %7
%120 = load i32, i32* @BTN_TRIGGER
%121 = sext i32 %120 to i64
%122 = udiv i64 %121, 64
%123 = getelementptr inbounds i64, i64* %119, i64 %122
%124 = load i64, i64* %123
%125 = load i32, i32* @BTN_TRIGGER
%126 = sext i32 %125 to i64
%127 = urem i64 %126, 64
%128 = lshr i64 %124, %127
%129 = and i64 %128, 1
%130 = icmp ne i64 %129, 0
br i1 %130, label %157, label %131
131: ; preds = %118
%132 = load i64*, i64** %7
%133 = load i32, i32* @BTN_A
%134 = sext i32 %133 to i64
%135 = udiv i64 %134, 64
%136 = getelementptr inbounds i64, i64* %132, i64 %135
%137 = load i64, i64* %136
%138 = load i32, i32* @BTN_A
%139 = sext i32 %138 to i64
%140 = urem i64 %139, 64
%141 = lshr i64 %137, %140
%142 = and i64 %141, 1
%143 = icmp ne i64 %142, 0
br i1 %143, label %157, label %144
144: ; preds = %131
%145 = load i64*, i64** %7
%146 = load i32, i32* @BTN_1
%147 = sext i32 %146 to i64
%148 = udiv i64 %147, 64
%149 = getelementptr inbounds i64, i64* %145, i64 %148
%150 = load i64, i64* %149
%151 = load i32, i32* @BTN_1
%152 = sext i32 %151 to i64
%153 = urem i64 %152, 64
%154 = lshr i64 %150, %153
%155 = and i64 %154, 1
%156 = icmp ne i64 %155, 0
br i1 %156, label %157, label %159
157: ; preds = %144, %131, %118
%158 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %190
159: ; preds = %144
%160 = load i64*, i64** %7
%161 = load i32, i32* @BTN_MOUSE
%162 = sext i32 %161 to i64
%163 = udiv i64 %162, 64
%164 = getelementptr inbounds i64, i64* %160, i64 %163
%165 = load i64, i64* %164
%166 = load i32, i32* @BTN_MOUSE
%167 = sext i32 %166 to i64
%168 = urem i64 %167, 64
%169 = lshr i64 %165, %168
%170 = and i64 %169, 1
%171 = icmp ne i64 %170, 0
br i1 %171, label %172, label %173
172: ; preds = %159
store i32 1, i32* %9
br label %189
173: ; preds = %159
%174 = load i64*, i64** %7
%175 = load i32, i32* @BTN_TOUCH
%176 = sext i32 %175 to i64
%177 = udiv i64 %176, 64
%178 = getelementptr inbounds i64, i64* %174, i64 %177
%179 = load i64, i64* %178
%180 = load i32, i32* @BTN_TOUCH
%181 = sext i32 %180 to i64
%182 = urem i64 %181, 64
%183 = lshr i64 %179, %182
%184 = and i64 %183, 1
%185 = icmp ne i64 %184, 0
br i1 %185, label %186, label %188
186: ; preds = %173
%187 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %188
188: ; preds = %186, %173
br label %189
189: ; preds = %188, %172
br label %190
190: ; preds = %189, %157
br label %191
191: ; preds = %190, %117
br label %192
192: ; preds = %191, %89
br label %193
193: ; preds = %192, %50, %37, %24
%194 = load i64*, i64** %5
%195 = load i32, i32* @EV_REL
%196 = sext i32 %195 to i64
%197 = udiv i64 %196, 64
%198 = getelementptr inbounds i64, i64* %194, i64 %197
%199 = load i64, i64* %198
%200 = load i32, i32* @EV_REL
%201 = sext i32 %200 to i64
%202 = urem i64 %201, 64
%203 = lshr i64 %199, %202
%204 = and i64 %203, 1
%205 = icmp ne i64 %204, 0
br i1 %205, label %206, label %246
206: ; preds = %193
%207 = load i64*, i64** %8
%208 = load i32, i32* @REL_X
%209 = sext i32 %208 to i64
%210 = udiv i64 %209, 64
%211 = getelementptr inbounds i64, i64* %207, i64 %210
%212 = load i64, i64* %211
%213 = load i32, i32* @REL_X
%214 = sext i32 %213 to i64
%215 = urem i64 %214, 64
%216 = lshr i64 %212, %215
%217 = and i64 %216, 1
%218 = icmp ne i64 %217, 0
br i1 %218, label %219, label %246
219: ; preds = %206
%220 = load i64*, i64** %8
%221 = load i32, i32* @REL_Y
%222 = sext i32 %221 to i64
%223 = udiv i64 %222, 64
%224 = getelementptr inbounds i64, i64* %220, i64 %223
%225 = load i64, i64* %224
%226 = load i32, i32* @REL_Y
%227 = sext i32 %226 to i64
%228 = urem i64 %227, 64
%229 = lshr i64 %225, %228
%230 = and i64 %229, 1
%231 = icmp ne i64 %230, 0
br i1 %231, label %232, label %246
232: ; preds = %219
%233 = load i64*, i64** %7
%234 = load i32, i32* @BTN_MOUSE
%235 = sext i32 %234 to i64
%236 = udiv i64 %235, 64
%237 = getelementptr inbounds i64, i64* %233, i64 %236
%238 = load i64, i64* %237
%239 = load i32, i32* @BTN_MOUSE
%240 = sext i32 %239 to i64
%241 = urem i64 %240, 64
%242 = lshr i64 %238, %241
%243 = and i64 %242, 1
%244 = icmp ne i64 %243, 0
br i1 %244, label %245, label %246
245: ; preds = %232
store i32 1, i32* %9
br label %246
246: ; preds = %245, %232, %219, %206, %193
%247 = load i32, i32* %9
%248 = icmp ne i32 %247, 0
br i1 %248, label %249, label %251
249: ; preds = %246
%250 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %251
251: ; preds = %249, %246
%252 = load i32, i32* %10
%253 = icmp ne i32 %252, 0
br i1 %253, label %254, label %256
254: ; preds = %251
%255 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %256
256: ; preds = %23, %254, %251
ret void
}

LLVM IR (-O2):
@EV_KEY = global i32 0
@EV_ABS = global i32 0
@ABS_X = global i32 0
@ABS_Y = global i32 0
@BTN_STYLUS = global i32 0
@BTN_TOOL_PEN = global i32 0
@.str = [18 x i8] c"ID_INPUT_TABLET=1\00"
@BTN_TOOL_FINGER = global i32 0
@BTN_TRIGGER = global i32 0
@BTN_A = global i32 0
@BTN_1 = global i32 0
@.str.1 = [20 x i8] c"ID_INPUT_JOYSTICK=1\00"
@BTN_MOUSE = global i32 0
@BTN_TOUCH = global i32 0
@.str.2 = [23 x i8] c"ID_INPUT_TOUCHSCREEN=1\00"
@EV_REL = global i32 0
@REL_X = global i32 0
@REL_Y = global i32 0
@.str.3 = [17 x i8] c"ID_INPUT_MOUSE=1\00"
@.str.4 = [20 x i8] c"ID_INPUT_TOUCHPAD=1\00"
define void @test_pointers(i64* nocapture %0, i64* nocapture %1, i64* nocapture %2, i64* nocapture %3) {
%5 = load i32, i32* @EV_KEY
%6 = sext i32 %5 to i64
%7 = lshr i64 %6, 6
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %6, 63
%11 = shl nuw i64 1, %10
%12 = and i64 %11, %9
%13 = icmp eq i64 %12, 0
br i1 %13, label %176, label %14
14: ; preds = %4
%15 = load i32, i32* @EV_ABS
%16 = sext i32 %15 to i64
%17 = lshr i64 %16, 6
%18 = getelementptr inbounds i64, i64* %0, i64 %17
%19 = load i64, i64* %18
%20 = and i64 %16, 63
%21 = shl nuw i64 1, %20
%22 = and i64 %21, %19
%23 = icmp eq i64 %22, 0
br i1 %23, label %127, label %24
24: ; preds = %14
%25 = load i32, i32* @ABS_X
%26 = sext i32 %25 to i64
%27 = lshr i64 %26, 6
%28 = getelementptr inbounds i64, i64* %1, i64 %27
%29 = load i64, i64* %28
%30 = and i64 %26, 63
%31 = shl nuw i64 1, %30
%32 = and i64 %31, %29
%33 = icmp eq i64 %32, 0
br i1 %33, label %127, label %34
34: ; preds = %24
%35 = load i32, i32* @ABS_Y
%36 = sext i32 %35 to i64
%37 = lshr i64 %36, 6
%38 = getelementptr inbounds i64, i64* %1, i64 %37
%39 = load i64, i64* %38
%40 = and i64 %36, 63
%41 = shl nuw i64 1, %40
%42 = and i64 %41, %39
%43 = icmp eq i64 %42, 0
br i1 %43, label %127, label %44
44: ; preds = %34
%45 = load i32, i32* @BTN_STYLUS
%46 = sext i32 %45 to i64
%47 = lshr i64 %46, 6
%48 = getelementptr inbounds i64, i64* %2, i64 %47
%49 = load i64, i64* %48
%50 = and i64 %46, 63
%51 = shl nuw i64 1, %50
%52 = and i64 %51, %49
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %124
54: ; preds = %44
%55 = load i32, i32* @BTN_TOOL_PEN
%56 = sext i32 %55 to i64
%57 = lshr i64 %56, 6
%58 = getelementptr inbounds i64, i64* %2, i64 %57
%59 = load i64, i64* %58
%60 = and i64 %56, 63
%61 = shl nuw i64 1, %60
%62 = and i64 %61, %59
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %124
64: ; preds = %54
%65 = load i32, i32* @BTN_TOOL_FINGER
%66 = sext i32 %65 to i64
%67 = lshr i64 %66, 6
%68 = getelementptr inbounds i64, i64* %2, i64 %67
%69 = load i64, i64* %68
%70 = and i64 %66, 63
%71 = shl nuw i64 1, %70
%72 = and i64 %71, %69
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %127
74: ; preds = %64
%75 = load i32, i32* @BTN_TRIGGER
%76 = sext i32 %75 to i64
%77 = lshr i64 %76, 6
%78 = getelementptr inbounds i64, i64* %2, i64 %77
%79 = load i64, i64* %78
%80 = and i64 %76, 63
%81 = shl nuw i64 1, %80
%82 = and i64 %81, %79
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %124
84: ; preds = %74
%85 = load i32, i32* @BTN_A
%86 = sext i32 %85 to i64
%87 = lshr i64 %86, 6
%88 = getelementptr inbounds i64, i64* %2, i64 %87
%89 = load i64, i64* %88
%90 = and i64 %86, 63
%91 = shl nuw i64 1, %90
%92 = and i64 %91, %89
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %124
94: ; preds = %84
%95 = load i32, i32* @BTN_1
%96 = sext i32 %95 to i64
%97 = lshr i64 %96, 6
%98 = getelementptr inbounds i64, i64* %2, i64 %97
%99 = load i64, i64* %98
%100 = and i64 %96, 63
%101 = shl nuw i64 1, %100
%102 = and i64 %101, %99
%103 = icmp eq i64 %102, 0
br i1 %103, label %104, label %124
104: ; preds = %94
%105 = load i32, i32* @BTN_MOUSE
%106 = sext i32 %105 to i64
%107 = lshr i64 %106, 6
%108 = getelementptr inbounds i64, i64* %2, i64 %107
%109 = load i64, i64* %108
%110 = and i64 %106, 63
%111 = shl nuw i64 1, %110
%112 = and i64 %111, %109
%113 = icmp eq i64 %112, 0
br i1 %113, label %114, label %127
114: ; preds = %104
%115 = load i32, i32* @BTN_TOUCH
%116 = sext i32 %115 to i64
%117 = lshr i64 %116, 6
%118 = getelementptr inbounds i64, i64* %2, i64 %117
%119 = load i64, i64* %118
%120 = and i64 %116, 63
%121 = shl nuw i64 1, %120
%122 = and i64 %121, %119
%123 = icmp eq i64 %122, 0
br i1 %123, label %127, label %124
124: ; preds = %114, %74, %84, %94, %44, %54
%125 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %54 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %44 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %94 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %84 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %74 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %114 ]
%126 = tail call i32 @puts(i8* dereferenceable(1) %125)
br label %127
127: ; preds = %124, %104, %64, %114, %34, %24, %14
%128 = phi i1 [ false, %104 ], [ true, %64 ], [ true, %114 ], [ true, %34 ], [ true, %24 ], [ true, %14 ], [ true, %124 ]
%129 = phi i1 [ true, %104 ], [ false, %64 ], [ true, %114 ], [ true, %34 ], [ true, %24 ], [ true, %14 ], [ true, %124 ]
%130 = load i32, i32* @EV_REL
%131 = sext i32 %130 to i64
%132 = lshr i64 %131, 6
%133 = getelementptr inbounds i64, i64* %0, i64 %132
%134 = load i64, i64* %133
%135 = and i64 %131, 63
%136 = shl nuw i64 1, %135
%137 = and i64 %136, %134
%138 = icmp eq i64 %137, 0
br i1 %138, label %170, label %139
139: ; preds = %127
%140 = load i32, i32* @REL_X
%141 = sext i32 %140 to i64
%142 = lshr i64 %141, 6
%143 = getelementptr inbounds i64, i64* %3, i64 %142
%144 = load i64, i64* %143
%145 = and i64 %141, 63
%146 = shl nuw i64 1, %145
%147 = and i64 %146, %144
%148 = icmp eq i64 %147, 0
br i1 %148, label %170, label %149
149: ; preds = %139
%150 = load i32, i32* @REL_Y
%151 = sext i32 %150 to i64
%152 = lshr i64 %151, 6
%153 = getelementptr inbounds i64, i64* %3, i64 %152
%154 = load i64, i64* %153
%155 = and i64 %151, 63
%156 = shl nuw i64 1, %155
%157 = and i64 %156, %154
%158 = icmp eq i64 %157, 0
br i1 %158, label %170, label %159
159: ; preds = %149
%160 = load i32, i32* @BTN_MOUSE
%161 = sext i32 %160 to i64
%162 = lshr i64 %161, 6
%163 = getelementptr inbounds i64, i64* %2, i64 %162
%164 = load i64, i64* %163
%165 = and i64 %161, 63
%166 = shl nuw i64 1, %165
%167 = and i64 %166, %164
%168 = icmp eq i64 %167, 0
%169 = and i1 %128, %168
br i1 %169, label %173, label %171
170: ; preds = %149, %139, %127
br i1 %128, label %173, label %171
171: ; preds = %159, %170
%172 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %173
173: ; preds = %159, %171, %170
br i1 %129, label %176, label %174
174: ; preds = %173
%175 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %176
176: ; preds = %173, %174, %4
ret void
}