#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 build_il(unsigned int *, unsigned int, char *, void **);
char *error_il(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int free_il(void *);
double getTime();
scalar_t__ malloc(int);
int /*<<< orphan*/ print_il_usage(char *);
int read_file(char *, unsigned int **, unsigned int *);
int save_il(void *, char *);
int /*<<< orphan*/ size_il(void *, unsigned int *);
int /*<<< orphan*/ size_il_uncompressed(void *, unsigned int *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(int argc, char *argv[]) {
  char *infile, *outfile;
  unsigned int *source;
  char *params = NULL;
  unsigned int source_len;
  void *index;
  int error, i;
  double start, end;
  if (argc < 3)
    print_il_usage(argv[0]);
  if (argc > 3) {
    int nchars, len;
    nchars = argc - 3;
    for (i = 2; i < argc; i++)
      nchars += strlen(argv[i]);
    params = (char *)malloc((nchars + 1) * sizeof(char));
    params[nchars] = '\0';
    nchars = 0;
    for (i = 3; i < argc; i++) {
      len = strlen(argv[i]);
      strncpy(params + nchars, argv[i], len);
      params[nchars + len] = ' ';
      nchars += len + 1;
    }
    params[nchars - 1] = '\0';
  }
  infile = argv[1];
  outfile = argv[2];
  start = getTime();
  error = read_file(infile, &source, &source_len);
  {{if (error){fprintf(stderr, "%s\n", error_il(error));
  exit(1);
}
}
}
;
error = build_il(source, source_len, params, &index);
{{if (error){fprintf(stderr, "%s\n", error_il(error));
exit(1);
}
}
}
;
error = save_il(index, outfile);
{{if (error){fprintf(stderr, "%s\n", error_il(error));
exit(1);
}
}
}
;
end = getTime();
fprintf(stderr, "Building time: %.3f secs\n", end - start);
unsigned int index_len;
size_il(index, &index_len);
unsigned int index_len_uncompressed;
size_il_uncompressed(index, &index_len_uncompressed);
fprintf(stdout, "Input: %lu bytes --> Output %lu bytes.\n",
        (unsigned long)index_len_uncompressed, (unsigned long)index_len);
fprintf(stdout, "+-Overall compression --> %.2f%% (+-%.2f bytes per post).\n\n",
        (100.0 * index_len) / (index_len_uncompressed),
        (index_len * 4.0) / (index_len_uncompressed));
error = free_il(index);
{{if (error){fprintf(stderr, "%s\n", error_il(error));
exit(1);
}
}
}
;
free(params);
exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x30(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1227 <main+0x37>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <print_il_usage@plt>
cmpl   $0x3,-0x8(%rbp)
jle    131e <main+0x12e>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x5c(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1272 <main+0x82>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <strlen@plt>
add    -0x5c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1241 <main+0x51>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x0,-0x5c(%rbp)
movl   $0x3,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    130d <main+0x11d>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <strlen@plt>
mov    %eax,-0x60(%rbp)
mov    -0x30(%rbp),%rdi
movslq -0x5c(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x60(%rbp),%edx
call   1040 <strncpy@plt>
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
add    -0x5c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12a3 <main+0xb3>
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1070 <getTime@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   10c0 <read_file@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     1392 <main+0x1a2>
mov    0x2c79(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x44(%rbp),%edi
call   1090 <error_il@plt>
mov    -0x6c(%rbp),%edi
mov    %rax,%rdx
lea    0xc8f(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1110 <build_il@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     13e5 <main+0x1f5>
mov    0x2c26(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    -0x44(%rbp),%edi
call   1090 <error_il@plt>
mov    -0x70(%rbp),%edi
mov    %rax,%rdx
lea    0xc3c(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <save_il@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     1431 <main+0x241>
mov    0x2bda(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x74(%rbp)
mov    -0x44(%rbp),%edi
call   1090 <error_il@plt>
mov    -0x74(%rbp),%edi
mov    %rax,%rdx
lea    0xbf0(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
xor    %eax,%eax
mov    %al,-0x81(%rbp)
call   1070 <getTime@plt>
movsd  %xmm0,-0x58(%rbp)
mov    0x2b96(%rip),%rax
mov    (%rax),%edi
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
subsd  %xmm1,%xmm0
lea    0xbb3(%rip),%rsi
mov    $0x1,%al
call   10a0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
lea    -0x64(%rbp),%rsi
call   1100 <size_il@plt>
mov    -0x40(%rbp),%rdi
lea    -0x68(%rbp),%rsi
call   10b0 <size_il_uncompressed@plt>
mov    -0x81(%rbp),%al
mov    0x2b49(%rip),%rcx
mov    %rcx,-0x80(%rbp)
mov    (%rcx),%edi
mov    -0x68(%rbp),%ecx
mov    %ecx,%edx
mov    -0x64(%rbp),%ecx
lea    0xb8a(%rip),%rsi
call   10a0 <fprintf@plt>
mov    -0x80(%rbp),%rax
mov    (%rax),%edi
mov    -0x64(%rbp),%eax
cvtsi2sd %rax,%xmm1
movsd  0xb41(%rip),%xmm2
movaps %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mov    -0x68(%rbp),%eax
cvtsi2sd %rax,%xmm2
divsd  %xmm2,%xmm0
movsd  0xb2e(%rip),%xmm3
mulsd  %xmm3,%xmm1
divsd  %xmm2,%xmm1
lea    0xb6d(%rip),%rsi
mov    $0x2,%al
call   10a0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
call   10e0 <free_il@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     153e <main+0x34e>
mov    0x2ad3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x88(%rbp)
mov    -0x44(%rbp),%edi
call   1090 <error_il@plt>
mov    -0x88(%rbp),%edi
mov    %rax,%rdx
lea    0xae3(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   10f0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r12
cmp    $0x2,%edi
jg     1217 <main+0x27>
mov    (%r12),%rdi
call   1060 <print_il_usage@plt>
xor    %r14d,%r14d
jmp    12bd <main+0xcd>
mov    %edi,%r15d
cmp    $0x3,%edi
jne    1227 <main+0x37>
xor    %r14d,%r14d
jmp    12bd <main+0xcd>
lea    -0x3(%r15),%ebp
mov    %r15d,%r13d
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%rbx,8),%rdi
call   1080 <strlen@plt>
add    %eax,%ebp
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1240 <main+0x50>
lea    0x1(%rbp),%edi
call   10d0 <malloc@plt>
mov    %rax,%r14
movslq %ebp,%rax
movb   $0x0,(%r14,%rax,1)
mov    $0xffffffffffffffff,%rax
cmp    $0x4,%r15d
jl     12b8 <main+0xc8>
xor    %ebp,%ebp
mov    $0x3,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rdi
call   1080 <strlen@plt>
mov    %eax,%r15d
movslq %ebp,%rbp
lea    (%r14,%rbp,1),%rdi
mov    (%r12,%rbx,8),%rsi
mov    %eax,%edx
call   1040 <strncpy@plt>
lea    (%r15,%rbp,1),%eax
cltq
movb   $0x20,(%r14,%rax,1)
add    %r15d,%ebp
add    $0x1,%ebp
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1280 <main+0x90>
movb   $0x0,(%r14,%rax,1)
mov    0x8(%r12),%rbx
mov    0x10(%r12),%r15
xor    %eax,%eax
call   1070 <getTime@plt>
movsd  %xmm0,0x18(%rsp)
lea    0x20(%rsp),%rsi
lea    0x14(%rsp),%rdx
mov    %rbx,%rdi
call   10c0 <read_file@plt>
test   %eax,%eax
jne    13db <main+0x1eb>
mov    0x20(%rsp),%rdi
mov    0x14(%rsp),%esi
lea    0x8(%rsp),%rcx
mov    %r14,%rdx
call   1110 <build_il@plt>
test   %eax,%eax
jne    13db <main+0x1eb>
mov    0x8(%rsp),%rdi
mov    %r15,%rsi
call   1050 <save_il@plt>
test   %eax,%eax
jne    13db <main+0x1eb>
xor    %eax,%eax
call   1070 <getTime@plt>
mov    0x2cb1(%rip),%rbx
mov    (%rbx),%edi
subsd  0x18(%rsp),%xmm0
lea    0xcd6(%rip),%rsi
mov    $0x1,%al
call   10a0 <fprintf@plt>
mov    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1100 <size_il@plt>
mov    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   10b0 <size_il_uncompressed@plt>
mov    0x2c70(%rip),%rbp
mov    0x0(%rbp),%edi
mov    (%rsp),%edx
mov    0x4(%rsp),%ecx
lea    0xcb5(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    0x4(%rsp),%eax
cvtsi2sd %rax,%xmm1
movsd  0xc6c(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    (%rsp),%eax
cvtsi2sd %rax,%xmm2
divsd  %xmm2,%xmm0
mulsd  0xc5c(%rip),%xmm1
divsd  %xmm2,%xmm1
lea    0xc9f(%rip),%rsi
mov    $0x2,%al
call   10a0 <fprintf@plt>
mov    0x8(%rsp),%rdi
call   10e0 <free_il@plt>
test   %eax,%eax
jne    1408 <main+0x218>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    0x2bfe(%rip),%rcx
mov    (%rcx),%ebx
mov    %eax,%edi
call   1090 <error_il@plt>
lea    0xc1e(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    (%rbx),%ebx
jmp    13e4 <main+0x1f4>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [26 x i8] c"Building time: %.3f secs\0A\00"
@stdout = global i32 0
@.str.2 = [40 x i8] c"Input: %lu bytes --> Output %lu bytes.\0A\00"
@.str.3 = [60 x i8] c"+-Overall compression --> %.2f%% (+-%.2f bytes per post).\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %9
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, 3
br i1 %21, label %22, label %27
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = call i32 @print_il_usage(i8* %25)
br label %27
27: ; preds = %22, %2
%28 = load i32, i32* %4
%29 = icmp sgt i32 %28, 3
br i1 %29, label %30, label %102
30: ; preds = %27
%31 = load i32, i32* %4
%32 = sub nsw i32 %31, 3
store i32 %32, i32* %16
store i32 2, i32* %13
br label %33
33: ; preds = %46, %30
%34 = load i32, i32* %13
%35 = load i32, i32* %4
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %49
37: ; preds = %33
%38 = load i8**, i8*** %5
%39 = load i32, i32* %13
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %38, i64 %40
%42 = load i8*, i8** %41
%43 = call i32 @strlen(i8* %42)
%44 = load i32, i32* %16
%45 = add nsw i32 %44, %43
store i32 %45, i32* %16
br label %46
46: ; preds = %37
%47 = load i32, i32* %13
%48 = add nsw i32 %47, 1
store i32 %48, i32* %13
br label %33
49: ; preds = %33
%50 = load i32, i32* %16
%51 = add nsw i32 %50, 1
%52 = sext i32 %51 to i64
%53 = mul i64 %52, 1
%54 = trunc i64 %53 to i32
%55 = call i64 @malloc(i32 %54)
%56 = inttoptr i64 %55 to i8*
store i8* %56, i8** %9
%57 = load i8*, i8** %9
%58 = load i32, i32* %16
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8, i8* %57, i64 %59
store i8 0, i8* %60
store i32 0, i32* %16
store i32 3, i32* %13
br label %61
61: ; preds = %93, %49
%62 = load i32, i32* %13
%63 = load i32, i32* %4
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %96
65: ; preds = %61
%66 = load i8**, i8*** %5
%67 = load i32, i32* %13
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %66, i64 %68
%70 = load i8*, i8** %69
%71 = call i32 @strlen(i8* %70)
store i32 %71, i32* %17
%72 = load i8*, i8** %9
%73 = load i32, i32* %16
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %72, i64 %74
%76 = load i8**, i8*** %5
%77 = load i32, i32* %13
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %76, i64 %78
%80 = load i8*, i8** %79
%81 = load i32, i32* %17
%82 = call i32 @strncpy(i8* %75, i8* %80, i32 %81)
%83 = load i8*, i8** %9
%84 = load i32, i32* %16
%85 = load i32, i32* %17
%86 = add nsw i32 %84, %85
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %83, i64 %87
store i8 32, i8* %88
%89 = load i32, i32* %17
%90 = add nsw i32 %89, 1
%91 = load i32, i32* %16
%92 = add nsw i32 %91, %90
store i32 %92, i32* %16
br label %93
93: ; preds = %65
%94 = load i32, i32* %13
%95 = add nsw i32 %94, 1
store i32 %95, i32* %13
br label %61
96: ; preds = %61
%97 = load i8*, i8** %9
%98 = load i32, i32* %16
%99 = sub nsw i32 %98, 1
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %97, i64 %100
store i8 0, i8* %101
br label %102
102: ; preds = %96, %27
%103 = load i8**, i8*** %5
%104 = getelementptr inbounds i8*, i8** %103, i64 1
%105 = load i8*, i8** %104
store i8* %105, i8** %6
%106 = load i8**, i8*** %5
%107 = getelementptr inbounds i8*, i8** %106, i64 2
%108 = load i8*, i8** %107
store i8* %108, i8** %7
%109 = call double (...) @getTime()
store double %109, double* %14
%110 = load i8*, i8** %6
%111 = call i32 @read_file(i8* %110, i32** %8, i32* %10)
store i32 %111, i32* %12
%112 = load i32, i32* %12
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %120
114: ; preds = %102
%115 = load i32, i32* @stderr
%116 = load i32, i32* %12
%117 = call i8* @error_il(i32 %116)
%118 = call i32 (i32, i8*, ...) @fprintf(i32 %115, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %117)
%119 = call i32 @exit(i32 1)
unreachable
120: ; preds = %102
%121 = load i32*, i32** %8
%122 = load i32, i32* %10
%123 = load i8*, i8** %9
%124 = call i32 @build_il(i32* %121, i32 %122, i8* %123, i8** %11)
store i32 %124, i32* %12
%125 = load i32, i32* %12
%126 = icmp ne i32 %125, 0
br i1 %126, label %127, label %133
127: ; preds = %120
%128 = load i32, i32* @stderr
%129 = load i32, i32* %12
%130 = call i8* @error_il(i32 %129)
%131 = call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %130)
%132 = call i32 @exit(i32 1)
unreachable
133: ; preds = %120
%134 = load i8*, i8** %11
%135 = load i8*, i8** %7
%136 = call i32 @save_il(i8* %134, i8* %135)
store i32 %136, i32* %12
%137 = load i32, i32* %12
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %145
139: ; preds = %133
%140 = load i32, i32* @stderr
%141 = load i32, i32* %12
%142 = call i8* @error_il(i32 %141)
%143 = call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %142)
%144 = call i32 @exit(i32 1)
unreachable
145: ; preds = %133
%146 = call double (...) @getTime()
store double %146, double* %15
%147 = load i32, i32* @stderr
%148 = load double, double* %15
%149 = load double, double* %14
%150 = fsub double %148, %149
%151 = call i32 (i32, i8*, ...) @fprintf(i32 %147, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double %150)
%152 = load i8*, i8** %11
%153 = call i32 @size_il(i8* %152, i32* %18)
%154 = load i8*, i8** %11
%155 = call i32 @size_il_uncompressed(i8* %154, i32* %19)
%156 = load i32, i32* @stdout
%157 = load i32, i32* %19
%158 = zext i32 %157 to i64
%159 = load i32, i32* %18
%160 = zext i32 %159 to i64
%161 = call i32 (i32, i8*, ...) @fprintf(i32 %156, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %158, i64 %160)
%162 = load i32, i32* @stdout
%163 = load i32, i32* %18
%164 = uitofp i32 %163 to double
%165 = fmul double 1.000000e+02, %164
%166 = load i32, i32* %19
%167 = uitofp i32 %166 to double
%168 = fdiv double %165, %167
%169 = load i32, i32* %18
%170 = uitofp i32 %169 to double
%171 = fmul double %170, 4.000000e+00
%172 = load i32, i32* %19
%173 = uitofp i32 %172 to double
%174 = fdiv double %171, %173
%175 = call i32 (i32, i8*, ...) @fprintf(i32 %162, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), double %168, double %174)
%176 = load i8*, i8** %11
%177 = call i32 @free_il(i8* %176)
store i32 %177, i32* %12
%178 = load i32, i32* %12
%179 = icmp ne i32 %178, 0
br i1 %179, label %180, label %186
180: ; preds = %145
%181 = load i32, i32* @stderr
%182 = load i32, i32* %12
%183 = call i8* @error_il(i32 %182)
%184 = call i32 (i32, i8*, ...) @fprintf(i32 %181, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %183)
%185 = call i32 @exit(i32 1)
unreachable
186: ; preds = %145
%187 = load i8*, i8** %9
%188 = call i32 @free(i8* %187)
%189 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [26 x i8] c"Building time: %.3f secs\0A\00"
@stdout = global i32 0
@.str.2 = [40 x i8] c"Input: %lu bytes --> Output %lu bytes.\0A\00"
@.str.3 = [60 x i8] c"+-Overall compression --> %.2f%% (+-%.2f bytes per post).\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = bitcast i32** %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i8** %5 to i8*
%11 = icmp slt i32 %0, 3
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %1
%14 = tail call i32 @print_il_usage(i8* %13)
br label %59
15: ; preds = %2
%16 = icmp eq i32 %0, 3
br i1 %16, label %59, label %17
17: ; preds = %15
%18 = add nsw i32 %0, -3
%19 = zext i32 %0 to i64
br label %20
20: ; preds = %17, %20
%21 = phi i64 [ 2, %17 ], [ %27, %20 ]
%22 = phi i32 [ %18, %17 ], [ %26, %20 ]
%23 = getelementptr inbounds i8*, i8** %1, i64 %21
%24 = load i8*, i8** %23
%25 = tail call i32 @strlen(i8* %24)
%26 = add nsw i32 %25, %22
%27 = add nuw nsw i64 %21, 1
%28 = icmp eq i64 %27, %19
br i1 %28, label %29, label %20
29: ; preds = %20
%30 = add nsw i32 %26, 1
%31 = tail call i64 @malloc(i32 %30)
%32 = inttoptr i64 %31 to i8*
%33 = sext i32 %26 to i64
%34 = getelementptr inbounds i8, i8* %32, i64 %33
store i8 0, i8* %34
%35 = icmp sgt i32 %0, 3
br i1 %35, label %36, label %56
36: ; preds = %29
%37 = zext i32 %0 to i64
br label %38
38: ; preds = %36, %38
%39 = phi i64 [ 3, %36 ], [ %52, %38 ]
%40 = phi i32 [ 0, %36 ], [ %51, %38 ]
%41 = getelementptr inbounds i8*, i8** %1, i64 %39
%42 = load i8*, i8** %41
%43 = tail call i32 @strlen(i8* %42)
%44 = sext i32 %40 to i64
%45 = getelementptr inbounds i8, i8* %32, i64 %44
%46 = load i8*, i8** %41
%47 = tail call i32 @strncpy(i8* %45, i8* %46, i32 %43)
%48 = add i32 %43, %40
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %32, i64 %49
store i8 32, i8* %50
%51 = add i32 %48, 1
%52 = add nuw nsw i64 %39, 1
%53 = icmp eq i64 %52, %37
br i1 %53, label %54, label %38
54: ; preds = %38
%55 = sext i32 %48 to i64
br label %56
56: ; preds = %54, %29
%57 = phi i64 [ -1, %29 ], [ %55, %54 ]
%58 = getelementptr inbounds i8, i8* %32, i64 %57
store i8 0, i8* %58
br label %59
59: ; preds = %12, %56, %15
%60 = phi i8* [ %32, %56 ], [ null, %15 ], [ null, %12 ]
%61 = getelementptr inbounds i8*, i8** %1, i64 1
%62 = load i8*, i8** %61
%63 = getelementptr inbounds i8*, i8** %1, i64 2
%64 = load i8*, i8** %63
%65 = tail call double (...) @getTime()
%66 = call i32 @read_file(i8* %62, i32** %3, i32* %4)
%67 = icmp eq i32 %66, 0
br i1 %67, label %73, label %68
68: ; preds = %59
%69 = load i32, i32* @stderr
%70 = call i8* @error_il(i32 %66)
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %70)
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %59
%74 = load i32*, i32** %3
%75 = load i32, i32* %4
%76 = call i32 @build_il(i32* %74, i32 %75, i8* %60, i8** %5)
%77 = icmp eq i32 %76, 0
br i1 %77, label %83, label %78
78: ; preds = %73
%79 = load i32, i32* @stderr
%80 = call i8* @error_il(i32 %76)
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %80)
%82 = call i32 @exit(i32 1)
unreachable
83: ; preds = %73
%84 = load i8*, i8** %5
%85 = call i32 @save_il(i8* %84, i8* %64)
%86 = icmp eq i32 %85, 0
br i1 %86, label %92, label %87
87: ; preds = %83
%88 = load i32, i32* @stderr
%89 = call i8* @error_il(i32 %85)
%90 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %89)
%91 = call i32 @exit(i32 1)
unreachable
92: ; preds = %83
%93 = call double (...) @getTime()
%94 = load i32, i32* @stderr
%95 = fsub double %93, %65
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double %95)
%97 = bitcast i32* %6 to i8*
%98 = load i8*, i8** %5
%99 = call i32 @size_il(i8* %98, i32* %6)
%100 = bitcast i32* %7 to i8*
%101 = load i8*, i8** %5
%102 = call i32 @size_il_uncompressed(i8* %101, i32* %7)
%103 = load i32, i32* @stdout
%104 = load i32, i32* %7
%105 = zext i32 %104 to i64
%106 = load i32, i32* %6
%107 = zext i32 %106 to i64
%108 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %105, i64 %107)
%109 = load i32, i32* @stdout
%110 = load i32, i32* %6
%111 = uitofp i32 %110 to double
%112 = fmul double %111, 1.000000e+02
%113 = load i32, i32* %7
%114 = uitofp i32 %113 to double
%115 = fdiv double %112, %114
%116 = fmul double %111, 4.000000e+00
%117 = fdiv double %116, %114
%118 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), double %115, double %117)
%119 = load i8*, i8** %5
%120 = call i32 @free_il(i8* %119)
%121 = icmp eq i32 %120, 0
br i1 %121, label %127, label %122
122: ; preds = %92
%123 = load i32, i32* @stderr
%124 = call i8* @error_il(i32 %120)
%125 = call i32 (i32, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %124)
%126 = call i32 @exit(i32 1)
unreachable
127: ; preds = %92
%128 = call i32 @free(i8* %60)
%129 = call i32 @exit(i32 0)
unreachable
}