#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 uint8_t;
typedef unsigned int uint32_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
scalar_t__ ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, size_t, int /*<<< orphan*/ *);
scalar_t__ getc(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
unsigned int readInt(int /*<<< orphan*/ *);
int readShort(int /*<<< orphan*/ *);
int /*<<< orphan*/ sscanf(char *, char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ *tmpfile();
void decompress(char *filename) {
  FILE *lz = fopen(filename, "rb");
  if (lz == NULL) {
    printf("ERROR: File not found: %s\n", filename);
    return;
  }
  printf("Decompressing %s\n", filename);
  FILE *normal = tmpfile();
  int csize = (int)readInt(lz) - 8;
  int dataSize = (int)readInt(lz);
  putc(csize & 0xFF, normal);
  putc((csize >> 8) & 0xFF, normal);
  putc((csize >> 16) & 0xFF, normal);
  putc((csize >> 24) & 0xFF, normal);
  for (int j = 0; j < (int)(csize); j++) {
    char c = (char)getc(lz);
    putc(c, normal);
  }
  fclose(lz);
  fflush(normal);
  fseek(normal, 0, SEEK_SET);
  char outfileName[512];
  sscanf(filename, "%507s", outfileName);
  {
    int nameLength = (int)strlen(outfileName);
    outfileName[nameLength++] = '.';
    outfileName[nameLength++] = 'r';
    outfileName[nameLength++] = 'a';
    outfileName[nameLength++] = 'w';
    outfileName[nameLength++] = '\0';
  }
  uint32_t filesize = readInt(normal) + 4;
  char *memBlock = (char *)malloc(sizeof(char) * (dataSize));
  int memPosition = 0;
  while ((unsigned)ftell(normal) < filesize && !feof(normal)) {
    uint8_t block = (uint8_t)getc(normal);
    for (int j = 0;
         j < 8 && (unsigned)ftell(normal) < filesize && !feof(normal); ++j) {
      if (block & 0x01) {
        memBlock[memPosition] = (char)getc(normal);
        ++memPosition;
      } else {
        uint16_t reference = readShort(normal);
        int length = (reference & 0x000F) + 3;
        int offset = ((reference & 0xFF00) >> 8) | ((reference & 0x00F0) << 4);
        int backSet = (memPosition - 18 - offset) & 0xFFF;
        int readLocation = memPosition - backSet;
        if (readLocation < 0) {
          int amt = -readLocation;
          if (length <= amt) {
            amt = length;
          }
          memset(&memBlock[memPosition], 0, sizeof(char) * amt);
          length -= amt;
          readLocation += amt;
          memPosition += amt;
        }
        while (length-- > 0) {
          memBlock[memPosition++] = memBlock[readLocation++];
        }
      }
      block = (uint8_t)(block >> 1);
    }
  }
  FILE *outfile = fopen(outfileName, "wb");
  fwrite(memBlock, sizeof(char), (size_t)dataSize, outfile);
  free(memBlock);
  fclose(outfile);
  fclose(normal);
  printf("Finished Decompressing %s\n", filename);
  return;
}


x86 assembly (clang, -O0):
<decompress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x280,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xdc6(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1263 <decompress+0x43>
mov    -0x8(%rbp),%rsi
lea    0xdaa(%rip),%rdi
call   1060 <printf@plt>
jmp    1734 <decompress+0x514>
mov    -0x8(%rbp),%rsi
lea    0xdc2(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1080 <tmpfile@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   10c0 <readInt@plt>
sub    $0x8,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   10c0 <readInt@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
and    $0xff,%eax
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1090 <putc@plt>
mov    -0x1c(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1090 <putc@plt>
mov    -0x1c(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1090 <putc@plt>
mov    -0x1c(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1090 <putc@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    132e <decompress+0x10e>
mov    -0x10(%rbp),%rdi
call   1140 <getc@plt>
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1090 <putc@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12f9 <decompress+0xd9>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <fflush@plt>
mov    -0x18(%rbp),%rdi
mov    0x2c95(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1100 <fseek@plt>
mov    -0x8(%rbp),%rdi
lea    -0x230(%rbp),%rdx
lea    0xcb8(%rip),%rsi
call   10f0 <sscanf@plt>
lea    -0x230(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x234(%rbp)
mov    -0x234(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x234(%rbp)
cltq
movb   $0x2e,-0x230(%rbp,%rax,1)
2e
mov    -0x234(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x234(%rbp)
cltq
movb   $0x72,-0x230(%rbp,%rax,1)
72
mov    -0x234(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x234(%rbp)
cltq
movb   $0x61,-0x230(%rbp,%rax,1)
61
mov    -0x234(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x234(%rbp)
cltq
movb   $0x77,-0x230(%rbp,%rax,1)
77
mov    -0x234(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x234(%rbp)
cltq
movb   $0x0,-0x230(%rbp,%rax,1)
mov    -0x18(%rbp),%rdi
call   10c0 <readInt@plt>
add    $0x4,%eax
mov    %eax,-0x238(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x240(%rbp)
movl   $0x0,-0x244(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    -0x238(%rbp),%ecx
mov    %al,-0x271(%rbp)
jae    146c <decompress+0x24c>
mov    -0x18(%rbp),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x271(%rbp)
mov    -0x271(%rbp),%al
test   $0x1,%al
jne    147f <decompress+0x25f>
jmp    16cd <decompress+0x4ad>
mov    -0x18(%rbp),%rdi
call   1140 <getc@plt>
mov    %eax,-0x248(%rbp)
movl   $0x0,-0x24c(%rbp)
xor    %eax,%eax
cmpl   $0x8,-0x24c(%rbp)
mov    %al,-0x272(%rbp)
jge    14e3 <decompress+0x2c3>
mov    -0x18(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    -0x238(%rbp),%ecx
mov    %al,-0x272(%rbp)
jae    14e3 <decompress+0x2c3>
mov    -0x18(%rbp),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x272(%rbp)
mov    -0x272(%rbp),%al
test   $0x1,%al
jne    14f6 <decompress+0x2d6>
jmp    16c8 <decompress+0x4a8>
mov    -0x248(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1538 <decompress+0x318>
mov    -0x18(%rbp),%rdi
call   1140 <getc@plt>
mov    %al,%dl
mov    -0x240(%rbp),%rax
movslq -0x244(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x244(%rbp)
jmp    16a5 <decompress+0x485>
mov    -0x18(%rbp),%rdi
call   1110 <readShort@plt>
mov    %eax,-0x250(%rbp)
mov    -0x250(%rbp),%eax
and    $0xf,%eax
add    $0x3,%eax
mov    %eax,-0x254(%rbp)
mov    -0x250(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    -0x250(%rbp),%ecx
and    $0xf0,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x258(%rbp)
mov    -0x244(%rbp),%eax
sub    $0x12,%eax
sub    -0x258(%rbp),%eax
and    $0xfff,%eax
mov    %eax,-0x25c(%rbp)
mov    -0x244(%rbp),%eax
sub    -0x25c(%rbp),%eax
mov    %eax,-0x260(%rbp)
cmpl   $0x0,-0x260(%rbp)
jge    1640 <decompress+0x420>
xor    %eax,%eax
sub    -0x260(%rbp),%eax
mov    %eax,-0x264(%rbp)
mov    -0x254(%rbp),%eax
cmp    -0x264(%rbp),%eax
jg     15e3 <decompress+0x3c3>
mov    -0x254(%rbp),%eax
mov    %eax,-0x264(%rbp)
mov    -0x240(%rbp),%rdi
movslq -0x244(%rbp),%rax
add    %rax,%rdi
movslq -0x264(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1070 <memset@plt>
mov    -0x264(%rbp),%ecx
mov    -0x254(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x254(%rbp)
mov    -0x264(%rbp),%eax
add    -0x260(%rbp),%eax
mov    %eax,-0x260(%rbp)
mov    -0x264(%rbp),%eax
add    -0x244(%rbp),%eax
mov    %eax,-0x244(%rbp)
jmp    1645 <decompress+0x425>
mov    -0x254(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x254(%rbp)
cmp    $0x0,%eax
jle    16a0 <decompress+0x480>
mov    -0x240(%rbp),%rax
mov    -0x260(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x260(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x240(%rbp),%rax
mov    -0x244(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x244(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1645 <decompress+0x425>
jmp    16a5 <decompress+0x485>
mov    -0x248(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x248(%rbp)
mov    -0x24c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24c(%rbp)
jmp    1498 <decompress+0x278>
jmp    1436 <decompress+0x216>
lea    -0x230(%rbp),%rdi
lea    0x949(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,-0x270(%rbp)
mov    -0x240(%rbp),%rdi
movslq -0x20(%rbp),%rdx
mov    -0x270(%rbp),%rcx
mov    $0x1,%esi
call   1130 <fwrite@plt>
mov    -0x240(%rbp),%rdi
call   1030 <free@plt>
mov    -0x270(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x8(%rbp),%rsi
lea    0x8f8(%rip),%rdi
call   1060 <printf@plt>
add    $0x280,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decompress>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x238,%rsp
mov    %rdi,%rbx
lea    0xdc5(%rip),%rsi
call   1120 <fopen@plt>
test   %rax,%rax
je     1679 <decompress+0x459>
mov    %rax,%r12
lea    0xddd(%rip),%rdi
mov    %rbx,0x10(%rsp)
mov    %rbx,%rsi
call   1060 <printf@plt>
xor    %eax,%eax
call   1080 <tmpfile@plt>
mov    %rax,%r13
mov    %r12,%rdi
call   10c0 <readInt@plt>
mov    %eax,%r14d
lea    -0x8(%r14),%ebx
mov    %r12,%rdi
call   10c0 <readInt@plt>
mov    %eax,%r15d
movsbl %bl,%edi
mov    %r13,%rsi
call   1090 <putc@plt>
mov    %ebx,%eax
shr    $0x8,%eax
movsbl %al,%edi
mov    %r13,%rsi
call   1090 <putc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movsbl %al,%edi
mov    %r13,%rsi
call   1090 <putc@plt>
mov    %ebx,%edi
sar    $0x18,%edi
mov    %r13,%rsi
call   1090 <putc@plt>
cmp    $0x9,%r14d
jl     12e8 <decompress+0xc8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rdi
call   1140 <getc@plt>
movsbl %al,%edi
mov    %r13,%rsi
call   1090 <putc@plt>
add    $0xffffffff,%ebx
jne    12d0 <decompress+0xb0>
movabs $0x1ffffffe0,%rbp
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    %r13,%rdi
call   10e0 <fflush@plt>
mov    0x2cd7(%rip),%rax
mov    (%rax),%edx
xor    %r14d,%r14d
mov    %r13,%rdi
xor    %esi,%esi
call   1100 <fseek@plt>
lea    0xcff(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    0x10(%rsp),%rdi
mov    %rbx,%rdx
call   10f0 <sscanf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
movslq %eax,%rcx
shl    $0x20,%rax
movb   $0x2e,0x30(%rsp,%rcx,1)
movabs $0x100000000,%rcx
add    %rax,%rcx
sar    $0x20,%rcx
movb   $0x72,0x30(%rsp,%rcx,1)
lea    (%rax,%rbp,1),%rcx
add    $0x20,%rcx
sar    $0x20,%rcx
movb   $0x61,0x30(%rsp,%rcx,1)
movabs $0x300000000,%rcx
add    %rax,%rcx
sar    $0x20,%rcx
movb   $0x77,0x30(%rsp,%rcx,1)
movabs $0x400000000,%rcx
add    %rax,%rcx
sar    $0x20,%rcx
movb   $0x0,0x30(%rsp,%rcx,1)
mov    %r13,%rdi
call   10c0 <readInt@plt>
mov    %eax,%r12d
add    $0x4,%r12d
movslq %r15d,%rax
mov    %rax,0x18(%rsp)
mov    %r15d,%edi
call   10d0 <malloc@plt>
mov    %rax,%rbx
mov    %r13,%rdi
call   10a0 <ftell@plt>
cmp    %eax,%r12d
jbe    1615 <decompress+0x3f5>
lea    0x1(%rbx),%rax
mov    %rax,0x28(%rsp)
lea    0x30(%rbx),%rax
mov    %rax,0x20(%rsp)
mov    %r13,0x8(%rsp)
mov    %r12d,(%rsp)
jmp    1401 <decompress+0x1e1>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   10a0 <ftell@plt>
cmp    %eax,%r12d
jbe    1615 <decompress+0x3f5>
mov    %r13,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
jne    1615 <decompress+0x3f5>
mov    %r13,%rdi
call   1140 <getc@plt>
mov    %rax,%r15
xor    %ebp,%ebp
jmp    143e <decompress+0x21e>
mov    %r13,%rdi
call   1140 <getc@plt>
movslq %r14d,%r14
mov    %al,(%rbx,%r14,1)
add    $0x1,%r14d
sar    %r15d
add    $0x1,%ebp
cmp    $0x8,%ebp
je     13f0 <decompress+0x1d0>
mov    %r13,%rdi
call   10a0 <ftell@plt>
cmp    %eax,%r12d
jbe    13f0 <decompress+0x1d0>
mov    %r13,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
jne    13f0 <decompress+0x1d0>
test   $0x1,%r15b
jne    1420 <decompress+0x200>
mov    %ebp,0x4(%rsp)
mov    %r13,%rdi
call   1110 <readShort@plt>
mov    %eax,%r12d
and    $0xf,%r12d
add    $0x3,%r12d
movzbl %ah,%ecx
shl    $0x4,%eax
and    $0xf00,%eax
or     %ecx,%eax
neg    %eax
add    %r14d,%eax
add    $0xfee,%eax
and    $0xfff,%eax
mov    %r14d,%r13d
sub    %eax,%r13d
jns    14c2 <decompress+0x2a2>
mov    %r13d,%ebp
neg    %ebp
cmp    %ebp,%r12d
cmovbe %r12d,%ebp
movslq %r14d,%rdi
add    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1070 <memset@plt>
add    %ebp,%r14d
sub    %ebp,%r12d
jle    15c3 <decompress+0x3a3>
add    %ebp,%r13d
movslq %r13d,%rax
movslq %r14d,%r14
cmp    $0x1,%r12d
mov    %r12d,%ecx
adc    $0xffffffff,%ecx
cmp    $0x1f,%ecx
jb     1505 <decompress+0x2e5>
cmp    $0x1,%r12d
mov    %r12d,%edx
adc    $0xffffffff,%edx
lea    (%rbx,%r14,1),%rsi
lea    (%rax,%rdx,1),%rdi
mov    0x28(%rsp),%rbp
add    %rbp,%rdi
cmp    %rdi,%rsi
jae    1546 <decompress+0x326>
add    %r14,%rdx
add    %rbp,%rdx
lea    (%rbx,%rax,1),%rsi
cmp    %rdx,%rsi
jae    1546 <decompress+0x326>
mov    0x8(%rsp),%r13
mov    (%rsp),%esi
add    $0x1,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rbx,%rax,1),%ecx
add    $0x1,%rax
mov    %cl,(%rbx,%r14,1)
add    $0x1,%r14
add    $0xffffffff,%r12d
cmp    $0x1,%r12d
ja     1520 <decompress+0x300>
mov    0x4(%rsp),%ebp
mov    %esi,%r12d
jmp    1433 <decompress+0x213>
add    $0x1,%rcx
mov    %rcx,%r8
movabs $0x1ffffffe0,%rdx
and    %rdx,%r8
lea    -0x20(%r8),%rdx
mov    %rdx,%r9
shr    $0x5,%r9
add    $0x1,%r9
test   %rdx,%rdx
je     15d5 <decompress+0x3b5>
mov    %r9,%rsi
and    $0xfffffffffffffffe,%rsi
mov    0x20(%rsp),%rdi
lea    (%rdi,%r14,1),%rdx
lea    (%rdi,%rax,1),%rbp
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups -0x30(%rbp,%rdi,1),%xmm0
movups -0x20(%rbp,%rdi,1),%xmm1
movups %xmm0,-0x30(%rdx,%rdi,1)
movups %xmm1,-0x20(%rdx,%rdi,1)
movups -0x10(%rbp,%rdi,1),%xmm0
movups 0x0(%rbp,%rdi,1),%xmm1
movups %xmm0,-0x10(%rdx,%rdi,1)
movups %xmm1,(%rdx,%rdi,1)
add    $0x40,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1590 <decompress+0x370>
jmp    15d7 <decompress+0x3b7>
mov    0x8(%rsp),%r13
mov    (%rsp),%r12d
mov    0x4(%rsp),%ebp
jmp    1433 <decompress+0x213>
xor    %edi,%edi
test   $0x1,%r9b
mov    0x8(%rsp),%r13
mov    (%rsp),%esi
je     15fe <decompress+0x3de>
lea    (%rdi,%r14,1),%rdx
add    %rax,%rdi
movups (%rbx,%rdi,1),%xmm0
movups 0x10(%rbx,%rdi,1),%xmm1
movups %xmm0,(%rbx,%rdx,1)
movups %xmm1,0x10(%rbx,%rdx,1)
add    %r8,%r14
cmp    %r8,%rcx
je     153a <decompress+0x31a>
add    %r8,%rax
sub    %r8d,%r12d
jmp    150d <decompress+0x2ed>
lea    0xa08(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1120 <fopen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    $0x1,%esi
mov    0x18(%rsp),%rdx
mov    %rax,%rcx
call   1130 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %r13,%rdi
call   1040 <fclose@plt>
lea    0x9ca(%rip),%rdi
mov    0x10(%rsp),%rsi
call   1060 <printf@plt>
add    $0x238,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x983(%rip),%rdi
mov    %rbx,%rsi
add    $0x238,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@.str.1 = [27 x i8] c"ERROR: File not found: %s\0A\00"
@.str.2 = [18 x i8] c"Decompressing %s\0A\00"
@SEEK_SET = global i32 0
@.str.3 = [6 x i8] c"%507s\00"
@.str.4 = [3 x i8] c"wb\00"
@.str.5 = [27 x i8] c"Finished Decompressing %s\0A\00"
define void @decompress(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca [512 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32*
store i8* %0, i8** %2
%23 = load i8*, i8** %2
%24 = call i32* @fopen(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %24, i32** %3
%25 = load i32*, i32** %3
%26 = icmp eq i32* %25, null
br i1 %26, label %27, label %30
27: ; preds = %1
%28 = load i8*, i8** %2
%29 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %28)
br label %257
30: ; preds = %1
%31 = load i8*, i8** %2
%32 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %31)
%33 = call i32* (...) @tmpfile()
store i32* %33, i32** %4
%34 = load i32*, i32** %3
%35 = call i32 @readInt(i32* %34)
%36 = sub nsw i32 %35, 8
store i32 %36, i32* %5
%37 = load i32*, i32** %3
%38 = call i32 @readInt(i32* %37)
store i32 %38, i32* %6
%39 = load i32, i32* %5
%40 = and i32 %39, 255
%41 = trunc i32 %40 to i8
%42 = load i32*, i32** %4
%43 = call i32 @putc(i8 signext %41, i32* %42)
%44 = load i32, i32* %5
%45 = ashr i32 %44, 8
%46 = and i32 %45, 255
%47 = trunc i32 %46 to i8
%48 = load i32*, i32** %4
%49 = call i32 @putc(i8 signext %47, i32* %48)
%50 = load i32, i32* %5
%51 = ashr i32 %50, 16
%52 = and i32 %51, 255
%53 = trunc i32 %52 to i8
%54 = load i32*, i32** %4
%55 = call i32 @putc(i8 signext %53, i32* %54)
%56 = load i32, i32* %5
%57 = ashr i32 %56, 24
%58 = and i32 %57, 255
%59 = trunc i32 %58 to i8
%60 = load i32*, i32** %4
%61 = call i32 @putc(i8 signext %59, i32* %60)
store i32 0, i32* %7
br label %62
62: ; preds = %73, %30
%63 = load i32, i32* %7
%64 = load i32, i32* %5
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %76
66: ; preds = %62
%67 = load i32*, i32** %3
%68 = call i64 @getc(i32* %67)
%69 = trunc i64 %68 to i8
store i8 %69, i8* %8
%70 = load i8, i8* %8
%71 = load i32*, i32** %4
%72 = call i32 @putc(i8 signext %70, i32* %71)
br label %73
73: ; preds = %66
%74 = load i32, i32* %7
%75 = add nsw i32 %74, 1
store i32 %75, i32* %7
br label %62
76: ; preds = %62
%77 = load i32*, i32** %3
%78 = call i32 @fclose(i32* %77)
%79 = load i32*, i32** %4
%80 = call i32 @fflush(i32* %79)
%81 = load i32*, i32** %4
%82 = load i32, i32* @SEEK_SET
%83 = call i32 @fseek(i32* %81, i32 0, i32 %82)
%84 = load i8*, i8** %2
%85 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%86 = call i32 @sscanf(i8* %84, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %85)
%87 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%88 = call i64 @strlen(i8* %87)
%89 = trunc i64 %88 to i32
store i32 %89, i32* %10
%90 = load i32, i32* %10
%91 = add nsw i32 %90, 1
store i32 %91, i32* %10
%92 = sext i32 %90 to i64
%93 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 %92
store i8 46, i8* %93
%94 = load i32, i32* %10
%95 = add nsw i32 %94, 1
store i32 %95, i32* %10
%96 = sext i32 %94 to i64
%97 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 %96
store i8 114, i8* %97
%98 = load i32, i32* %10
%99 = add nsw i32 %98, 1
store i32 %99, i32* %10
%100 = sext i32 %98 to i64
%101 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 %100
store i8 97, i8* %101
%102 = load i32, i32* %10
%103 = add nsw i32 %102, 1
store i32 %103, i32* %10
%104 = sext i32 %102 to i64
%105 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 %104
store i8 119, i8* %105
%106 = load i32, i32* %10
%107 = add nsw i32 %106, 1
store i32 %107, i32* %10
%108 = sext i32 %106 to i64
%109 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 %108
store i8 0, i8* %109
%110 = load i32*, i32** %4
%111 = call i32 @readInt(i32* %110)
%112 = add i32 %111, 4
store i32 %112, i32* %11
%113 = load i32, i32* %6
%114 = sext i32 %113 to i64
%115 = mul i64 1, %114
%116 = trunc i64 %115 to i32
%117 = call i64 @malloc(i32 %116)
%118 = inttoptr i64 %117 to i8*
store i8* %118, i8** %12
store i32 0, i32* %13
br label %119
119: ; preds = %240, %76
%120 = load i32*, i32** %4
%121 = call i64 @ftell(i32* %120)
%122 = trunc i64 %121 to i32
%123 = load i32, i32* %11
%124 = icmp ult i32 %122, %123
br i1 %124, label %125, label %130
125: ; preds = %119
%126 = load i32*, i32** %4
%127 = call i32 @feof(i32* %126)
%128 = icmp ne i32 %127, 0
%129 = xor i1 %128, true
br label %130
130: ; preds = %125, %119
%131 = phi i1 [ false, %119 ], [ %129, %125 ]
br i1 %131, label %132, label %241
132: ; preds = %130
%133 = load i32*, i32** %4
%134 = call i64 @getc(i32* %133)
%135 = trunc i64 %134 to i32
store i32 %135, i32* %14
store i32 0, i32* %15
br label %136
136: ; preds = %237, %132
%137 = load i32, i32* %15
%138 = icmp slt i32 %137, 8
br i1 %138, label %139, label %150
139: ; preds = %136
%140 = load i32*, i32** %4
%141 = call i64 @ftell(i32* %140)
%142 = trunc i64 %141 to i32
%143 = load i32, i32* %11
%144 = icmp ult i32 %142, %143
br i1 %144, label %145, label %150
145: ; preds = %139
%146 = load i32*, i32** %4
%147 = call i32 @feof(i32* %146)
%148 = icmp ne i32 %147, 0
%149 = xor i1 %148, true
br label %150
150: ; preds = %145, %139, %136
%151 = phi i1 [ false, %139 ], [ false, %136 ], [ %149, %145 ]
br i1 %151, label %152, label %240
152: ; preds = %150
%153 = load i32, i32* %14
%154 = and i32 %153, 1
%155 = icmp ne i32 %154, 0
br i1 %155, label %156, label %166
156: ; preds = %152
%157 = load i32*, i32** %4
%158 = call i64 @getc(i32* %157)
%159 = trunc i64 %158 to i8
%160 = load i8*, i8** %12
%161 = load i32, i32* %13
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i8, i8* %160, i64 %162
store i8 %159, i8* %163
%164 = load i32, i32* %13
%165 = add nsw i32 %164, 1
store i32 %165, i32* %13
br label %234
166: ; preds = %152
%167 = load i32*, i32** %4
%168 = call i32 @readShort(i32* %167)
store i32 %168, i32* %16
%169 = load i32, i32* %16
%170 = and i32 %169, 15
%171 = add nsw i32 %170, 3
store i32 %171, i32* %17
%172 = load i32, i32* %16
%173 = and i32 %172, 65280
%174 = ashr i32 %173, 8
%175 = load i32, i32* %16
%176 = and i32 %175, 240
%177 = shl i32 %176, 4
%178 = or i32 %174, %177
store i32 %178, i32* %18
%179 = load i32, i32* %13
%180 = sub nsw i32 %179, 18
%181 = load i32, i32* %18
%182 = sub nsw i32 %180, %181
%183 = and i32 %182, 4095
store i32 %183, i32* %19
%184 = load i32, i32* %13
%185 = load i32, i32* %19
%186 = sub nsw i32 %184, %185
store i32 %186, i32* %20
%187 = load i32, i32* %20
%188 = icmp slt i32 %187, 0
br i1 %188, label %189, label %216
189: ; preds = %166
%190 = load i32, i32* %20
%191 = sub nsw i32 0, %190
store i32 %191, i32* %21
%192 = load i32, i32* %17
%193 = load i32, i32* %21
%194 = icmp sle i32 %192, %193
br i1 %194, label %195, label %197
195: ; preds = %189
%196 = load i32, i32* %17
store i32 %196, i32* %21
br label %197
197: ; preds = %195, %189
%198 = load i8*, i8** %12
%199 = load i32, i32* %13
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i8, i8* %198, i64 %200
%202 = load i32, i32* %21
%203 = sext i32 %202 to i64
%204 = mul i64 1, %203
%205 = trunc i64 %204 to i32
%206 = call i32 @memset(i8* %201, i32 0, i32 %205)
%207 = load i32, i32* %21
%208 = load i32, i32* %17
%209 = sub nsw i32 %208, %207
store i32 %209, i32* %17
%210 = load i32, i32* %21
%211 = load i32, i32* %20
%212 = add nsw i32 %211, %210
store i32 %212, i32* %20
%213 = load i32, i32* %21
%214 = load i32, i32* %13
%215 = add nsw i32 %214, %213
store i32 %215, i32* %13
br label %216
216: ; preds = %197, %166
br label %217
217: ; preds = %221, %216
%218 = load i32, i32* %17
%219 = add nsw i32 %218, -1
store i32 %219, i32* %17
%220 = icmp sgt i32 %218, 0
br i1 %220, label %221, label %233
221: ; preds = %217
%222 = load i8*, i8** %12
%223 = load i32, i32* %20
%224 = add nsw i32 %223, 1
store i32 %224, i32* %20
%225 = sext i32 %223 to i64
%226 = getelementptr inbounds i8, i8* %222, i64 %225
%227 = load i8, i8* %226
%228 = load i8*, i8** %12
%229 = load i32, i32* %13
%230 = add nsw i32 %229, 1
store i32 %230, i32* %13
%231 = sext i32 %229 to i64
%232 = getelementptr inbounds i8, i8* %228, i64 %231
store i8 %227, i8* %232
br label %217
233: ; preds = %217
br label %234
234: ; preds = %233, %156
%235 = load i32, i32* %14
%236 = ashr i32 %235, 1
store i32 %236, i32* %14
br label %237
237: ; preds = %234
%238 = load i32, i32* %15
%239 = add nsw i32 %238, 1
store i32 %239, i32* %15
br label %136
240: ; preds = %150
br label %119
241: ; preds = %130
%242 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%243 = call i32* @fopen(i8* %242, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %243, i32** %22
%244 = load i8*, i8** %12
%245 = load i32, i32* %6
%246 = sext i32 %245 to i64
%247 = load i32*, i32** %22
%248 = call i32 @fwrite(i8* %244, i32 1, i64 %246, i32* %247)
%249 = load i8*, i8** %12
%250 = call i32 @free(i8* %249)
%251 = load i32*, i32** %22
%252 = call i32 @fclose(i32* %251)
%253 = load i32*, i32** %4
%254 = call i32 @fclose(i32* %253)
%255 = load i8*, i8** %2
%256 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i8* %255)
br label %257
257: ; preds = %241, %27
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@.str.1 = [27 x i8] c"ERROR: File not found: %s\0A\00"
@.str.2 = [18 x i8] c"Decompressing %s\0A\00"
@SEEK_SET = global i32 0
@.str.3 = [6 x i8] c"%507s\00"
@.str.4 = [3 x i8] c"wb\00"
@.str.5 = [27 x i8] c"Finished Decompressing %s\0A\00"
define void @decompress(i8* %0) {
%2 = alloca [512 x i8]
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %240
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%9 = tail call i32* (...) @tmpfile()
%10 = tail call i32 @readInt(i32* %3)
%11 = add i32 %10, -8
%12 = tail call i32 @readInt(i32* %3)
%13 = trunc i32 %11 to i8
%14 = tail call i32 @putc(i8 signext %13, i32* %9)
%15 = lshr i32 %11, 8
%16 = trunc i32 %15 to i8
%17 = tail call i32 @putc(i8 signext %16, i32* %9)
%18 = lshr i32 %11, 16
%19 = trunc i32 %18 to i8
%20 = tail call i32 @putc(i8 signext %19, i32* %9)
%21 = lshr i32 %11, 24
%22 = trunc i32 %21 to i8
%23 = tail call i32 @putc(i8 signext %22, i32* %9)
%24 = icmp sgt i32 %10, 8
br i1 %24, label %59, label %25
25: ; preds = %59, %7
%26 = tail call i32 @fclose(i32* %3)
%27 = tail call i32 @fflush(i32* %9)
%28 = load i32, i32* @SEEK_SET
%29 = tail call i32 @fseek(i32* %9, i32 0, i32 %28)
%30 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%31 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %30)
%32 = call i64 @strlen(i8* %30)
%33 = shl i64 %32, 32
%34 = ashr exact i64 %33, 32
%35 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %34
store i8 46, i8* %35
%36 = add i64 %33, 4294967296
%37 = ashr exact i64 %36, 32
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %37
store i8 114, i8* %38
%39 = add i64 %33, 8589934592
%40 = ashr exact i64 %39, 32
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %40
store i8 97, i8* %41
%42 = add i64 %33, 12884901888
%43 = ashr exact i64 %42, 32
%44 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %43
store i8 119, i8* %44
%45 = add i64 %33, 17179869184
%46 = ashr exact i64 %45, 32
%47 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %46
store i8 0, i8* %47
%48 = call i32 @readInt(i32* %9)
%49 = add i32 %48, 4
%50 = sext i32 %12 to i64
%51 = call i64 @malloc(i32 %12)
%52 = inttoptr i64 %51 to i8*
%53 = call i64 @ftell(i32* %9)
%54 = trunc i64 %53 to i32
%55 = icmp ugt i32 %49, %54
br i1 %55, label %56, label %233
56: ; preds = %25
%57 = getelementptr i8, i8* %52, i64 1
%58 = getelementptr i8, i8* %52, i64 1
br label %66
59: ; preds = %7, %59
%60 = phi i32 [ %64, %59 ], [ 0, %7 ]
%61 = tail call i64 @getc(i32* %3)
%62 = trunc i64 %61 to i8
%63 = tail call i32 @putc(i8 signext %62, i32* %9)
%64 = add nuw nsw i32 %60, 1
%65 = icmp eq i32 %64, %11
br i1 %65, label %25, label %59
66: ; preds = %56, %83
%67 = phi i32 [ %84, %83 ], [ 0, %56 ]
%68 = call i32 @feof(i32* %9)
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %233
70: ; preds = %66
%71 = call i64 @getc(i32* %9)
%72 = trunc i64 %71 to i32
br label %73
73: ; preds = %70, %228
%74 = phi i32 [ %67, %70 ], [ %229, %228 ]
%75 = phi i32 [ %72, %70 ], [ %230, %228 ]
%76 = phi i32 [ 0, %70 ], [ %231, %228 ]
%77 = call i64 @ftell(i32* %9)
%78 = trunc i64 %77 to i32
%79 = icmp ugt i32 %49, %78
br i1 %79, label %80, label %83
80: ; preds = %73
%81 = call i32 @feof(i32* %9)
%82 = icmp eq i32 %81, 0
br i1 %82, label %88, label %83
83: ; preds = %228, %73, %80
%84 = phi i32 [ %229, %228 ], [ %74, %73 ], [ %74, %80 ]
%85 = call i64 @ftell(i32* %9)
%86 = trunc i64 %85 to i32
%87 = icmp ugt i32 %49, %86
br i1 %87, label %66, label %233
88: ; preds = %80
%89 = and i32 %75, 1
%90 = icmp eq i32 %89, 0
br i1 %90, label %97, label %91
91: ; preds = %88
%92 = call i64 @getc(i32* %9)
%93 = trunc i64 %92 to i8
%94 = sext i32 %74 to i64
%95 = getelementptr inbounds i8, i8* %52, i64 %94
store i8 %93, i8* %95
%96 = add nsw i32 %74, 1
br label %228
97: ; preds = %88
%98 = call i32 @readShort(i32* %9)
%99 = and i32 %98, 15
%100 = add nuw nsw i32 %99, 3
%101 = lshr i32 %98, 8
%102 = and i32 %101, 255
%103 = shl i32 %98, 4
%104 = and i32 %103, 3840
%105 = add i32 %74, 4078
%106 = or i32 %104, %102
%107 = sub i32 %105, %106
%108 = and i32 %107, 4095
%109 = sub nsw i32 %74, %108
%110 = icmp slt i32 %109, 0
br i1 %110, label %111, label %122
111: ; preds = %97
%112 = sub nsw i32 0, %109
%113 = icmp ugt i32 %100, %112
%114 = select i1 %113, i32 %112, i32 %100
%115 = sext i32 %74 to i64
%116 = getelementptr inbounds i8, i8* %52, i64 %115
%117 = call i32 @memset(i8* %116, i32 0, i32 %114)
%118 = sub nsw i32 %100, %114
%119 = add nsw i32 %114, %109
%120 = add nsw i32 %114, %74
%121 = icmp sgt i32 %118, 0
br i1 %121, label %122, label %228
122: ; preds = %97, %111
%123 = phi i32 [ %119, %111 ], [ %109, %97 ]
%124 = phi i32 [ %120, %111 ], [ %74, %97 ]
%125 = phi i32 [ %118, %111 ], [ %100, %97 ]
%126 = sext i32 %123 to i64
%127 = sext i32 %124 to i64
%128 = icmp ne i32 %125, 0
%129 = sext i1 %128 to i32
%130 = add nsw i32 %125, %129
%131 = zext i32 %130 to i64
%132 = add nuw nsw i64 %131, 1
%133 = icmp ult i32 %130, 31
br i1 %133, label %210, label %134
134: ; preds = %122
%135 = getelementptr i8, i8* %52, i64 %127
%136 = icmp ne i32 %125, 0
%137 = sext i1 %136 to i32
%138 = add nsw i32 %125, %137
%139 = zext i32 %138 to i64
%140 = add nsw i64 %127, %139
%141 = getelementptr i8, i8* %57, i64 %140
%142 = getelementptr i8, i8* %52, i64 %126
%143 = add nsw i64 %126, %139
%144 = getelementptr i8, i8* %58, i64 %143
%145 = icmp ult i8* %135, %144
%146 = icmp ult i8* %142, %141
%147 = and i1 %145, %146
br i1 %147, label %210, label %148
148: ; preds = %134
%149 = and i64 %132, 8589934560
%150 = add nsw i64 %149, %127
%151 = add nsw i64 %149, %126
%152 = trunc i64 %149 to i32
%153 = sub i32 %125, %152
%154 = add nsw i64 %149, -32
%155 = lshr exact i64 %154, 5
%156 = add nuw nsw i64 %155, 1
%157 = and i64 %156, 1
%158 = icmp eq i64 %154, 0
br i1 %158, label %192, label %159
159: ; preds = %148
%160 = and i64 %156, 1152921504606846974
br label %161
161: ; preds = %161, %159
%162 = phi i64 [ 0, %159 ], [ %189, %161 ]
%163 = phi i64 [ 0, %159 ], [ %190, %161 ]
%164 = add i64 %162, %127
%165 = add i64 %162, %126
%166 = getelementptr inbounds i8, i8* %52, i64 %165
%167 = bitcast i8* %166 to <16 x i8>*
%168 = load <16 x i8>, <16 x i8>* %167
%169 = getelementptr inbounds i8, i8* %166, i64 16
%170 = bitcast i8* %169 to <16 x i8>*
%171 = load <16 x i8>, <16 x i8>* %170
%172 = getelementptr inbounds i8, i8* %52, i64 %164
%173 = bitcast i8* %172 to <16 x i8>*
store <16 x i8> %168, <16 x i8>* %173
%174 = getelementptr inbounds i8, i8* %172, i64 16
%175 = bitcast i8* %174 to <16 x i8>*
store <16 x i8> %171, <16 x i8>* %175
%176 = or i64 %162, 32
%177 = add i64 %176, %127
%178 = add i64 %176, %126
%179 = getelementptr inbounds i8, i8* %52, i64 %178
%180 = bitcast i8* %179 to <16 x i8>*
%181 = load <16 x i8>, <16 x i8>* %180
%182 = getelementptr inbounds i8, i8* %179, i64 16
%183 = bitcast i8* %182 to <16 x i8>*
%184 = load <16 x i8>, <16 x i8>* %183
%185 = getelementptr inbounds i8, i8* %52, i64 %177
%186 = bitcast i8* %185 to <16 x i8>*
store <16 x i8> %181, <16 x i8>* %186
%187 = getelementptr inbounds i8, i8* %185, i64 16
%188 = bitcast i8* %187 to <16 x i8>*
store <16 x i8> %184, <16 x i8>* %188
%189 = add nuw i64 %162, 64
%190 = add i64 %163, 2
%191 = icmp eq i64 %190, %160
br i1 %191, label %192, label %161
192: ; preds = %161, %148
%193 = phi i64 [ 0, %148 ], [ %189, %161 ]
%194 = icmp eq i64 %157, 0
br i1 %194, label %208, label %195
195: ; preds = %192
%196 = add i64 %193, %127
%197 = add i64 %193, %126
%198 = getelementptr inbounds i8, i8* %52, i64 %197
%199 = bitcast i8* %198 to <16 x i8>*
%200 = load <16 x i8>, <16 x i8>* %199
%201 = getelementptr inbounds i8, i8* %198, i64 16
%202 = bitcast i8* %201 to <16 x i8>*
%203 = load <16 x i8>, <16 x i8>* %202
%204 = getelementptr inbounds i8, i8* %52, i64 %196
%205 = bitcast i8* %204 to <16 x i8>*
store <16 x i8> %200, <16 x i8>* %205
%206 = getelementptr inbounds i8, i8* %204, i64 16
%207 = bitcast i8* %206 to <16 x i8>*
store <16 x i8> %203, <16 x i8>* %207
br label %208
208: ; preds = %192, %195
%209 = icmp eq i64 %132, %149
br i1 %209, label %225, label %210
210: ; preds = %134, %122, %208
%211 = phi i64 [ %127, %134 ], [ %127, %122 ], [ %150, %208 ]
%212 = phi i64 [ %126, %134 ], [ %126, %122 ], [ %151, %208 ]
%213 = phi i32 [ %125, %134 ], [ %125, %122 ], [ %153, %208 ]
br label %214
214: ; preds = %210, %214
%215 = phi i64 [ %222, %214 ], [ %211, %210 ]
%216 = phi i64 [ %219, %214 ], [ %212, %210 ]
%217 = phi i32 [ %218, %214 ], [ %213, %210 ]
%218 = add nsw i32 %217, -1
%219 = add nsw i64 %216, 1
%220 = getelementptr inbounds i8, i8* %52, i64 %216
%221 = load i8, i8* %220
%222 = add nsw i64 %215, 1
%223 = getelementptr inbounds i8, i8* %52, i64 %215
store i8 %221, i8* %223
%224 = icmp ugt i32 %217, 1
br i1 %224, label %214, label %225
225: ; preds = %214, %208
%226 = phi i64 [ %150, %208 ], [ %222, %214 ]
%227 = trunc i64 %226 to i32
br label %228
228: ; preds = %225, %111, %91
%229 = phi i32 [ %96, %91 ], [ %120, %111 ], [ %227, %225 ]
%230 = ashr i32 %75, 1
%231 = add nuw nsw i32 %76, 1
%232 = icmp eq i32 %231, 8
br i1 %232, label %83, label %73
233: ; preds = %66, %83, %25
%234 = call i32* @fopen(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%235 = call i32 @fwrite(i8* %52, i32 1, i64 %50, i32* %234)
%236 = call i32 @free(i8* %52)
%237 = call i32 @fclose(i32* %234)
%238 = call i32 @fclose(i32* %9)
%239 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i8* %0)
br label %240
240: ; preds = %233, %5
ret void
}