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

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fopen_s(int /*<<< orphan*/ **, char const *, char *);
int /*<<< orphan*/ fread_s(int *, size_t, size_t, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ printf(char *, ...);
size_t roundUp(size_t, int);
int main(int argc, char **argv) {
  if (argc < 2) {
    return -1;
  }
  const char *filePath = argv[1];
  const char *dataName = "data";
  if (argc >= 3) {
    dataName = argv[2];
  }
  FILE *file;
  if (fopen_s(&file, filePath, "rb") != 0) {
    return (-1);
  }
  fseek(file, 0, SEEK_END);
  size_t size = ftell(file);
  fseek(file, 0, SEEK_SET);
  uint8_t *mem = (uint8_t *)malloc(size);
  if (mem == NULL) {
    fclose(file);
    return (-1);
  }
  fread_s(mem, size, size, 1, file);
  fclose(file);
  const char *dataTypeName;
  int byteCount;
  size_t maxColCount;
  int forceBytes = 8;
  if (size % 8 == 0 || forceBytes == 8) {
    dataTypeName = "uint64_t";
    byteCount = 8;
    maxColCount = 4;
  } else if (size % 4 == 0 || forceBytes == 4) {
    dataTypeName = "uint32_t";
    byteCount = 4;
    maxColCount = 8;
  } else if (size % 2 == 0 || forceBytes == 2) {
    dataTypeName = "uint16_t";
    byteCount = 2;
    maxColCount = 16;
  } else {
    dataTypeName = "uint8_t";
    byteCount = 1;
    maxColCount = 32;
  }
  size_t blockSize = roundUp(size, byteCount);
  size_t blockCount = blockSize / byteCount;
  printf("const %s data_%s[%zu] = {\n", dataTypeName, dataName, blockCount);
  size_t remainingSize = size;
  const uint8_t *p = mem;
  size_t outByteCount = 0;
  while (remainingSize > 0) {
    size_t colCount = ((remainingSize / byteCount) < (maxColCount)
                           ? (remainingSize / byteCount)
                           : (maxColCount));
    printf("\t");
    size_t readBytes = 0;
    if (colCount > 0) {
      for (size_t col = 0; col < colCount; ++col) {
        if (col > 0) {
          printf(",");
        }
        if (byteCount == 8) {
          uint64_t *x = (uint64_t *)p;
          uint64_t value = x[col];
          printf("0x%016llx", value);
          readBytes += 8;
        } else if (byteCount == 4) {
          uint32_t *x = (uint32_t *)p;
          uint32_t value = x[col];
          printf("0x%08x", value);
          readBytes += 4;
        } else if (byteCount == 2) {
          uint16_t *x = (uint16_t *)p;
          uint16_t value = x[col];
          printf("0x%04x", value);
          readBytes += 2;
        } else {
          uint8_t value = p[col];
          printf("0x%02x", value);
          ++readBytes;
        }
      }
    } else {
      size_t pad = byteCount - remainingSize;
      uint64_t finalValue = 0;
      for (int i = 0; i < remainingSize; ++i) {
        uint8_t b8 = p[i];
        int bits = i * 8;
        finalValue |= (((uint64_t)b8 & 0xFF) << bits);
      }
      readBytes += remainingSize;
      if (byteCount == 8) {
        printf("0x%016llx\n", finalValue);
      } else if (byteCount == 4) {
        uint32_t *x = (uint32_t *)p;
        uint32_t value = (uint32_t)(finalValue & 0xFFFFFFFF);
        printf("0x%08x", value);
      } else if (byteCount == 2) {
        uint16_t value = (uint16_t)(finalValue & 0xFFFF);
        printf("0x%04x", value);
      } else {
        uint8_t value = (uint8_t)(finalValue & 0xFF);
        printf("0x%02x", value);
      }
    }
    outByteCount += readBytes;
    remainingSize -= readBytes;
    p += readBytes;
    if (remainingSize > 0) {
      printf(",");
    }
    if (remainingSize > 0)
      printf("\n");
  }
  assert(outByteCount == size);
  printf("};\n");
  printf("const size_t sizeOf_%s = %zu;\n", dataName, size);
  printf("const size_t blockSizeOf_%s = %zu;\n", dataName, blockSize);
  printf("const uint8_t *ptr_%s = (uint8_t *)data_%s;\n", dataName, dataName);
  free(mem);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11cf <main+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1837 <main+0x697>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
lea    0xe1e(%rip),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     11fc <main+0x5c>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdi
lea    0xdfa(%rip),%rdx
call   1050 <fopen_s@plt>
cmp    $0x0,%rax
je     1226 <main+0x86>
movl   $0xffffffff,-0x4(%rbp)
jmp    1837 <main+0x697>
mov    -0x28(%rbp),%rdi
mov    0x2db7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    -0x28(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2d86(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    -0x30(%rbp),%rdi
call   10b0 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1288 <main+0xe8>
mov    -0x28(%rbp),%rdi
call   1070 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1837 <main+0x697>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%r8
mov    $0x1,%ecx
call   1040 <fread_s@plt>
mov    -0x28(%rbp),%rdi
call   1070 <fclose@plt>
movl   $0x8,-0x54(%rbp)
mov    -0x30(%rbp),%rax
and    $0x7,%rax
cmp    $0x0,%rax
je     12ce <main+0x12e>
cmpl   $0x8,-0x54(%rbp)
jne    12ed <main+0x14d>
lea    0xd33(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x8,-0x44(%rbp)
movq   $0x4,-0x50(%rbp)
jmp    1387 <main+0x1e7>
mov    -0x30(%rbp),%rax
and    $0x3,%rax
cmp    $0x0,%rax
je     1309 <main+0x169>
cmpl   $0x4,-0x54(%rbp)
jne    1328 <main+0x188>
lea    0xd01(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x4,-0x44(%rbp)
movq   $0x8,-0x50(%rbp)
jmp    1382 <main+0x1e2>
mov    -0x30(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1344 <main+0x1a4>
cmpl   $0x2,-0x54(%rbp)
jne    1363 <main+0x1c3>
lea    0xccf(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x2,-0x44(%rbp)
movq   $0x10,-0x50(%rbp)
jmp    137d <main+0x1dd>
lea    0xcb9(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x1,-0x44(%rbp)
movq   $0x20,-0x50(%rbp)
jmp    1382 <main+0x1e2>
jmp    1387 <main+0x1e7>
mov    -0x30(%rbp),%rdi
mov    -0x44(%rbp),%esi
call   1060 <roundUp@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x68(%rbp)
mov    -0x40(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x68(%rbp),%rcx
lea    0xc70(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x78(%rbp)
movq   $0x0,-0x80(%rbp)
cmpq   $0x0,-0x70(%rbp)
jbe    17c9 <main+0x629>
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
xor    %edx,%edx
div    %rcx
cmp    -0x50(%rbp),%rax
jae    1415 <main+0x275>
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x100(%rbp)
jmp    1420 <main+0x280>
mov    -0x50(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x100(%rbp),%rax
mov    %rax,-0x88(%rbp)
lea    0xc11(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movq   $0x0,-0x90(%rbp)
cmpq   $0x0,-0x88(%rbp)
jbe    15fa <main+0x45a>
movq   $0x0,-0x98(%rbp)
mov    -0x98(%rbp),%rax
cmp    -0x88(%rbp),%rax
jae    15f5 <main+0x455>
cmpq   $0x0,-0x98(%rbp)
jbe    1490 <main+0x2f0>
lea    0xbbf(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
cmpl   $0x8,-0x44(%rbp)
jne    14e7 <main+0x347>
mov    -0x78(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%esi
lea    0xb81(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x90(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x90(%rbp)
jmp    15d9 <main+0x439>
cmpl   $0x4,-0x44(%rbp)
jne    153e <main+0x39e>
mov    -0x78(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
mov    -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%esi
lea    0xb34(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x90(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x90(%rbp)
jmp    15d4 <main+0x434>
cmpl   $0x2,-0x44(%rbp)
jne    1595 <main+0x3f5>
mov    -0x78(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%esi
lea    0xae4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x90(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x90(%rbp)
jmp    15cf <main+0x42f>
mov    -0x78(%rbp),%rax
mov    -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc8(%rbp)
mov    -0xc8(%rbp),%esi
lea    0xaac(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x90(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x90(%rbp)
jmp    15d4 <main+0x434>
jmp    15d9 <main+0x439>
jmp    15de <main+0x43e>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
jmp    1460 <main+0x2c0>
jmp    175e <main+0x5be>
movslq -0x44(%rbp),%rax
sub    -0x70(%rbp),%rax
mov    %rax,-0xd0(%rbp)
movl   $0x0,-0xd4(%rbp)
movl   $0x0,-0xd8(%rbp)
movslq -0xd8(%rbp),%rax
cmp    -0x70(%rbp),%rax
jae    1684 <main+0x4e4>
mov    -0x78(%rbp),%rax
movslq -0xd8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xdc(%rbp)
mov    -0xd8(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xe0(%rbp)
mov    -0xdc(%rbp),%eax
and    $0xff,%eax
mov    -0xe0(%rbp),%ecx
shl    %cl,%eax
or     -0xd4(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    161d <main+0x47d>
mov    -0x70(%rbp),%rax
add    -0x90(%rbp),%rax
mov    %rax,-0x90(%rbp)
cmpl   $0x8,-0x44(%rbp)
jne    16b9 <main+0x519>
mov    -0xd4(%rbp),%esi
lea    0x9bc(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1759 <main+0x5b9>
cmpl   $0x4,-0x44(%rbp)
jne    16f6 <main+0x556>
mov    -0x78(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0xd4(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0xec(%rbp)
mov    -0xec(%rbp),%esi
lea    0x96a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1754 <main+0x5b4>
cmpl   $0x2,-0x44(%rbp)
jne    172a <main+0x58a>
mov    -0xd4(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0xf0(%rbp)
mov    -0xf0(%rbp),%esi
lea    0x93d(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    174f <main+0x5af>
mov    -0xd4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xf4(%rbp)
mov    -0xf4(%rbp),%esi
lea    0x91a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1754 <main+0x5b4>
jmp    1759 <main+0x5b9>
jmp    175e <main+0x5be>
mov    -0x90(%rbp),%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x90(%rbp),%rcx
mov    -0x70(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x90(%rbp),%rax
shl    $0x2,%rax
add    -0x78(%rbp),%rax
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x70(%rbp)
jbe    17ab <main+0x60b>
lea    0x8a4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
cmpq   $0x0,-0x70(%rbp)
jbe    17c4 <main+0x624>
lea    0x929(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    13da <main+0x23a>
mov    -0x80(%rbp),%rax
cmp    -0x30(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0x88f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    0x87d(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x20(%rbp),%rsi
mov    -0x60(%rbp),%rdx
lea    0x886(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x20(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0x894(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0xffffffff,%ebp
cmp    $0x2,%edi
jl     16ae <main+0x4ee>
mov    %rsi,%rax
mov    0x8(%rsi),%rsi
jne    11ee <main+0x2e>
lea    0xe84(%rip),%r12
jmp    11f2 <main+0x32>
mov    0x10(%rax),%r12
lea    0xe7c(%rip),%rdx
mov    %rsp,%rdi
call   1060 <fopen_s@plt>
mov    $0xffffffff,%ebp
test   %rax,%rax
jne    16ae <main+0x4ee>
mov    (%rsp),%rdi
mov    0x2dce(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10e0 <fseek@plt>
mov    (%rsp),%rdi
call   10c0 <ftell@plt>
mov    %rax,%rbx
mov    (%rsp),%rdi
mov    0x2d9e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10e0 <fseek@plt>
mov    %rbx,%rdi
call   10d0 <malloc@plt>
mov    (%rsp),%r8
test   %rax,%rax
je     1643 <main+0x483>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    $0x1,%ecx
call   1050 <fread_s@plt>
mov    (%rsp),%rdi
call   1090 <fclose@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1080 <roundUp@plt>
mov    %rax,%r13
mov    %rax,%rcx
shr    $0x3,%rcx
lea    0xdec(%rip),%rdi
lea    0xddc(%rip),%rsi
xor    %ebp,%ebp
mov    %r12,%rdx
xor    %eax,%eax
call   10a0 <printf@plt>
test   %rbx,%rbx
je     164d <main+0x48d>
mov    %r13,0x8(%rsp)
mov    %r12,0x20(%rsp)
lea    0xdda(%rip),%r13
mov    %rbx,0x10(%rsp)
mov    %rbx,%rbp
mov    %r14,0x18(%rsp)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%r12
shr    $0x3,%r12
cmp    $0x20,%rbp
mov    $0x4,%eax
cmovae %rax,%r12
mov    $0x9,%edi
call   1040 <putchar@plt>
test   %r12,%r12
je     1350 <main+0x190>
mov    (%r14),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
cmp    $0x1,%r12
je     1341 <main+0x181>
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x2c,%edi
call   1040 <putchar@plt>
mov    (%r14,%rbx,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1320 <main+0x160>
shl    $0x3,%r12
jmp    15e6 <main+0x426>
nopw   0x0(%rax,%rax,1)
cmp    $0x8,%rbp
jae    135f <main+0x19f>
xor    %eax,%eax
xor    %esi,%esi
jmp    15af <main+0x3ef>
mov    %rbp,%rax
and    $0xfffffffffffffff8,%rax
lea    -0x8(%rax),%rdx
mov    %rdx,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
movdqa 0xc8f(%rip),%xmm8
movdqa 0xc96(%rip),%xmm9
movdqa 0xc9d(%rip),%xmm10
je     160b <main+0x44b>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
pxor   %xmm0,%xmm0
xor    %edx,%edx
pxor   %xmm1,%xmm1
movdqa 0xc4e(%rip),%xmm2
movdqa 0xc85(%rip),%xmm11
movdqa 0xc8c(%rip),%xmm12
movdqa 0xc93(%rip),%xmm13
nopl   (%rax)
movdqa %xmm2,%xmm3
pslld  $0x3,%xmm3
movdqu (%r14,%rdx,4),%xmm4
pand   %xmm9,%xmm4
movdqa %xmm2,%xmm5
pslld  $0x1a,%xmm5
paddd  %xmm10,%xmm5
cvttps2dq %xmm5,%xmm5
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm5,%xmm4
pshufd $0xf5,%xmm5,%xmm7
pmuludq %xmm6,%xmm7
movdqa %xmm3,%xmm6
paddd  %xmm8,%xmm6
pshufd $0xe8,%xmm4,%xmm5
pshufd $0xe8,%xmm7,%xmm4
punpckldq %xmm4,%xmm5
movdqu 0x10(%r14,%rdx,4),%xmm4
pand   %xmm9,%xmm4
por    %xmm0,%xmm5
pslld  $0x17,%xmm6
paddd  %xmm10,%xmm6
cvttps2dq %xmm6,%xmm0
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm0,%xmm4
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm6,%xmm0
movdqu 0x20(%r14,%rdx,4),%xmm6
pshufd $0xe8,%xmm4,%xmm4
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm4
por    %xmm1,%xmm4
movdqa %xmm3,%xmm0
paddd  %xmm11,%xmm0
pand   %xmm9,%xmm6
pslld  $0x17,%xmm0
paddd  %xmm10,%xmm0
cvttps2dq %xmm0,%xmm0
pshufd $0xf5,%xmm6,%xmm1
pmuludq %xmm0,%xmm6
pshufd $0xf5,%xmm0,%xmm7
pmuludq %xmm1,%xmm7
pshufd $0xe8,%xmm6,%xmm0
pshufd $0xe8,%xmm7,%xmm1
punpckldq %xmm1,%xmm0
movdqu 0x30(%r14,%rdx,4),%xmm1
paddd  %xmm12,%xmm3
pand   %xmm9,%xmm1
por    %xmm5,%xmm0
pslld  $0x17,%xmm3
paddd  %xmm10,%xmm3
cvttps2dq %xmm3,%xmm3
pshufd $0xf5,%xmm1,%xmm5
pmuludq %xmm3,%xmm1
pshufd $0xf5,%xmm3,%xmm3
pmuludq %xmm5,%xmm3
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm1
por    %xmm4,%xmm1
add    $0x10,%rdx
paddd  %xmm13,%xmm2
add    $0xfffffffffffffffe,%rsi
jne    13d0 <main+0x210>
test   $0x1,%cl
je     1590 <main+0x3d0>
movdqu (%r14,%rdx,4),%xmm4
movdqu 0x10(%r14,%rdx,4),%xmm3
movdqa %xmm2,%xmm5
pslld  $0x3,%xmm5
paddd  %xmm8,%xmm5
pand   %xmm9,%xmm4
pand   %xmm9,%xmm3
pslld  $0x1a,%xmm2
paddd  %xmm10,%xmm2
cvttps2dq %xmm2,%xmm2
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm2,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm6,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm4
por    %xmm4,%xmm0
pslld  $0x17,%xmm5
paddd  %xmm10,%xmm5
cvttps2dq %xmm5,%xmm2
pshufd $0xf5,%xmm3,%xmm4
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm4,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm3
por    %xmm3,%xmm1
por    %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
por    %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
por    %xmm1,%xmm0
movd   %xmm0,%esi
cmp    %rax,%rbp
je     15d5 <main+0x415>
lea    0x0(,%rax,8),%ecx
cs nopw 0x0(%rax,%rax,1)
movzbl (%r14,%rax,4),%edx
shl    %cl,%edx
or     %edx,%esi
add    $0x1,%rax
add    $0x8,%ecx
cmp    %rax,%rbp
jne    15c0 <main+0x400>
lea    0xaca(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    %rbp,%r12
add    %r12,%r15
sub    %r12,%rbp
je     162b <main+0x46b>
lea    (%r14,%r12,4),%r14
mov    $0x2c,%edi
call   1040 <putchar@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    12e0 <main+0x120>
pxor   %xmm0,%xmm0
xor    %edx,%edx
pxor   %xmm1,%xmm1
movdqa 0x9e3(%rip),%xmm2
test   $0x1,%cl
jne    1507 <main+0x347>
jmp    1590 <main+0x3d0>
mov    0x20(%rsp),%r12
xor    %ebp,%ebp
mov    0x18(%rsp),%r14
mov    0x10(%rsp),%rbx
mov    0x8(%rsp),%r13
jmp    1650 <main+0x490>
mov    %r8,%rdi
call   1090 <fclose@plt>
jmp    16ae <main+0x4ee>
xor    %r15d,%r15d
xor    %edi,%edi
cmp    %rbx,%r15
sete   %dil
call   10b0 <assert@plt>
lea    0xabc(%rip),%rdi
call   1070 <puts@plt>
lea    0xa40(%rip),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <printf@plt>
lea    0xa4b(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   10a0 <printf@plt>
lea    0xa5b(%rip),%rdi
mov    %r12,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   10a0 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"data\00"
@.str.1 = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.2 = [9 x i8] c"uint64_t\00"
@.str.3 = [9 x i8] c"uint32_t\00"
@.str.4 = [9 x i8] c"uint16_t\00"
@.str.5 = [8 x i8] c"uint8_t\00"
@.str.6 = [27 x i8] c"const %s data_%s[%zu] = {\0A\00"
@.str.7 = [2 x i8] c"\09\00"
@.str.8 = [2 x i8] c",\00"
@.str.9 = [10 x i8] c"0x%016llx\00"
@.str.10 = [7 x i8] c"0x%08x\00"
@.str.11 = [7 x i8] c"0x%04x\00"
@.str.12 = [7 x i8] c"0x%02x\00"
@.str.13 = [11 x i8] c"0x%016llx\0A\00"
@.str.14 = [2 x i8] c"\0A\00"
@.str.15 = [4 x i8] c"};\0A\00"
@.str.16 = [31 x i8] c"const size_t sizeOf_%s = %zu;\0A\00"
@.str.17 = [36 x i8] c"const size_t blockSizeOf_%s = %zu;\0A\00"
@.str.18 = [45 x i8] c"const uint8_t *ptr_%s = (uint8_t *)data_%s;\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i64
%14 = alloca i32
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i32*
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i32*
%24 = alloca i32
%25 = alloca i32*
%26 = alloca i32
%27 = alloca i32*
%28 = alloca i32
%29 = alloca i32
%30 = alloca i64
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32*
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%39 = load i32, i32* %4
%40 = icmp slt i32 %39, 2
br i1 %40, label %41, label %42
41: ; preds = %2
store i32 -1, i32* %3
br label %308
42: ; preds = %2
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
store i8* %45, i8** %6
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %7
%46 = load i32, i32* %4
%47 = icmp sge i32 %46, 3
br i1 %47, label %48, label %52
48: ; preds = %42
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 2
%51 = load i8*, i8** %50
store i8* %51, i8** %7
br label %52
52: ; preds = %48, %42
%53 = load i8*, i8** %6
%54 = call i64 @fopen_s(i32** %8, i8* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %52
store i32 -1, i32* %3
br label %308
57: ; preds = %52
%58 = load i32*, i32** %8
%59 = load i32, i32* @SEEK_END
%60 = call i32 @fseek(i32* %58, i32 0, i32 %59)
%61 = load i32*, i32** %8
%62 = call i64 @ftell(i32* %61)
store i64 %62, i64* %9
%63 = load i32*, i32** %8
%64 = load i32, i32* @SEEK_SET
%65 = call i32 @fseek(i32* %63, i32 0, i32 %64)
%66 = load i64, i64* %9
%67 = call i64 @malloc(i64 %66)
%68 = inttoptr i64 %67 to i32*
store i32* %68, i32** %10
%69 = load i32*, i32** %10
%70 = icmp eq i32* %69, null
br i1 %70, label %71, label %74
71: ; preds = %57
%72 = load i32*, i32** %8
%73 = call i32 @fclose(i32* %72)
store i32 -1, i32* %3
br label %308
74: ; preds = %57
%75 = load i32*, i32** %10
%76 = load i64, i64* %9
%77 = load i64, i64* %9
%78 = load i32*, i32** %8
%79 = call i32 @fread_s(i32* %75, i64 %76, i64 %77, i32 1, i32* %78)
%80 = load i32*, i32** %8
%81 = call i32 @fclose(i32* %80)
store i32 8, i32* %14
%82 = load i64, i64* %9
%83 = urem i64 %82, 8
%84 = icmp eq i64 %83, 0
br i1 %84, label %88, label %85
85: ; preds = %74
%86 = load i32, i32* %14
%87 = icmp eq i32 %86, 8
br i1 %87, label %88, label %89
88: ; preds = %85, %74
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %11
store i32 8, i32* %12
store i64 4, i64* %13
br label %108
89: ; preds = %85
%90 = load i64, i64* %9
%91 = urem i64 %90, 4
%92 = icmp eq i64 %91, 0
br i1 %92, label %96, label %93
93: ; preds = %89
%94 = load i32, i32* %14
%95 = icmp eq i32 %94, 4
br i1 %95, label %96, label %97
96: ; preds = %93, %89
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8** %11
store i32 4, i32* %12
store i64 8, i64* %13
br label %107
97: ; preds = %93
%98 = load i64, i64* %9
%99 = urem i64 %98, 2
%100 = icmp eq i64 %99, 0
br i1 %100, label %104, label %101
101: ; preds = %97
%102 = load i32, i32* %14
%103 = icmp eq i32 %102, 2
br i1 %103, label %104, label %105
104: ; preds = %101, %97
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8** %11
store i32 2, i32* %12
store i64 16, i64* %13
br label %106
105: ; preds = %101
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** %11
store i32 1, i32* %12
store i64 32, i64* %13
br label %106
106: ; preds = %105, %104
br label %107
107: ; preds = %106, %96
br label %108
108: ; preds = %107, %88
%109 = load i64, i64* %9
%110 = load i32, i32* %12
%111 = call i64 @roundUp(i64 %109, i32 %110)
store i64 %111, i64* %15
%112 = load i64, i64* %15
%113 = load i32, i32* %12
%114 = sext i32 %113 to i64
%115 = udiv i64 %112, %114
store i64 %115, i64* %16
%116 = load i8*, i8** %11
%117 = load i8*, i8** %7
%118 = load i64, i64* %16
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %116, i8* %117, i64 %118)
%120 = load i64, i64* %9
store i64 %120, i64* %17
%121 = load i32*, i32** %10
store i32* %121, i32** %18
store i64 0, i64* %19
br label %122
122: ; preds = %289, %108
%123 = load i64, i64* %17
%124 = icmp ugt i64 %123, 0
br i1 %124, label %125, label %290
125: ; preds = %122
%126 = load i64, i64* %17
%127 = load i32, i32* %12
%128 = sext i32 %127 to i64
%129 = udiv i64 %126, %128
%130 = load i64, i64* %13
%131 = icmp ult i64 %129, %130
br i1 %131, label %132, label %137
132: ; preds = %125
%133 = load i64, i64* %17
%134 = load i32, i32* %12
%135 = sext i32 %134 to i64
%136 = udiv i64 %133, %135
br label %139
137: ; preds = %125
%138 = load i64, i64* %13
br label %139
139: ; preds = %137, %132
%140 = phi i64 [ %136, %132 ], [ %138, %137 ]
store i64 %140, i64* %20
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i64 0, i64* %21
%142 = load i64, i64* %20
%143 = icmp ugt i64 %142, 0
br i1 %143, label %144, label %209
144: ; preds = %139
store i64 0, i64* %22
br label %145
145: ; preds = %205, %144
%146 = load i64, i64* %22
%147 = load i64, i64* %20
%148 = icmp ult i64 %146, %147
br i1 %148, label %149, label %208
149: ; preds = %145
%150 = load i64, i64* %22
%151 = icmp ugt i64 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %149
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %154
154: ; preds = %152, %149
%155 = load i32, i32* %12
%156 = icmp eq i32 %155, 8
br i1 %156, label %157, label %167
157: ; preds = %154
%158 = load i32*, i32** %18
store i32* %158, i32** %23
%159 = load i32*, i32** %23
%160 = load i64, i64* %22
%161 = getelementptr inbounds i32, i32* %159, i64 %160
%162 = load i32, i32* %161
store i32 %162, i32* %24
%163 = load i32, i32* %24
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %163)
%165 = load i64, i64* %21
%166 = add i64 %165, 8
store i64 %166, i64* %21
br label %204
167: ; preds = %154
%168 = load i32, i32* %12
%169 = icmp eq i32 %168, 4
br i1 %169, label %170, label %180
170: ; preds = %167
%171 = load i32*, i32** %18
store i32* %171, i32** %25
%172 = load i32*, i32** %25
%173 = load i64, i64* %22
%174 = getelementptr inbounds i32, i32* %172, i64 %173
%175 = load i32, i32* %174
store i32 %175, i32* %26
%176 = load i32, i32* %26
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %176)
%178 = load i64, i64* %21
%179 = add i64 %178, 4
store i64 %179, i64* %21
br label %203
180: ; preds = %167
%181 = load i32, i32* %12
%182 = icmp eq i32 %181, 2
br i1 %182, label %183, label %193
183: ; preds = %180
%184 = load i32*, i32** %18
store i32* %184, i32** %27
%185 = load i32*, i32** %27
%186 = load i64, i64* %22
%187 = getelementptr inbounds i32, i32* %185, i64 %186
%188 = load i32, i32* %187
store i32 %188, i32* %28
%189 = load i32, i32* %28
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %189)
%191 = load i64, i64* %21
%192 = add i64 %191, 2
store i64 %192, i64* %21
br label %202
193: ; preds = %180
%194 = load i32*, i32** %18
%195 = load i64, i64* %22
%196 = getelementptr inbounds i32, i32* %194, i64 %195
%197 = load i32, i32* %196
store i32 %197, i32* %29
%198 = load i32, i32* %29
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %198)
%200 = load i64, i64* %21
%201 = add i64 %200, 1
store i64 %201, i64* %21
br label %202
202: ; preds = %193, %183
br label %203
203: ; preds = %202, %170
br label %204
204: ; preds = %203, %157
br label %205
205: ; preds = %204
%206 = load i64, i64* %22
%207 = add i64 %206, 1
store i64 %207, i64* %22
br label %145
208: ; preds = %145
br label %270
209: ; preds = %139
%210 = load i32, i32* %12
%211 = sext i32 %210 to i64
%212 = load i64, i64* %17
%213 = sub i64 %211, %212
store i64 %213, i64* %30
store i32 0, i32* %31
store i32 0, i32* %32
br label %214
214: ; preds = %233, %209
%215 = load i32, i32* %32
%216 = sext i32 %215 to i64
%217 = load i64, i64* %17
%218 = icmp ult i64 %216, %217
br i1 %218, label %219, label %236
219: ; preds = %214
%220 = load i32*, i32** %18
%221 = load i32, i32* %32
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds i32, i32* %220, i64 %222
%224 = load i32, i32* %223
store i32 %224, i32* %33
%225 = load i32, i32* %32
%226 = mul nsw i32 %225, 8
store i32 %226, i32* %34
%227 = load i32, i32* %33
%228 = and i32 %227, 255
%229 = load i32, i32* %34
%230 = shl i32 %228, %229
%231 = load i32, i32* %31
%232 = or i32 %231, %230
store i32 %232, i32* %31
br label %233
233: ; preds = %219
%234 = load i32, i32* %32
%235 = add nsw i32 %234, 1
store i32 %235, i32* %32
br label %214
236: ; preds = %214
%237 = load i64, i64* %17
%238 = load i64, i64* %21
%239 = add i64 %238, %237
store i64 %239, i64* %21
%240 = load i32, i32* %12
%241 = icmp eq i32 %240, 8
br i1 %241, label %242, label %245
242: ; preds = %236
%243 = load i32, i32* %31
%244 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %243)
br label %269
245: ; preds = %236
%246 = load i32, i32* %12
%247 = icmp eq i32 %246, 4
br i1 %247, label %248, label %254
248: ; preds = %245
%249 = load i32*, i32** %18
store i32* %249, i32** %35
%250 = load i32, i32* %31
%251 = and i32 %250, -1
store i32 %251, i32* %36
%252 = load i32, i32* %36
%253 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %252)
br label %268
254: ; preds = %245
%255 = load i32, i32* %12
%256 = icmp eq i32 %255, 2
br i1 %256, label %257, label %262
257: ; preds = %254
%258 = load i32, i32* %31
%259 = and i32 %258, 65535
store i32 %259, i32* %37
%260 = load i32, i32* %37
%261 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %260)
br label %267
262: ; preds = %254
%263 = load i32, i32* %31
%264 = and i32 %263, 255
store i32 %264, i32* %38
%265 = load i32, i32* %38
%266 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %265)
br label %267
267: ; preds = %262, %257
br label %268
268: ; preds = %267, %248
br label %269
269: ; preds = %268, %242
br label %270
270: ; preds = %269, %208
%271 = load i64, i64* %21
%272 = load i64, i64* %19
%273 = add i64 %272, %271
store i64 %273, i64* %19
%274 = load i64, i64* %21
%275 = load i64, i64* %17
%276 = sub i64 %275, %274
store i64 %276, i64* %17
%277 = load i64, i64* %21
%278 = load i32*, i32** %18
%279 = getelementptr inbounds i32, i32* %278, i64 %277
store i32* %279, i32** %18
%280 = load i64, i64* %17
%281 = icmp ugt i64 %280, 0
br i1 %281, label %282, label %284
282: ; preds = %270
%283 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %284
284: ; preds = %282, %270
%285 = load i64, i64* %17
%286 = icmp ugt i64 %285, 0
br i1 %286, label %287, label %289
287: ; preds = %284
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %289
289: ; preds = %287, %284
br label %122
290: ; preds = %122
%291 = load i64, i64* %19
%292 = load i64, i64* %9
%293 = icmp eq i64 %291, %292
%294 = zext i1 %293 to i32
%295 = call i32 @assert(i32 %294)
%296 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
%297 = load i8*, i8** %7
%298 = load i64, i64* %9
%299 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i8* %297, i64 %298)
%300 = load i8*, i8** %7
%301 = load i64, i64* %15
%302 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0), i8* %300, i64 %301)
%303 = load i8*, i8** %7
%304 = load i8*, i8** %7
%305 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0), i8* %303, i8* %304)
%306 = load i32*, i32** %10
%307 = call i32 @free(i32* %306)
br label %308
308: ; preds = %290, %71, %56, %41
%309 = load i32, i32* %3
ret i32 %309
}

LLVM IR (-O2):
@.str = [5 x i8] c"data\00"
@.str.1 = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.2 = [9 x i8] c"uint64_t\00"
@.str.6 = [27 x i8] c"const %s data_%s[%zu] = {\0A\00"
@.str.9 = [10 x i8] c"0x%016llx\00"
@.str.13 = [11 x i8] c"0x%016llx\0A\00"
@.str.16 = [31 x i8] c"const size_t sizeOf_%s = %zu;\0A\00"
@.str.17 = [36 x i8] c"const size_t blockSizeOf_%s = %zu;\0A\00"
@.str.18 = [45 x i8] c"const uint8_t *ptr_%s = (uint8_t *)data_%s;\0A\00"
@str = [3 x i8] c"};\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32*
%4 = icmp slt i32 %0, 2
br i1 %4, label %185, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = icmp eq i32 %0, 2
br i1 %8, label %12, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
br label %12
12: ; preds = %9, %5
%13 = phi i8* [ %11, %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %5 ]
%14 = bitcast i32** %3 to i8*
%15 = call i64 @fopen_s(i32** %3, i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %183
17: ; preds = %12
%18 = load i32*, i32** %3
%19 = load i32, i32* @SEEK_END
%20 = call i32 @fseek(i32* %18, i32 0, i32 %19)
%21 = load i32*, i32** %3
%22 = call i64 @ftell(i32* %21)
%23 = load i32*, i32** %3
%24 = load i32, i32* @SEEK_SET
%25 = call i32 @fseek(i32* %23, i32 0, i32 %24)
%26 = call i64 @malloc(i64 %22)
%27 = inttoptr i64 %26 to i32*
%28 = icmp eq i64 %26, 0
%29 = load i32*, i32** %3
br i1 %28, label %30, label %32
30: ; preds = %17
%31 = call i32 @fclose(i32* %29)
br label %183
32: ; preds = %17
%33 = call i32 @fread_s(i32* %27, i64 %22, i64 %22, i32 1, i32* %29)
%34 = load i32*, i32** %3
%35 = call i32 @fclose(i32* %34)
%36 = call i64 @roundUp(i64 %22, i32 8)
%37 = lshr i64 %36, 3
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %13, i64 %37)
%39 = icmp eq i64 %22, 0
br i1 %39, label %173, label %40
40: ; preds = %32, %169
%41 = phi i64 [ %167, %169 ], [ %22, %32 ]
%42 = phi i32* [ %170, %169 ], [ %27, %32 ]
%43 = phi i64 [ %166, %169 ], [ 0, %32 ]
%44 = icmp ult i64 %41, 32
%45 = lshr i64 %41, 3
%46 = select i1 %44, i64 %45, i64 4
%47 = call i32 @putchar(i32 9)
%48 = icmp eq i64 %46, 0
br i1 %48, label %49, label %135
49: ; preds = %40
%50 = icmp ult i64 %41, 8
br i1 %50, label %132, label %51
51: ; preds = %49
%52 = and i64 %41, -8
%53 = add i64 %52, -8
%54 = lshr exact i64 %53, 3
%55 = add nuw nsw i64 %54, 1
%56 = and i64 %55, 1
%57 = icmp eq i64 %53, 0
br i1 %57, label %102, label %58
58: ; preds = %51
%59 = and i64 %55, 4611686018427387902
br label %60
60: ; preds = %60, %58
%61 = phi i64 [ 0, %58 ], [ %98, %60 ]
%62 = phi <4 x i32> [ zeroinitializer, %58 ], [ %96, %60 ]
%63 = phi <4 x i32> [ zeroinitializer, %58 ], [ %97, %60 ]
%64 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %58 ], [ %99, %60 ]
%65 = phi i64 [ 0, %58 ], [ %100, %60 ]
%66 = getelementptr inbounds i32, i32* %42, i64 %61
%67 = bitcast i32* %66 to <4 x i32>*
%68 = load <4 x i32>, <4 x i32>* %67
%69 = getelementptr inbounds i32, i32* %66, i64 4
%70 = bitcast i32* %69 to <4 x i32>*
%71 = load <4 x i32>, <4 x i32>* %70
%72 = shl nsw <4 x i32> %64, <i32 3, i32 3, i32 3, i32 3>
%73 = shl <4 x i32> %64, <i32 3, i32 3, i32 3, i32 3>
%74 = add <4 x i32> %73, <i32 32, i32 32, i32 32, i32 32>
%75 = and <4 x i32> %68, <i32 255, i32 255, i32 255, i32 255>
%76 = and <4 x i32> %71, <i32 255, i32 255, i32 255, i32 255>
%77 = shl <4 x i32> %75, %72
%78 = shl <4 x i32> %76, %74
%79 = or <4 x i32> %77, %62
%80 = or <4 x i32> %78, %63
%81 = or i64 %61, 8
%82 = add <4 x i32> %64, <i32 8, i32 8, i32 8, i32 8>
%83 = getelementptr inbounds i32, i32* %42, i64 %81
%84 = bitcast i32* %83 to <4 x i32>*
%85 = load <4 x i32>, <4 x i32>* %84
%86 = getelementptr inbounds i32, i32* %83, i64 4
%87 = bitcast i32* %86 to <4 x i32>*
%88 = load <4 x i32>, <4 x i32>* %87
%89 = shl nsw <4 x i32> %82, <i32 3, i32 3, i32 3, i32 3>
%90 = shl <4 x i32> %82, <i32 3, i32 3, i32 3, i32 3>
%91 = add <4 x i32> %90, <i32 32, i32 32, i32 32, i32 32>
%92 = and <4 x i32> %85, <i32 255, i32 255, i32 255, i32 255>
%93 = and <4 x i32> %88, <i32 255, i32 255, i32 255, i32 255>
%94 = shl <4 x i32> %92, %89
%95 = shl <4 x i32> %93, %91
%96 = or <4 x i32> %94, %79
%97 = or <4 x i32> %95, %80
%98 = add nuw i64 %61, 16
%99 = add <4 x i32> %64, <i32 16, i32 16, i32 16, i32 16>
%100 = add i64 %65, 2
%101 = icmp eq i64 %100, %59
br i1 %101, label %102, label %60
102: ; preds = %60, %51
%103 = phi <4 x i32> [ undef, %51 ], [ %96, %60 ]
%104 = phi <4 x i32> [ undef, %51 ], [ %97, %60 ]
%105 = phi i64 [ 0, %51 ], [ %98, %60 ]
%106 = phi <4 x i32> [ zeroinitializer, %51 ], [ %96, %60 ]
%107 = phi <4 x i32> [ zeroinitializer, %51 ], [ %97, %60 ]
%108 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %51 ], [ %99, %60 ]
%109 = icmp eq i64 %56, 0
br i1 %109, label %126, label %110
110: ; preds = %102
%111 = getelementptr inbounds i32, i32* %42, i64 %105
%112 = bitcast i32* %111 to <4 x i32>*
%113 = load <4 x i32>, <4 x i32>* %112
%114 = getelementptr inbounds i32, i32* %111, i64 4
%115 = bitcast i32* %114 to <4 x i32>*
%116 = load <4 x i32>, <4 x i32>* %115
%117 = shl nsw <4 x i32> %108, <i32 3, i32 3, i32 3, i32 3>
%118 = shl <4 x i32> %108, <i32 3, i32 3, i32 3, i32 3>
%119 = add <4 x i32> %118, <i32 32, i32 32, i32 32, i32 32>
%120 = and <4 x i32> %113, <i32 255, i32 255, i32 255, i32 255>
%121 = and <4 x i32> %116, <i32 255, i32 255, i32 255, i32 255>
%122 = shl <4 x i32> %120, %117
%123 = shl <4 x i32> %121, %119
%124 = or <4 x i32> %122, %106
%125 = or <4 x i32> %123, %107
br label %126
126: ; preds = %102, %110
%127 = phi <4 x i32> [ %103, %102 ], [ %124, %110 ]
%128 = phi <4 x i32> [ %104, %102 ], [ %125, %110 ]
%129 = or <4 x i32> %128, %127
%130 = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %129)
%131 = icmp eq i64 %41, %52
br i1 %131, label %159, label %132
132: ; preds = %49, %126
%133 = phi i64 [ 0, %49 ], [ %52, %126 ]
%134 = phi i32 [ 0, %49 ], [ %130, %126 ]
br label %147
135: ; preds = %40
%136 = load i32, i32* %42
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %136)
%138 = icmp eq i64 %46, 1
br i1 %138, label %162, label %139
139: ; preds = %135, %139
%140 = phi i64 [ %145, %139 ], [ 1, %135 ]
%141 = call i32 @putchar(i32 44)
%142 = getelementptr inbounds i32, i32* %42, i64 %140
%143 = load i32, i32* %142
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %143)
%145 = add nuw nsw i64 %140, 1
%146 = icmp eq i64 %145, %46
br i1 %146, label %162, label %139
147: ; preds = %132, %147
%148 = phi i64 [ %157, %147 ], [ %133, %132 ]
%149 = phi i32 [ %156, %147 ], [ %134, %132 ]
%150 = getelementptr inbounds i32, i32* %42, i64 %148
%151 = load i32, i32* %150
%152 = trunc i64 %148 to i32
%153 = shl nsw i32 %152, 3
%154 = and i32 %151, 255
%155 = shl i32 %154, %153
%156 = or i32 %155, %149
%157 = add nuw nsw i64 %148, 1
%158 = icmp eq i64 %157, %41
br i1 %158, label %159, label %147
159: ; preds = %147, %126
%160 = phi i32 [ %130, %126 ], [ %156, %147 ]
%161 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %160)
br label %164
162: ; preds = %139, %135
%163 = shl nuw i64 %46, 3
br label %164
164: ; preds = %162, %159
%165 = phi i64 [ %41, %159 ], [ %163, %162 ]
%166 = add i64 %165, %43
%167 = sub i64 %41, %165
%168 = icmp eq i64 %167, 0
br i1 %168, label %173, label %169
169: ; preds = %164
%170 = getelementptr inbounds i32, i32* %42, i64 %165
%171 = call i32 @putchar(i32 44)
%172 = call i32 @putchar(i32 10)
br label %40
173: ; preds = %164, %32
%174 = phi i64 [ 0, %32 ], [ %166, %164 ]
%175 = icmp eq i64 %174, %22
%176 = zext i1 %175 to i32
%177 = call i32 @assert(i32 %176)
%178 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%179 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i8* %13, i64 %22)
%180 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0), i8* %13, i64 %36)
%181 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0), i8* %13, i8* %13)
%182 = call i32 @free(i32* %27)
br label %183
183: ; preds = %30, %173, %12
%184 = phi i32 [ -1, %12 ], [ -1, %30 ], [ 0, %173 ]
br label %185
185: ; preds = %2, %183
%186 = phi i32 [ %184, %183 ], [ -1, %2 ]
ret i32 %186
}