#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 */
scalar_t__ JSIOCGAXES;
scalar_t__ JSIOCGAXMAP;
scalar_t__ JSIOCGBTNMAP;
scalar_t__ JSIOCGBUTTONS;
scalar_t__ JSIOCGCORR;
scalar_t__ JSIOCGNAME(int);
scalar_t__ JSIOCGVERSION;
scalar_t__ JSIOCSAXMAP;
scalar_t__ JSIOCSBTNMAP;
scalar_t__ JSIOCSCORR;
scalar_t__ JS_CORR_BROKEN;
scalar_t__ JS_CORR_NONE;
scalar_t__ JS_EVENT_AXIS;
scalar_t__ JS_EVENT_BUTTON;
scalar_t__ JS_EVENT_INIT;
scalar_t__ JS_VERSION;
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("import struct\n");
  printf("event = struct.Struct('=IhBB')\n");
  printf("corr = struct.Struct('=ihH')\n");
  printf("version = 0x%x\n", (unsigned)JS_VERSION);
  printf("event_button = 0x%x\n", (unsigned)JS_EVENT_BUTTON);
  printf("event_axis = 0x%x\n", (unsigned)JS_EVENT_AXIS);
  printf("event_init = 0x%x\n", (unsigned)JS_EVENT_INIT);
  printf("gversion = 0x%x\n", (unsigned)JSIOCGVERSION);
  printf("gaxes = 0x%x\n", (unsigned)JSIOCGAXES);
  printf("gbuttons = 0x%x\n", (unsigned)JSIOCGBUTTONS);
  printf("gname = 0x%x\n", (unsigned)(JSIOCGNAME(4096)));
  printf("scorr = 0x%x\n", (unsigned)JSIOCSCORR);
  printf("gcorr = 0x%x\n", (unsigned)JSIOCGCORR);
  printf("saxmap = 0x%x\n", (unsigned)JSIOCSAXMAP);
  printf("gaxmap = 0x%x\n", (unsigned)JSIOCGAXMAP);
  printf("sbtnmap = 0x%x\n", (unsigned)JSIOCSBTNMAP);
  printf("gbtnmap = 0x%x\n", (unsigned)JSIOCGBTNMAP);
  printf("corr_none = 0x%x\n", (unsigned)JS_CORR_NONE);
  printf("corr_broken = 0x%x\n", (unsigned)JS_CORR_BROKEN);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dee(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e34(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dd2(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e18(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1000,%edi
call   1040 <JSIOCGNAME@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d8e(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d0c(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d52(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d20(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cfe(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d24(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cda(%rip),%rax
mov    (%rax),%rax
mov    %eax,%esi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xfc1(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc3(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd6(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%esi
lea    0xe84(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%esi
lea    0xe82(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%esi
lea    0xe7e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e28(%rip),%rax
mov    (%rax),%esi
lea    0xe7a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%esi
lea    0xe74(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2da2(%rip),%rax
mov    (%rax),%esi
lea    0xe6b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1000,%edi
call   1050 <JSIOCGNAME@plt>
lea    0xe64(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d79(%rip),%rax
mov    (%rax),%esi
lea    0xe59(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2daa(%rip),%rax
mov    (%rax),%esi
lea    0xe50(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%esi
lea    0xe47(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d74(%rip),%rax
mov    (%rax),%esi
lea    0xe3f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d45(%rip),%rax
mov    (%rax),%esi
lea    0xe37(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d26(%rip),%rax
mov    (%rax),%esi
lea    0xe30(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d4f(%rip),%rax
mov    (%rax),%esi
lea    0xe29(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
lea    0xe24(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"import struct\0A\00"
@.str.1 = [32 x i8] c"event = struct.Struct('=IhBB')\0A\00"
@.str.2 = [30 x i8] c"corr = struct.Struct('=ihH')\0A\00"
@.str.3 = [16 x i8] c"version = 0x%x\0A\00"
@JS_VERSION = global i64 0
@.str.4 = [21 x i8] c"event_button = 0x%x\0A\00"
@JS_EVENT_BUTTON = global i64 0
@.str.5 = [19 x i8] c"event_axis = 0x%x\0A\00"
@JS_EVENT_AXIS = global i64 0
@.str.6 = [19 x i8] c"event_init = 0x%x\0A\00"
@JS_EVENT_INIT = global i64 0
@.str.7 = [17 x i8] c"gversion = 0x%x\0A\00"
@JSIOCGVERSION = global i64 0
@.str.8 = [14 x i8] c"gaxes = 0x%x\0A\00"
@JSIOCGAXES = global i64 0
@.str.9 = [17 x i8] c"gbuttons = 0x%x\0A\00"
@JSIOCGBUTTONS = global i64 0
@.str.10 = [14 x i8] c"gname = 0x%x\0A\00"
@.str.11 = [14 x i8] c"scorr = 0x%x\0A\00"
@JSIOCSCORR = global i64 0
@.str.12 = [14 x i8] c"gcorr = 0x%x\0A\00"
@JSIOCGCORR = global i64 0
@.str.13 = [15 x i8] c"saxmap = 0x%x\0A\00"
@JSIOCSAXMAP = global i64 0
@.str.14 = [15 x i8] c"gaxmap = 0x%x\0A\00"
@JSIOCGAXMAP = global i64 0
@.str.15 = [16 x i8] c"sbtnmap = 0x%x\0A\00"
@JSIOCSBTNMAP = global i64 0
@.str.16 = [16 x i8] c"gbtnmap = 0x%x\0A\00"
@JSIOCGBTNMAP = global i64 0
@.str.17 = [18 x i8] c"corr_none = 0x%x\0A\00"
@JS_CORR_NONE = global i64 0
@.str.18 = [20 x i8] c"corr_broken = 0x%x\0A\00"
@JS_CORR_BROKEN = global i64 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%5 = load i64, i64* @JS_VERSION
%6 = trunc i64 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = load i64, i64* @JS_EVENT_BUTTON
%9 = trunc i64 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i64, i64* @JS_EVENT_AXIS
%12 = trunc i64 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = load i64, i64* @JS_EVENT_INIT
%15 = trunc i64 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %15)
%17 = load i64, i64* @JSIOCGVERSION
%18 = trunc i64 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %18)
%20 = load i64, i64* @JSIOCGAXES
%21 = trunc i64 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %21)
%23 = load i64, i64* @JSIOCGBUTTONS
%24 = trunc i64 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %24)
%26 = call i64 @JSIOCGNAME(i32 4096)
%27 = trunc i64 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 %27)
%29 = load i64, i64* @JSIOCSCORR
%30 = trunc i64 %29 to i32
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %30)
%32 = load i64, i64* @JSIOCGCORR
%33 = trunc i64 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %33)
%35 = load i64, i64* @JSIOCSAXMAP
%36 = trunc i64 %35 to i32
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i32 %36)
%38 = load i64, i64* @JSIOCGAXMAP
%39 = trunc i64 %38 to i32
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i32 %39)
%41 = load i64, i64* @JSIOCSBTNMAP
%42 = trunc i64 %41 to i32
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32 %42)
%44 = load i64, i64* @JSIOCGBTNMAP
%45 = trunc i64 %44 to i32
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i32 %45)
%47 = load i64, i64* @JS_CORR_NONE
%48 = trunc i64 %47 to i32
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i32 %48)
%50 = load i64, i64* @JS_CORR_BROKEN
%51 = trunc i64 %50 to i32
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0), i32 %51)
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [16 x i8] c"version = 0x%x\0A\00"
@JS_VERSION = global i64 0
@.str.4 = [21 x i8] c"event_button = 0x%x\0A\00"
@JS_EVENT_BUTTON = global i64 0
@.str.5 = [19 x i8] c"event_axis = 0x%x\0A\00"
@JS_EVENT_AXIS = global i64 0
@.str.6 = [19 x i8] c"event_init = 0x%x\0A\00"
@JS_EVENT_INIT = global i64 0
@.str.7 = [17 x i8] c"gversion = 0x%x\0A\00"
@JSIOCGVERSION = global i64 0
@.str.8 = [14 x i8] c"gaxes = 0x%x\0A\00"
@JSIOCGAXES = global i64 0
@.str.9 = [17 x i8] c"gbuttons = 0x%x\0A\00"
@JSIOCGBUTTONS = global i64 0
@.str.10 = [14 x i8] c"gname = 0x%x\0A\00"
@.str.11 = [14 x i8] c"scorr = 0x%x\0A\00"
@JSIOCSCORR = global i64 0
@.str.12 = [14 x i8] c"gcorr = 0x%x\0A\00"
@JSIOCGCORR = global i64 0
@.str.13 = [15 x i8] c"saxmap = 0x%x\0A\00"
@JSIOCSAXMAP = global i64 0
@.str.14 = [15 x i8] c"gaxmap = 0x%x\0A\00"
@JSIOCGAXMAP = global i64 0
@.str.15 = [16 x i8] c"sbtnmap = 0x%x\0A\00"
@JSIOCSBTNMAP = global i64 0
@.str.16 = [16 x i8] c"gbtnmap = 0x%x\0A\00"
@JSIOCGBTNMAP = global i64 0
@.str.17 = [18 x i8] c"corr_none = 0x%x\0A\00"
@JS_CORR_NONE = global i64 0
@.str.18 = [20 x i8] c"corr_broken = 0x%x\0A\00"
@JS_CORR_BROKEN = global i64 0
@str = [14 x i8] c"import struct\00"
@str.19 = [31 x i8] c"event = struct.Struct('=IhBB')\00"
@str.20 = [29 x i8] c"corr = struct.Struct('=ihH')\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.19, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.20, i64 0, i64 0))
%4 = load i64, i64* @JS_VERSION
%5 = trunc i64 %4 to i32
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %5)
%7 = load i64, i64* @JS_EVENT_BUTTON
%8 = trunc i64 %7 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %8)
%10 = load i64, i64* @JS_EVENT_AXIS
%11 = trunc i64 %10 to i32
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i64, i64* @JS_EVENT_INIT
%14 = trunc i64 %13 to i32
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %14)
%16 = load i64, i64* @JSIOCGVERSION
%17 = trunc i64 %16 to i32
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %17)
%19 = load i64, i64* @JSIOCGAXES
%20 = trunc i64 %19 to i32
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %20)
%22 = load i64, i64* @JSIOCGBUTTONS
%23 = trunc i64 %22 to i32
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %23)
%25 = tail call i64 @JSIOCGNAME(i32 4096)
%26 = trunc i64 %25 to i32
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 %26)
%28 = load i64, i64* @JSIOCSCORR
%29 = trunc i64 %28 to i32
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %29)
%31 = load i64, i64* @JSIOCGCORR
%32 = trunc i64 %31 to i32
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %32)
%34 = load i64, i64* @JSIOCSAXMAP
%35 = trunc i64 %34 to i32
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i32 %35)
%37 = load i64, i64* @JSIOCGAXMAP
%38 = trunc i64 %37 to i32
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i32 %38)
%40 = load i64, i64* @JSIOCSBTNMAP
%41 = trunc i64 %40 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32 %41)
%43 = load i64, i64* @JSIOCGBTNMAP
%44 = trunc i64 %43 to i32
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i32 %44)
%46 = load i64, i64* @JS_CORR_NONE
%47 = trunc i64 %46 to i32
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i32 %47)
%49 = load i64, i64* @JS_CORR_BROKEN
%50 = trunc i64 %49 to i32
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0), i32 %50)
ret i32 0
}