#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 int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, unsigned short,
                         int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int read16LE(int /*<<< orphan*/ *, unsigned short *);
int read32LE(int /*<<< orphan*/ *, unsigned int *);
int main(int arvc, char **argv) {
  if (arvc < 2) {
    printf("U r sux!\n");
    return 1;
  }
  FILE *bnk = fopen(argv[1], "rb");
  if (!bnk) {
    printf("CANT OPEN!\n");
    return -1;
  }
  unsigned short numIns, numInsUsed;
  unsigned int nameOffset, dataOffset;
  fseek(bnk, 8, SEEK_SET);
  if (read16LE(bnk, &numInsUsed) != 2) {
    printf("CANT READ 1!\n");
    return -1;
  }
  if (read16LE(bnk, &numIns) != 2) {
    printf("CANT READ 2!\n");
    return -1;
  }
  if (read32LE(bnk, &nameOffset) != 4) {
    printf("CANT READ 3!\n");
    return -1;
  }
  if (read32LE(bnk, &dataOffset) != 4) {
    printf("CANT READ 4!\n");
    return -1;
  }
  unsigned short i = 0;
  for (i = 0; i < numIns; i++) {
    fseek(bnk, nameOffset + 12 * i, SEEK_SET);
    unsigned short insIndex;
    unsigned short insAddress;
    unsigned char flags;
    unsigned char ins[30];
    unsigned char name[9];
    if (read16LE(bnk, &insIndex) != 2) {
      printf("I CAN'T READ INSTRUMENT NAME SLOT :(\n");
      return -1;
    }
    if (fread(&flags, 1, 1, bnk) != 1)
      return -1;
    if (fread(name, 1, 9, bnk) != 9)
      return -1;
    int j = 0;
    for (j = 0; j < 8; j++) {
      if (name[j] < 0x21 || name[j] >= 127)
        name[j] = '?';
    }
    name[8] = '\0';
    printf("[%-8s] FLAGS: 0x%02X, IDX: %05d => ", name, flags, insIndex);
    insAddress = dataOffset + (insIndex * 30);
    fseek(bnk, insAddress, SEEK_SET);
    if (fread(ins, 1, 30, bnk) != 30) {
      printf("I CAN'T READ INSTRUMENT :(\n");
      return -1;
    }
    printf("P=0x%02X VN=0x%03d "
           "{OP1 L=0x%02X M=0x%02X F=0x%03X A=0x%02X S=0x%02X E=0x%02X "
           "D=0x%02X r=0x%02X l=0x%02X A=0x%02X V=0x%02X R=0x%02X C=0x%02X} "
           "{OP2 L=0x%02X M=0x%02X F=%03d A=0x%02X S=0x%02X E=0x%02X D=0x%02X "
           "r=0x%02X l=0x%02X A=0x%02X V=0x%02X R=0x%02X C=0x%02X} "
           "W1=0x%02X W2=0x%02X\n",
           ins[0], ins[1], ins[2], ins[3], ins[4], ins[5], ins[6], ins[7],
           ins[8], ins[9], ins[10], ins[11], ins[12], ins[13], ins[14], ins[15],
           ins[16], ins[17], ins[18], ins[19], ins[20], ins[21], ins[22],
           ins[23], ins[24], ins[25], ins[26], ins[27], ins[28], ins[29]);
  }
  fclose(bnk);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
movl   $0x0,-0x2c(%rbp)
mov    %edi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
cmpl   $0x2,-0x30(%rbp)
jge    11b6 <main+0x46>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x2c(%rbp)
jmp    168e <main+0x51e>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe45(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    11f3 <main+0x83>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
mov    -0x40(%rbp),%rdi
mov    0x2de2(%rip),%rax
mov    (%rax),%edx
mov    $0x8,%esi
call   1070 <fseek@plt>
mov    -0x40(%rbp),%rdi
lea    -0x44(%rbp),%rsi
call   1090 <read16LE@plt>
cmp    $0x2,%eax
je     123a <main+0xca>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
mov    -0x40(%rbp),%rdi
lea    -0x42(%rbp),%rsi
call   1090 <read16LE@plt>
cmp    $0x2,%eax
je     126a <main+0xfa>
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
mov    -0x40(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1040 <read32LE@plt>
cmp    $0x4,%eax
je     129a <main+0x12a>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
mov    -0x40(%rbp),%rdi
lea    -0x4c(%rbp),%rsi
call   1040 <read32LE@plt>
cmp    $0x4,%eax
je     12ca <main+0x15a>
lea    0xd8c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
movw   $0x0,-0x4e(%rbp)
movw   $0x0,-0x4e(%rbp)
movzwl -0x4e(%rbp),%eax
movzwl -0x42(%rbp),%ecx
cmp    %ecx,%eax
jge    167e <main+0x50e>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%eax
movzwl -0x4e(%rbp),%ecx
imul   $0xc,%ecx,%ecx
add    %ecx,%eax
mov    0x2ce3(%rip),%rcx
mov    (%rcx),%edx
movzwl %ax,%esi
call   1070 <fseek@plt>
mov    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1090 <read16LE@plt>
cmp    $0x2,%eax
je     1337 <main+0x1c7>
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
mov    -0x40(%rbp),%rcx
lea    -0x53(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
cmp    $0x1,%eax
je     1360 <main+0x1f0>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
lea    -0x89(%rbp),%rdi
mov    -0x40(%rbp),%rcx
mov    $0x1,%esi
mov    $0x9,%edx
call   1030 <fread@plt>
cmp    $0x9,%eax
je     138f <main+0x21f>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
movl   $0x0,-0x90(%rbp)
movl   $0x0,-0x90(%rbp)
cmpl   $0x8,-0x90(%rbp)
jge    1408 <main+0x298>
movslq -0x90(%rbp),%rax
movzbl -0x89(%rbp,%rax,1),%eax
ff
cmp    $0x21,%eax
jl     13e0 <main+0x270>
movslq -0x90(%rbp),%rax
movzbl -0x89(%rbp,%rax,1),%eax
ff
cmp    $0x7f,%eax
jl     13ef <main+0x27f>
movslq -0x90(%rbp),%rax
movb   $0x3f,-0x89(%rbp,%rax,1)
3f
jmp    13f4 <main+0x284>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    13a3 <main+0x233>
movb   $0x0,-0x81(%rbp)
lea    -0x89(%rbp),%rsi
movzbl -0x53(%rbp),%edx
movzwl -0x50(%rbp),%ecx
lea    0xc52(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4c(%rbp),%eax
movzwl -0x50(%rbp),%ecx
imul   $0x1e,%ecx,%ecx
add    %ecx,%eax
mov    %ax,-0x52(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x52(%rbp),%ax
mov    0x2b95(%rip),%rcx
mov    (%rcx),%edx
movzwl %ax,%esi
call   1070 <fseek@plt>
lea    -0x80(%rbp),%rdi
mov    -0x40(%rbp),%rcx
mov    $0x1,%esi
mov    $0x1e,%edx
call   1030 <fread@plt>
cmp    $0x1e,%eax
je     148f <main+0x31f>
lea    0xc1f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    168e <main+0x51e>
movzbl -0x80(%rbp),%esi
movzbl -0x7f(%rbp),%edx
movzbl -0x7e(%rbp),%ecx
movzbl -0x7d(%rbp),%r8d
movzbl -0x7c(%rbp),%r9d
movzbl -0x7b(%rbp),%eax
movzbl -0x7a(%rbp),%edi
mov    %edi,-0xd4(%rbp)
movzbl -0x79(%rbp),%edi
mov    %edi,-0xd0(%rbp)
movzbl -0x78(%rbp),%edi
mov    %edi,-0xcc(%rbp)
movzbl -0x77(%rbp),%edi
mov    %edi,-0xc8(%rbp)
movzbl -0x76(%rbp),%edi
mov    %edi,-0xc4(%rbp)
movzbl -0x75(%rbp),%edi
mov    %edi,-0xc0(%rbp)
movzbl -0x74(%rbp),%edi
mov    %edi,-0xbc(%rbp)
movzbl -0x73(%rbp),%edi
mov    %edi,-0xb8(%rbp)
movzbl -0x72(%rbp),%edi
mov    %edi,-0xb4(%rbp)
movzbl -0x71(%rbp),%edi
mov    %edi,-0xb0(%rbp)
movzbl -0x70(%rbp),%edi
mov    %edi,-0xac(%rbp)
movzbl -0x6f(%rbp),%edi
mov    %edi,-0xa8(%rbp)
movzbl -0x6e(%rbp),%edi
mov    %edi,-0xa4(%rbp)
movzbl -0x6d(%rbp),%edi
mov    %edi,-0xa0(%rbp)
movzbl -0x6c(%rbp),%edi
mov    %edi,-0x9c(%rbp)
movzbl -0x6b(%rbp),%edi
mov    %edi,-0x98(%rbp)
movzbl -0x6a(%rbp),%r13d
movzbl -0x69(%rbp),%r12d
movzbl -0x68(%rbp),%r15d
movzbl -0x67(%rbp),%r14d
movzbl -0x66(%rbp),%ebx
movzbl -0x65(%rbp),%r11d
movzbl -0x64(%rbp),%r10d
movzbl -0x63(%rbp),%edi
mov    %edi,-0x94(%rbp)
lea    0xb3b(%rip),%rdi
mov    %eax,(%rsp)
mov    -0xd4(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0xd0(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0xcc(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0xc8(%rbp),%eax
mov    %eax,0x20(%rsp)
mov    -0xc4(%rbp),%eax
mov    %eax,0x28(%rsp)
mov    -0xc0(%rbp),%eax
mov    %eax,0x30(%rsp)
mov    -0xbc(%rbp),%eax
mov    %eax,0x38(%rsp)
mov    -0xb8(%rbp),%eax
mov    %eax,0x40(%rsp)
mov    -0xb4(%rbp),%eax
mov    %eax,0x48(%rsp)
mov    -0xb0(%rbp),%eax
mov    %eax,0x50(%rsp)
mov    -0xac(%rbp),%eax
mov    %eax,0x58(%rsp)
mov    -0xa8(%rbp),%eax
mov    %eax,0x60(%rsp)
mov    -0xa4(%rbp),%eax
mov    %eax,0x68(%rsp)
mov    -0xa0(%rbp),%eax
mov    %eax,0x70(%rsp)
mov    -0x9c(%rbp),%eax
mov    %eax,0x78(%rsp)
mov    -0x98(%rbp),%eax
mov    %eax,0x80(%rsp)
mov    -0x94(%rbp),%eax
mov    %r13d,0x88(%rsp)
mov    %r12d,0x90(%rsp)
mov    %r15d,0x98(%rsp)
mov    %r14d,0xa0(%rsp)
mov    %ebx,0xa8(%rsp)
mov    %r11d,0xb0(%rsp)
mov    %r10d,0xb8(%rsp)
mov    %eax,0xc0(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4e(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x4e(%rbp)
jmp    12d6 <main+0x166>
mov    -0x40(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x178,%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    $0xe8,%rsp
cmp    $0x1,%edi
jg     11ac <main+0x2c>
lea    0x1025(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
jmp    15dc <main+0x45c>
mov    0x8(%rsi),%rdi
lea    0xe49(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     15a7 <main+0x427>
mov    %rax,%rbx
mov    0x2e11(%rip),%rbp
mov    0x0(%rbp),%edx
mov    %rax,%rdi
mov    $0x8,%esi
call   1080 <fseek@plt>
lea    0x46(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <read16LE@plt>
cmp    $0x2,%eax
jne    15b0 <main+0x430>
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <read16LE@plt>
cmp    $0x2,%eax
jne    15b9 <main+0x439>
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <read32LE@plt>
cmp    $0x4,%eax
jne    15c2 <main+0x442>
lea    0x3c(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <read32LE@plt>
cmp    $0x4,%eax
jne    15cb <main+0x44b>
cmpw   $0x0,0xe(%rsp)
je     159b <main+0x41b>
lea    0x2(%rsp),%r14
xor    %r15d,%r15d
xor    %r12d,%r12d
movzwl 0x40(%rsp),%eax
add    %r15w,%ax
mov    0x0(%rbp),%edx
movzwl %ax,%esi
mov    %rbx,%rdi
call   1080 <fseek@plt>
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
call   10a0 <read16LE@plt>
cmp    $0x2,%eax
jne    15ee <main+0x46e>
lea    0xb(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x1,%eax
jne    15d7 <main+0x457>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x9,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x9,%eax
jne    15d7 <main+0x457>
movzbl 0x2(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     12c9 <main+0x149>
movb   $0x3f,0x2(%rsp)
movzbl 0x3(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     12d9 <main+0x159>
movb   $0x3f,0x3(%rsp)
movzbl 0x4(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     12e9 <main+0x169>
movb   $0x3f,0x4(%rsp)
movzbl 0x5(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     12f9 <main+0x179>
movb   $0x3f,0x5(%rsp)
movzbl 0x6(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     1309 <main+0x189>
movb   $0x3f,0x6(%rsp)
movzbl 0x7(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     1319 <main+0x199>
movb   $0x3f,0x7(%rsp)
movzbl 0x8(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     1329 <main+0x1a9>
movb   $0x3f,0x8(%rsp)
movzbl 0x9(%rsp),%eax
add    $0x81,%al
cmp    $0xa1,%al
ja     1339 <main+0x1b9>
movb   $0x3f,0x9(%rsp)
movb   $0x0,0xa(%rsp)
movzbl 0xb(%rsp),%edx
movzwl 0xc(%rsp),%ecx
lea    0xcb4(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0xc(%rsp),%eax
mov    %eax,%ecx
shl    $0x5,%ecx
sub    %eax,%ecx
sub    %eax,%ecx
add    0x3c(%rsp),%ecx
mov    0x0(%rbp),%edx
movzwl %cx,%esi
mov    %rbx,%rdi
call   1080 <fseek@plt>
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1e,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x1e,%eax
jne    15f7 <main+0x477>
movzbl 0x10(%rsp),%esi
movzbl 0x11(%rsp),%edx
movzbl 0x12(%rsp),%ecx
movzbl 0x13(%rsp),%r8d
movzbl 0x14(%rsp),%r9d
movzbl 0x15(%rsp),%eax
mov    %rax,0xe0(%rsp)
movzbl 0x16(%rsp),%eax
mov    %rax,0xd8(%rsp)
movzbl 0x17(%rsp),%eax
mov    %rax,0xd0(%rsp)
movzbl 0x18(%rsp),%eax
mov    %rax,0xc8(%rsp)
movzbl 0x19(%rsp),%eax
mov    %rax,0xc0(%rsp)
movzbl 0x1a(%rsp),%eax
mov    %rax,0xb8(%rsp)
movzbl 0x1b(%rsp),%eax
mov    %rax,0xb0(%rsp)
movzbl 0x1c(%rsp),%eax
mov    %rax,0xa8(%rsp)
movzbl 0x1d(%rsp),%eax
mov    %rax,0xa0(%rsp)
movzbl 0x1e(%rsp),%eax
mov    %rax,0x98(%rsp)
movzbl 0x1f(%rsp),%eax
mov    %rax,0x90(%rsp)
movzbl 0x20(%rsp),%eax
mov    %rax,0x88(%rsp)
movzbl 0x21(%rsp),%eax
mov    %rax,0x80(%rsp)
movzbl 0x22(%rsp),%eax
mov    %rax,0x78(%rsp)
movzbl 0x23(%rsp),%eax
mov    %rax,0x70(%rsp)
movzbl 0x24(%rsp),%eax
mov    %rax,0x68(%rsp)
movzbl 0x25(%rsp),%eax
mov    %rax,0x60(%rsp)
movzbl 0x26(%rsp),%eax
mov    %rax,0x58(%rsp)
movzbl 0x27(%rsp),%eax
mov    %rax,0x50(%rsp)
movzbl 0x28(%rsp),%eax
mov    %rax,0x48(%rsp)
movzbl 0x29(%rsp),%r13d
mov    %r15d,%r14d
movzbl 0x2a(%rsp),%r15d
movzbl 0x2b(%rsp),%r10d
movzbl 0x2c(%rsp),%r11d
mov    %r12d,%ebp
movzbl 0x2d(%rsp),%r12d
sub    $0x8,%rsp
lea    0xb55(%rip),%rdi
xor    %eax,%eax
push   %r12
mov    %ebp,%r12d
push   %r11
push   %r10
push   %r15
mov    %r14d,%r15d
push   %r13
push   0x78(%rsp)
push   0x88(%rsp)
lea    0x42(%rsp),%r14
mov    0x2ae5(%rip),%rbp
push   0x98(%rsp)
push   0xa8(%rsp)
push   0xb8(%rsp)
push   0xc8(%rsp)
push   0xd8(%rsp)
push   0xe8(%rsp)
push   0xf8(%rsp)
push   0x108(%rsp)
push   0x118(%rsp)
push   0x128(%rsp)
push   0x138(%rsp)
push   0x148(%rsp)
push   0x158(%rsp)
push   0x168(%rsp)
push   0x178(%rsp)
push   0x188(%rsp)
push   0x198(%rsp)
push   0x1a8(%rsp)
call   1070 <printf@plt>
add    $0xd0,%rsp
add    $0x1,%r12d
movzwl 0xe(%rsp),%eax
add    $0xc,%r15d
cmp    %eax,%r12d
jb     124e <main+0xce>
mov    %rbx,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
jmp    15dc <main+0x45c>
lea    0xb95(%rip),%rdi
jmp    15d2 <main+0x452>
lea    0xbfe(%rip),%rdi
jmp    15d2 <main+0x452>
lea    0xbe8(%rip),%rdi
jmp    15d2 <main+0x452>
lea    0xbd2(%rip),%rdi
jmp    15d2 <main+0x452>
lea    0xbbc(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb74(%rip),%rdi
jmp    15d2 <main+0x452>
lea    0xb50(%rip),%rdi
jmp    15d2 <main+0x452>

LLVM IR (-O0):
@.str = [10 x i8] c"U r sux!\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [12 x i8] c"CANT OPEN!\0A\00"
@SEEK_SET = global i32 0
@.str.3 = [14 x i8] c"CANT READ 1!\0A\00"
@.str.4 = [14 x i8] c"CANT READ 2!\0A\00"
@.str.5 = [14 x i8] c"CANT READ 3!\0A\00"
@.str.6 = [14 x i8] c"CANT READ 4!\0A\00"
@.str.7 = [38 x i8] c"I CAN'T READ INSTRUMENT NAME SLOT :(\0A\00"
@.str.8 = [36 x i8] c"[%-8s] FLAGS: 0x%02X, IDX: %05d => \00"
@.str.9 = [28 x i8] c"I CAN'T READ INSTRUMENT :(\0A\00"
@.str.10 = [284 x i8] c"P=0x%02X VN=0x%03d {OP1 L=0x%02X M=0x%02X F=0x%03X A=0x%02X S=0x%02X E=0x%02X D=0x%02X r=0x%02X l=0x%02X A=0x%02X V=0x%02X R=0x%02X C=0x%02X} {OP2 L=0x%02X M=0x%02X F=%03d A=0x%02X S=0x%02X E=0x%02X D=0x%02X r=0x%02X l=0x%02X A=0x%02X V=0x%02X R=0x%02X C=0x%02X} W1=0x%02X W2=0x%02X\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i16
%8 = alloca i16
%9 = alloca i32
%10 = alloca i32
%11 = alloca i16
%12 = alloca i16
%13 = alloca i16
%14 = alloca i8
%15 = alloca [30 x i8]
%16 = alloca [9 x i8]
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 2
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %239
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %26, i32** %6
%27 = load i32*, i32** %6
%28 = icmp ne i32* %27, null
br i1 %28, label %31, label %29
29: ; preds = %22
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %239
31: ; preds = %22
%32 = load i32*, i32** %6
%33 = load i32, i32* @SEEK_SET
%34 = call i32 @fseek(i32* %32, i16 zeroext 8, i32 %33)
%35 = load i32*, i32** %6
%36 = call i32 @read16LE(i32* %35, i16* %8)
%37 = icmp ne i32 %36, 2
br i1 %37, label %38, label %40
38: ; preds = %31
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %3
br label %239
40: ; preds = %31
%41 = load i32*, i32** %6
%42 = call i32 @read16LE(i32* %41, i16* %7)
%43 = icmp ne i32 %42, 2
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %3
br label %239
46: ; preds = %40
%47 = load i32*, i32** %6
%48 = call i32 @read32LE(i32* %47, i32* %9)
%49 = icmp ne i32 %48, 4
br i1 %49, label %50, label %52
50: ; preds = %46
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
store i32 -1, i32* %3
br label %239
52: ; preds = %46
%53 = load i32*, i32** %6
%54 = call i32 @read32LE(i32* %53, i32* %10)
%55 = icmp ne i32 %54, 4
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
store i32 -1, i32* %3
br label %239
58: ; preds = %52
store i16 0, i16* %11
store i16 0, i16* %11
br label %59
59: ; preds = %233, %58
%60 = load i16, i16* %11
%61 = zext i16 %60 to i32
%62 = load i16, i16* %7
%63 = zext i16 %62 to i32
%64 = icmp slt i32 %61, %63
br i1 %64, label %65, label %236
65: ; preds = %59
%66 = load i32*, i32** %6
%67 = load i32, i32* %9
%68 = load i16, i16* %11
%69 = zext i16 %68 to i32
%70 = mul nsw i32 12, %69
%71 = add i32 %67, %70
%72 = trunc i32 %71 to i16
%73 = load i32, i32* @SEEK_SET
%74 = call i32 @fseek(i32* %66, i16 zeroext %72, i32 %73)
%75 = load i32*, i32** %6
%76 = call i32 @read16LE(i32* %75, i16* %12)
%77 = icmp ne i32 %76, 2
br i1 %77, label %78, label %80
78: ; preds = %65
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %3
br label %239
80: ; preds = %65
%81 = load i32*, i32** %6
%82 = call i32 @fread(i8* %14, i32 1, i32 1, i32* %81)
%83 = icmp ne i32 %82, 1
br i1 %83, label %84, label %85
84: ; preds = %80
store i32 -1, i32* %3
br label %239
85: ; preds = %80
%86 = getelementptr inbounds [9 x i8], [9 x i8]* %16, i64 0, i64 0
%87 = load i32*, i32** %6
%88 = call i32 @fread(i8* %86, i32 1, i32 9, i32* %87)
%89 = icmp ne i32 %88, 9
br i1 %89, label %90, label %91
90: ; preds = %85
store i32 -1, i32* %3
br label %239
91: ; preds = %85
store i32 0, i32* %17
store i32 0, i32* %17
br label %92
92: ; preds = %114, %91
%93 = load i32, i32* %17
%94 = icmp slt i32 %93, 8
br i1 %94, label %95, label %117
95: ; preds = %92
%96 = load i32, i32* %17
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [9 x i8], [9 x i8]* %16, i64 0, i64 %97
%99 = load i8, i8* %98
%100 = zext i8 %99 to i32
%101 = icmp slt i32 %100, 33
br i1 %101, label %109, label %102
102: ; preds = %95
%103 = load i32, i32* %17
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [9 x i8], [9 x i8]* %16, i64 0, i64 %104
%106 = load i8, i8* %105
%107 = zext i8 %106 to i32
%108 = icmp sge i32 %107, 127
br i1 %108, label %109, label %113
109: ; preds = %102, %95
%110 = load i32, i32* %17
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [9 x i8], [9 x i8]* %16, i64 0, i64 %111
store i8 63, i8* %112
br label %113
113: ; preds = %109, %102
br label %114
114: ; preds = %113
%115 = load i32, i32* %17
%116 = add nsw i32 %115, 1
store i32 %116, i32* %17
br label %92
117: ; preds = %92
%118 = getelementptr inbounds [9 x i8], [9 x i8]* %16, i64 0, i64 8
store i8 0, i8* %118
%119 = getelementptr inbounds [9 x i8], [9 x i8]* %16, i64 0, i64 0
%120 = load i8, i8* %14
%121 = zext i8 %120 to i32
%122 = load i16, i16* %12
%123 = zext i16 %122 to i32
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i8* %119, i32 %121, i32 %123)
%125 = load i32, i32* %10
%126 = load i16, i16* %12
%127 = zext i16 %126 to i32
%128 = mul nsw i32 %127, 30
%129 = add i32 %125, %128
%130 = trunc i32 %129 to i16
store i16 %130, i16* %13
%131 = load i32*, i32** %6
%132 = load i16, i16* %13
%133 = load i32, i32* @SEEK_SET
%134 = call i32 @fseek(i32* %131, i16 zeroext %132, i32 %133)
%135 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 0
%136 = load i32*, i32** %6
%137 = call i32 @fread(i8* %135, i32 1, i32 30, i32* %136)
%138 = icmp ne i32 %137, 30
br i1 %138, label %139, label %141
139: ; preds = %117
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
store i32 -1, i32* %3
br label %239
141: ; preds = %117
%142 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 0
%143 = load i8, i8* %142
%144 = zext i8 %143 to i32
%145 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 1
%146 = load i8, i8* %145
%147 = zext i8 %146 to i32
%148 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 2
%149 = load i8, i8* %148
%150 = zext i8 %149 to i32
%151 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 3
%152 = load i8, i8* %151
%153 = zext i8 %152 to i32
%154 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 4
%155 = load i8, i8* %154
%156 = zext i8 %155 to i32
%157 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 5
%158 = load i8, i8* %157
%159 = zext i8 %158 to i32
%160 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 6
%161 = load i8, i8* %160
%162 = zext i8 %161 to i32
%163 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 7
%164 = load i8, i8* %163
%165 = zext i8 %164 to i32
%166 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 8
%167 = load i8, i8* %166
%168 = zext i8 %167 to i32
%169 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 9
%170 = load i8, i8* %169
%171 = zext i8 %170 to i32
%172 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 10
%173 = load i8, i8* %172
%174 = zext i8 %173 to i32
%175 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 11
%176 = load i8, i8* %175
%177 = zext i8 %176 to i32
%178 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 12
%179 = load i8, i8* %178
%180 = zext i8 %179 to i32
%181 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 13
%182 = load i8, i8* %181
%183 = zext i8 %182 to i32
%184 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 14
%185 = load i8, i8* %184
%186 = zext i8 %185 to i32
%187 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 15
%188 = load i8, i8* %187
%189 = zext i8 %188 to i32
%190 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 16
%191 = load i8, i8* %190
%192 = zext i8 %191 to i32
%193 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 17
%194 = load i8, i8* %193
%195 = zext i8 %194 to i32
%196 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 18
%197 = load i8, i8* %196
%198 = zext i8 %197 to i32
%199 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 19
%200 = load i8, i8* %199
%201 = zext i8 %200 to i32
%202 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 20
%203 = load i8, i8* %202
%204 = zext i8 %203 to i32
%205 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 21
%206 = load i8, i8* %205
%207 = zext i8 %206 to i32
%208 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 22
%209 = load i8, i8* %208
%210 = zext i8 %209 to i32
%211 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 23
%212 = load i8, i8* %211
%213 = zext i8 %212 to i32
%214 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 24
%215 = load i8, i8* %214
%216 = zext i8 %215 to i32
%217 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 25
%218 = load i8, i8* %217
%219 = zext i8 %218 to i32
%220 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 26
%221 = load i8, i8* %220
%222 = zext i8 %221 to i32
%223 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 27
%224 = load i8, i8* %223
%225 = zext i8 %224 to i32
%226 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 28
%227 = load i8, i8* %226
%228 = zext i8 %227 to i32
%229 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 29
%230 = load i8, i8* %229
%231 = zext i8 %230 to i32
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([284 x i8], [284 x i8]* @.str.10, i64 0, i64 0), i32 %144, i32 %147, i32 %150, i32 %153, i32 %156, i32 %159, i32 %162, i32 %165, i32 %168, i32 %171, i32 %174, i32 %177, i32 %180, i32 %183, i32 %186, i32 %189, i32 %192, i32 %195, i32 %198, i32 %201, i32 %204, i32 %207, i32 %210, i32 %213, i32 %216, i32 %219, i32 %222, i32 %225, i32 %228, i32 %231)
br label %233
233: ; preds = %141
%234 = load i16, i16* %11
%235 = add i16 %234, 1
store i16 %235, i16* %11
br label %59
236: ; preds = %59
%237 = load i32*, i32** %6
%238 = call i32 @fclose(i32* %237)
store i32 0, i32* %3
br label %239
239: ; preds = %236, %139, %90, %84, %78, %56, %50, %44, %38, %29, %20
%240 = load i32, i32* %3
ret i32 %240
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"rb\00"
@SEEK_SET = global i32 0
@.str.8 = [36 x i8] c"[%-8s] FLAGS: 0x%02X, IDX: %05d => \00"
@.str.10 = [284 x i8] c"P=0x%02X VN=0x%03d {OP1 L=0x%02X M=0x%02X F=0x%03X A=0x%02X S=0x%02X E=0x%02X D=0x%02X r=0x%02X l=0x%02X A=0x%02X V=0x%02X R=0x%02X C=0x%02X} {OP2 L=0x%02X M=0x%02X F=%03d A=0x%02X S=0x%02X E=0x%02X D=0x%02X r=0x%02X l=0x%02X A=0x%02X V=0x%02X R=0x%02X C=0x%02X} W1=0x%02X W2=0x%02X\0A\00"
@str = [11 x i8] c"CANT OPEN!\00"
@str.11 = [27 x i8] c"I CAN'T READ INSTRUMENT :(\00"
@str.12 = [37 x i8] c"I CAN'T READ INSTRUMENT NAME SLOT :(\00"
@str.13 = [13 x i8] c"CANT READ 4!\00"
@str.14 = [13 x i8] c"CANT READ 3!\00"
@str.15 = [13 x i8] c"CANT READ 2!\00"
@str.16 = [13 x i8] c"CANT READ 1!\00"
@str.17 = [9 x i8] c"U r sux!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i32
%6 = alloca i32
%7 = alloca i16
%8 = alloca i8
%9 = alloca [30 x i8]
%10 = alloca [9 x i8]
%11 = icmp slt i32 %0, 2
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i64 0, i64 0))
br label %237
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32* @fopen(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %237
21: ; preds = %14
%22 = bitcast i16* %3 to i8*
%23 = bitcast i16* %4 to i8*
%24 = bitcast i32* %5 to i8*
%25 = bitcast i32* %6 to i8*
%26 = load i32, i32* @SEEK_SET
%27 = tail call i32 @fseek(i32* %17, i16 zeroext 8, i32 %26)
%28 = call i32 @read16LE(i32* %17, i16* %4)
%29 = icmp eq i32 %28, 2
br i1 %29, label %32, label %30
30: ; preds = %21
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.16, i64 0, i64 0))
br label %235
32: ; preds = %21
%33 = call i32 @read16LE(i32* %17, i16* %3)
%34 = icmp eq i32 %33, 2
br i1 %34, label %37, label %35
35: ; preds = %32
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.15, i64 0, i64 0))
br label %235
37: ; preds = %32
%38 = call i32 @read32LE(i32* %17, i32* %5)
%39 = icmp eq i32 %38, 4
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.14, i64 0, i64 0))
br label %235
42: ; preds = %37
%43 = call i32 @read32LE(i32* %17, i32* %6)
%44 = icmp eq i32 %43, 4
br i1 %44, label %45, label %89
45: ; preds = %42
%46 = load i16, i16* %3
%47 = icmp eq i16 %46, 0
br i1 %47, label %233, label %48
48: ; preds = %45
%49 = bitcast i16* %7 to i8*
%50 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 0
%51 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 0
%52 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 8
%53 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 1
%54 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 2
%55 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 3
%56 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 4
%57 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 5
%58 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 6
%59 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 7
%60 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 8
%61 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 9
%62 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 10
%63 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 11
%64 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 12
%65 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 13
%66 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 14
%67 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 15
%68 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 16
%69 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 17
%70 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 18
%71 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 19
%72 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 20
%73 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 21
%74 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 22
%75 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 23
%76 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 24
%77 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 25
%78 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 26
%79 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 27
%80 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 28
%81 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 29
%82 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 1
%83 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 2
%84 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 3
%85 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 4
%86 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 5
%87 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 6
%88 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 7
br label %91
89: ; preds = %42
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.13, i64 0, i64 0))
br label %235
91: ; preds = %48, %167
%92 = phi i32 [ 0, %48 ], [ %229, %167 ]
%93 = load i32, i32* %5
%94 = mul nuw nsw i32 %92, 12
%95 = add i32 %93, %94
%96 = trunc i32 %95 to i16
%97 = load i32, i32* @SEEK_SET
%98 = call i32 @fseek(i32* %17, i16 zeroext %96, i32 %97)
%99 = call i32 @read16LE(i32* %17, i16* %7)
%100 = icmp eq i32 %99, 2
br i1 %100, label %101, label %163
101: ; preds = %91
%102 = call i32 @fread(i8* %8, i32 1, i32 1, i32* %17)
%103 = icmp eq i32 %102, 1
br i1 %103, label %104, label %166
104: ; preds = %101
%105 = call i32 @fread(i8* %51, i32 1, i32 9, i32* %17)
%106 = icmp eq i32 %105, 9
br i1 %106, label %107, label %166
107: ; preds = %104
%108 = load i8, i8* %51
%109 = add i8 %108, -127
%110 = icmp ult i8 %109, -94
br i1 %110, label %111, label %112
111: ; preds = %107
store i8 63, i8* %51
br label %112
112: ; preds = %107, %111
%113 = load i8, i8* %82
%114 = add i8 %113, -127
%115 = icmp ult i8 %114, -94
br i1 %115, label %116, label %117
116: ; preds = %112
store i8 63, i8* %82
br label %117
117: ; preds = %116, %112
%118 = load i8, i8* %83
%119 = add i8 %118, -127
%120 = icmp ult i8 %119, -94
br i1 %120, label %121, label %122
121: ; preds = %117
store i8 63, i8* %83
br label %122
122: ; preds = %121, %117
%123 = load i8, i8* %84
%124 = add i8 %123, -127
%125 = icmp ult i8 %124, -94
br i1 %125, label %126, label %127
126: ; preds = %122
store i8 63, i8* %84
br label %127
127: ; preds = %126, %122
%128 = load i8, i8* %85
%129 = add i8 %128, -127
%130 = icmp ult i8 %129, -94
br i1 %130, label %131, label %132
131: ; preds = %127
store i8 63, i8* %85
br label %132
132: ; preds = %131, %127
%133 = load i8, i8* %86
%134 = add i8 %133, -127
%135 = icmp ult i8 %134, -94
br i1 %135, label %136, label %137
136: ; preds = %132
store i8 63, i8* %86
br label %137
137: ; preds = %136, %132
%138 = load i8, i8* %87
%139 = add i8 %138, -127
%140 = icmp ult i8 %139, -94
br i1 %140, label %141, label %142
141: ; preds = %137
store i8 63, i8* %87
br label %142
142: ; preds = %141, %137
%143 = load i8, i8* %88
%144 = add i8 %143, -127
%145 = icmp ult i8 %144, -94
br i1 %145, label %146, label %147
146: ; preds = %142
store i8 63, i8* %88
br label %147
147: ; preds = %146, %142
store i8 0, i8* %52
%148 = load i8, i8* %8
%149 = zext i8 %148 to i32
%150 = load i16, i16* %7
%151 = zext i16 %150 to i32
%152 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i8* %51, i32 %149, i32 %151)
%153 = load i32, i32* %6
%154 = load i16, i16* %7
%155 = zext i16 %154 to i32
%156 = mul nuw nsw i32 %155, 30
%157 = add i32 %156, %153
%158 = trunc i32 %157 to i16
%159 = load i32, i32* @SEEK_SET
%160 = call i32 @fseek(i32* %17, i16 zeroext %158, i32 %159)
%161 = call i32 @fread(i8* %50, i32 1, i32 30, i32* %17)
%162 = icmp eq i32 %161, 30
br i1 %162, label %167, label %163
163: ; preds = %147, %91
%164 = phi i8* [ getelementptr inbounds ([37 x i8], [37 x i8]* @str.12, i64 0, i64 0), %91 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.11, i64 0, i64 0), %147 ]
%165 = call i32 @puts(i8* dereferenceable(1) %164)
br label %166
166: ; preds = %101, %104, %163
br label %235
167: ; preds = %147
%168 = load i8, i8* %50
%169 = zext i8 %168 to i32
%170 = load i8, i8* %53
%171 = zext i8 %170 to i32
%172 = load i8, i8* %54
%173 = zext i8 %172 to i32
%174 = load i8, i8* %55
%175 = zext i8 %174 to i32
%176 = load i8, i8* %56
%177 = zext i8 %176 to i32
%178 = load i8, i8* %57
%179 = zext i8 %178 to i32
%180 = load i8, i8* %58
%181 = zext i8 %180 to i32
%182 = load i8, i8* %59
%183 = zext i8 %182 to i32
%184 = load i8, i8* %60
%185 = zext i8 %184 to i32
%186 = load i8, i8* %61
%187 = zext i8 %186 to i32
%188 = load i8, i8* %62
%189 = zext i8 %188 to i32
%190 = load i8, i8* %63
%191 = zext i8 %190 to i32
%192 = load i8, i8* %64
%193 = zext i8 %192 to i32
%194 = load i8, i8* %65
%195 = zext i8 %194 to i32
%196 = load i8, i8* %66
%197 = zext i8 %196 to i32
%198 = load i8, i8* %67
%199 = zext i8 %198 to i32
%200 = load i8, i8* %68
%201 = zext i8 %200 to i32
%202 = load i8, i8* %69
%203 = zext i8 %202 to i32
%204 = load i8, i8* %70
%205 = zext i8 %204 to i32
%206 = load i8, i8* %71
%207 = zext i8 %206 to i32
%208 = load i8, i8* %72
%209 = zext i8 %208 to i32
%210 = load i8, i8* %73
%211 = zext i8 %210 to i32
%212 = load i8, i8* %74
%213 = zext i8 %212 to i32
%214 = load i8, i8* %75
%215 = zext i8 %214 to i32
%216 = load i8, i8* %76
%217 = zext i8 %216 to i32
%218 = load i8, i8* %77
%219 = zext i8 %218 to i32
%220 = load i8, i8* %78
%221 = zext i8 %220 to i32
%222 = load i8, i8* %79
%223 = zext i8 %222 to i32
%224 = load i8, i8* %80
%225 = zext i8 %224 to i32
%226 = load i8, i8* %81
%227 = zext i8 %226 to i32
%228 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([284 x i8], [284 x i8]* @.str.10, i64 0, i64 0), i32 %169, i32 %171, i32 %173, i32 %175, i32 %177, i32 %179, i32 %181, i32 %183, i32 %185, i32 %187, i32 %189, i32 %191, i32 %193, i32 %195, i32 %197, i32 %199, i32 %201, i32 %203, i32 %205, i32 %207, i32 %209, i32 %211, i32 %213, i32 %215, i32 %217, i32 %219, i32 %221, i32 %223, i32 %225, i32 %227)
%229 = add nuw nsw i32 %92, 1
%230 = load i16, i16* %3
%231 = zext i16 %230 to i32
%232 = icmp ult i32 %229, %231
br i1 %232, label %91, label %233
233: ; preds = %167, %45
%234 = call i32 @fclose(i32* %17)
br label %235
235: ; preds = %166, %233, %89, %40, %35, %30
%236 = phi i32 [ -1, %30 ], [ -1, %35 ], [ -1, %40 ], [ -1, %89 ], [ 0, %233 ], [ -1, %166 ]
br label %237
237: ; preds = %19, %235, %12
%238 = phi i32 [ 1, %12 ], [ %236, %235 ], [ -1, %19 ]
ret i32 %238
}