#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 uint32_t;
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, double, double, double);
int /*<<< orphan*/ puts(char *);
scalar_t__ rand();
int /*<<< orphan*/ rot13_naivetable(char *);
int /*<<< orphan*/ rot13_simd(char *);
int /*<<< orphan*/ rot13_unrolltable(char *);
int main() {
  static char buf1[0x1000000];
  static char buf2[0x1000000];
  static char buf3[0x1000000];
  int i;
  for (i = 0; i < 0xFFFFFF;) {
    char a = (char)rand();
    if (!a)
      continue;
    buf1[i] = buf2[i] = buf3[i] = a;
    i++;
  }
  buf1[0xFFFFFF] = buf2[0xFFFFFF] = buf3[0xFFFFFF] = '\0';
  uint32_t hash1, hash2, hash3;
  hash1 = hash2 = hash3 = 0;
  struct timeval tv1, tv2;
  double t1, t2, t3;
  gettimeofday(&tv1, NULL);
  for (i = 0; i < 100; i++)
    rot13_naivetable(buf1);
  gettimeofday(&tv2, NULL);
  t1 = tv2.tv_sec - tv1.tv_sec + (tv2.tv_usec - tv1.tv_usec) / 1000000.0;
  gettimeofday(&tv1, NULL);
  for (i = 0; i < 100; i++)
    rot13_simd(buf2);
  gettimeofday(&tv2, NULL);
  t2 = tv2.tv_sec - tv1.tv_sec + (tv2.tv_usec - tv1.tv_usec) / 1000000.0;
  gettimeofday(&tv1, NULL);
  for (i = 0; i < 100; i++)
    rot13_unrolltable(buf3);
  gettimeofday(&tv2, NULL);
  t3 = tv2.tv_sec - tv1.tv_sec + (tv2.tv_usec - tv1.tv_usec) / 1000000.0;
  printf("1M 100times naivetable %fsec simd %fsec unrolltable %fsec\n", t1, t2,
         t3);
  for (i = 0; i < 0x100000; i++)
    hash1 ^= ((uint32_t *)buf1)[i];
  for (i = 0; i < 0x100000; i++)
    hash2 ^= ((uint32_t *)buf2)[i];
  for (i = 0; i < 0x100000; i++)
    hash3 ^= ((uint32_t *)buf3)[i];
  printf("naivetable %08X simd %08X unrolltable %08X\n", hash1, hash2, hash3);
  static char hw1[64] = "Hello, world! Hello, world! Hello, world!";
  static char hw2[64] = "Hello, world! Hello, world! Hello, world!";
  static char hw3[64] = "Hello, world! Hello, world! Hello, world!";
  gettimeofday(&tv1, NULL);
  for (i = 0; i < 10000001; i++)
    rot13_naivetable(hw1 + 2);
  gettimeofday(&tv2, NULL);
  t1 = tv2.tv_sec - tv1.tv_sec + (tv2.tv_usec - tv1.tv_usec) / 1000000.0;
  gettimeofday(&tv1, NULL);
  for (i = 0; i < 10000001; i++)
    rot13_simd(hw2 + 2);
  gettimeofday(&tv2, NULL);
  t2 = tv2.tv_sec - tv1.tv_sec + (tv2.tv_usec - tv1.tv_usec) / 1000000.0;
  gettimeofday(&tv1, NULL);
  for (i = 0; i < 10000001; i++)
    rot13_unrolltable(hw3 + 2);
  gettimeofday(&tv2, NULL);
  t3 = tv2.tv_sec - tv1.tv_sec + (tv2.tv_usec - tv1.tv_usec) / 1000000.0;
  printf("Hello, world!x3[1] 10Mtimes naivetable %fsec simd %fsec unrolltable "
         "%fsec\n",
         t1, t2, t3);
  puts(hw1);
  puts(hw2);
  puts(hw3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xffffff,-0x8(%rbp)
jge    11e7 <main+0x77>
mov    $0x0,%al
call   1090 <rand@plt>
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
jne    11ac <main+0x3c>
jmp    1186 <main+0x16>
mov    -0x9(%rbp),%dl
movslq -0x8(%rbp),%rcx
lea    0x2002f76(%rip),%rax
mov    %dl,(%rax,%rcx,1)
movslq -0x8(%rbp),%rcx
lea    0x1002f68(%rip),%rax
mov    %dl,(%rax,%rcx,1)
movslq -0x8(%rbp),%rcx
lea    0x2f5a(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1186 <main+0x16>
movb   $0x0,0x3002f41(%rip)
movb   $0x0,0x2002f3a(%rip)
movb   $0x0,0x1002f33(%rip)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1249 <main+0xd9>
lea    0x2efa(%rip),%rdi
call   1060 <rot13_naivetable@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1225 <main+0xb5>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movsd  -0x38(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xd8e(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    12b7 <main+0x147>
lea    0x1002e8c(%rip),%rdi
call   1080 <rot13_simd@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1293 <main+0x123>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movsd  -0x38(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xd20(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1325 <main+0x1b5>
lea    0x2002e1e(%rip),%rdi
call   1070 <rot13_unrolltable@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1301 <main+0x191>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movsd  -0x38(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xcb2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
lea    0xc97(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x100000,-0x8(%rbp)
jge    13ac <main+0x23c>
movslq -0x8(%rbp),%rcx
lea    0x2d9b(%rip),%rax
mov    (%rax,%rcx,4),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    137d <main+0x20d>
movl   $0x0,-0x8(%rbp)
cmpl   $0x100000,-0x8(%rbp)
jge    13e2 <main+0x272>
movslq -0x8(%rbp),%rcx
lea    0x1002d65(%rip),%rax
mov    (%rax,%rcx,4),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13b3 <main+0x243>
movl   $0x0,-0x8(%rbp)
cmpl   $0x100000,-0x8(%rbp)
jge    1418 <main+0x2a8>
movslq -0x8(%rbp),%rcx
lea    0x2002d2f(%rip),%rax
mov    (%rax,%rcx,4),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13e9 <main+0x279>
cvtsi2sdl -0x10(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
cvtsi2sdl -0x18(%rbp),%xmm2
lea    0xc15(%rip),%rdi
call   1040 <printf@plt>
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x989681,-0x8(%rbp)
jge    1472 <main+0x302>
lea    0x2c05(%rip),%rdi
add    $0x2,%rdi
call   1060 <rot13_naivetable@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1447 <main+0x2d7>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movsd  -0x38(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xb65(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x989681,-0x8(%rbp)
jge    14e7 <main+0x377>
lea    0x2bd0(%rip),%rdi
add    $0x2,%rdi
call   1080 <rot13_simd@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14bc <main+0x34c>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movsd  -0x38(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xaf0(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x989681,-0x8(%rbp)
jge    155c <main+0x3ec>
lea    0x2b9b(%rip),%rdi
add    $0x2,%rdi
call   1070 <rot13_unrolltable@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1531 <main+0x3c1>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movsd  -0x38(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xa7b(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
lea    0xac7(%rip),%rdi
call   1040 <printf@plt>
lea    0x2aac(%rip),%rdi
call   1030 <puts@plt>
lea    0x2ae0(%rip),%rdi
call   1030 <puts@plt>
lea    0x2b14(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x70,%rsp
lea    0x2002fad(%rip),%r14
lea    0x1002fa6(%rip),%r15
lea    0x2f9f(%rip),%r12
xor    %ebx,%ebx
jmp    11a8 <main+0x38>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0xffffff,%ebx
jge    11c7 <main+0x57>
xor    %eax,%eax
call   1090 <rand@plt>
test   %al,%al
je     11a0 <main+0x30>
movslq %ebx,%rbx
mov    %al,(%rbx,%r14,1)
mov    %al,(%rbx,%r15,1)
mov    %al,(%rbx,%r12,1)
add    $0x1,%ebx
jmp    11a0 <main+0x30>
movb   $0x0,0x3002f61(%rip)
movb   $0x0,0x2002f5a(%rip)
movb   $0x0,0x1002f53(%rip)
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    $0x64,%ebx
lea    0x2f3c(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
call   1060 <rot13_naivetable@plt>
add    $0xffffffff,%ebx
jne    1200 <main+0x90>
mov    %rsp,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
movsd  (%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x30(%rsp)
subsd  0x18(%rsp),%xmm0
divsd  0xdbe(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    $0x64,%ebx
lea    0x1002ed0(%rip),%r15
mov    %r15,%rdi
call   1080 <rot13_simd@plt>
add    $0xffffffff,%ebx
jne    1260 <main+0xf0>
movsd  0x20(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
movsd  (%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x68(%rsp)
subsd  0x18(%rsp),%xmm0
divsd  0xd4c(%rip),%xmm0
movsd  %xmm0,0x50(%rsp)
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    $0x64,%ebx
lea    0x2002e5e(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1070 <rot13_unrolltable@plt>
add    $0xffffffff,%ebx
jne    12e0 <main+0x170>
movsd  0x20(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x30(%rsp),%xmm0
subsd  0x68(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
xor    %ebx,%ebx
mov    %rsp,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
movapd (%rsp),%xmm0
subpd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
divsd  0xcc2(%rip),%xmm2
addsd  %xmm0,%xmm2
lea    0xcbf(%rip),%rdi
movq   0x20(%rsp),%xmm0
movq   0x30(%rsp),%xmm1
call   1040 <printf@plt>
pxor   %xmm0,%xmm0
pxor   %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
pxor   (%r12,%rbx,4),%xmm0
pxor   0x10(%r12,%rbx,4),%xmm1
pxor   0x20(%r12,%rbx,4),%xmm0
pxor   0x30(%r12,%rbx,4),%xmm1
pxor   0x40(%r12,%rbx,4),%xmm0
pxor   0x50(%r12,%rbx,4),%xmm1
pxor   0x60(%r12,%rbx,4),%xmm0
pxor   0x70(%r12,%rbx,4),%xmm1
add    $0x20,%rbx
cmp    $0x100000,%rbx
jne    1370 <main+0x200>
pxor   %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
pxor   %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
pxor   %xmm0,%xmm1
movd   %xmm1,%eax
pxor   %xmm0,%xmm0
xor    %ecx,%ecx
pxor   %xmm1,%xmm1
nopl   0x0(%rax,%rax,1)
pxor   (%r15,%rcx,4),%xmm0
pxor   0x10(%r15,%rcx,4),%xmm1
pxor   0x20(%r15,%rcx,4),%xmm0
pxor   0x30(%r15,%rcx,4),%xmm1
pxor   0x40(%r15,%rcx,4),%xmm0
pxor   0x50(%r15,%rcx,4),%xmm1
pxor   0x60(%r15,%rcx,4),%xmm0
pxor   0x70(%r15,%rcx,4),%xmm1
add    $0x20,%rcx
cmp    $0x100000,%rcx
jne    13e0 <main+0x270>
pxor   %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
pxor   %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
pxor   %xmm0,%xmm1
movd   %xmm1,%ecx
pxor   %xmm0,%xmm0
xor    %edx,%edx
pxor   %xmm1,%xmm1
nopl   0x0(%rax,%rax,1)
pxor   (%r14,%rdx,4),%xmm0
pxor   0x10(%r14,%rdx,4),%xmm1
pxor   0x20(%r14,%rdx,4),%xmm0
pxor   0x30(%r14,%rdx,4),%xmm1
pxor   0x40(%r14,%rdx,4),%xmm0
pxor   0x50(%r14,%rdx,4),%xmm1
pxor   0x60(%r14,%rdx,4),%xmm0
pxor   0x70(%r14,%rdx,4),%xmm1
add    $0x20,%rdx
cmp    $0x100000,%rdx
jne    1450 <main+0x2e0>
pxor   %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
pxor   %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
pxor   %xmm0,%xmm1
movd   %xmm1,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
cvtsi2sd %edx,%xmm2
lea    0xb7c(%rip),%rdi
call   1040 <printf@plt>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    $0x989681,%ebp
lea    0x2b7e(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1060 <rot13_naivetable@plt>
add    $0xffffffff,%ebp
jne    14f0 <main+0x380>
mov    %rsp,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x10(%rsp),%xmm0
movaps %xmm0,0x30(%rsp)
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    $0x989681,%ebp
lea    0x2b70(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1080 <rot13_simd@plt>
add    $0xffffffff,%ebp
jne    1540 <main+0x3d0>
mov    %rsp,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x10(%rsp),%xmm0
movaps %xmm0,0x50(%rsp)
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    $0x989681,%ebp
lea    0x2b60(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1070 <rot13_unrolltable@plt>
add    $0xffffffff,%ebp
jne    1590 <main+0x420>
movapd 0x40(%rsp),%xmm1
subpd  0x50(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
movsd  0xa47(%rip),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x40(%rsp)
movapd 0x20(%rsp),%xmm0
subpd  0x30(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
movapd (%rsp),%xmm0
subpd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
divsd  0x9f2(%rip),%xmm2
addsd  %xmm0,%xmm2
lea    0xa56(%rip),%rdi
movaps 0x20(%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
call   1040 <printf@plt>
lea    0x2a31(%rip),%rdi
call   1030 <puts@plt>
lea    0x2a65(%rip),%rdi
call   1030 <puts@plt>
lea    0x2a99(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
@main.buf1 = internal global [16777216 x i8] zeroinitializer
@main.buf2 = internal global [16777216 x i8] zeroinitializer
@main.buf3 = internal global [16777216 x i8] zeroinitializer
@.str = [59 x i8] c"1M 100times naivetable %fsec simd %fsec unrolltable %fsec\0A\00"
@.str.1 = [44 x i8] c"naivetable %08X simd %08X unrolltable %08X\0A\00"
@main.hw1 = internal global [64 x i8] c"Hello, world! Hello, world! Hello, world!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@main.hw2 = internal global [64 x i8] c"Hello, world! Hello, world! Hello, world!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@main.hw3 = internal global [64 x i8] c"Hello, world! Hello, world! Hello, world!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str.2 = [75 x i8] c"Hello, world!x3[1] 10Mtimes naivetable %fsec simd %fsec unrolltable %fsec\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.timeval
%8 = alloca %struct.timeval
%9 = alloca double
%10 = alloca double
%11 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
br label %12
12: ; preds = %21, %20, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 16777215
br i1 %14, label %15, label %34
15: ; preds = %12
%16 = call i64 (...) @rand()
%17 = trunc i64 %16 to i8
store i8 %17, i8* %3
%18 = load i8, i8* %3
%19 = icmp ne i8 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %15
br label %12
21: ; preds = %15
%22 = load i8, i8* %3
%23 = load i32, i32* %2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [16777216 x i8], [16777216 x i8]* @main.buf3, i64 0, i64 %24
store i8 %22, i8* %25
%26 = load i32, i32* %2
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [16777216 x i8], [16777216 x i8]* @main.buf2, i64 0, i64 %27
store i8 %22, i8* %28
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [16777216 x i8], [16777216 x i8]* @main.buf1, i64 0, i64 %30
store i8 %22, i8* %31
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %12
34: ; preds = %12
store i8 0, i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf3, i64 0, i64 16777215)
store i8 0, i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf2, i64 0, i64 16777215)
store i8 0, i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf1, i64 0, i64 16777215)
store i32 0, i32* %6
store i32 0, i32* %5
store i32 0, i32* %4
%35 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
store i32 0, i32* %2
br label %36
36: ; preds = %41, %34
%37 = load i32, i32* %2
%38 = icmp slt i32 %37, 100
br i1 %38, label %39, label %44
39: ; preds = %36
%40 = call i32 @rot13_naivetable(i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf1, i64 0, i64 0))
br label %41
41: ; preds = %39
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %36
44: ; preds = %36
%45 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%46 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%47 = load double, double* %46
%48 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%49 = load double, double* %48
%50 = fsub double %47, %49
%51 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%52 = load double, double* %51
%53 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%54 = load double, double* %53
%55 = fsub double %52, %54
%56 = fdiv double %55, 1.000000e+06
%57 = fadd double %50, %56
store double %57, double* %9
%58 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
store i32 0, i32* %2
br label %59
59: ; preds = %64, %44
%60 = load i32, i32* %2
%61 = icmp slt i32 %60, 100
br i1 %61, label %62, label %67
62: ; preds = %59
%63 = call i32 @rot13_simd(i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf2, i64 0, i64 0))
br label %64
64: ; preds = %62
%65 = load i32, i32* %2
%66 = add nsw i32 %65, 1
store i32 %66, i32* %2
br label %59
67: ; preds = %59
%68 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%69 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%70 = load double, double* %69
%71 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%72 = load double, double* %71
%73 = fsub double %70, %72
%74 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%75 = load double, double* %74
%76 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%77 = load double, double* %76
%78 = fsub double %75, %77
%79 = fdiv double %78, 1.000000e+06
%80 = fadd double %73, %79
store double %80, double* %10
%81 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
store i32 0, i32* %2
br label %82
82: ; preds = %87, %67
%83 = load i32, i32* %2
%84 = icmp slt i32 %83, 100
br i1 %84, label %85, label %90
85: ; preds = %82
%86 = call i32 @rot13_unrolltable(i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf3, i64 0, i64 0))
br label %87
87: ; preds = %85
%88 = load i32, i32* %2
%89 = add nsw i32 %88, 1
store i32 %89, i32* %2
br label %82
90: ; preds = %82
%91 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%92 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%93 = load double, double* %92
%94 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%95 = load double, double* %94
%96 = fsub double %93, %95
%97 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%98 = load double, double* %97
%99 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%100 = load double, double* %99
%101 = fsub double %98, %100
%102 = fdiv double %101, 1.000000e+06
%103 = fadd double %96, %102
store double %103, double* %11
%104 = load double, double* %9
%105 = load double, double* %10
%106 = load double, double* %11
%107 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), double %104, double %105, double %106)
store i32 0, i32* %2
br label %108
108: ; preds = %118, %90
%109 = load i32, i32* %2
%110 = icmp slt i32 %109, 1048576
br i1 %110, label %111, label %121
111: ; preds = %108
%112 = load i32, i32* %2
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf1 to i32*), i64 %113
%115 = load i32, i32* %114
%116 = load i32, i32* %4
%117 = xor i32 %116, %115
store i32 %117, i32* %4
br label %118
118: ; preds = %111
%119 = load i32, i32* %2
%120 = add nsw i32 %119, 1
store i32 %120, i32* %2
br label %108
121: ; preds = %108
store i32 0, i32* %2
br label %122
122: ; preds = %132, %121
%123 = load i32, i32* %2
%124 = icmp slt i32 %123, 1048576
br i1 %124, label %125, label %135
125: ; preds = %122
%126 = load i32, i32* %2
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf2 to i32*), i64 %127
%129 = load i32, i32* %128
%130 = load i32, i32* %5
%131 = xor i32 %130, %129
store i32 %131, i32* %5
br label %132
132: ; preds = %125
%133 = load i32, i32* %2
%134 = add nsw i32 %133, 1
store i32 %134, i32* %2
br label %122
135: ; preds = %122
store i32 0, i32* %2
br label %136
136: ; preds = %146, %135
%137 = load i32, i32* %2
%138 = icmp slt i32 %137, 1048576
br i1 %138, label %139, label %149
139: ; preds = %136
%140 = load i32, i32* %2
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf3 to i32*), i64 %141
%143 = load i32, i32* %142
%144 = load i32, i32* %6
%145 = xor i32 %144, %143
store i32 %145, i32* %6
br label %146
146: ; preds = %139
%147 = load i32, i32* %2
%148 = add nsw i32 %147, 1
store i32 %148, i32* %2
br label %136
149: ; preds = %136
%150 = load i32, i32* %4
%151 = sitofp i32 %150 to double
%152 = load i32, i32* %5
%153 = sitofp i32 %152 to double
%154 = load i32, i32* %6
%155 = sitofp i32 %154 to double
%156 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double %151, double %153, double %155)
%157 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
store i32 0, i32* %2
br label %158
158: ; preds = %163, %149
%159 = load i32, i32* %2
%160 = icmp slt i32 %159, 10000001
br i1 %160, label %161, label %166
161: ; preds = %158
%162 = call i32 @rot13_naivetable(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw1, i64 0, i64 2))
br label %163
163: ; preds = %161
%164 = load i32, i32* %2
%165 = add nsw i32 %164, 1
store i32 %165, i32* %2
br label %158
166: ; preds = %158
%167 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%168 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%169 = load double, double* %168
%170 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%171 = load double, double* %170
%172 = fsub double %169, %171
%173 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%174 = load double, double* %173
%175 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%176 = load double, double* %175
%177 = fsub double %174, %176
%178 = fdiv double %177, 1.000000e+06
%179 = fadd double %172, %178
store double %179, double* %9
%180 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
store i32 0, i32* %2
br label %181
181: ; preds = %186, %166
%182 = load i32, i32* %2
%183 = icmp slt i32 %182, 10000001
br i1 %183, label %184, label %189
184: ; preds = %181
%185 = call i32 @rot13_simd(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw2, i64 0, i64 2))
br label %186
186: ; preds = %184
%187 = load i32, i32* %2
%188 = add nsw i32 %187, 1
store i32 %188, i32* %2
br label %181
189: ; preds = %181
%190 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%191 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%192 = load double, double* %191
%193 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%194 = load double, double* %193
%195 = fsub double %192, %194
%196 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%197 = load double, double* %196
%198 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%199 = load double, double* %198
%200 = fsub double %197, %199
%201 = fdiv double %200, 1.000000e+06
%202 = fadd double %195, %201
store double %202, double* %10
%203 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
store i32 0, i32* %2
br label %204
204: ; preds = %209, %189
%205 = load i32, i32* %2
%206 = icmp slt i32 %205, 10000001
br i1 %206, label %207, label %212
207: ; preds = %204
%208 = call i32 @rot13_unrolltable(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw3, i64 0, i64 2))
br label %209
209: ; preds = %207
%210 = load i32, i32* %2
%211 = add nsw i32 %210, 1
store i32 %211, i32* %2
br label %204
212: ; preds = %204
%213 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%214 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%215 = load double, double* %214
%216 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%217 = load double, double* %216
%218 = fsub double %215, %217
%219 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%220 = load double, double* %219
%221 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%222 = load double, double* %221
%223 = fsub double %220, %222
%224 = fdiv double %223, 1.000000e+06
%225 = fadd double %218, %224
store double %225, double* %11
%226 = load double, double* %9
%227 = load double, double* %10
%228 = load double, double* %11
%229 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0), double %226, double %227, double %228)
%230 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw1, i64 0, i64 0))
%231 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw2, i64 0, i64 0))
%232 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
@main.buf1 = internal global [16777216 x i8] zeroinitializer
@main.buf2 = internal global [16777216 x i8] zeroinitializer
@main.buf3 = internal global [16777216 x i8] zeroinitializer
@.str = [59 x i8] c"1M 100times naivetable %fsec simd %fsec unrolltable %fsec\0A\00"
@.str.1 = [44 x i8] c"naivetable %08X simd %08X unrolltable %08X\0A\00"
@main.hw1 = internal global [64 x i8] c"Hello, world! Hello, world! Hello, world!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@main.hw2 = internal global [64 x i8] c"Hello, world! Hello, world! Hello, world!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@main.hw3 = internal global [64 x i8] c"Hello, world! Hello, world! Hello, world!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str.2 = [75 x i8] c"Hello, world!x3[1] 10Mtimes naivetable %fsec simd %fsec unrolltable %fsec\0A\00"
define i32 @main() {
%1 = alloca <2 x double>
%2 = bitcast <2 x double>* %1 to %struct.timeval*
%3 = alloca <2 x double>
%4 = bitcast <2 x double>* %3 to %struct.timeval*
br label %5
5: ; preds = %0, %16
%6 = phi i32 [ 0, %0 ], [ %17, %16 ]
%7 = tail call i64 (...) @rand()
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 0
br i1 %9, label %16, label %10
10: ; preds = %5
%11 = sext i32 %6 to i64
%12 = getelementptr inbounds [16777216 x i8], [16777216 x i8]* @main.buf3, i64 0, i64 %11
store i8 %8, i8* %12
%13 = getelementptr inbounds [16777216 x i8], [16777216 x i8]* @main.buf2, i64 0, i64 %11
store i8 %8, i8* %13
%14 = getelementptr inbounds [16777216 x i8], [16777216 x i8]* @main.buf1, i64 0, i64 %11
store i8 %8, i8* %14
%15 = add nsw i32 %6, 1
br label %16
16: ; preds = %5, %10
%17 = phi i32 [ %15, %10 ], [ %6, %5 ]
%18 = icmp slt i32 %17, 16777215
br i1 %18, label %5, label %19
19: ; preds = %16
store i8 0, i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf3, i64 0, i64 16777215)
store i8 0, i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf2, i64 0, i64 16777215)
store i8 0, i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf1, i64 0, i64 16777215)
%20 = bitcast <2 x double>* %1 to i8*
%21 = bitcast <2 x double>* %3 to i8*
%22 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
br label %23
23: ; preds = %19, %23
%24 = phi i32 [ 0, %19 ], [ %26, %23 ]
%25 = tail call i32 @rot13_naivetable(i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf1, i64 0, i64 0))
%26 = add nuw nsw i32 %24, 1
%27 = icmp eq i32 %26, 100
br i1 %27, label %28, label %23
28: ; preds = %23
%29 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%30 = getelementptr inbounds <2 x double>, <2 x double>* %3, i64 0, i64 0
%31 = load double, double* %30
%32 = getelementptr inbounds <2 x double>, <2 x double>* %1, i64 0, i64 0
%33 = load double, double* %32
%34 = getelementptr inbounds <2 x double>, <2 x double>* %3, i64 0, i64 1
%35 = load double, double* %34
%36 = getelementptr inbounds <2 x double>, <2 x double>* %1, i64 0, i64 1
%37 = load double, double* %36
%38 = fsub double %35, %37
%39 = fdiv double %38, 1.000000e+06
%40 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
br label %41
41: ; preds = %28, %41
%42 = phi i32 [ 0, %28 ], [ %44, %41 ]
%43 = tail call i32 @rot13_simd(i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf2, i64 0, i64 0))
%44 = add nuw nsw i32 %42, 1
%45 = icmp eq i32 %44, 100
br i1 %45, label %46, label %41
46: ; preds = %41
%47 = fsub double %31, %33
%48 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%49 = load double, double* %30
%50 = load double, double* %32
%51 = load double, double* %34
%52 = load double, double* %36
%53 = fsub double %51, %52
%54 = fdiv double %53, 1.000000e+06
%55 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
br label %56
56: ; preds = %46, %56
%57 = phi i32 [ 0, %46 ], [ %59, %56 ]
%58 = tail call i32 @rot13_unrolltable(i8* getelementptr inbounds ([16777216 x i8], [16777216 x i8]* @main.buf3, i64 0, i64 0))
%59 = add nuw nsw i32 %57, 1
%60 = icmp eq i32 %59, 100
br i1 %60, label %61, label %56
61: ; preds = %56
%62 = fadd double %47, %39
%63 = fsub double %49, %50
%64 = fadd double %63, %54
%65 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%66 = load <2 x double>, <2 x double>* %3
%67 = load <2 x double>, <2 x double>* %1
%68 = fsub <2 x double> %66, %67
%69 = extractelement <2 x double> %68, i64 1
%70 = fdiv double %69, 1.000000e+06
%71 = extractelement <2 x double> %68, i64 0
%72 = fadd double %71, %70
%73 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), double %62, double %64, double %72)
br label %74
74: ; preds = %74, %61
%75 = phi i64 [ 0, %61 ], [ %113, %74 ]
%76 = phi <4 x i32> [ zeroinitializer, %61 ], [ %111, %74 ]
%77 = phi <4 x i32> [ zeroinitializer, %61 ], [ %112, %74 ]
%78 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf1 to i32*), i64 %75
%79 = bitcast i32* %78 to <4 x i32>*
%80 = load <4 x i32>, <4 x i32>* %79
%81 = getelementptr inbounds i32, i32* %78, i64 4
%82 = bitcast i32* %81 to <4 x i32>*
%83 = load <4 x i32>, <4 x i32>* %82
%84 = xor <4 x i32> %80, %76
%85 = xor <4 x i32> %83, %77
%86 = or i64 %75, 8
%87 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf1 to i32*), i64 %86
%88 = bitcast i32* %87 to <4 x i32>*
%89 = load <4 x i32>, <4 x i32>* %88
%90 = getelementptr inbounds i32, i32* %87, i64 4
%91 = bitcast i32* %90 to <4 x i32>*
%92 = load <4 x i32>, <4 x i32>* %91
%93 = xor <4 x i32> %89, %84
%94 = xor <4 x i32> %92, %85
%95 = or i64 %75, 16
%96 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf1 to i32*), i64 %95
%97 = bitcast i32* %96 to <4 x i32>*
%98 = load <4 x i32>, <4 x i32>* %97
%99 = getelementptr inbounds i32, i32* %96, i64 4
%100 = bitcast i32* %99 to <4 x i32>*
%101 = load <4 x i32>, <4 x i32>* %100
%102 = xor <4 x i32> %98, %93
%103 = xor <4 x i32> %101, %94
%104 = or i64 %75, 24
%105 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf1 to i32*), i64 %104
%106 = bitcast i32* %105 to <4 x i32>*
%107 = load <4 x i32>, <4 x i32>* %106
%108 = getelementptr inbounds i32, i32* %105, i64 4
%109 = bitcast i32* %108 to <4 x i32>*
%110 = load <4 x i32>, <4 x i32>* %109
%111 = xor <4 x i32> %107, %102
%112 = xor <4 x i32> %110, %103
%113 = add nuw nsw i64 %75, 32
%114 = icmp eq i64 %113, 1048576
br i1 %114, label %115, label %74
115: ; preds = %74
%116 = xor <4 x i32> %112, %111
%117 = call i32 @llvm.vector.reduce.xor.v4i32(<4 x i32> %116)
br label %118
118: ; preds = %118, %115
%119 = phi i64 [ 0, %115 ], [ %157, %118 ]
%120 = phi <4 x i32> [ zeroinitializer, %115 ], [ %155, %118 ]
%121 = phi <4 x i32> [ zeroinitializer, %115 ], [ %156, %118 ]
%122 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf2 to i32*), i64 %119
%123 = bitcast i32* %122 to <4 x i32>*
%124 = load <4 x i32>, <4 x i32>* %123
%125 = getelementptr inbounds i32, i32* %122, i64 4
%126 = bitcast i32* %125 to <4 x i32>*
%127 = load <4 x i32>, <4 x i32>* %126
%128 = xor <4 x i32> %124, %120
%129 = xor <4 x i32> %127, %121
%130 = or i64 %119, 8
%131 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf2 to i32*), i64 %130
%132 = bitcast i32* %131 to <4 x i32>*
%133 = load <4 x i32>, <4 x i32>* %132
%134 = getelementptr inbounds i32, i32* %131, i64 4
%135 = bitcast i32* %134 to <4 x i32>*
%136 = load <4 x i32>, <4 x i32>* %135
%137 = xor <4 x i32> %133, %128
%138 = xor <4 x i32> %136, %129
%139 = or i64 %119, 16
%140 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf2 to i32*), i64 %139
%141 = bitcast i32* %140 to <4 x i32>*
%142 = load <4 x i32>, <4 x i32>* %141
%143 = getelementptr inbounds i32, i32* %140, i64 4
%144 = bitcast i32* %143 to <4 x i32>*
%145 = load <4 x i32>, <4 x i32>* %144
%146 = xor <4 x i32> %142, %137
%147 = xor <4 x i32> %145, %138
%148 = or i64 %119, 24
%149 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf2 to i32*), i64 %148
%150 = bitcast i32* %149 to <4 x i32>*
%151 = load <4 x i32>, <4 x i32>* %150
%152 = getelementptr inbounds i32, i32* %149, i64 4
%153 = bitcast i32* %152 to <4 x i32>*
%154 = load <4 x i32>, <4 x i32>* %153
%155 = xor <4 x i32> %151, %146
%156 = xor <4 x i32> %154, %147
%157 = add nuw nsw i64 %119, 32
%158 = icmp eq i64 %157, 1048576
br i1 %158, label %159, label %118
159: ; preds = %118
%160 = xor <4 x i32> %156, %155
%161 = call i32 @llvm.vector.reduce.xor.v4i32(<4 x i32> %160)
br label %162
162: ; preds = %162, %159
%163 = phi i64 [ 0, %159 ], [ %201, %162 ]
%164 = phi <4 x i32> [ zeroinitializer, %159 ], [ %199, %162 ]
%165 = phi <4 x i32> [ zeroinitializer, %159 ], [ %200, %162 ]
%166 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf3 to i32*), i64 %163
%167 = bitcast i32* %166 to <4 x i32>*
%168 = load <4 x i32>, <4 x i32>* %167
%169 = getelementptr inbounds i32, i32* %166, i64 4
%170 = bitcast i32* %169 to <4 x i32>*
%171 = load <4 x i32>, <4 x i32>* %170
%172 = xor <4 x i32> %168, %164
%173 = xor <4 x i32> %171, %165
%174 = or i64 %163, 8
%175 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf3 to i32*), i64 %174
%176 = bitcast i32* %175 to <4 x i32>*
%177 = load <4 x i32>, <4 x i32>* %176
%178 = getelementptr inbounds i32, i32* %175, i64 4
%179 = bitcast i32* %178 to <4 x i32>*
%180 = load <4 x i32>, <4 x i32>* %179
%181 = xor <4 x i32> %177, %172
%182 = xor <4 x i32> %180, %173
%183 = or i64 %163, 16
%184 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf3 to i32*), i64 %183
%185 = bitcast i32* %184 to <4 x i32>*
%186 = load <4 x i32>, <4 x i32>* %185
%187 = getelementptr inbounds i32, i32* %184, i64 4
%188 = bitcast i32* %187 to <4 x i32>*
%189 = load <4 x i32>, <4 x i32>* %188
%190 = xor <4 x i32> %186, %181
%191 = xor <4 x i32> %189, %182
%192 = or i64 %163, 24
%193 = getelementptr inbounds i32, i32* bitcast ([16777216 x i8]* @main.buf3 to i32*), i64 %192
%194 = bitcast i32* %193 to <4 x i32>*
%195 = load <4 x i32>, <4 x i32>* %194
%196 = getelementptr inbounds i32, i32* %193, i64 4
%197 = bitcast i32* %196 to <4 x i32>*
%198 = load <4 x i32>, <4 x i32>* %197
%199 = xor <4 x i32> %195, %190
%200 = xor <4 x i32> %198, %191
%201 = add nuw nsw i64 %163, 32
%202 = icmp eq i64 %201, 1048576
br i1 %202, label %203, label %162
203: ; preds = %162
%204 = xor <4 x i32> %200, %199
%205 = call i32 @llvm.vector.reduce.xor.v4i32(<4 x i32> %204)
%206 = sitofp i32 %117 to double
%207 = sitofp i32 %161 to double
%208 = sitofp i32 %205 to double
%209 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double %206, double %207, double %208)
%210 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
br label %211
211: ; preds = %203, %211
%212 = phi i32 [ 0, %203 ], [ %214, %211 ]
%213 = tail call i32 @rot13_naivetable(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw1, i64 0, i64 2))
%214 = add nuw nsw i32 %212, 1
%215 = icmp eq i32 %214, 10000001
br i1 %215, label %216, label %211
216: ; preds = %211
%217 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%218 = load <2 x double>, <2 x double>* %3
%219 = load <2 x double>, <2 x double>* %1
%220 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
br label %221
221: ; preds = %216, %221
%222 = phi i32 [ 0, %216 ], [ %224, %221 ]
%223 = tail call i32 @rot13_simd(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw2, i64 0, i64 2))
%224 = add nuw nsw i32 %222, 1
%225 = icmp eq i32 %224, 10000001
br i1 %225, label %226, label %221
226: ; preds = %221
%227 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%228 = load <2 x double>, <2 x double>* %3
%229 = load <2 x double>, <2 x double>* %1
%230 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
br label %231
231: ; preds = %226, %231
%232 = phi i32 [ 0, %226 ], [ %234, %231 ]
%233 = tail call i32 @rot13_unrolltable(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw3, i64 0, i64 2))
%234 = add nuw nsw i32 %232, 1
%235 = icmp eq i32 %234, 10000001
br i1 %235, label %236, label %231
236: ; preds = %231
%237 = fsub <2 x double> %228, %229
%238 = extractelement <2 x double> %237, i64 1
%239 = fdiv double %238, 1.000000e+06
%240 = extractelement <2 x double> %237, i64 0
%241 = fadd double %240, %239
%242 = fsub <2 x double> %218, %219
%243 = extractelement <2 x double> %242, i64 1
%244 = fdiv double %243, 1.000000e+06
%245 = extractelement <2 x double> %242, i64 0
%246 = fadd double %245, %244
%247 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%248 = load <2 x double>, <2 x double>* %3
%249 = load <2 x double>, <2 x double>* %1
%250 = fsub <2 x double> %248, %249
%251 = extractelement <2 x double> %250, i64 1
%252 = fdiv double %251, 1.000000e+06
%253 = extractelement <2 x double> %250, i64 0
%254 = fadd double %253, %252
%255 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0), double %246, double %241, double %254)
%256 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw1, i64 0, i64 0))
%257 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw2, i64 0, i64 0))
%258 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @main.hw3, i64 0, i64 0))
ret i32 0
}