#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 */
typedef scalar_t__ mz;
typedef scalar_t__ my;
typedef scalar_t__ mx;
typedef scalar_t__ gz;
typedef scalar_t__ gy;
typedef scalar_t__ gx;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ Usage();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ free(char *);
scalar_t__ getline(char **, unsigned int *, int /*<<< orphan*/ *);
scalar_t__ isspace(char);
int /*<<< orphan*/ printf(char *, unsigned char, unsigned char, unsigned char,
                          unsigned char, unsigned char, unsigned char,
                          unsigned char, unsigned char, unsigned char,
                          unsigned char, unsigned char, unsigned char, int);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *, int *, int *, int *,
                          int *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
scalar_t__ strlen(char *);
int main(int argc, char **argv) {
  char *line = NULL;
  unsigned int n = 0;
  FILE *fp = NULL;
  int index = 0;
  int group = 1;
  if (argc <= 1 || strcmp(argv[1], "-h") == 0) {
    Usage();
    return 0;
  }
  fp = fopen(argv[1], "r");
  if (fp == NULL) {
    fprintf(stderr, "%s: cannot open file %s\n", argv[0], argv[1]);
    return 0;
  }
  getline(&line, &n, fp);
  while (getline(&line, &n, fp) >= 0) {
    char *ch = line;
    int gx, gy, gz, mx, my, mz;
    while (ch && *ch && isspace(*ch))
      ch++;
    if (strlen(ch) == 0)
      break;
    if (ch && (*ch == 'A' || *ch == 'B'))
      ch++;
    while (ch && *ch && isspace(*ch))
      ch++;
    sscanf(ch, "%d %d %d %d %d %d", &gx, &gy, &gz, &mx, &my, &mz);
    printf("0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x "
           "%d 0\n",
           (unsigned char)((gx >> 8) & 0xff), (unsigned char)((gx)&0xff),
           (unsigned char)((gy >> 8) & 0xff), (unsigned char)((gy)&0xff),
           (unsigned char)((gz >> 8) & 0xff), (unsigned char)((gz)&0xff),
           (unsigned char)((mx >> 8) & 0xff), (unsigned char)((mx)&0xff),
           (unsigned char)((my >> 8) & 0xff), (unsigned char)((my)&0xff),
           (unsigned char)((mz >> 8) & 0xff), (unsigned char)((mz)&0xff),
           group);
    ++index;
    if (index % 4 == 0) {
      if (index >= 16)
        group = -1;
      else
        ++group;
    }
    free(line);
    line = NULL;
  }
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
movl   $0x0,-0x2c(%rbp)
mov    %edi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movq   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x1,-0x58(%rbp)
cmpl   $0x1,-0x30(%rbp)
jle    121f <main+0x6f>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf0(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1232 <main+0x82>
mov    $0x0,%al
call   1080 <Usage@plt>
movl   $0x0,-0x2c(%rbp)
jmp    1551 <main+0x3a1>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc2(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    1285 <main+0xd5>
mov    0x2d84(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rax
mov    (%rax),%rdx
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xd91(%rip),%rsi
call   10a0 <fprintf@plt>
movl   $0x0,-0x2c(%rbp)
jmp    1551 <main+0x3a1>
mov    -0x50(%rbp),%rdx
lea    -0x40(%rbp),%rdi
lea    -0x44(%rbp),%rsi
call   10d0 <getline@plt>
mov    -0x50(%rbp),%rdx
lea    -0x40(%rbp),%rdi
lea    -0x44(%rbp),%rsi
call   10d0 <getline@plt>
cmp    $0x0,%rax
jl     1541 <main+0x391>
mov    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x60(%rbp)
mov    %al,-0x79(%rbp)
je     12f4 <main+0x144>
mov    -0x60(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x79(%rbp)
je     12f4 <main+0x144>
mov    -0x60(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    1304 <main+0x154>
jmp    1315 <main+0x165>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    12b9 <main+0x109>
mov    -0x60(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jne    132d <main+0x17d>
jmp    1541 <main+0x391>
cmpq   $0x0,-0x60(%rbp)
je     1364 <main+0x1b4>
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
je     1358 <main+0x1a8>
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x42,%eax
jne    1364 <main+0x1b4>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1369 <main+0x1b9>
xor    %eax,%eax
cmpq   $0x0,-0x60(%rbp)
mov    %al,-0x7a(%rbp)
je     13a4 <main+0x1f4>
mov    -0x60(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x7a(%rbp)
je     13a4 <main+0x1f4>
mov    -0x60(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x7a(%rbp)
mov    -0x7a(%rbp),%al
test   $0x1,%al
jne    13b4 <main+0x204>
jmp    13c5 <main+0x215>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1369 <main+0x1b9>
mov    -0x60(%rbp),%rdi
lea    0xc4e(%rip),%rsi
lea    -0x64(%rbp),%rdx
lea    -0x68(%rbp),%rcx
lea    -0x6c(%rbp),%r8
lea    -0x70(%rbp),%r9
lea    -0x74(%rbp),%r10
lea    -0x78(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   10b0 <sscanf@plt>
mov    -0x64(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%sil
mov    -0x64(%rbp),%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x68(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x68(%rbp),%eax
and    $0xff,%eax
mov    %al,%r8b
mov    -0x6c(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%r9b
mov    -0x6c(%rbp),%eax
and    $0xff,%eax
mov    %al,%r13b
mov    -0x70(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%r12b
mov    -0x70(%rbp),%eax
and    $0xff,%eax
mov    %al,%r15b
mov    -0x74(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%r14b
mov    -0x74(%rbp),%eax
and    $0xff,%eax
mov    %al,%bl
mov    -0x78(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%r11b
mov    -0x78(%rbp),%eax
and    $0xff,%eax
mov    %al,%r10b
mov    -0x58(%rbp),%eax
lea    0xb9d(%rip),%rdi
movzbl %sil,%esi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %r9b,%r9d
movzbl %r13b,%r13d
mov    %r13d,(%rsp)
movzbl %r12b,%r12d
mov    %r12d,0x8(%rsp)
movzbl %r15b,%r15d
mov    %r15d,0x10(%rsp)
movzbl %r14b,%r14d
mov    %r14d,0x18(%rsp)
movzbl %bl,%ebx
mov    %ebx,0x20(%rsp)
movzbl %r11b,%r11d
mov    %r11d,0x28(%rsp)
movzbl %r10b,%r10d
mov    %r10d,0x30(%rsp)
mov    %eax,0x38(%rsp)
call   1060 <printf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    152b <main+0x37b>
cmpl   $0x10,-0x54(%rbp)
jl     151d <main+0x36d>
movl   $0xffffffff,-0x58(%rbp)
jmp    1526 <main+0x376>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    152b <main+0x37b>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x40(%rbp)
jmp    1296 <main+0xe6>
mov    -0x50(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movq   $0x0,(%rsp)
movl   $0x0,0x14(%rsp)
cmp    $0x2,%edi
jl     13c9 <main+0x229>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
lea    0xe2b(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     13c9 <main+0x229>
mov    0x8(%rbp),%rdi
lea    0xe15(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     13e1 <main+0x241>
mov    %rax,%r14
mov    %rsp,%rbp
lea    0x14(%rsp),%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   10c0 <getline@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   10c0 <getline@plt>
test   %rax,%rax
js     13bf <main+0x21f>
xor    %ebp,%ebp
mov    $0x1,%r15d
lea    0xc(%rsp),%rbx
lea    0x10(%rsp),%r12
mov    (%rsp),%r13
mov    0x0(%r13),%al
test   %al,%al
je     13bf <main+0x21f>
xchg   %ax,%ax
movsbl %al,%edi
call   1060 <isspace@plt>
test   %rax,%rax
je     126f <main+0xcf>
movzbl 0x1(%r13),%eax
add    $0x1,%r13
test   %al,%al
jne    1250 <main+0xb0>
jmp    13bf <main+0x21f>
mov    0x0(%r13),%al
test   %al,%al
je     13bf <main+0x21f>
mov    %r15,0x38(%rsp)
mov    %rbp,0x40(%rsp)
add    $0xbf,%al
xor    %r15d,%r15d
cmp    $0x2,%al
setb   %r15b
mov    0x0(%r13,%r15,1),%al
test   %al,%al
je     12bb <main+0x11b>
nopl   0x0(%rax)
movsbl %al,%edi
call   1060 <isspace@plt>
test   %rax,%rax
je     12bb <main+0x11b>
movzbl 0x1(%r13,%r15,1),%eax
add    $0x1,%r15
test   %al,%al
jne    12a0 <main+0x100>
add    %r15,%r13
mov    %r13,%rdi
lea    0xd56(%rip),%rsi
lea    0x24(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x18(%rsp),%r9
push   %rbx
push   %r12
call   10a0 <sscanf@plt>
add    $0x10,%rsp
mov    0x24(%rsp),%ebx
mov    0x20(%rsp),%ebp
mov    0x1c(%rsp),%edi
mov    0x18(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%eax
movzbl %al,%r13d
movzbl %ah,%eax
mov    %rax,%r12
movzbl %cl,%r11d
movzbl %ch,%eax
mov    %rax,%r10
movzbl %dl,%eax
mov    %rax,0x30(%rsp)
movzbl %dh,%eax
mov    %rax,0x28(%rsp)
movzbl %bh,%esi
movzbl %bl,%edx
mov    %edi,%eax
movzbl %al,%r15d
mov    %ebp,%ebx
movzbl %bh,%ecx
movzbl %bl,%r8d
movzbl %ah,%eax
lea    0xced(%rip),%rdi
mov    %eax,%r9d
mov    0x38(%rsp),%rbx
push   %rbx
push   %r13
push   %r12
push   %r11
push   %r10
push   0x58(%rsp)
push   0x58(%rsp)
push   %r15
call   1050 <printf@plt>
add    $0x40,%rsp
mov    0x40(%rsp),%rax
lea    0x1(%rax),%r13d
lea    0x1(%rbx),%ebp
cmp    $0xf,%eax
mov    $0xffffffff,%eax
cmovae %eax,%ebp
test   $0x3,%r13b
cmovne %ebx,%ebp
mov    (%rsp),%rdi
call   1030 <free@plt>
movq   $0x0,(%rsp)
mov    %rsp,%rdi
lea    0x14(%rsp),%rsi
mov    %r14,%rdx
call   10c0 <getline@plt>
mov    %ebp,%r15d
lea    0x10(%rsp),%r12
mov    %r13d,%ebp
lea    0xc(%rsp),%rbx
test   %rax,%rax
jns    123e <main+0x9e>
mov    %r14,%rdi
call   1040 <fclose@plt>
jmp    13d0 <main+0x230>
xor    %eax,%eax
call   1070 <Usage@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bf8(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%rdx
mov    0x8(%rbp),%rcx
lea    0xc0c(%rip),%rsi
call   1090 <fprintf@plt>
jmp    13d0 <main+0x230>

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [25 x i8] c"%s: cannot open file %s\0A\00"
@.str.3 = [18 x i8] c"%d %d %d %d %d %d\00"
@.str.4 = [72 x i8] c"0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x %d 0\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i32 0, i32* %7
store i32* null, i32** %8
store i32 0, i32* %9
store i32 1, i32* %10
%18 = load i32, i32* %4
%19 = icmp sle i32 %18, 1
br i1 %19, label %26, label %20
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %20, %2
%27 = call i32 (...) @Usage()
store i32 0, i32* %3
br label %177
28: ; preds = %20
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32* @fopen(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %32, i32** %8
%33 = load i32*, i32** %8
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %44
35: ; preds = %28
%36 = load i32, i32* @stderr
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 0
%39 = load i8*, i8** %38
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 1
%42 = load i8*, i8** %41
%43 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %39, i8* %42)
store i32 0, i32* %3
br label %177
44: ; preds = %28
%45 = load i32*, i32** %8
%46 = call i64 @getline(i8** %6, i32* %7, i32* %45)
br label %47
47: ; preds = %171, %44
%48 = load i32*, i32** %8
%49 = call i64 @getline(i8** %6, i32* %7, i32* %48)
%50 = icmp sge i64 %49, 0
br i1 %50, label %51, label %174
51: ; preds = %47
%52 = load i8*, i8** %6
store i8* %52, i8** %11
br label %53
53: ; preds = %68, %51
%54 = load i8*, i8** %11
%55 = icmp ne i8* %54, null
br i1 %55, label %56, label %66
56: ; preds = %53
%57 = load i8*, i8** %11
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %66
61: ; preds = %56
%62 = load i8*, i8** %11
%63 = load i8, i8* %62
%64 = call i64 @isspace(i8 signext %63)
%65 = icmp ne i64 %64, 0
br label %66
66: ; preds = %61, %56, %53
%67 = phi i1 [ false, %56 ], [ false, %53 ], [ %65, %61 ]
br i1 %67, label %68, label %71
68: ; preds = %66
%69 = load i8*, i8** %11
%70 = getelementptr inbounds i8, i8* %69, i32 1
store i8* %70, i8** %11
br label %53
71: ; preds = %66
%72 = load i8*, i8** %11
%73 = call i64 @strlen(i8* %72)
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %76
75: ; preds = %71
br label %174
76: ; preds = %71
%77 = load i8*, i8** %11
%78 = icmp ne i8* %77, null
br i1 %78, label %79, label %92
79: ; preds = %76
%80 = load i8*, i8** %11
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 65
br i1 %83, label %89, label %84
84: ; preds = %79
%85 = load i8*, i8** %11
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 66
br i1 %88, label %89, label %92
89: ; preds = %84, %79
%90 = load i8*, i8** %11
%91 = getelementptr inbounds i8, i8* %90, i32 1
store i8* %91, i8** %11
br label %92
92: ; preds = %89, %84, %76
br label %93
93: ; preds = %108, %92
%94 = load i8*, i8** %11
%95 = icmp ne i8* %94, null
br i1 %95, label %96, label %106
96: ; preds = %93
%97 = load i8*, i8** %11
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %106
101: ; preds = %96
%102 = load i8*, i8** %11
%103 = load i8, i8* %102
%104 = call i64 @isspace(i8 signext %103)
%105 = icmp ne i64 %104, 0
br label %106
106: ; preds = %101, %96, %93
%107 = phi i1 [ false, %96 ], [ false, %93 ], [ %105, %101 ]
br i1 %107, label %108, label %111
108: ; preds = %106
%109 = load i8*, i8** %11
%110 = getelementptr inbounds i8, i8* %109, i32 1
store i8* %110, i8** %11
br label %93
111: ; preds = %106
%112 = load i8*, i8** %11
%113 = call i32 @sscanf(i8* %112, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32* %12, i32* %13, i32* %14, i32* %15, i32* %16, i32* %17)
%114 = load i32, i32* %12
%115 = ashr i32 %114, 8
%116 = and i32 %115, 255
%117 = trunc i32 %116 to i8
%118 = load i32, i32* %12
%119 = and i32 %118, 255
%120 = trunc i32 %119 to i8
%121 = load i32, i32* %13
%122 = ashr i32 %121, 8
%123 = and i32 %122, 255
%124 = trunc i32 %123 to i8
%125 = load i32, i32* %13
%126 = and i32 %125, 255
%127 = trunc i32 %126 to i8
%128 = load i32, i32* %14
%129 = ashr i32 %128, 8
%130 = and i32 %129, 255
%131 = trunc i32 %130 to i8
%132 = load i32, i32* %14
%133 = and i32 %132, 255
%134 = trunc i32 %133 to i8
%135 = load i32, i32* %15
%136 = ashr i32 %135, 8
%137 = and i32 %136, 255
%138 = trunc i32 %137 to i8
%139 = load i32, i32* %15
%140 = and i32 %139, 255
%141 = trunc i32 %140 to i8
%142 = load i32, i32* %16
%143 = ashr i32 %142, 8
%144 = and i32 %143, 255
%145 = trunc i32 %144 to i8
%146 = load i32, i32* %16
%147 = and i32 %146, 255
%148 = trunc i32 %147 to i8
%149 = load i32, i32* %17
%150 = ashr i32 %149, 8
%151 = and i32 %150, 255
%152 = trunc i32 %151 to i8
%153 = load i32, i32* %17
%154 = and i32 %153, 255
%155 = trunc i32 %154 to i8
%156 = load i32, i32* %10
%157 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0), i8 zeroext %117, i8 zeroext %120, i8 zeroext %124, i8 zeroext %127, i8 zeroext %131, i8 zeroext %134, i8 zeroext %138, i8 zeroext %141, i8 zeroext %145, i8 zeroext %148, i8 zeroext %152, i8 zeroext %155, i32 %156)
%158 = load i32, i32* %9
%159 = add nsw i32 %158, 1
store i32 %159, i32* %9
%160 = load i32, i32* %9
%161 = srem i32 %160, 4
%162 = icmp eq i32 %161, 0
br i1 %162, label %163, label %171
163: ; preds = %111
%164 = load i32, i32* %9
%165 = icmp sge i32 %164, 16
br i1 %165, label %166, label %167
166: ; preds = %163
store i32 -1, i32* %10
br label %170
167: ; preds = %163
%168 = load i32, i32* %10
%169 = add nsw i32 %168, 1
store i32 %169, i32* %10
br label %170
170: ; preds = %167, %166
br label %171
171: ; preds = %170, %111
%172 = load i8*, i8** %6
%173 = call i32 @free(i8* %172)
store i8* null, i8** %6
br label %47
174: ; preds = %75, %47
%175 = load i32*, i32** %8
%176 = call i32 @fclose(i32* %175)
store i32 0, i32* %3
br label %177
177: ; preds = %174, %35, %26
%178 = load i32, i32* %3
ret i32 %178
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [25 x i8] c"%s: cannot open file %s\0A\00"
@.str.3 = [18 x i8] c"%d %d %d %d %d %d\00"
@.str.4 = [72 x i8] c"0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x 0x%02x%02x %d 0\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%12 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%13 = icmp slt i32 %0, 2
br i1 %13, label %19, label %14
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %14, %2
%20 = tail call i32 (...) @Usage()
br label %117
21: ; preds = %14
%22 = load i8*, i8** %15
%23 = tail call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i32, i32* @stderr
%27 = load i8*, i8** %1
%28 = load i8*, i8** %15
%29 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %27, i8* %28)
br label %117
30: ; preds = %21
%31 = call i64 @getline(i8** %3, i32* %4, i32* %23)
%32 = call i64 @getline(i8** %3, i32* %4, i32* %23)
%33 = icmp sgt i64 %32, -1
br i1 %33, label %34, label %115
34: ; preds = %30
%35 = bitcast i32* %5 to i8*
%36 = bitcast i32* %6 to i8*
%37 = bitcast i32* %7 to i8*
%38 = bitcast i32* %8 to i8*
%39 = bitcast i32* %9 to i8*
%40 = bitcast i32* %10 to i8*
br label %41
41: ; preds = %34, %76
%42 = phi i32 [ 1, %34 ], [ %110, %76 ]
%43 = phi i32 [ 0, %34 ], [ %104, %76 ]
%44 = load i8*, i8** %3
%45 = load i8, i8* %44
%46 = icmp eq i8 %45, 0
br i1 %46, label %75, label %47
47: ; preds = %41, %52
%48 = phi i8 [ %54, %52 ], [ %45, %41 ]
%49 = phi i8* [ %53, %52 ], [ %44, %41 ]
%50 = call i64 @isspace(i8 signext %48)
%51 = icmp eq i64 %50, 0
br i1 %51, label %56, label %52
52: ; preds = %47
%53 = getelementptr inbounds i8, i8* %49, i64 1
%54 = load i8, i8* %53
%55 = icmp eq i8 %54, 0
br i1 %55, label %75, label %47
56: ; preds = %47
%57 = load i8, i8* %49
%58 = icmp eq i8 %57, 0
br i1 %58, label %75, label %59
59: ; preds = %56
%60 = add i8 %57, -65
%61 = icmp ult i8 %60, 2
%62 = zext i1 %61 to i64
%63 = getelementptr i8, i8* %49, i64 %62
%64 = load i8, i8* %63
%65 = icmp eq i8 %64, 0
br i1 %65, label %76, label %66
66: ; preds = %59, %71
%67 = phi i8 [ %73, %71 ], [ %64, %59 ]
%68 = phi i8* [ %72, %71 ], [ %63, %59 ]
%69 = call i64 @isspace(i8 signext %67)
%70 = icmp eq i64 %69, 0
br i1 %70, label %76, label %71
71: ; preds = %66
%72 = getelementptr inbounds i8, i8* %68, i64 1
%73 = load i8, i8* %72
%74 = icmp eq i8 %73, 0
br i1 %74, label %76, label %66
75: ; preds = %56, %41, %52
br label %115
76: ; preds = %71, %66, %59
%77 = phi i8* [ %63, %59 ], [ %68, %66 ], [ %72, %71 ]
%78 = call i32 @sscanf(i8* %77, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10)
%79 = load i32, i32* %5
%80 = lshr i32 %79, 8
%81 = trunc i32 %80 to i8
%82 = trunc i32 %79 to i8
%83 = load i32, i32* %6
%84 = lshr i32 %83, 8
%85 = trunc i32 %84 to i8
%86 = trunc i32 %83 to i8
%87 = load i32, i32* %7
%88 = lshr i32 %87, 8
%89 = trunc i32 %88 to i8
%90 = trunc i32 %87 to i8
%91 = load i32, i32* %8
%92 = lshr i32 %91, 8
%93 = trunc i32 %92 to i8
%94 = trunc i32 %91 to i8
%95 = load i32, i32* %9
%96 = lshr i32 %95, 8
%97 = trunc i32 %96 to i8
%98 = trunc i32 %95 to i8
%99 = load i32, i32* %10
%100 = lshr i32 %99, 8
%101 = trunc i32 %100 to i8
%102 = trunc i32 %99 to i8
%103 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0), i8 zeroext %81, i8 zeroext %82, i8 zeroext %85, i8 zeroext %86, i8 zeroext %89, i8 zeroext %90, i8 zeroext %93, i8 zeroext %94, i8 zeroext %97, i8 zeroext %98, i8 zeroext %101, i8 zeroext %102, i32 %42)
%104 = add nuw nsw i32 %43, 1
%105 = and i32 %104, 3
%106 = icmp eq i32 %105, 0
%107 = icmp ugt i32 %43, 14
%108 = add nsw i32 %42, 1
%109 = select i1 %107, i32 -1, i32 %108
%110 = select i1 %106, i32 %109, i32 %42
%111 = load i8*, i8** %3
%112 = call i32 @free(i8* %111)
store i8* null, i8** %3
%113 = call i64 @getline(i8** %3, i32* %4, i32* %23)
%114 = icmp sgt i64 %113, -1
br i1 %114, label %41, label %115
115: ; preds = %76, %30, %75
%116 = call i32 @fclose(i32* %23)
br label %117
117: ; preds = %115, %25, %19
ret i32 0
}