#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 */
int /*<<< orphan*/ Base42_CopyFlipA(char *, char *, int);
int /*<<< orphan*/ Base42_CopyFlipB(char *, char *, int);
int /*<<< orphan*/ Base42_CopyFlipD(char *, char *, int);
int Base42_DecUnit(char *);
int Base42_EncUnit(int, char *);
scalar_t__ CLOCKS_PER_SEC;
int clock();
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  char *bufa, *bufb;
  char sv[64];
  int i0, i1, i2;
  int i, j, k, l;
  for (i = 0; i < 42; i++) {
    j = i * 42;
    i0 = j * 780 + 6242;
    k = (i0) >> 15;
    i1 = (j - 1) * 780 + 328;
    l = (i1) >> 15;
    printf("%d %d %d %04X\n", i, k, l, i0 & 32767);
  }
  memcpy(sv + 16, sv, 12);
  printf("%08X\n", *(long long *)(sv + 16));
  for (i = 0; i < 65536; i++) {
    j = Base42_EncUnit(i, sv);
    if (j < 0)
      break;
    sv[3] = 0;
    j = Base42_DecUnit(sv);
    if (i != j) {
      printf("%04X %04X %s\n", i, j, sv);
      break;
    }
  }
  bufa = malloc(1 << 24);
  bufb = malloc(1 << 24);
  i0 = clock();
  j = 0;
  for (i = 0; i < 128; i++) {
    memcpy(bufa, bufb, 1 << 24);
    j += 1 << 22;
  }
  i1 = clock();
  i2 = i1 - i0;
  printf("Mcpy: %d %f\n", i2,
         (j / 1000000.0) / (i2 / ((double)CLOCKS_PER_SEC)));
  i0 = clock();
  j = 0;
  for (i = 0; i < 128; i++) {
    Base42_CopyFlipA(bufa, bufb, 1 << 22);
    j += 1 << 22;
  }
  i1 = clock();
  i2 = i1 - i0;
  printf("A: %d %f\n", i2, (j / 1000000.0) / (i2 / ((double)CLOCKS_PER_SEC)));
  i0 = clock();
  j = 0;
  for (i = 0; i < 128; i++) {
    Base42_CopyFlipB(bufa, bufb, 1 << 22);
    j += 1 << 22;
  }
  i1 = clock();
  i2 = i1 - i0;
  printf("B: %d %f\n", i2, (j / 1000000.0) / (i2 / ((double)CLOCKS_PER_SEC)));
  i0 = clock();
  j = 0;
  for (i = 0; i < 128; i++) {
    Base42_CopyFlipD(bufa, bufb, 1 << 22);
    j += 1 << 22;
  }
  i1 = clock();
  i2 = i1 - i0;
  printf("D: %d %f\n", i2, (j / 1000000.0) / (i2 / ((double)CLOCKS_PER_SEC)));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x70(%rbp)
cmpl   $0x2a,-0x70(%rbp)
jge    121f <main+0x8f>
imul   $0x2a,-0x70(%rbp),%eax
mov    %eax,-0x74(%rbp)
imul   $0x30c,-0x74(%rbp),%eax
add    $0x1862,%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
sar    $0xf,%eax
mov    %eax,-0x78(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
imul   $0x30c,%eax,%eax
add    $0x148,%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
sar    $0xf,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x70(%rbp),%esi
mov    -0x78(%rbp),%edx
mov    -0x7c(%rbp),%ecx
mov    -0x64(%rbp),%r8d
and    $0x7fff,%r8d
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    11a9 <main+0x19>
lea    -0x60(%rbp),%rdi
add    $0x10,%rdi
lea    -0x60(%rbp),%rsi
mov    $0xc,%edx
call   1080 <memcpy@plt>
mov    -0x50(%rbp),%rax
mov    %eax,%esi
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x70(%rbp)
cmpl   $0x10000,-0x70(%rbp)
jge    12c7 <main+0x137>
mov    -0x70(%rbp),%edi
lea    -0x60(%rbp),%rsi
call   1070 <Base42_EncUnit@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x0,-0x74(%rbp)
jge    127b <main+0xeb>
jmp    12c7 <main+0x137>
movb   $0x0,-0x5d(%rbp)
lea    -0x60(%rbp),%rdi
call   1060 <Base42_DecUnit@plt>
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x74(%rbp),%eax
je     12b4 <main+0x124>
mov    -0x70(%rbp),%esi
mov    -0x74(%rbp),%edx
lea    -0x60(%rbp),%rcx
lea    0xd75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12c7 <main+0x137>
jmp    12b9 <main+0x129>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1250 <main+0xc0>
mov    $0x1000000,%edi
call   1090 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1000000,%edi
call   1090 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x70(%rbp)
cmpl   $0x80,-0x70(%rbp)
jge    1333 <main+0x1a3>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1000000,%edx
call   1080 <memcpy@plt>
mov    -0x74(%rbp),%eax
add    $0x400000,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    12fb <main+0x16b>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
sub    -0x64(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%esi
cvtsi2sdl -0x74(%rbp),%xmm0
movsd  0xcaa(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x6c(%rbp),%xmm1
mov    0x2c82(%rip),%rax
cvtsi2sdq (%rax),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0xcb1(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x70(%rbp)
cmpl   $0x80,-0x70(%rbp)
jge    13d1 <main+0x241>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x400000,%edx
call   1050 <Base42_CopyFlipA@plt>
mov    -0x74(%rbp),%eax
add    $0x400000,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1399 <main+0x209>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
sub    -0x64(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%esi
cvtsi2sdl -0x74(%rbp),%xmm0
movsd  0xc0c(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x6c(%rbp),%xmm1
mov    0x2be4(%rip),%rax
cvtsi2sdq (%rax),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0xc20(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x70(%rbp)
cmpl   $0x80,-0x70(%rbp)
jge    146f <main+0x2df>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x400000,%edx
call   10a0 <Base42_CopyFlipB@plt>
mov    -0x74(%rbp),%eax
add    $0x400000,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1437 <main+0x2a7>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
sub    -0x64(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%esi
cvtsi2sdl -0x74(%rbp),%xmm0
movsd  0xb6e(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x6c(%rbp),%xmm1
mov    0x2b46(%rip),%rax
cvtsi2sdq (%rax),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0xb8c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x70(%rbp)
cmpl   $0x80,-0x70(%rbp)
jge    150d <main+0x37d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x400000,%edx
call   10b0 <Base42_CopyFlipD@plt>
mov    -0x74(%rbp),%eax
add    $0x400000,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    14d5 <main+0x345>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
sub    -0x64(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%esi
cvtsi2sdl -0x74(%rbp),%xmm0
movsd  0xad0(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x6c(%rbp),%xmm1
mov    0x2aa8(%rip),%rax
cvtsi2sdq (%rax),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0xaf8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    $0x1862,%ebx
mov    $0xfffffe3c,%ebp
lea    0xe5b(%rip),%r14
xor    %r15d,%r15d
lea    0x1a26(%rbp),%edx
shr    $0xf,%edx
mov    %ebp,%ecx
sar    $0xf,%ecx
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebx,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15d
add    $0xfffffff8,%ebx
add    $0x7ff8,%ebp
cmp    $0x1712,%ebx
jne    11b0 <main+0x20>
lea    0x10(%rsp),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0xc,%edx
call   1080 <memcpy@plt>
mov    0x10(%rsp),%esi
lea    0xe14(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <printf@plt>
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <Base42_EncUnit@plt>
test   %eax,%eax
js     1251 <main+0xc1>
movb   $0x0,0x3(%rsp)
mov    %rbx,%rdi
call   1060 <Base42_DecUnit@plt>
cmp    %eax,%ebp
jne    123c <main+0xac>
add    $0x1,%ebp
cmp    $0x10000,%ebp
jne    1210 <main+0x80>
jmp    1251 <main+0xc1>
lea    0xdda(%rip),%rdi
mov    %rsp,%rcx
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1000000,%edi
call   1090 <malloc@plt>
mov    %rax,%r14
mov    $0x1000000,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
mov    %eax,%r15d
mov    $0x80,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1000000,%edx
call   1080 <memcpy@plt>
add    $0xffffffff,%ebp
jne    1280 <main+0xf0>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %r15d,%eax
cvtsi2sd %eax,%xmm1
mov    0x2d3e(%rip),%r15
cvtsi2sdq (%r15),%xmm0
divsd  %xmm0,%xmm1
movsd  0xd45(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0xd65(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <clock@plt>
mov    %eax,%r12d
mov    $0x80,%ebp
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x400000,%edx
call   1050 <Base42_CopyFlipA@plt>
add    $0xffffffff,%ebp
jne    12e0 <main+0x150>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %r12d,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq (%r15),%xmm0
divsd  %xmm0,%xmm1
movsd  0xce6(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0xd13(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <clock@plt>
mov    %eax,%r12d
mov    $0x80,%ebp
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x400000,%edx
call   10a0 <Base42_CopyFlipB@plt>
add    $0xffffffff,%ebp
jne    1340 <main+0x1b0>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %r12d,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq (%r15),%xmm0
divsd  %xmm0,%xmm1
movsd  0xc86(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0xcbd(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <clock@plt>
mov    %eax,%r12d
mov    $0x80,%ebp
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x400000,%edx
call   10b0 <Base42_CopyFlipD@plt>
add    $0xffffffff,%ebp
jne    13a0 <main+0x210>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %r12d,%eax
cvtsi2sd %eax,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sdq (%r15),%xmm1
divsd  %xmm1,%xmm2
movsd  0xc29(%rip),%xmm0
divsd  %xmm2,%xmm0
lea    0xc6a(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d %d %d %04X\0A\00"
@.str.1 = [6 x i8] c"%08X\0A\00"
@.str.2 = [14 x i8] c"%04X %04X %s\0A\00"
@.str.3 = [13 x i8] c"Mcpy: %d %f\0A\00"
@CLOCKS_PER_SEC = global i64 0
@.str.4 = [10 x i8] c"A: %d %f\0A\00"
@.str.5 = [10 x i8] c"B: %d %f\0A\00"
@.str.6 = [10 x i8] c"D: %d %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [64 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %8
br label %12
12: ; preds = %35, %0
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 42
br i1 %14, label %15, label %38
15: ; preds = %12
%16 = load i32, i32* %8
%17 = mul nsw i32 %16, 42
store i32 %17, i32* %9
%18 = load i32, i32* %9
%19 = mul nsw i32 %18, 780
%20 = add nsw i32 %19, 6242
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = ashr i32 %21, 15
store i32 %22, i32* %10
%23 = load i32, i32* %9
%24 = sub nsw i32 %23, 1
%25 = mul nsw i32 %24, 780
%26 = add nsw i32 %25, 328
store i32 %26, i32* %6
%27 = load i32, i32* %6
%28 = ashr i32 %27, 15
store i32 %28, i32* %11
%29 = load i32, i32* %8
%30 = load i32, i32* %10
%31 = load i32, i32* %11
%32 = load i32, i32* %5
%33 = and i32 %32, 32767
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %29, i32 %30, i32 %31, i32 %33)
br label %35
35: ; preds = %15
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
store i32 %37, i32* %8
br label %12
38: ; preds = %12
%39 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%40 = getelementptr inbounds i8, i8* %39, i64 16
%41 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%42 = call i32 @memcpy(i8* %40, i8* %41, i32 12)
%43 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%44 = getelementptr inbounds i8, i8* %43, i64 16
%45 = bitcast i8* %44 to i64*
%46 = load i64, i64* %45
%47 = trunc i64 %46 to i32
%48 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %47)
store i32 0, i32* %8
br label %49
49: ; preds = %72, %38
%50 = load i32, i32* %8
%51 = icmp slt i32 %50, 65536
br i1 %51, label %52, label %75
52: ; preds = %49
%53 = load i32, i32* %8
%54 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%55 = call i32 @Base42_EncUnit(i32 %53, i8* %54)
store i32 %55, i32* %9
%56 = load i32, i32* %9
%57 = icmp slt i32 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %52
br label %75
59: ; preds = %52
%60 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 3
store i8 0, i8* %60
%61 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%62 = call i32 @Base42_DecUnit(i8* %61)
store i32 %62, i32* %9
%63 = load i32, i32* %8
%64 = load i32, i32* %9
%65 = icmp ne i32 %63, %64
br i1 %65, label %66, label %71
66: ; preds = %59
%67 = load i32, i32* %8
%68 = load i32, i32* %9
%69 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%70 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %67, i32 %68, i8* %69)
br label %75
71: ; preds = %59
br label %72
72: ; preds = %71
%73 = load i32, i32* %8
%74 = add nsw i32 %73, 1
store i32 %74, i32* %8
br label %49
75: ; preds = %66, %58, %49
%76 = call i8* @malloc(i32 16777216)
store i8* %76, i8** %2
%77 = call i8* @malloc(i32 16777216)
store i8* %77, i8** %3
%78 = call i32 (...) @clock()
store i32 %78, i32* %5
store i32 0, i32* %9
store i32 0, i32* %8
br label %79
79: ; preds = %88, %75
%80 = load i32, i32* %8
%81 = icmp slt i32 %80, 128
br i1 %81, label %82, label %91
82: ; preds = %79
%83 = load i8*, i8** %2
%84 = load i8*, i8** %3
%85 = call i32 @memcpy(i8* %83, i8* %84, i32 16777216)
%86 = load i32, i32* %9
%87 = add nsw i32 %86, 4194304
store i32 %87, i32* %9
br label %88
88: ; preds = %82
%89 = load i32, i32* %8
%90 = add nsw i32 %89, 1
store i32 %90, i32* %8
br label %79
91: ; preds = %79
%92 = call i32 (...) @clock()
store i32 %92, i32* %6
%93 = load i32, i32* %6
%94 = load i32, i32* %5
%95 = sub nsw i32 %93, %94
store i32 %95, i32* %7
%96 = load i32, i32* %7
%97 = load i32, i32* %9
%98 = sitofp i32 %97 to double
%99 = fdiv double %98, 1.000000e+06
%100 = load i32, i32* %7
%101 = sitofp i32 %100 to double
%102 = load i64, i64* @CLOCKS_PER_SEC
%103 = sitofp i64 %102 to double
%104 = fdiv double %101, %103
%105 = fdiv double %99, %104
%106 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %96, double %105)
%107 = call i32 (...) @clock()
store i32 %107, i32* %5
store i32 0, i32* %9
store i32 0, i32* %8
br label %108
108: ; preds = %117, %91
%109 = load i32, i32* %8
%110 = icmp slt i32 %109, 128
br i1 %110, label %111, label %120
111: ; preds = %108
%112 = load i8*, i8** %2
%113 = load i8*, i8** %3
%114 = call i32 @Base42_CopyFlipA(i8* %112, i8* %113, i32 4194304)
%115 = load i32, i32* %9
%116 = add nsw i32 %115, 4194304
store i32 %116, i32* %9
br label %117
117: ; preds = %111
%118 = load i32, i32* %8
%119 = add nsw i32 %118, 1
store i32 %119, i32* %8
br label %108
120: ; preds = %108
%121 = call i32 (...) @clock()
store i32 %121, i32* %6
%122 = load i32, i32* %6
%123 = load i32, i32* %5
%124 = sub nsw i32 %122, %123
store i32 %124, i32* %7
%125 = load i32, i32* %7
%126 = load i32, i32* %9
%127 = sitofp i32 %126 to double
%128 = fdiv double %127, 1.000000e+06
%129 = load i32, i32* %7
%130 = sitofp i32 %129 to double
%131 = load i64, i64* @CLOCKS_PER_SEC
%132 = sitofp i64 %131 to double
%133 = fdiv double %130, %132
%134 = fdiv double %128, %133
%135 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %125, double %134)
%136 = call i32 (...) @clock()
store i32 %136, i32* %5
store i32 0, i32* %9
store i32 0, i32* %8
br label %137
137: ; preds = %146, %120
%138 = load i32, i32* %8
%139 = icmp slt i32 %138, 128
br i1 %139, label %140, label %149
140: ; preds = %137
%141 = load i8*, i8** %2
%142 = load i8*, i8** %3
%143 = call i32 @Base42_CopyFlipB(i8* %141, i8* %142, i32 4194304)
%144 = load i32, i32* %9
%145 = add nsw i32 %144, 4194304
store i32 %145, i32* %9
br label %146
146: ; preds = %140
%147 = load i32, i32* %8
%148 = add nsw i32 %147, 1
store i32 %148, i32* %8
br label %137
149: ; preds = %137
%150 = call i32 (...) @clock()
store i32 %150, i32* %6
%151 = load i32, i32* %6
%152 = load i32, i32* %5
%153 = sub nsw i32 %151, %152
store i32 %153, i32* %7
%154 = load i32, i32* %7
%155 = load i32, i32* %9
%156 = sitofp i32 %155 to double
%157 = fdiv double %156, 1.000000e+06
%158 = load i32, i32* %7
%159 = sitofp i32 %158 to double
%160 = load i64, i64* @CLOCKS_PER_SEC
%161 = sitofp i64 %160 to double
%162 = fdiv double %159, %161
%163 = fdiv double %157, %162
%164 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %154, double %163)
%165 = call i32 (...) @clock()
store i32 %165, i32* %5
store i32 0, i32* %9
store i32 0, i32* %8
br label %166
166: ; preds = %175, %149
%167 = load i32, i32* %8
%168 = icmp slt i32 %167, 128
br i1 %168, label %169, label %178
169: ; preds = %166
%170 = load i8*, i8** %2
%171 = load i8*, i8** %3
%172 = call i32 @Base42_CopyFlipD(i8* %170, i8* %171, i32 4194304)
%173 = load i32, i32* %9
%174 = add nsw i32 %173, 4194304
store i32 %174, i32* %9
br label %175
175: ; preds = %169
%176 = load i32, i32* %8
%177 = add nsw i32 %176, 1
store i32 %177, i32* %8
br label %166
178: ; preds = %166
%179 = call i32 (...) @clock()
store i32 %179, i32* %6
%180 = load i32, i32* %6
%181 = load i32, i32* %5
%182 = sub nsw i32 %180, %181
store i32 %182, i32* %7
%183 = load i32, i32* %7
%184 = load i32, i32* %9
%185 = sitofp i32 %184 to double
%186 = fdiv double %185, 1.000000e+06
%187 = load i32, i32* %7
%188 = sitofp i32 %187 to double
%189 = load i64, i64* @CLOCKS_PER_SEC
%190 = sitofp i64 %189 to double
%191 = fdiv double %188, %190
%192 = fdiv double %186, %191
%193 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %183, double %192)
%194 = load i32, i32* %1
ret i32 %194
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d %d %d %04X\0A\00"
@.str.1 = [6 x i8] c"%08X\0A\00"
@.str.2 = [14 x i8] c"%04X %04X %s\0A\00"
@.str.3 = [13 x i8] c"Mcpy: %d %f\0A\00"
@CLOCKS_PER_SEC = global i64 0
@.str.4 = [10 x i8] c"A: %d %f\0A\00"
@.str.5 = [10 x i8] c"B: %d %f\0A\00"
@.str.6 = [10 x i8] c"D: %d %f\0A\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %12, %3 ]
%5 = mul nuw nsw i32 %4, 32760
%6 = add nuw nsw i32 %5, 6242
%7 = lshr i32 %6, 15
%8 = add nsw i32 %5, -452
%9 = ashr i32 %8, 15
%10 = and i32 %6, 32762
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %7, i32 %9, i32 %10)
%12 = add nuw nsw i32 %4, 1
%13 = icmp eq i32 %12, 42
br i1 %13, label %14, label %3
14: ; preds = %3
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 16
%16 = call i32 @memcpy(i8* %15, i8* %2, i32 12)
%17 = bitcast i8* %15 to i64*
%18 = load i64, i64* %17
%19 = trunc i64 %18 to i32
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 3
br label %22
22: ; preds = %14, %31
%23 = phi i32 [ 0, %14 ], [ %32, %31 ]
%24 = call i32 @Base42_EncUnit(i32 %23, i8* %2)
%25 = icmp slt i32 %24, 0
br i1 %25, label %34, label %26
26: ; preds = %22
store i8 0, i8* %21
%27 = call i32 @Base42_DecUnit(i8* %2)
%28 = icmp eq i32 %23, %27
br i1 %28, label %31, label %29
29: ; preds = %26
%30 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %27, i8* %2)
br label %34
31: ; preds = %26
%32 = add nuw nsw i32 %23, 1
%33 = icmp eq i32 %32, 65536
br i1 %33, label %34, label %22
34: ; preds = %22, %31, %29
%35 = call dereferenceable_or_null(16777216) i8* @malloc(i32 16777216)
%36 = call dereferenceable_or_null(16777216) i8* @malloc(i32 16777216)
%37 = call i32 (...) @clock()
br label %38
38: ; preds = %34, %38
%39 = phi i32 [ 0, %34 ], [ %41, %38 ]
%40 = call i32 @memcpy(i8* %35, i8* %36, i32 16777216)
%41 = add nuw nsw i32 %39, 1
%42 = icmp eq i32 %41, 128
br i1 %42, label %43, label %38
43: ; preds = %38
%44 = call i32 (...) @clock()
%45 = sub nsw i32 %44, %37
%46 = sitofp i32 %45 to double
%47 = load i64, i64* @CLOCKS_PER_SEC
%48 = sitofp i64 %47 to double
%49 = fdiv double %46, %48
%50 = fdiv double 0x4080C6F7A0B5ED8D, %49
%51 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %45, double %50)
%52 = call i32 (...) @clock()
br label %53
53: ; preds = %43, %53
%54 = phi i32 [ 0, %43 ], [ %56, %53 ]
%55 = call i32 @Base42_CopyFlipA(i8* %35, i8* %36, i32 4194304)
%56 = add nuw nsw i32 %54, 1
%57 = icmp eq i32 %56, 128
br i1 %57, label %58, label %53
58: ; preds = %53
%59 = call i32 (...) @clock()
%60 = sub nsw i32 %59, %52
%61 = sitofp i32 %60 to double
%62 = load i64, i64* @CLOCKS_PER_SEC
%63 = sitofp i64 %62 to double
%64 = fdiv double %61, %63
%65 = fdiv double 0x4080C6F7A0B5ED8D, %64
%66 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %60, double %65)
%67 = call i32 (...) @clock()
br label %68
68: ; preds = %58, %68
%69 = phi i32 [ 0, %58 ], [ %71, %68 ]
%70 = call i32 @Base42_CopyFlipB(i8* %35, i8* %36, i32 4194304)
%71 = add nuw nsw i32 %69, 1
%72 = icmp eq i32 %71, 128
br i1 %72, label %73, label %68
73: ; preds = %68
%74 = call i32 (...) @clock()
%75 = sub nsw i32 %74, %67
%76 = sitofp i32 %75 to double
%77 = load i64, i64* @CLOCKS_PER_SEC
%78 = sitofp i64 %77 to double
%79 = fdiv double %76, %78
%80 = fdiv double 0x4080C6F7A0B5ED8D, %79
%81 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %75, double %80)
%82 = call i32 (...) @clock()
br label %83
83: ; preds = %73, %83
%84 = phi i32 [ 0, %73 ], [ %86, %83 ]
%85 = call i32 @Base42_CopyFlipD(i8* %35, i8* %36, i32 4194304)
%86 = add nuw nsw i32 %84, 1
%87 = icmp eq i32 %86, 128
br i1 %87, label %88, label %83
88: ; preds = %83
%89 = call i32 (...) @clock()
%90 = sub nsw i32 %89, %82
%91 = sitofp i32 %90 to double
%92 = load i64, i64* @CLOCKS_PER_SEC
%93 = sitofp i64 %92 to double
%94 = fdiv double %91, %93
%95 = fdiv double 0x4080C6F7A0B5ED8D, %94
%96 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %90, double %95)
ret i32 0
}