#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 */

/* Variables and functions */
char **calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getpid();
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
long long strtoull(char *, char **, int /*<<< orphan*/);
int /*<<< orphan*/ usage(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  long long kbtotal = 0, kballoc;
  int i, j, k, numchunk, alloc, sum, rc = 0;
  char **mem, *tmp;
  if (argc == 2) {
    char *end = NULL;
    kbtotal = strtoull(argv[1], &end, 0);
    switch (*end) {
    case 'g':
    case 'G':
      kbtotal *= 1024;
    case 'm':
    case 'M':
      kbtotal *= 1024;
    case '\0':
    case 'k':
    case 'K':
      break;
    case 'p':
    case 'P':
      kbtotal *= 4;
      break;
    default:
      usage(argv[0], stderr);
      break;
    }
  }
  if (argc != 2 || kbtotal == 0)
    usage(argv[0], stderr);
  numchunk = (kbtotal + (128 * 1024) - 1) / (128 * 1024);
  mem = calloc(numchunk, sizeof(*mem));
  if (mem == NULL) {
    fprintf(stderr, "error allocating initial chunk array\n");
    exit(-1);
  }
  alloc = (128 * 1024);
  printf("[%d] allocating %lld kbytes in %u kbyte chunks\n", getpid(), kbtotal,
         alloc);
  for (i = kballoc = 0; i < numchunk && alloc > 0; i++, kballoc += alloc) {
    if (kbtotal - kballoc < alloc)
      alloc = kbtotal - kballoc;
    while (alloc > 0 && (mem[i] = malloc(alloc * 1024)) == NULL) {
      fprintf(stderr, "malloc(%u) failed (%lld/%lld)\n", alloc * 1024, kballoc,
              kbtotal);
      alloc /= 2;
    }
    if (alloc == 0)
      break;
    printf("touching %p ([%lld-%lld]/%lld)\n", mem[i], kballoc,
           kballoc + alloc - 1, kbtotal);
    for (j = 0, tmp = mem[i]; j < alloc; j += 4) {
      for (k = 0, sum = 0; k < 4095; k++, tmp++)
        sum += *tmp;
      *tmp = sum;
    }
  }
  if (kballoc == 0)
    exit(-2);
  kbtotal = kballoc;
  printf("touched %lld kbytes\n", kballoc);
  alloc = (128 * 1024);
  printf("verifying %lld kbytes in %u kbyte chunks\n", kbtotal, alloc);
  for (i = kballoc = 0; i < numchunk; i++, kballoc += alloc) {
    if (kbtotal - kballoc < alloc)
      alloc = kbtotal - kballoc;
    tmp = mem[i];
    if (tmp != NULL) {
      printf("verifying %p (%lld/%lld)\n", tmp, kballoc, kbtotal);
      for (j = 0; j < alloc; j += 4) {
        for (k = 0, sum = 0; k < 4095; k++, tmp++)
          sum += *tmp;
        if (*tmp != sum) {
          fprintf(stderr, "sum %x != %x at %p\n", *tmp, sum, tmp - 4092);
          rc++;
        }
      }
    }
  }
  printf("verified %lld kbytes\n", kballoc);
  return rc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    12b5 <main+0x135>
movq   $0x0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x58(%rbp),%rsi
xor    %edx,%edx
call   1050 <strtoull@plt>
mov    %rax,-0x18(%rbp)
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x5c(%rbp)
test   %eax,%eax
je     1285 <main+0x105>
jmp    11e5 <main+0x65>
mov    -0x5c(%rbp),%eax
sub    $0x47,%eax
je     126d <main+0xed>
jmp    11f6 <main+0x76>
mov    -0x5c(%rbp),%eax
sub    $0x4b,%eax
je     1285 <main+0x105>
jmp    1207 <main+0x87>
mov    -0x5c(%rbp),%eax
sub    $0x4d,%eax
je     1279 <main+0xf9>
jmp    1218 <main+0x98>
mov    -0x5c(%rbp),%eax
sub    $0x50,%eax
je     128a <main+0x10a>
jmp    1229 <main+0xa9>
mov    -0x5c(%rbp),%eax
sub    $0x67,%eax
je     126d <main+0xed>
jmp    123a <main+0xba>
mov    -0x5c(%rbp),%eax
sub    $0x6b,%eax
je     1285 <main+0x105>
jmp    124b <main+0xcb>
mov    -0x5c(%rbp),%eax
sub    $0x6d,%eax
je     1279 <main+0xf9>
jmp    125c <main+0xdc>
mov    -0x5c(%rbp),%eax
sub    $0x70,%eax
je     128a <main+0x10a>
jmp    129b <main+0x11b>
mov    -0x18(%rbp),%rax
shl    $0xa,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0xa,%rax
mov    %rax,-0x18(%rbp)
jmp    12b0 <main+0x130>
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %rax,-0x18(%rbp)
jmp    12b0 <main+0x130>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    0x2d37(%rip),%rax
mov    (%rax),%esi
call   1090 <usage@plt>
jmp    12b5 <main+0x135>
cmpl   $0x2,-0x8(%rbp)
jne    12ca <main+0x14a>
cmpq   $0x0,-0x18(%rbp)
jne    12df <main+0x15f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
call   1090 <usage@plt>
mov    -0x18(%rbp),%rax
add    $0x20000,%rax
sub    $0x1,%rax
mov    $0x20000,%ecx
cqto
idiv   %rcx
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1337 <main+0x1b7>
mov    0x2cc3(%rip),%rax
mov    (%rax),%edi
lea    0xcda(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
movl   $0x20000,-0x34(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
mov    -0x34(%rbp),%ecx
lea    0xcd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
xor    %eax,%eax
cmp    -0x30(%rbp),%ecx
mov    %al,-0x5d(%rbp)
jge    1386 <main+0x206>
cmpl   $0x0,-0x34(%rbp)
setg   %al
mov    %al,-0x5d(%rbp)
mov    -0x5d(%rbp),%al
test   $0x1,%al
jne    1396 <main+0x216>
jmp    1510 <main+0x390>
mov    -0x18(%rbp),%rax
sub    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmp    %rcx,%rax
jge    13b6 <main+0x236>
mov    -0x18(%rbp),%rax
sub    -0x20(%rbp),%rax
mov    %eax,-0x34(%rbp)
jmp    13bb <main+0x23b>
xor    %eax,%eax
cmpl   $0x0,-0x34(%rbp)
mov    %al,-0x5e(%rbp)
jle    13eb <main+0x26b>
mov    -0x34(%rbp),%edi
shl    $0xa,%edi
call   1080 <malloc@plt>
mov    -0x48(%rbp),%rcx
movslq -0x24(%rbp),%rdx
mov    %rax,(%rcx,%rdx,8)
cmp    $0x0,%rax
sete   %al
mov    %al,-0x5e(%rbp)
mov    -0x5e(%rbp),%al
test   $0x1,%al
jne    13fb <main+0x27b>
jmp    1433 <main+0x2b3>
mov    0x2bde(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%edx
shl    $0xa,%edx
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xc3d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x34(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
jmp    13bb <main+0x23b>
cmpl   $0x0,-0x34(%rbp)
jne    1442 <main+0x2c2>
jmp    1510 <main+0x390>
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movslq -0x34(%rbp),%rax
add    %rax,%rcx
sub    $0x1,%rcx
mov    -0x18(%rbp),%r8
lea    0xc09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    14f1 <main+0x371>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xfff,-0x2c(%rbp)
jge    14d8 <main+0x358>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    14a4 <main+0x324>
mov    -0x38(%rbp),%eax
mov    %al,%cl
mov    -0x50(%rbp),%rax
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x28(%rbp)
jmp    148a <main+0x30a>
jmp    14f6 <main+0x376>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movslq -0x34(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    136b <main+0x1eb>
cmpq   $0x0,-0x20(%rbp)
jne    1525 <main+0x3a5>
mov    $0xfffffffe,%edi
call   10a0 <exit@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xb5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x20000,-0x34(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x34(%rbp),%edx
lea    0xb56(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    169c <main+0x51c>
mov    -0x18(%rbp),%rax
sub    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmp    %rcx,%rax
jge    1596 <main+0x416>
mov    -0x18(%rbp),%rax
sub    -0x20(%rbp),%rax
mov    %eax,-0x34(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
je     167d <main+0x4fd>
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xb10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1678 <main+0x4f8>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xfff,-0x2c(%rbp)
jge    1620 <main+0x4a0>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    15ec <main+0x46c>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x38(%rbp),%eax
je     1665 <main+0x4e5>
mov    0x29a9(%rip),%rax
mov    (%rax),%edi
mov    -0x50(%rbp),%rax
movsbl (%rax),%edx
mov    -0x38(%rbp),%ecx
mov    -0x50(%rbp),%r8
add    $0xfffffffffffff004,%r8
lea    0xa99(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    166a <main+0x4ea>
mov    -0x28(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x28(%rbp)
jmp    15d2 <main+0x452>
jmp    167d <main+0x4fd>
jmp    1682 <main+0x502>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movslq -0x34(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    156a <main+0x3ea>
mov    -0x20(%rbp),%rsi
lea    0xa5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x60,%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    %rsi,%rbp
cmp    $0x2,%edi
jne    11fd <main+0x7d>
movq   $0x0,0x20(%rsp)
mov    0x8(%rbp),%rdi
lea    0x20(%rsp),%rsi
xor    %edx,%edx
call   1050 <strtoull@plt>
mov    %rax,%r13
mov    0x20(%rsp),%rax
movsbl (%rax),%ecx
lea    -0x47(%rcx),%eax
cmp    $0x29,%eax
ja     11e2 <main+0x62>
lea    0xe37(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
shl    $0xa,%r13
shl    $0xa,%r13
jmp    11f8 <main+0x78>
shl    $0x2,%r13
jmp    11f8 <main+0x78>
test   %ecx,%ecx
je     11f8 <main+0x78>
mov    0x0(%rbp),%rdi
mov    0x2def(%rip),%rax
mov    (%rax),%esi
call   1090 <usage@plt>
test   %r13,%r13
jne    1212 <main+0x92>
mov    0x0(%rbp),%rdi
mov    0x2dd8(%rip),%rax
mov    (%rax),%esi
call   1090 <usage@plt>
xor    %r13d,%r13d
lea    0x1ffff(%r13),%rax
lea    0x3fffe(%r13),%rbp
test   %rax,%rax
cmovns %rax,%rbp
sar    $0x11,%rbp
mov    %ebp,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     16c8 <main+0x548>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xe7b(%rip),%rdi
mov    $0x20000,%ebx
mov    %eax,%esi
mov    %r13,%rdx
mov    $0x20000,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
jle    16be <main+0x53e>
mov    %rbp,0x10(%rsp)
movslq %ebp,%rax
mov    %rax,0x18(%rsp)
xor    %r14d,%r14d
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%r12
sub    %r15,%r12
mov    %ebx,%eax
cmp    %rax,%r12
cmovge %ebx,%r12d
test   %r12d,%r12d
jle    1310 <main+0x190>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12d,%ebx
shl    $0xa,%ebx
mov    %ebx,%edi
call   1080 <malloc@plt>
test   %rax,%rax
jne    1330 <main+0x1b0>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
lea    0xe2c(%rip),%rsi
mov    %ebx,%edx
mov    %r15,%rcx
mov    %r13,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r12d,%ebx
shr    %ebx
cmp    $0x1,%r12d
mov    %ebx,%r12d
ja     12b0 <main+0x130>
mov    0x8(%rsp),%rax
movq   $0x0,(%rax,%r14,8)
test   %ebx,%ebx
jne    131b <main+0x19b>
jmp    1482 <main+0x302>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12d,%ebx
test   %ebx,%ebx
je     1482 <main+0x302>
mov    0x8(%rsp),%rax
mov    (%rax,%r14,8),%rbp
jmp    133f <main+0x1bf>
cs nopw 0x0(%rax,%rax,1)
mov    %rax,%rbp
mov    0x8(%rsp),%rax
mov    %rbp,(%rax,%r14,8)
mov    %r12d,%ebx
movslq %ebx,%r12
lea    (%r15,%r12,1),%rax
mov    %rax,(%rsp)
lea    (%r15,%r12,1),%rcx
add    $0xffffffffffffffff,%rcx
lea    0xdc4(%rip),%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r13,%r8
xor    %eax,%eax
call   1040 <printf@plt>
test   %r12d,%r12d
jle    147c <main+0x2fc>
xor    %eax,%eax
pxor   %xmm4,%xmm4
jmp    13dc <main+0x25c>
nopw   0x0(%rax,%rax,1)
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%ecx
add    0xff8(%rbp),%cl
add    0xff9(%rbp),%cl
add    0xffa(%rbp),%cl
add    0xffb(%rbp),%cl
add    0xffc(%rbp),%cl
add    0xffd(%rbp),%cl
add    0xffe(%rbp),%cl
mov    %cl,0xfff(%rbp)
add    $0xfff,%rbp
add    $0x4,%eax
cmp    %ebx,%eax
jge    1460 <main+0x2e0>
pxor   %xmm3,%xmm3
mov    $0xc,%ecx
pxor   %xmm2,%xmm2
nopl   0x0(%rax)
movd   -0xc(%rbp,%rcx,1),%xmm1
movd   -0x8(%rbp,%rcx,1),%xmm0
punpcklbw %xmm4,%xmm1
punpcklwd %xmm4,%xmm1
paddd  %xmm3,%xmm1
punpcklbw %xmm4,%xmm0
punpcklwd %xmm4,%xmm0
paddd  %xmm2,%xmm0
cmp    $0xffc,%rcx
je     1380 <main+0x200>
movd   -0x4(%rbp,%rcx,1),%xmm2
movd   0x0(%rbp,%rcx,1),%xmm3
punpcklbw %xmm4,%xmm2
punpcklwd %xmm4,%xmm2
punpcklbw %xmm4,%xmm3
punpcklwd %xmm4,%xmm3
paddd  %xmm2,%xmm1
paddd  %xmm3,%xmm0
add    $0x10,%rcx
movdqa %xmm1,%xmm3
movdqa %xmm0,%xmm2
jmp    13f0 <main+0x270>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r14
cmp    0x18(%rsp),%r14
jge    147c <main+0x2fc>
mov    (%rsp),%rax
mov    %rax,%r15
test   %ebx,%ebx
jg     1290 <main+0x110>
jmp    1485 <main+0x305>
mov    (%rsp),%rax
jmp    1485 <main+0x305>
mov    %r15,%rax
test   %rax,%rax
mov    0x10(%rsp),%r14
je     16be <main+0x53e>
mov    %rax,%rbx
lea    0xca0(%rip),%rdi
xor    %r15d,%r15d
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xca1(%rip),%rdi
mov    $0x20000,%ebp
mov    %rbx,%rsi
mov    $0x20000,%edx
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
jle    1699 <main+0x519>
mov    %r14d,%eax
mov    %rax,0x10(%rsp)
xor    %r14d,%r14d
xor    %r15d,%r15d
xor    %edx,%edx
mov    %rbx,(%rsp)
jmp    150e <main+0x38e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r14
movslq %ebp,%rax
mov    0x18(%rsp),%rdx
add    %rax,%rdx
cmp    0x10(%rsp),%r14
mov    (%rsp),%rbx
je     169b <main+0x51b>
mov    %rbx,%rax
sub    %rdx,%rax
movslq %ebp,%rbp
cmp    %rbp,%rax
cmovl  %eax,%ebp
mov    0x8(%rsp),%rax
mov    (%rax,%r14,8),%r12
test   %r12,%r12
mov    %rdx,0x18(%rsp)
je     14f0 <main+0x370>
lea    0xc45(%rip),%rdi
mov    %r12,%rsi
mov    %rbx,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
jle    14f0 <main+0x370>
xor    %r13d,%r13d
lea    0xc44(%rip),%rbx
jmp    1570 <main+0x3f0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xfff,%r12
add    $0x4,%r13d
cmp    %ebp,%r13d
jge    14f0 <main+0x370>
pxor   %xmm2,%xmm2
mov    $0xc,%eax
pxor   %xmm3,%xmm3
nopl   (%rax)
movd   -0xc(%r12,%rax,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm1
movd   -0x8(%r12,%rax,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
psrad  $0x18,%xmm1
paddd  %xmm2,%xmm1
psrad  $0x18,%xmm0
paddd  %xmm3,%xmm0
cmp    $0xffc,%rax
je     1600 <main+0x480>
movd   -0x4(%r12,%rax,1),%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
movd   (%r12,%rax,1),%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
psrad  $0x18,%xmm2
psrad  $0x18,%xmm3
paddd  %xmm2,%xmm1
paddd  %xmm3,%xmm0
add    $0x10,%rax
movdqa %xmm1,%xmm2
movdqa %xmm0,%xmm3
jmp    1580 <main+0x400>
cs nopw 0x0(%rax,%rax,1)
nop
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%eax
movsbl 0xff8(%r12),%ecx
add    %eax,%ecx
movsbl 0xff9(%r12),%eax
add    %ecx,%eax
movsbl 0xffa(%r12),%ecx
add    %eax,%ecx
movsbl 0xffb(%r12),%eax
add    %ecx,%eax
movsbl 0xffc(%r12),%ecx
add    %eax,%ecx
movsbl 0xffd(%r12),%eax
add    %ecx,%eax
movsbl 0xffe(%r12),%ecx
add    %eax,%ecx
movsbl 0xfff(%r12),%edx
cmp    %edx,%ecx
je     1560 <main+0x3e0>
mov    0x2961(%rip),%rax
mov    (%rax),%edi
lea    0x3(%r12),%r8
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%r15d
jmp    1560 <main+0x3e0>
xor    %edx,%edx
lea    0xb08(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xfffffffe,%edi
call   10a0 <exit@plt>
mov    0x2911(%rip),%rax
mov    (%rax),%edi
lea    0x9d0(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"error allocating initial chunk array\0A\00"
@.str.1 = [48 x i8] c"[%d] allocating %lld kbytes in %u kbyte chunks\0A\00"
@.str.2 = [31 x i8] c"malloc(%u) failed (%lld/%lld)\0A\00"
@.str.3 = [32 x i8] c"touching %p ([%lld-%lld]/%lld)\0A\00"
@.str.4 = [21 x i8] c"touched %lld kbytes\0A\00"
@.str.5 = [42 x i8] c"verifying %lld kbytes in %u kbyte chunks\0A\00"
@.str.6 = [26 x i8] c"verifying %p (%lld/%lld)\0A\00"
@.str.7 = [20 x i8] c"sum %x != %x at %p\0A\00"
@.str.8 = [22 x i8] c"verified %lld kbytes\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8**
%16 = alloca i8*
%17 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %6
store i32 0, i32* %14
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %45
20: ; preds = %2
store i8* null, i8** %17
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i64 @strtoull(i8* %23, i8** %17, i32 0)
store i64 %24, i64* %6
%25 = load i8*, i8** %17
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
switch i32 %27, label %38 [
i32 103, label %28
i32 71, label %28
i32 109, label %31
i32 77, label %31
i32 0, label %34
i32 107, label %34
i32 75, label %34
i32 112, label %35
i32 80, label %35
]
28: ; preds = %20, %20
%29 = load i64, i64* %6
%30 = mul nsw i64 %29, 1024
store i64 %30, i64* %6
br label %31
31: ; preds = %20, %20, %28
%32 = load i64, i64* %6
%33 = mul nsw i64 %32, 1024
store i64 %33, i64* %6
br label %34
34: ; preds = %20, %20, %20, %31
br label %44
35: ; preds = %20, %20
%36 = load i64, i64* %6
%37 = mul nsw i64 %36, 4
store i64 %37, i64* %6
br label %44
38: ; preds = %20
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 0
%41 = load i8*, i8** %40
%42 = load i32, i32* @stderr
%43 = call i32 @usage(i8* %41, i32 %42)
br label %44
44: ; preds = %38, %35, %34
br label %45
45: ; preds = %44, %2
%46 = load i32, i32* %4
%47 = icmp ne i32 %46, 2
br i1 %47, label %51, label %48
48: ; preds = %45
%49 = load i64, i64* %6
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %57
51: ; preds = %48, %45
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 0
%54 = load i8*, i8** %53
%55 = load i32, i32* @stderr
%56 = call i32 @usage(i8* %54, i32 %55)
br label %57
57: ; preds = %51, %48
%58 = load i64, i64* %6
%59 = add nsw i64 %58, 131072
%60 = sub nsw i64 %59, 1
%61 = sdiv i64 %60, 131072
%62 = trunc i64 %61 to i32
store i32 %62, i32* %11
%63 = load i32, i32* %11
%64 = call i8** @calloc(i32 %63, i32 8)
store i8** %64, i8*** %15
%65 = load i8**, i8*** %15
%66 = icmp eq i8** %65, null
br i1 %66, label %67, label %71
67: ; preds = %57
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%70 = call i32 @exit(i32 -1)
unreachable
71: ; preds = %57
store i32 131072, i32* %12
%72 = call i32 (...) @getpid()
%73 = load i64, i64* %6
%74 = load i32, i32* %12
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %72, i64 %73, i32 %74)
store i64 0, i64* %7
store i32 0, i32* %8
br label %76
76: ; preds = %171, %71
%77 = load i32, i32* %8
%78 = load i32, i32* %11
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %83
80: ; preds = %76
%81 = load i32, i32* %12
%82 = icmp sgt i32 %81, 0
br label %83
83: ; preds = %80, %76
%84 = phi i1 [ false, %76 ], [ %82, %80 ]
br i1 %84, label %85, label %178
85: ; preds = %83
%86 = load i64, i64* %6
%87 = load i64, i64* %7
%88 = sub nsw i64 %86, %87
%89 = load i32, i32* %12
%90 = sext i32 %89 to i64
%91 = icmp slt i64 %88, %90
br i1 %91, label %92, label %97
92: ; preds = %85
%93 = load i64, i64* %6
%94 = load i64, i64* %7
%95 = sub nsw i64 %93, %94
%96 = trunc i64 %95 to i32
store i32 %96, i32* %12
br label %97
97: ; preds = %92, %85
br label %98
98: ; preds = %112, %97
%99 = load i32, i32* %12
%100 = icmp sgt i32 %99, 0
br i1 %100, label %101, label %110
101: ; preds = %98
%102 = load i32, i32* %12
%103 = mul nsw i32 %102, 1024
%104 = call i8* @malloc(i32 %103)
%105 = load i8**, i8*** %15
%106 = load i32, i32* %8
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8*, i8** %105, i64 %107
store i8* %104, i8** %108
%109 = icmp eq i8* %104, null
br label %110
110: ; preds = %101, %98
%111 = phi i1 [ false, %98 ], [ %109, %101 ]
br i1 %111, label %112, label %121
112: ; preds = %110
%113 = load i32, i32* @stderr
%114 = load i32, i32* %12
%115 = mul nsw i32 %114, 1024
%116 = load i64, i64* %7
%117 = load i64, i64* %6
%118 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %115, i64 %116, i64 %117)
%119 = load i32, i32* %12
%120 = sdiv i32 %119, 2
store i32 %120, i32* %12
br label %98
121: ; preds = %110
%122 = load i32, i32* %12
%123 = icmp eq i32 %122, 0
br i1 %123, label %124, label %125
124: ; preds = %121
br label %178
125: ; preds = %121
%126 = load i8**, i8*** %15
%127 = load i32, i32* %8
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8*, i8** %126, i64 %128
%130 = load i8*, i8** %129
%131 = load i64, i64* %7
%132 = load i64, i64* %7
%133 = load i32, i32* %12
%134 = sext i32 %133 to i64
%135 = add nsw i64 %132, %134
%136 = sub nsw i64 %135, 1
%137 = load i64, i64* %6
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %130, i64 %131, i64 %136, i64 %137)
store i32 0, i32* %9
%139 = load i8**, i8*** %15
%140 = load i32, i32* %8
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i8*, i8** %139, i64 %141
%143 = load i8*, i8** %142
store i8* %143, i8** %16
br label %144
144: ; preds = %167, %125
%145 = load i32, i32* %9
%146 = load i32, i32* %12
%147 = icmp slt i32 %145, %146
br i1 %147, label %148, label %170
148: ; preds = %144
store i32 0, i32* %10
store i32 0, i32* %13
br label %149
149: ; preds = %158, %148
%150 = load i32, i32* %10
%151 = icmp slt i32 %150, 4095
br i1 %151, label %152, label %163
152: ; preds = %149
%153 = load i8*, i8** %16
%154 = load i8, i8* %153
%155 = sext i8 %154 to i32
%156 = load i32, i32* %13
%157 = add nsw i32 %156, %155
store i32 %157, i32* %13
br label %158
158: ; preds = %152
%159 = load i32, i32* %10
%160 = add nsw i32 %159, 1
store i32 %160, i32* %10
%161 = load i8*, i8** %16
%162 = getelementptr inbounds i8, i8* %161, i32 1
store i8* %162, i8** %16
br label %149
163: ; preds = %149
%164 = load i32, i32* %13
%165 = trunc i32 %164 to i8
%166 = load i8*, i8** %16
store i8 %165, i8* %166
br label %167
167: ; preds = %163
%168 = load i32, i32* %9
%169 = add nsw i32 %168, 4
store i32 %169, i32* %9
br label %144
170: ; preds = %144
br label %171
171: ; preds = %170
%172 = load i32, i32* %8
%173 = add nsw i32 %172, 1
store i32 %173, i32* %8
%174 = load i32, i32* %12
%175 = sext i32 %174 to i64
%176 = load i64, i64* %7
%177 = add nsw i64 %176, %175
store i64 %177, i64* %7
br label %76
178: ; preds = %124, %83
%179 = load i64, i64* %7
%180 = icmp eq i64 %179, 0
br i1 %180, label %181, label %183
181: ; preds = %178
%182 = call i32 @exit(i32 -2)
unreachable
183: ; preds = %178
%184 = load i64, i64* %7
store i64 %184, i64* %6
%185 = load i64, i64* %7
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 %185)
store i32 131072, i32* %12
%187 = load i64, i64* %6
%188 = load i32, i32* %12
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i64 %187, i32 %188)
store i64 0, i64* %7
store i32 0, i32* %8
br label %190
190: ; preds = %261, %183
%191 = load i32, i32* %8
%192 = load i32, i32* %11
%193 = icmp slt i32 %191, %192
br i1 %193, label %194, label %268
194: ; preds = %190
%195 = load i64, i64* %6
%196 = load i64, i64* %7
%197 = sub nsw i64 %195, %196
%198 = load i32, i32* %12
%199 = sext i32 %198 to i64
%200 = icmp slt i64 %197, %199
br i1 %200, label %201, label %206
201: ; preds = %194
%202 = load i64, i64* %6
%203 = load i64, i64* %7
%204 = sub nsw i64 %202, %203
%205 = trunc i64 %204 to i32
store i32 %205, i32* %12
br label %206
206: ; preds = %201, %194
%207 = load i8**, i8*** %15
%208 = load i32, i32* %8
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds i8*, i8** %207, i64 %209
%211 = load i8*, i8** %210
store i8* %211, i8** %16
%212 = load i8*, i8** %16
%213 = icmp ne i8* %212, null
br i1 %213, label %214, label %260
214: ; preds = %206
%215 = load i8*, i8** %16
%216 = load i64, i64* %7
%217 = load i64, i64* %6
%218 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i8* %215, i64 %216, i64 %217)
store i32 0, i32* %9
br label %219
219: ; preds = %256, %214
%220 = load i32, i32* %9
%221 = load i32, i32* %12
%222 = icmp slt i32 %220, %221
br i1 %222, label %223, label %259
223: ; preds = %219
store i32 0, i32* %10
store i32 0, i32* %13
br label %224
224: ; preds = %233, %223
%225 = load i32, i32* %10
%226 = icmp slt i32 %225, 4095
br i1 %226, label %227, label %238
227: ; preds = %224
%228 = load i8*, i8** %16
%229 = load i8, i8* %228
%230 = sext i8 %229 to i32
%231 = load i32, i32* %13
%232 = add nsw i32 %231, %230
store i32 %232, i32* %13
br label %233
233: ; preds = %227
%234 = load i32, i32* %10
%235 = add nsw i32 %234, 1
store i32 %235, i32* %10
%236 = load i8*, i8** %16
%237 = getelementptr inbounds i8, i8* %236, i32 1
store i8* %237, i8** %16
br label %224
238: ; preds = %224
%239 = load i8*, i8** %16
%240 = load i8, i8* %239
%241 = sext i8 %240 to i32
%242 = load i32, i32* %13
%243 = icmp ne i32 %241, %242
br i1 %243, label %244, label %255
244: ; preds = %238
%245 = load i32, i32* @stderr
%246 = load i8*, i8** %16
%247 = load i8, i8* %246
%248 = sext i8 %247 to i32
%249 = load i32, i32* %13
%250 = load i8*, i8** %16
%251 = getelementptr inbounds i8, i8* %250, i64 -4092
%252 = call i32 (i32, i8*, ...) @fprintf(i32 %245, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %248, i32 %249, i8* %251)
%253 = load i32, i32* %14
%254 = add nsw i32 %253, 1
store i32 %254, i32* %14
br label %255
255: ; preds = %244, %238
br label %256
256: ; preds = %255
%257 = load i32, i32* %9
%258 = add nsw i32 %257, 4
store i32 %258, i32* %9
br label %219
259: ; preds = %219
br label %260
260: ; preds = %259, %206
br label %261
261: ; preds = %260
%262 = load i32, i32* %8
%263 = add nsw i32 %262, 1
store i32 %263, i32* %8
%264 = load i32, i32* %12
%265 = sext i32 %264 to i64
%266 = load i64, i64* %7
%267 = add nsw i64 %266, %265
store i64 %267, i64* %7
br label %190
268: ; preds = %190
%269 = load i64, i64* %7
%270 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i64 %269)
%271 = load i32, i32* %14
ret i32 %271
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"error allocating initial chunk array\0A\00"
@.str.1 = [48 x i8] c"[%d] allocating %lld kbytes in %u kbyte chunks\0A\00"
@.str.2 = [31 x i8] c"malloc(%u) failed (%lld/%lld)\0A\00"
@.str.3 = [32 x i8] c"touching %p ([%lld-%lld]/%lld)\0A\00"
@.str.4 = [21 x i8] c"touched %lld kbytes\0A\00"
@.str.5 = [42 x i8] c"verifying %lld kbytes in %u kbyte chunks\0A\00"
@.str.6 = [26 x i8] c"verifying %p (%lld/%lld)\0A\00"
@.str.7 = [20 x i8] c"sum %x != %x at %p\0A\00"
@.str.8 = [22 x i8] c"verified %lld kbytes\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8*
%4 = icmp eq i32 %0, 2
br i1 %4, label %5, label %27
5: ; preds = %2
%6 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i64 @strtoull(i8* %8, i8** %3, i32 0)
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
switch i32 %12, label %20 [
i32 103, label %13
i32 71, label %13
i32 109, label %15
i32 77, label %15
i32 0, label %24
i32 107, label %24
i32 75, label %24
i32 112, label %18
i32 80, label %18
]
13: ; preds = %5, %5
%14 = shl nsw i64 %9, 10
br label %15
15: ; preds = %5, %5, %13
%16 = phi i64 [ %9, %5 ], [ %9, %5 ], [ %14, %13 ]
%17 = shl nsw i64 %16, 10
br label %24
18: ; preds = %5, %5
%19 = shl nsw i64 %9, 2
br label %24
20: ; preds = %5
%21 = load i8*, i8** %1
%22 = load i32, i32* @stderr
%23 = tail call i32 @usage(i8* %21, i32 %22)
br label %24
24: ; preds = %18, %20, %5, %5, %5, %15
%25 = phi i64 [ %9, %20 ], [ %19, %18 ], [ %9, %5 ], [ %9, %5 ], [ %9, %5 ], [ %17, %15 ]
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %2, %24
%28 = load i8*, i8** %1
%29 = load i32, i32* @stderr
%30 = tail call i32 @usage(i8* %28, i32 %29)
br label %31
31: ; preds = %24, %27
%32 = phi i64 [ %25, %24 ], [ 0, %27 ]
%33 = add nsw i64 %32, 131071
%34 = sdiv i64 %33, 131072
%35 = trunc i64 %34 to i32
%36 = tail call i8** @calloc(i32 %35, i32 8)
%37 = icmp eq i8** %36, null
br i1 %37, label %38, label %42
38: ; preds = %31
%39 = load i32, i32* @stderr
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%41 = tail call i32 @exit(i32 -1)
unreachable
42: ; preds = %31
%43 = tail call i32 (...) @getpid()
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %43, i64 %32, i32 131072)
%45 = icmp sgt i32 %35, 0
br i1 %45, label %46, label %153
46: ; preds = %42
%47 = shl i64 %34, 32
%48 = ashr exact i64 %47, 32
br label %49
49: ; preds = %46, %146
%50 = phi i64 [ 0, %46 ], [ %147, %146 ]
%51 = phi i32 [ 131072, %46 ], [ %81, %146 ]
%52 = phi i64 [ 0, %46 ], [ %83, %146 ]
%53 = sub nsw i64 %32, %52
%54 = zext i32 %51 to i64
%55 = icmp slt i64 %53, %54
%56 = trunc i64 %53 to i32
%57 = select i1 %55, i32 %56, i32 %51
%58 = icmp sgt i32 %57, 0
br i1 %58, label %59, label %72
59: ; preds = %49
%60 = getelementptr inbounds i8*, i8** %36, i64 %50
br label %61
61: ; preds = %59, %66
%62 = phi i32 [ %57, %59 ], [ %69, %66 ]
%63 = shl nsw i32 %62, 10
%64 = tail call i8* @malloc(i32 %63)
%65 = icmp eq i8* %64, null
br i1 %65, label %66, label %78
66: ; preds = %61
%67 = load i32, i32* @stderr
%68 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %63, i64 %52, i64 %32)
%69 = lshr i32 %62, 1
%70 = icmp ult i32 %62, 2
br i1 %70, label %71, label %61
71: ; preds = %66
store i8* null, i8** %60
br label %72
72: ; preds = %71, %49
%73 = phi i32 [ %69, %71 ], [ %57, %49 ]
%74 = icmp eq i32 %73, 0
br i1 %74, label %150, label %75
75: ; preds = %72
%76 = getelementptr inbounds i8*, i8** %36, i64 %50
%77 = load i8*, i8** %76
br label %79
78: ; preds = %61
store i8* %64, i8** %60
br label %79
79: ; preds = %75, %78
%80 = phi i8* [ %64, %78 ], [ %77, %75 ]
%81 = phi i32 [ %62, %78 ], [ %73, %75 ]
%82 = sext i32 %81 to i64
%83 = add nsw i64 %52, %82
%84 = add nsw i64 %83, -1
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %80, i64 %52, i64 %84, i64 %32)
%86 = icmp sgt i32 %81, 0
br i1 %86, label %87, label %150
87: ; preds = %79, %119
%88 = phi i8* [ %135, %119 ], [ %80, %79 ]
%89 = phi i32 [ %144, %119 ], [ 0, %79 ]
%90 = getelementptr i8, i8* %88, i64 4088
br label %91
91: ; preds = %107, %87
%92 = phi i64 [ 0, %87 ], [ %118, %107 ]
%93 = phi <4 x i32> [ zeroinitializer, %87 ], [ %116, %107 ]
%94 = phi <4 x i32> [ zeroinitializer, %87 ], [ %117, %107 ]
%95 = getelementptr i8, i8* %88, i64 %92
%96 = bitcast i8* %95 to <4 x i8>*
%97 = load <4 x i8>, <4 x i8>* %96
%98 = getelementptr i8, i8* %95, i64 4
%99 = bitcast i8* %98 to <4 x i8>*
%100 = load <4 x i8>, <4 x i8>* %99
%101 = zext <4 x i8> %97 to <4 x i32>
%102 = zext <4 x i8> %100 to <4 x i32>
%103 = add <4 x i32> %93, %101
%104 = add <4 x i32> %94, %102
%105 = or i64 %92, 8
%106 = icmp eq i64 %105, 4088
br i1 %106, label %119, label %107
107: ; preds = %91
%108 = getelementptr i8, i8* %88, i64 %105
%109 = bitcast i8* %108 to <4 x i8>*
%110 = load <4 x i8>, <4 x i8>* %109
%111 = getelementptr i8, i8* %108, i64 4
%112 = bitcast i8* %111 to <4 x i8>*
%113 = load <4 x i8>, <4 x i8>* %112
%114 = zext <4 x i8> %110 to <4 x i32>
%115 = zext <4 x i8> %113 to <4 x i32>
%116 = add <4 x i32> %103, %114
%117 = add <4 x i32> %104, %115
%118 = add nuw nsw i64 %92, 16
br label %91
119: ; preds = %91
%120 = add <4 x i32> %104, %103
%121 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %120)
%122 = load i8, i8* %90
%123 = getelementptr i8, i8* %88, i64 4089
%124 = load i8, i8* %123
%125 = getelementptr i8, i8* %88, i64 4090
%126 = load i8, i8* %125
%127 = getelementptr i8, i8* %88, i64 4091
%128 = load i8, i8* %127
%129 = getelementptr i8, i8* %88, i64 4092
%130 = load i8, i8* %129
%131 = getelementptr i8, i8* %88, i64 4093
%132 = load i8, i8* %131
%133 = getelementptr i8, i8* %88, i64 4094
%134 = load i8, i8* %133
%135 = getelementptr i8, i8* %88, i64 4095
%136 = trunc i32 %121 to i8
%137 = add i8 %122, %136
%138 = add i8 %137, %124
%139 = add i8 %138, %126
%140 = add i8 %139, %128
%141 = add i8 %140, %130
%142 = add i8 %141, %132
%143 = add i8 %142, %134
store i8 %143, i8* %135
%144 = add nuw nsw i32 %89, 4
%145 = icmp slt i32 %144, %81
br i1 %145, label %87, label %146
146: ; preds = %119
%147 = add nuw nsw i64 %50, 1
%148 = icmp slt i64 %147, %48
%149 = select i1 %148, i1 %86, i1 false
br i1 %149, label %49, label %150
150: ; preds = %79, %146, %72
%151 = phi i64 [ %83, %146 ], [ %52, %72 ], [ %83, %79 ]
%152 = icmp eq i64 %151, 0
br i1 %152, label %153, label %155
153: ; preds = %42, %150
%154 = tail call i32 @exit(i32 -2)
unreachable
155: ; preds = %150
%156 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 %151)
%157 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i64 %151, i32 131072)
br i1 %45, label %158, label %258
158: ; preds = %155
%159 = and i64 %34, 4294967295
br label %160
160: ; preds = %158, %252
%161 = phi i64 [ 0, %158 ], [ %254, %252 ]
%162 = phi i32 [ 0, %158 ], [ %253, %252 ]
%163 = phi i32 [ 131072, %158 ], [ %169, %252 ]
%164 = phi i64 [ 0, %158 ], [ %256, %252 ]
%165 = sub nsw i64 %151, %164
%166 = sext i32 %163 to i64
%167 = icmp slt i64 %165, %166
%168 = trunc i64 %165 to i32
%169 = select i1 %167, i32 %168, i32 %163
%170 = getelementptr inbounds i8*, i8** %36, i64 %161
%171 = load i8*, i8** %170
%172 = icmp eq i8* %171, null
br i1 %172, label %252, label %173
173: ; preds = %160
%174 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i8* %171, i64 %164, i64 %151)
%175 = icmp sgt i32 %169, 0
br i1 %175, label %176, label %252
176: ; preds = %173, %248
%177 = phi i8* [ %239, %248 ], [ %171, %173 ]
%178 = phi i32 [ %249, %248 ], [ %162, %173 ]
%179 = phi i32 [ %250, %248 ], [ 0, %173 ]
%180 = getelementptr i8, i8* %177, i64 4088
br label %181
181: ; preds = %197, %176
%182 = phi i64 [ 0, %176 ], [ %208, %197 ]
%183 = phi <4 x i32> [ zeroinitializer, %176 ], [ %206, %197 ]
%184 = phi <4 x i32> [ zeroinitializer, %176 ], [ %207, %197 ]
%185 = getelementptr i8, i8* %177, i64 %182
%186 = bitcast i8* %185 to <4 x i8>*
%187 = load <4 x i8>, <4 x i8>* %186
%188 = getelementptr i8, i8* %185, i64 4
%189 = bitcast i8* %188 to <4 x i8>*
%190 = load <4 x i8>, <4 x i8>* %189
%191 = sext <4 x i8> %187 to <4 x i32>
%192 = sext <4 x i8> %190 to <4 x i32>
%193 = add <4 x i32> %183, %191
%194 = add <4 x i32> %184, %192
%195 = or i64 %182, 8
%196 = icmp eq i64 %195, 4088
br i1 %196, label %209, label %197
197: ; preds = %181
%198 = getelementptr i8, i8* %177, i64 %195
%199 = bitcast i8* %198 to <4 x i8>*
%200 = load <4 x i8>, <4 x i8>* %199
%201 = getelementptr i8, i8* %198, i64 4
%202 = bitcast i8* %201 to <4 x i8>*
%203 = load <4 x i8>, <4 x i8>* %202
%204 = sext <4 x i8> %200 to <4 x i32>
%205 = sext <4 x i8> %203 to <4 x i32>
%206 = add <4 x i32> %193, %204
%207 = add <4 x i32> %194, %205
%208 = add nuw nsw i64 %182, 16
br label %181
209: ; preds = %181
%210 = add <4 x i32> %194, %193
%211 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %210)
%212 = load i8, i8* %180
%213 = sext i8 %212 to i32
%214 = add nsw i32 %211, %213
%215 = getelementptr i8, i8* %177, i64 4089
%216 = load i8, i8* %215
%217 = sext i8 %216 to i32
%218 = add nsw i32 %214, %217
%219 = getelementptr i8, i8* %177, i64 4090
%220 = load i8, i8* %219
%221 = sext i8 %220 to i32
%222 = add nsw i32 %218, %221
%223 = getelementptr i8, i8* %177, i64 4091
%224 = load i8, i8* %223
%225 = sext i8 %224 to i32
%226 = add nsw i32 %222, %225
%227 = getelementptr i8, i8* %177, i64 4092
%228 = load i8, i8* %227
%229 = sext i8 %228 to i32
%230 = add nsw i32 %226, %229
%231 = getelementptr i8, i8* %177, i64 4093
%232 = load i8, i8* %231
%233 = sext i8 %232 to i32
%234 = add nsw i32 %230, %233
%235 = getelementptr i8, i8* %177, i64 4094
%236 = load i8, i8* %235
%237 = sext i8 %236 to i32
%238 = add nsw i32 %234, %237
%239 = getelementptr i8, i8* %177, i64 4095
%240 = load i8, i8* %239
%241 = sext i8 %240 to i32
%242 = icmp eq i32 %238, %241
br i1 %242, label %248, label %243
243: ; preds = %209
%244 = load i32, i32* @stderr
%245 = getelementptr i8, i8* %177, i64 3
%246 = tail call i32 (i32, i8*, ...) @fprintf(i32 %244, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %241, i32 %238, i8* %245)
%247 = add nsw i32 %178, 1
br label %248
248: ; preds = %209, %243
%249 = phi i32 [ %247, %243 ], [ %178, %209 ]
%250 = add nuw nsw i32 %179, 4
%251 = icmp slt i32 %250, %169
br i1 %251, label %176, label %252
252: ; preds = %248, %173, %160
%253 = phi i32 [ %162, %160 ], [ %162, %173 ], [ %249, %248 ]
%254 = add nuw nsw i64 %161, 1
%255 = sext i32 %169 to i64
%256 = add nsw i64 %164, %255
%257 = icmp eq i64 %254, %159
br i1 %257, label %258, label %160
258: ; preds = %252, %155
%259 = phi i64 [ 0, %155 ], [ %256, %252 ]
%260 = phi i32 [ 0, %155 ], [ %253, %252 ]
%261 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i64 %259)
ret i32 %260
}