#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int report_id;
  scalar_t__ usage_index;
  scalar_t__ field_index;
  void *report_type;
};
struct hiddev_usage_ref_multi {
  int report_id;
  int num_fields;
  size_t num_values;
  unsigned int *values;
  TYPE_1__ uref;
  void *report_type;
};
struct hiddev_report_info {
  int report_id;
  int num_fields;
  size_t num_values;
  unsigned int *values;
  TYPE_1__ uref;
  void *report_type;
};

/* Variables and functions */
int /*<<< orphan*/ HIDIOCGREPORT;
int /*<<< orphan*/ HIDIOCGUSAGES;
void *HID_REPORT_TYPE_INPUT;
int ioctl(int, int /*<<< orphan*/, struct hiddev_usage_ref_multi *);
int /*<<< orphan*/ perror(char *);
int query_report(int fd, int id, unsigned int *buf, size_t size) {
  struct hiddev_usage_ref_multi uref;
  struct hiddev_report_info rinfo;
  int i = 0, rc = -1;
  rinfo.report_type = HID_REPORT_TYPE_INPUT;
  rinfo.report_id = id;
  rinfo.num_fields = 1;
  rc = ioctl(fd, HIDIOCGREPORT, &rinfo);
  if (rc < 0) {
    perror("HIDIOCGREPORT");
    return rc;
  }
  uref.uref.report_type = HID_REPORT_TYPE_INPUT;
  uref.uref.report_id = id;
  uref.uref.field_index = 0;
  uref.uref.usage_index = 0;
  uref.num_values = size;
  rc = ioctl(fd, HIDIOCGUSAGES, &uref);
  if (rc < 0) {
    perror("HIDIOCGUSAGES");
    return rc;
  }
  for (i = 0; i < size; i++) {
    buf[i] = uref.values[i];
  }
  return rc;
}


x86 assembly (clang, -O0):
<query_report>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0xa4(%rbp)
movl   $0xffffffff,-0xa8(%rbp)
ff ff ff
mov    0x2e84(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x68(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xa0(%rbp)
movl   $0x1,-0x9c(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e68(%rip),%rax
mov    (%rax),%esi
lea    -0xa0(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0xa8(%rbp)
cmpl   $0x0,-0xa8(%rbp)
jge    11b3 <query_report+0x93>
lea    0xe60(%rip),%rdi
call   1040 <perror@plt>
mov    -0xa8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1275 <query_report+0x155>
mov    0x2e1e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2dff(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0xa8(%rbp)
cmpl   $0x0,-0xa8(%rbp)
jge    1221 <query_report+0x101>
lea    0xe00(%rip),%rdi
call   1040 <perror@plt>
mov    -0xa8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1275 <query_report+0x155>
movl   $0x0,-0xa4(%rbp)
movslq -0xa4(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    126c <query_report+0x14c>
mov    -0x50(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    122b <query_report+0x10b>
mov    -0xa8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<query_report>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%r12d
mov    0x2e95(%rip),%r13
mov    0x0(%r13),%rax
mov    %rax,0x80(%rsp)
mov    %esi,0x48(%rsp)
movl   $0x1,0x4c(%rsp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
lea    0x48(%rsp),%rdx
call   1030 <ioctl@plt>
test   %eax,%eax
js     1315 <query_report+0x1f5>
mov    0x0(%r13),%rax
mov    %rax,0x38(%rsp)
mov    %ebp,0x20(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x28(%rsp)
mov    %r14,0x10(%rsp)
mov    0x2e51(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %r12d,%edi
call   1030 <ioctl@plt>
mov    %eax,%r15d
test   %eax,%eax
js     1326 <query_report+0x206>
test   %r14,%r14
je     1332 <query_report+0x212>
mov    0x18(%rsp),%rax
cmp    $0x8,%r14
jb     11d7 <query_report+0xb7>
lea    (%rax,%r14,4),%rcx
cmp    %rbx,%rcx
jbe    123c <query_report+0x11c>
lea    (%rbx,%r14,4),%rcx
cmp    %rcx,%rax
jae    123c <query_report+0x11c>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %r14,%rdx
mov    %r14,%rsi
and    $0x3,%rsi
je     1200 <query_report+0xe0>
nopl   0x0(%rax,%rax,1)
mov    (%rax,%rcx,4),%edi
mov    %edi,(%rbx,%rcx,4)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    11f0 <query_report+0xd0>
cmp    $0x3,%rdx
jb     1332 <query_report+0x212>
nopw   0x0(%rax,%rax,1)
mov    (%rax,%rcx,4),%edx
mov    %edx,(%rbx,%rcx,4)
mov    0x4(%rax,%rcx,4),%edx
mov    %edx,0x4(%rbx,%rcx,4)
mov    0x8(%rax,%rcx,4),%edx
mov    %edx,0x8(%rbx,%rcx,4)
mov    0xc(%rax,%rcx,4),%edx
mov    %edx,0xc(%rbx,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%r14
jne    1210 <query_report+0xf0>
jmp    1332 <query_report+0x212>
mov    %r14,%rcx
and    $0xfffffffffffffff8,%rcx
lea    -0x8(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0x18,%rdi
jae    1261 <query_report+0x141>
xor    %edi,%edi
jmp    12c8 <query_report+0x1a8>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movups (%rax,%rdi,4),%xmm0
movups 0x10(%rax,%rdi,4),%xmm1
movups %xmm0,(%rbx,%rdi,4)
movups %xmm1,0x10(%rbx,%rdi,4)
movups 0x20(%rax,%rdi,4),%xmm0
movups 0x30(%rax,%rdi,4),%xmm1
movups %xmm0,0x20(%rbx,%rdi,4)
movups %xmm1,0x30(%rbx,%rdi,4)
movups 0x40(%rax,%rdi,4),%xmm0
movups 0x50(%rax,%rdi,4),%xmm1
movups %xmm0,0x40(%rbx,%rdi,4)
movups %xmm1,0x50(%rbx,%rdi,4)
movups 0x60(%rax,%rdi,4),%xmm0
movups 0x70(%rax,%rdi,4),%xmm1
movups %xmm0,0x60(%rbx,%rdi,4)
movups %xmm1,0x70(%rbx,%rdi,4)
add    $0x20,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1270 <query_report+0x150>
test   %rdx,%rdx
je     130b <query_report+0x1eb>
lea    (%rbx,%rdi,4),%rsi
add    $0x10,%rsi
lea    (%rax,%rdi,4),%rdi
add    $0x10,%rdi
shl    $0x5,%rdx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x10(%rdi,%rbp,1),%xmm0
movups (%rdi,%rbp,1),%xmm1
movups %xmm0,-0x10(%rsi,%rbp,1)
movups %xmm1,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rdx
jne    12f0 <query_report+0x1d0>
cmp    %r14,%rcx
je     1332 <query_report+0x212>
jmp    11d9 <query_report+0xb9>
mov    %eax,%r15d
lea    0xce1(%rip),%rdi
call   1040 <perror@plt>
jmp    1332 <query_report+0x212>
lea    0xce1(%rip),%rdi
call   1040 <perror@plt>
mov    %r15d,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.hiddev_usage_ref_multi = type { i32, i32, i64, i32*, %struct.TYPE_2__, i8* }
%struct.TYPE_2__ = type { i32, i64, i64, i8* }
%struct.hiddev_report_info = type { i32, i32, i64, i32*, %struct.TYPE_2__, i8* }
@HID_REPORT_TYPE_INPUT = global i8* null
@HIDIOCGREPORT = global i32 0
@.str = [14 x i8] c"HIDIOCGREPORT\00"
@HIDIOCGUSAGES = global i32 0
@.str.1 = [14 x i8] c"HIDIOCGUSAGES\00"
define i32 @query_report(i32 %0, i32 %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i64
%10 = alloca %struct.hiddev_usage_ref_multi
%11 = alloca %struct.hiddev_report_info
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i64 %3, i64* %9
store i32 0, i32* %12
store i32 -1, i32* %13
%14 = load i8*, i8** @HID_REPORT_TYPE_INPUT
%15 = getelementptr inbounds %struct.hiddev_report_info, %struct.hiddev_report_info* %11, i32 0, i32 5
store i8* %14, i8** %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds %struct.hiddev_report_info, %struct.hiddev_report_info* %11, i32 0, i32 0
store i32 %16, i32* %17
%18 = getelementptr inbounds %struct.hiddev_report_info, %struct.hiddev_report_info* %11, i32 0, i32 1
store i32 1, i32* %18
%19 = load i32, i32* %6
%20 = load i32, i32* @HIDIOCGREPORT
%21 = bitcast %struct.hiddev_report_info* %11 to %struct.hiddev_usage_ref_multi*
%22 = call i32 @ioctl(i32 %19, i32 %20, %struct.hiddev_usage_ref_multi* %21)
store i32 %22, i32* %13
%23 = load i32, i32* %13
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %4
%26 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%27 = load i32, i32* %13
store i32 %27, i32* %5
br label %71
28: ; preds = %4
%29 = load i8*, i8** @HID_REPORT_TYPE_INPUT
%30 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %10, i32 0, i32 4
%31 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %30, i32 0, i32 3
store i8* %29, i8** %31
%32 = load i32, i32* %7
%33 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %10, i32 0, i32 4
%34 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %33, i32 0, i32 0
store i32 %32, i32* %34
%35 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %10, i32 0, i32 4
%36 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %35, i32 0, i32 2
store i64 0, i64* %36
%37 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %10, i32 0, i32 4
%38 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %37, i32 0, i32 1
store i64 0, i64* %38
%39 = load i64, i64* %9
%40 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %10, i32 0, i32 2
store i64 %39, i64* %40
%41 = load i32, i32* %6
%42 = load i32, i32* @HIDIOCGUSAGES
%43 = call i32 @ioctl(i32 %41, i32 %42, %struct.hiddev_usage_ref_multi* %10)
store i32 %43, i32* %13
%44 = load i32, i32* %13
%45 = icmp slt i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %28
%47 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%48 = load i32, i32* %13
store i32 %48, i32* %5
br label %71
49: ; preds = %28
store i32 0, i32* %12
br label %50
50: ; preds = %66, %49
%51 = load i32, i32* %12
%52 = sext i32 %51 to i64
%53 = load i64, i64* %9
%54 = icmp ult i64 %52, %53
br i1 %54, label %55, label %69
55: ; preds = %50
%56 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %10, i32 0, i32 3
%57 = load i32*, i32** %56
%58 = load i32, i32* %12
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i32, i32* %57, i64 %59
%61 = load i32, i32* %60
%62 = load i32*, i32** %8
%63 = load i32, i32* %12
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %62, i64 %64
store i32 %61, i32* %65
br label %66
66: ; preds = %55
%67 = load i32, i32* %12
%68 = add nsw i32 %67, 1
store i32 %68, i32* %12
br label %50
69: ; preds = %50
%70 = load i32, i32* %13
store i32 %70, i32* %5
br label %71
71: ; preds = %69, %46, %25
%72 = load i32, i32* %5
ret i32 %72
}

LLVM IR (-O2):
%struct.hiddev_usage_ref_multi = type { i32, i32, i64, i32*, %struct.TYPE_2__, i8* }
%struct.TYPE_2__ = type { i32, i64, i64, i8* }
%struct.hiddev_report_info = type { i32, i32, i64, i32*, %struct.TYPE_2__, i8* }
@HID_REPORT_TYPE_INPUT = global i8* null
@HIDIOCGREPORT = global i32 0
@.str = [14 x i8] c"HIDIOCGREPORT\00"
@HIDIOCGUSAGES = global i32 0
@.str.1 = [14 x i8] c"HIDIOCGUSAGES\00"
define i32 @query_report(i32 %0, i32 %1, i32* nocapture writeonly %2, i64 %3) {
%5 = alloca %struct.hiddev_usage_ref_multi
%6 = alloca %struct.hiddev_report_info
%7 = bitcast %struct.hiddev_usage_ref_multi* %5 to i8*
%8 = bitcast %struct.hiddev_report_info* %6 to i8*
%9 = load i8*, i8** @HID_REPORT_TYPE_INPUT
%10 = getelementptr inbounds %struct.hiddev_report_info, %struct.hiddev_report_info* %6, i64 0, i32 5
store i8* %9, i8** %10
%11 = getelementptr inbounds %struct.hiddev_report_info, %struct.hiddev_report_info* %6, i64 0, i32 0
store i32 %1, i32* %11
%12 = getelementptr inbounds %struct.hiddev_report_info, %struct.hiddev_report_info* %6, i64 0, i32 1
store i32 1, i32* %12
%13 = load i32, i32* @HIDIOCGREPORT
%14 = bitcast %struct.hiddev_report_info* %6 to %struct.hiddev_usage_ref_multi*
%15 = call i32 @ioctl(i32 %0, i32 %13, %struct.hiddev_usage_ref_multi* %14)
%16 = icmp slt i32 %15, 0
br i1 %16, label %155, label %17
17: ; preds = %4
%18 = load i8*, i8** @HID_REPORT_TYPE_INPUT
%19 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %5, i64 0, i32 4, i32 3
store i8* %18, i8** %19
%20 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %5, i64 0, i32 4, i32 0
store i32 %1, i32* %20
%21 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %5, i64 0, i32 4, i32 1
%22 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %5, i64 0, i32 2
%23 = bitcast i64* %21 to i8*
store i64 %3, i64* %22
%24 = load i32, i32* @HIDIOCGUSAGES
%25 = call i32 @ioctl(i32 %0, i32 %24, %struct.hiddev_usage_ref_multi* %5)
%26 = icmp slt i32 %25, 0
br i1 %26, label %155, label %27
27: ; preds = %17
%28 = icmp eq i64 %3, 0
br i1 %28, label %159, label %29
29: ; preds = %27
%30 = getelementptr inbounds %struct.hiddev_usage_ref_multi, %struct.hiddev_usage_ref_multi* %5, i64 0, i32 3
%31 = load i32*, i32** %30
%32 = icmp ult i64 %3, 8
br i1 %32, label %118, label %33
33: ; preds = %29
%34 = getelementptr i32, i32* %2, i64 %3
%35 = getelementptr i32, i32* %31, i64 %3
%36 = icmp ugt i32* %35, %2
%37 = icmp ult i32* %31, %34
%38 = and i1 %36, %37
br i1 %38, label %118, label %39
39: ; preds = %33
%40 = and i64 %3, -8
%41 = add i64 %40, -8
%42 = lshr exact i64 %41, 3
%43 = add nuw nsw i64 %42, 1
%44 = and i64 %43, 3
%45 = icmp ult i64 %41, 24
br i1 %45, label %97, label %46
46: ; preds = %39
%47 = and i64 %43, 4611686018427387900
br label %48
48: ; preds = %48, %46
%49 = phi i64 [ 0, %46 ], [ %94, %48 ]
%50 = phi i64 [ 0, %46 ], [ %95, %48 ]
%51 = getelementptr inbounds i32, i32* %31, i64 %49
%52 = bitcast i32* %51 to <4 x i32>*
%53 = load <4 x i32>, <4 x i32>* %52
%54 = getelementptr inbounds i32, i32* %51, i64 4
%55 = bitcast i32* %54 to <4 x i32>*
%56 = load <4 x i32>, <4 x i32>* %55
%57 = getelementptr inbounds i32, i32* %2, i64 %49
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> %53, <4 x i32>* %58
%59 = getelementptr inbounds i32, i32* %57, i64 4
%60 = bitcast i32* %59 to <4 x i32>*
store <4 x i32> %56, <4 x i32>* %60
%61 = or i64 %49, 8
%62 = getelementptr inbounds i32, i32* %31, i64 %61
%63 = bitcast i32* %62 to <4 x i32>*
%64 = load <4 x i32>, <4 x i32>* %63
%65 = getelementptr inbounds i32, i32* %62, i64 4
%66 = bitcast i32* %65 to <4 x i32>*
%67 = load <4 x i32>, <4 x i32>* %66
%68 = getelementptr inbounds i32, i32* %2, i64 %61
%69 = bitcast i32* %68 to <4 x i32>*
store <4 x i32> %64, <4 x i32>* %69
%70 = getelementptr inbounds i32, i32* %68, i64 4
%71 = bitcast i32* %70 to <4 x i32>*
store <4 x i32> %67, <4 x i32>* %71
%72 = or i64 %49, 16
%73 = getelementptr inbounds i32, i32* %31, i64 %72
%74 = bitcast i32* %73 to <4 x i32>*
%75 = load <4 x i32>, <4 x i32>* %74
%76 = getelementptr inbounds i32, i32* %73, i64 4
%77 = bitcast i32* %76 to <4 x i32>*
%78 = load <4 x i32>, <4 x i32>* %77
%79 = getelementptr inbounds i32, i32* %2, i64 %72
%80 = bitcast i32* %79 to <4 x i32>*
store <4 x i32> %75, <4 x i32>* %80
%81 = getelementptr inbounds i32, i32* %79, i64 4
%82 = bitcast i32* %81 to <4 x i32>*
store <4 x i32> %78, <4 x i32>* %82
%83 = or i64 %49, 24
%84 = getelementptr inbounds i32, i32* %31, i64 %83
%85 = bitcast i32* %84 to <4 x i32>*
%86 = load <4 x i32>, <4 x i32>* %85
%87 = getelementptr inbounds i32, i32* %84, i64 4
%88 = bitcast i32* %87 to <4 x i32>*
%89 = load <4 x i32>, <4 x i32>* %88
%90 = getelementptr inbounds i32, i32* %2, i64 %83
%91 = bitcast i32* %90 to <4 x i32>*
store <4 x i32> %86, <4 x i32>* %91
%92 = getelementptr inbounds i32, i32* %90, i64 4
%93 = bitcast i32* %92 to <4 x i32>*
store <4 x i32> %89, <4 x i32>* %93
%94 = add nuw i64 %49, 32
%95 = add i64 %50, 4
%96 = icmp eq i64 %95, %47
br i1 %96, label %97, label %48
97: ; preds = %48, %39
%98 = phi i64 [ 0, %39 ], [ %94, %48 ]
%99 = icmp eq i64 %44, 0
br i1 %99, label %116, label %100
100: ; preds = %97, %100
%101 = phi i64 [ %113, %100 ], [ %98, %97 ]
%102 = phi i64 [ %114, %100 ], [ 0, %97 ]
%103 = getelementptr inbounds i32, i32* %31, i64 %101
%104 = bitcast i32* %103 to <4 x i32>*
%105 = load <4 x i32>, <4 x i32>* %104
%106 = getelementptr inbounds i32, i32* %103, i64 4
%107 = bitcast i32* %106 to <4 x i32>*
%108 = load <4 x i32>, <4 x i32>* %107
%109 = getelementptr inbounds i32, i32* %2, i64 %101
%110 = bitcast i32* %109 to <4 x i32>*
store <4 x i32> %105, <4 x i32>* %110
%111 = getelementptr inbounds i32, i32* %109, i64 4
%112 = bitcast i32* %111 to <4 x i32>*
store <4 x i32> %108, <4 x i32>* %112
%113 = add nuw i64 %101, 8
%114 = add i64 %102, 1
%115 = icmp eq i64 %114, %44
br i1 %115, label %116, label %100
116: ; preds = %100, %97
%117 = icmp eq i64 %40, %3
br i1 %117, label %159, label %118
118: ; preds = %33, %29, %116
%119 = phi i64 [ 0, %33 ], [ 0, %29 ], [ %40, %116 ]
%120 = xor i64 %119, -1
%121 = add i64 %120, %3
%122 = and i64 %3, 3
%123 = icmp eq i64 %122, 0
br i1 %123, label %133, label %124
124: ; preds = %118, %124
%125 = phi i64 [ %130, %124 ], [ %119, %118 ]
%126 = phi i64 [ %131, %124 ], [ 0, %118 ]
%127 = getelementptr inbounds i32, i32* %31, i64 %125
%128 = load i32, i32* %127
%129 = getelementptr inbounds i32, i32* %2, i64 %125
store i32 %128, i32* %129
%130 = add nuw nsw i64 %125, 1
%131 = add i64 %126, 1
%132 = icmp eq i64 %131, %122
br i1 %132, label %133, label %124
133: ; preds = %124, %118
%134 = phi i64 [ %119, %118 ], [ %130, %124 ]
%135 = icmp ult i64 %121, 3
br i1 %135, label %159, label %136
136: ; preds = %133, %136
%137 = phi i64 [ %153, %136 ], [ %134, %133 ]
%138 = getelementptr inbounds i32, i32* %31, i64 %137
%139 = load i32, i32* %138
%140 = getelementptr inbounds i32, i32* %2, i64 %137
store i32 %139, i32* %140
%141 = add nuw nsw i64 %137, 1
%142 = getelementptr inbounds i32, i32* %31, i64 %141
%143 = load i32, i32* %142
%144 = getelementptr inbounds i32, i32* %2, i64 %141
store i32 %143, i32* %144
%145 = add nuw nsw i64 %137, 2
%146 = getelementptr inbounds i32, i32* %31, i64 %145
%147 = load i32, i32* %146
%148 = getelementptr inbounds i32, i32* %2, i64 %145
store i32 %147, i32* %148
%149 = add nuw nsw i64 %137, 3
%150 = getelementptr inbounds i32, i32* %31, i64 %149
%151 = load i32, i32* %150
%152 = getelementptr inbounds i32, i32* %2, i64 %149
store i32 %151, i32* %152
%153 = add nuw nsw i64 %137, 4
%154 = icmp eq i64 %153, %3
br i1 %154, label %159, label %136
155: ; preds = %17, %4
%156 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %4 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), %17 ]
%157 = phi i32 [ %15, %4 ], [ %25, %17 ]
%158 = call i32 @perror(i8* %156)
br label %159
159: ; preds = %133, %136, %116, %155, %27
%160 = phi i32 [ %25, %27 ], [ %157, %155 ], [ %25, %116 ], [ %25, %136 ], [ %25, %133 ]
ret i32 %160
}