#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 scalar_t__ clock_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
float CLOCKS_PER_SEC;
scalar_t__ clock();
size_t decode_array(char *, size_t, char *, size_t);
size_t encode_array(char *, size_t, char *, size_t, size_t const);
size_t encoded_dest_size(size_t, size_t const);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
size_t fread(char *, int, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fwrite(char *, int, size_t, int /*<<< orphan*/ *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ printf(char *, size_t, size_t, float);
int main() {
  const char *binary_file = "tables.ods";
  const char *encoded_file = "tables.ods.encoded.txt";
  const char *decoded_file = "tables.ods.decoded.ods";
  const size_t binary_src_size = 3 * 1024 * 1024;
  const size_t base64_src_size = 4 * 1024 * 1024;
  const size_t line_size = 72;
  FILE *src_file;
  FILE *dest_file;
  char *src_array;
  char *dest_array;
  size_t src_size;
  size_t dest_size;
  size_t src_len;
  size_t cnt;
  clock_t clock_start;
  clock_t clock_diff;
  src_size = binary_src_size;
  src_array = (char *)malloc(src_size);
  if (!src_array)
    return 1;
  src_file = fopen(binary_file, "rb");
  if (!src_file)
    return 2;
  src_len = fread(src_array, 1, src_size, src_file);
  fclose(src_file);
  dest_size = encoded_dest_size(src_len, line_size);
  dest_array = (char *)malloc(dest_size);
  if (!dest_array)
    return 3;
  clock_start = clock();
  cnt = encode_array(src_array, src_len, dest_array, dest_size, line_size);
  clock_diff = clock() - clock_start;
  free(src_array);
  src_array = NULL;
  printf("Encoded %ld bytes into %ld bytes in %.3f seconds\n", src_len, cnt,
         ((float)clock_diff) / CLOCKS_PER_SEC);
  dest_file = fopen(encoded_file, "w");
  if (!dest_file)
    return 4;
  fwrite(dest_array, 1, cnt, dest_file);
  fclose(dest_file);
  free(dest_array);
  dest_array = NULL;
  src_size = base64_src_size;
  src_array = (char *)malloc(src_size + 1);
  if (!src_array)
    return 5;
  src_file = fopen(encoded_file, "r");
  if (!src_file)
    return 6;
  src_len = fread(src_array, 1, src_size, src_file);
  src_array[src_len] = '\0';
  fclose(src_file);
  dest_size = encoded_dest_size(src_len, line_size);
  dest_array = (char *)malloc(dest_size);
  if (!dest_array)
    return 7;
  clock_start = clock();
  cnt = decode_array(src_array, src_len, dest_array, dest_size);
  clock_diff = clock() - clock_start;
  free(src_array);
  src_array = NULL;
  printf("Decoded %ld bytes into %ld bytes in %.3f seconds\n", src_len, cnt,
         ((float)clock_diff) / CLOCKS_PER_SEC);
  dest_file = fopen(decoded_file, "wb");
  if (!dest_file)
    return 8;
  fwrite(dest_array, 1, cnt, dest_file);
  fclose(dest_file);
  free(dest_array);
  dest_array = NULL;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe37(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xe37(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xe43(%rip),%rax
mov    %rax,-0x20(%rbp)
movq   $0x300000,-0x28(%rbp)
movq   $0x400000,-0x30(%rbp)
movq   $0x48,-0x38(%rbp)
movq   $0x300000,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
call   1090 <malloc@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    1227 <main+0x77>
movl   $0x1,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    -0x10(%rbp),%rdi
lea    0xe07(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1252 <main+0xa2>
movl   $0x2,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %rax,-0x70(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x70(%rbp),%rdi
mov    $0x48,%esi
call   1080 <encoded_dest_size@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
call   1090 <malloc@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    12ab <main+0xfb>
movl   $0x3,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x80(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    $0x48,%r8d
call   10b0 <encode_array@plt>
mov    %rax,-0x78(%rbp)
mov    $0x0,%al
call   1050 <clock@plt>
sub    -0x80(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x50(%rbp)
mov    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
cvtsi2ssq -0x88(%rbp),%xmm0
ff ff
mov    0x2cd8(%rip),%rax
divss  (%rax),%xmm0
lea    0xd21(%rip),%rdi
call   1070 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd43(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    134b <main+0x19b>
movl   $0x4,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    -0x58(%rbp),%rdi
mov    -0x78(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    $0x1,%esi
call   10d0 <fwrite@plt>
mov    -0x48(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x58(%rbp)
movq   $0x400000,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
add    $0x1,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    13ab <main+0x1fb>
movl   $0x5,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    -0x18(%rbp),%rdi
lea    0xcba(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    13d6 <main+0x226>
movl   $0x6,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %rax,-0x70(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x70(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x40(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x70(%rbp),%rdi
mov    $0x48,%esi
call   1080 <encoded_dest_size@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
call   1090 <malloc@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    143b <main+0x28b>
movl   $0x7,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x80(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x68(%rbp),%rcx
call   10a0 <decode_array@plt>
mov    %rax,-0x78(%rbp)
mov    $0x0,%al
call   1050 <clock@plt>
sub    -0x80(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x50(%rbp)
mov    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
cvtsi2ssq -0x88(%rbp),%xmm0
ff ff
mov    0x2b4e(%rip),%rax
divss  (%rax),%xmm0
lea    0xbcd(%rip),%rdi
call   1070 <printf@plt>
mov    -0x20(%rbp),%rdi
lea    0xbef(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    14d5 <main+0x325>
movl   $0x8,-0x4(%rbp)
jmp    150c <main+0x35c>
mov    -0x58(%rbp),%rdi
mov    -0x78(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    $0x1,%esi
call   10d0 <fwrite@plt>
mov    -0x48(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x58(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x300000,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     13eb <main+0x23b>
mov    %rax,%r13
lea    0xe28(%rip),%rdi
lea    0xe5a(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     13f2 <main+0x242>
mov    %rax,%rbx
mov    $0x300000,%edx
mov    %r13,%rdi
mov    $0x1,%esi
mov    %rax,%rcx
call   1040 <fread@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    $0x48,%esi
mov    %r15,%rdi
call   1080 <encoded_dest_size@plt>
mov    %rax,%r12
mov    %rax,%rdi
call   1090 <malloc@plt>
test   %rax,%rax
je     13f9 <main+0x249>
mov    %rax,%r14
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%rbx
mov    $0x48,%r8d
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r12,%rcx
call   10b0 <encode_array@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%rbp
sub    %rbx,%rbp
mov    %r13,%rdi
call   1030 <free@plt>
cvtsi2ss %rbp,%xmm0
mov    0x2d6f(%rip),%rax
divss  (%rax),%xmm0
lea    0xdb8(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1070 <printf@plt>
lea    0xd75(%rip),%rdi
lea    0xdd1(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1400 <main+0x250>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x1,%esi
mov    %r12,%rdx
mov    %rax,%rcx
call   10d0 <fwrite@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x400001,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     1407 <main+0x257>
mov    %rax,%r14
lea    0xd1d(%rip),%rdi
lea    0xd7b(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     140e <main+0x25e>
mov    %rax,%rbx
mov    $0x400000,%edx
mov    %r14,%rdi
mov    $0x1,%esi
mov    %rax,%rcx
call   1040 <fread@plt>
mov    %rax,%r12
movb   $0x0,(%r14,%rax,1)
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    $0x48,%esi
mov    %r12,%rdi
call   1080 <encoded_dest_size@plt>
mov    %rax,%r13
mov    %rax,%rdi
call   1090 <malloc@plt>
test   %rax,%rax
je     1415 <main+0x265>
mov    %rax,%r15
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%rbp
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r13,%rcx
call   10a0 <decode_array@plt>
mov    %rax,(%rsp)
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%r13
sub    %rbp,%r13
mov    %r14,%rdi
call   1030 <free@plt>
cvtsi2ss %r13,%xmm0
mov    0x2c57(%rip),%rax
divss  (%rax),%xmm0
lea    0xcd6(%rip),%rdi
mov    %r12,%rsi
mov    (%rsp),%rbp
mov    %rbp,%rdx
call   1070 <printf@plt>
lea    0xc70(%rip),%rdi
lea    0xceb(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     141c <main+0x26c>
mov    %rax,%r14
mov    %r15,%rdi
mov    $0x1,%esi
mov    %rbp,%rdx
mov    %rax,%rcx
call   10d0 <fwrite@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    %r15,%rdi
call   1030 <free@plt>
jmp    1421 <main+0x271>
mov    $0x1,%ebx
jmp    1421 <main+0x271>
mov    $0x2,%ebx
jmp    1421 <main+0x271>
mov    $0x3,%ebx
jmp    1421 <main+0x271>
mov    $0x4,%ebx
jmp    1421 <main+0x271>
mov    $0x5,%ebx
jmp    1421 <main+0x271>
mov    $0x6,%ebx
jmp    1421 <main+0x271>
mov    $0x7,%ebx
jmp    1421 <main+0x271>
mov    $0x8,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"tables.ods\00"
@.str.1 = [23 x i8] c"tables.ods.encoded.txt\00"
@.str.2 = [23 x i8] c"tables.ods.decoded.ods\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [50 x i8] c"Encoded %ld bytes into %ld bytes in %.3f seconds\0A\00"
@CLOCKS_PER_SEC = global float 0.000000e+00
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [2 x i8] c"r\00"
@.str.7 = [50 x i8] c"Decoded %ld bytes into %ld bytes in %.3f seconds\0A\00"
@.str.8 = [3 x i8] c"wb\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
store i32 0, i32* %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8** %4
store i64 3145728, i64* %5
store i64 4194304, i64* %6
store i64 72, i64* %7
store i64 3145728, i64* %12
%18 = load i64, i64* %12
%19 = call i64 @malloc(i64 %18)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %10
%21 = load i8*, i8** %10
%22 = icmp ne i8* %21, null
br i1 %22, label %24, label %23
23: ; preds = %0
store i32 1, i32* %1
br label %142
24: ; preds = %0
%25 = load i8*, i8** %2
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %26, i32** %8
%27 = load i32*, i32** %8
%28 = icmp ne i32* %27, null
br i1 %28, label %30, label %29
29: ; preds = %24
store i32 2, i32* %1
br label %142
30: ; preds = %24
%31 = load i8*, i8** %10
%32 = load i64, i64* %12
%33 = load i32*, i32** %8
%34 = call i64 @fread(i8* %31, i32 1, i64 %32, i32* %33)
store i64 %34, i64* %14
%35 = load i32*, i32** %8
%36 = call i32 @fclose(i32* %35)
%37 = load i64, i64* %14
%38 = call i64 @encoded_dest_size(i64 %37, i64 72)
store i64 %38, i64* %13
%39 = load i64, i64* %13
%40 = call i64 @malloc(i64 %39)
%41 = inttoptr i64 %40 to i8*
store i8* %41, i8** %11
%42 = load i8*, i8** %11
%43 = icmp ne i8* %42, null
br i1 %43, label %45, label %44
44: ; preds = %30
store i32 3, i32* %1
br label %142
45: ; preds = %30
%46 = call i64 (...) @clock()
store i64 %46, i64* %16
%47 = load i8*, i8** %10
%48 = load i64, i64* %14
%49 = load i8*, i8** %11
%50 = load i64, i64* %13
%51 = call i64 @encode_array(i8* %47, i64 %48, i8* %49, i64 %50, i64 72)
store i64 %51, i64* %15
%52 = call i64 (...) @clock()
%53 = load i64, i64* %16
%54 = sub nsw i64 %52, %53
store i64 %54, i64* %17
%55 = load i8*, i8** %10
%56 = call i32 @free(i8* %55)
store i8* null, i8** %10
%57 = load i64, i64* %14
%58 = load i64, i64* %15
%59 = load i64, i64* %17
%60 = sitofp i64 %59 to float
%61 = load float, float* @CLOCKS_PER_SEC
%62 = fdiv float %60, %61
%63 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i64 %57, i64 %58, float %62)
%64 = load i8*, i8** %3
%65 = call i32* @fopen(i8* %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %65, i32** %9
%66 = load i32*, i32** %9
%67 = icmp ne i32* %66, null
br i1 %67, label %69, label %68
68: ; preds = %45
store i32 4, i32* %1
br label %142
69: ; preds = %45
%70 = load i8*, i8** %11
%71 = load i64, i64* %15
%72 = load i32*, i32** %9
%73 = call i32 @fwrite(i8* %70, i32 1, i64 %71, i32* %72)
%74 = load i32*, i32** %9
%75 = call i32 @fclose(i32* %74)
%76 = load i8*, i8** %11
%77 = call i32 @free(i8* %76)
store i8* null, i8** %11
store i64 4194304, i64* %12
%78 = load i64, i64* %12
%79 = add i64 %78, 1
%80 = call i64 @malloc(i64 %79)
%81 = inttoptr i64 %80 to i8*
store i8* %81, i8** %10
%82 = load i8*, i8** %10
%83 = icmp ne i8* %82, null
br i1 %83, label %85, label %84
84: ; preds = %69
store i32 5, i32* %1
br label %142
85: ; preds = %69
%86 = load i8*, i8** %3
%87 = call i32* @fopen(i8* %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32* %87, i32** %8
%88 = load i32*, i32** %8
%89 = icmp ne i32* %88, null
br i1 %89, label %91, label %90
90: ; preds = %85
store i32 6, i32* %1
br label %142
91: ; preds = %85
%92 = load i8*, i8** %10
%93 = load i64, i64* %12
%94 = load i32*, i32** %8
%95 = call i64 @fread(i8* %92, i32 1, i64 %93, i32* %94)
store i64 %95, i64* %14
%96 = load i8*, i8** %10
%97 = load i64, i64* %14
%98 = getelementptr inbounds i8, i8* %96, i64 %97
store i8 0, i8* %98
%99 = load i32*, i32** %8
%100 = call i32 @fclose(i32* %99)
%101 = load i64, i64* %14
%102 = call i64 @encoded_dest_size(i64 %101, i64 72)
store i64 %102, i64* %13
%103 = load i64, i64* %13
%104 = call i64 @malloc(i64 %103)
%105 = inttoptr i64 %104 to i8*
store i8* %105, i8** %11
%106 = load i8*, i8** %11
%107 = icmp ne i8* %106, null
br i1 %107, label %109, label %108
108: ; preds = %91
store i32 7, i32* %1
br label %142
109: ; preds = %91
%110 = call i64 (...) @clock()
store i64 %110, i64* %16
%111 = load i8*, i8** %10
%112 = load i64, i64* %14
%113 = load i8*, i8** %11
%114 = load i64, i64* %13
%115 = call i64 @decode_array(i8* %111, i64 %112, i8* %113, i64 %114)
store i64 %115, i64* %15
%116 = call i64 (...) @clock()
%117 = load i64, i64* %16
%118 = sub nsw i64 %116, %117
store i64 %118, i64* %17
%119 = load i8*, i8** %10
%120 = call i32 @free(i8* %119)
store i8* null, i8** %10
%121 = load i64, i64* %14
%122 = load i64, i64* %15
%123 = load i64, i64* %17
%124 = sitofp i64 %123 to float
%125 = load float, float* @CLOCKS_PER_SEC
%126 = fdiv float %124, %125
%127 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0), i64 %121, i64 %122, float %126)
%128 = load i8*, i8** %4
%129 = call i32* @fopen(i8* %128, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
store i32* %129, i32** %9
%130 = load i32*, i32** %9
%131 = icmp ne i32* %130, null
br i1 %131, label %133, label %132
132: ; preds = %109
store i32 8, i32* %1
br label %142
133: ; preds = %109
%134 = load i8*, i8** %11
%135 = load i64, i64* %15
%136 = load i32*, i32** %9
%137 = call i32 @fwrite(i8* %134, i32 1, i64 %135, i32* %136)
%138 = load i32*, i32** %9
%139 = call i32 @fclose(i32* %138)
%140 = load i8*, i8** %11
%141 = call i32 @free(i8* %140)
store i8* null, i8** %11
store i32 0, i32* %1
br label %142
142: ; preds = %133, %132, %108, %90, %84, %68, %44, %29, %23
%143 = load i32, i32* %1
ret i32 %143
}

LLVM IR (-O2):
@.str = [11 x i8] c"tables.ods\00"
@.str.1 = [23 x i8] c"tables.ods.encoded.txt\00"
@.str.2 = [23 x i8] c"tables.ods.decoded.ods\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [50 x i8] c"Encoded %ld bytes into %ld bytes in %.3f seconds\0A\00"
@CLOCKS_PER_SEC = global float 0.000000e+00
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [2 x i8] c"r\00"
@.str.7 = [50 x i8] c"Decoded %ld bytes into %ld bytes in %.3f seconds\0A\00"
@.str.8 = [3 x i8] c"wb\00"
define i32 @main() {
%1 = tail call i64 @malloc(i64 3145728)
%2 = inttoptr i64 %1 to i8*
%3 = icmp eq i64 %1, 0
br i1 %3, label %60, label %4
4: ; preds = %0
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %60, label %7
7: ; preds = %4
%8 = tail call i64 @fread(i8* %2, i32 1, i64 3145728, i32* %5)
%9 = tail call i32 @fclose(i32* %5)
%10 = tail call i64 @encoded_dest_size(i64 %8, i64 72)
%11 = tail call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i8*
%13 = icmp eq i64 %11, 0
br i1 %13, label %60, label %14
14: ; preds = %7
%15 = tail call i64 (...) @clock()
%16 = tail call i64 @encode_array(i8* %2, i64 %8, i8* %12, i64 %10, i64 72)
%17 = tail call i64 (...) @clock()
%18 = sub nsw i64 %17, %15
%19 = tail call i32 @free(i8* %2)
%20 = sitofp i64 %18 to float
%21 = load float, float* @CLOCKS_PER_SEC
%22 = fdiv float %20, %21
%23 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i64 %8, i64 %16, float %22)
%24 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%25 = icmp eq i32* %24, null
br i1 %25, label %60, label %26
26: ; preds = %14
%27 = tail call i32 @fwrite(i8* %12, i32 1, i64 %16, i32* %24)
%28 = tail call i32 @fclose(i32* %24)
%29 = tail call i32 @free(i8* %12)
%30 = tail call i64 @malloc(i64 4194305)
%31 = inttoptr i64 %30 to i8*
%32 = icmp eq i64 %30, 0
br i1 %32, label %60, label %33
33: ; preds = %26
%34 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%35 = icmp eq i32* %34, null
br i1 %35, label %60, label %36
36: ; preds = %33
%37 = tail call i64 @fread(i8* %31, i32 1, i64 4194304, i32* %34)
%38 = getelementptr inbounds i8, i8* %31, i64 %37
store i8 0, i8* %38
%39 = tail call i32 @fclose(i32* %34)
%40 = tail call i64 @encoded_dest_size(i64 %37, i64 72)
%41 = tail call i64 @malloc(i64 %40)
%42 = inttoptr i64 %41 to i8*
%43 = icmp eq i64 %41, 0
br i1 %43, label %60, label %44
44: ; preds = %36
%45 = tail call i64 (...) @clock()
%46 = tail call i64 @decode_array(i8* %31, i64 %37, i8* %42, i64 %40)
%47 = tail call i64 (...) @clock()
%48 = sub nsw i64 %47, %45
%49 = tail call i32 @free(i8* %31)
%50 = sitofp i64 %48 to float
%51 = load float, float* @CLOCKS_PER_SEC
%52 = fdiv float %50, %51
%53 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0), i64 %37, i64 %46, float %52)
%54 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%55 = icmp eq i32* %54, null
br i1 %55, label %60, label %56
56: ; preds = %44
%57 = tail call i32 @fwrite(i8* %42, i32 1, i64 %46, i32* %54)
%58 = tail call i32 @fclose(i32* %54)
%59 = tail call i32 @free(i8* %42)
br label %60
60: ; preds = %44, %36, %33, %26, %14, %7, %4, %0, %56
%61 = phi i32 [ 0, %56 ], [ 1, %0 ], [ 2, %4 ], [ 3, %7 ], [ 4, %14 ], [ 5, %26 ], [ 6, %33 ], [ 7, %36 ], [ 8, %44 ]
ret i32 %61
}