#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 /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ make7BitString(unsigned char *, char const *);
size_t makeByteArray(unsigned char *, char *, size_t);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char const *);
size_t compress(const char *text, unsigned char *compressed,
                size_t compressedSize) {
  size_t i;
  size_t inLen = strlen(text);
  size_t bufferLen = (compressedSize + 1) * (8);
  char buffer[bufferLen + 1];
  memset(buffer, 0, sizeof(buffer));
  int fallback = 0;
  for (i = 0; i < inLen; i++) {
    char c = text[i];
    switch (c) {
    case ':':
      strcat(buffer, "101");
      break;
    case '0':
      strcat(buffer, "011");
      break;
    case '7':
      strcat(buffer, "1101");
      break;
    case '6':
      strcat(buffer, "1100");
      break;
    case 'a':
      strcat(buffer, "0010");
      break;
    case '9':
      strcat(buffer, "0001");
      break;
    case '2':
      strcat(buffer, "0000");
      break;
    case '3':
      strcat(buffer, "1001");
      break;
    case '1':
      strcat(buffer, "0100");
      break;
    case '.':
      strcat(buffer, "0101");
      break;
    case '4':
      strcat(buffer, "0011");
      break;
    case '-':
      strcat(buffer, "10000");
      break;
    case '5':
      strcat(buffer, "11110");
      break;
    case 'f':
      strcat(buffer, "11101");
      break;
    case '8':
      strcat(buffer, "11100");
      break;
    case 'e':
      strcat(buffer, "111110");
      break;
    case 'b':
      strcat(buffer, "111111");
      break;
    case '#':
      strcat(buffer, "100010");
      break;
    case 'd':
      strcat(buffer, "1000111");
      break;
    case 'c':
      strcat(buffer, "10001101");
      break;
    case '\3':
      strcat(buffer, "10001100");
      break;
    default:
      printf("uncompressible character: %c\n", c);
      fallback = 1;
      break;
    }
    if (strlen(buffer) >= bufferLen) {
      printf("too big!!\n");
      break;
    }
  }
  strcat(buffer, "10001100");
  strcat(buffer, "10001100");
  size_t outLen = strlen(buffer);
  size_t byteC = makeByteArray(compressed, buffer, outLen);
  if ((inLen < byteC) || fallback) {
    make7BitString((unsigned char *)buffer, text);
    strcpy((char *)compressed, "3");
    strcat((char *)compressed, buffer);
    byteC = strlen((char *)compressed);
  }
  return byteC;
}


x86 assembly (clang, -O0):
<compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
lea    0x8(,%rax,8),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    %rcx,%rax
add    $0x1,%rax
mov    %rsp,%rdx
mov    %rdx,-0x38(%rbp)
add    $0x10,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x60(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x40(%rbp)
mov    %eax,%edx
xor    %esi,%esi
call   1070 <memset@plt>
movl   $0x0,-0x44(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1438 <compress+0x2c8>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x45(%rbp)
movsbl -0x45(%rbp),%eax
add    $0xfffffffd,%eax
mov    %eax,%ecx
mov    %rcx,-0x68(%rbp)
sub    $0x63,%eax
ja     13e3 <compress+0x273>
mov    -0x68(%rbp),%rax
lea    0xddf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x60(%rbp),%rdi
lea    0xf6b(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xf5b(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xf7d(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xf71(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xf42(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xef2(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xef7(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xecd(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe9d(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe8b(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe69(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe5a(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe4b(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe3d(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe2f(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe21(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe14(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
mov    -0x60(%rbp),%rdi
lea    0xe08(%rip),%rsi
call   1090 <strcat@plt>
jmp    13fc <compress+0x28c>
movsbl -0x45(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x44(%rbp)
mov    -0x60(%rbp),%rdi
call   1050 <strlen@plt>
cmp    -0x30(%rbp),%rax
jb     1422 <compress+0x2b2>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1438 <compress+0x2c8>
jmp    1427 <compress+0x2b7>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11e4 <compress+0x74>
mov    -0x60(%rbp),%rdi
lea    0xd9e(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x60(%rbp),%rdi
lea    0xd8e(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x60(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x60(%rbp),%rsi
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x50(%rbp),%rdx
call   1080 <makeByteArray@plt>
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x58(%rbp),%rax
jb     1492 <compress+0x322>
cmpl   $0x0,-0x44(%rbp)
je     14c9 <compress+0x359>
mov    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <make7BitString@plt>
mov    -0x10(%rbp),%rdi
lea    0xd69(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x60(%rbp),%rsi
mov    -0x10(%rbp),%rdi
call   1090 <strcat@plt>
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compress>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r13
mov    %rsi,-0x40(%rbp)
mov    %rdi,-0x38(%rbp)
call   1060 <strlen@plt>
mov    %rax,%r12
lea    0x0(,%r13,8),%rdx
add    $0x9,%edx
mov    %rsp,%rbx
lea    0x18(,%r13,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
movl   $0x0,-0x2c(%rbp)
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
test   %r12,%r12
je     137d <compress+0x1fd>
lea    0x8(,%r13,8),%r13
lea    0xe13(%rip),%r14
xor    %r15d,%r15d
movl   $0x0,-0x2c(%rbp)
nopw   0x0(%rax,%rax,1)
mov    -0x38(%rbp),%rax
movsbl (%rax,%r15,1),%esi
lea    -0x3(%rsi),%eax
cmp    $0x63,%eax
ja     1229 <compress+0xa9>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    %rbx,%rdi
lea    0xfbd(%rip),%rsi
jmp    1350 <compress+0x1d0>
lea    0xfba(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movl   $0x1,-0x2c(%rbp)
jmp    1355 <compress+0x1d5>
mov    %rbx,%rdi
lea    0xf7c(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xf4d(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xf34(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xf2b(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xf11(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xf12(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xeee(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xeee(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xef7(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xf11(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xefc(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xec9(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xe98(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xe9c(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xebb(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xea6(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xeb0(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xe9c(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xe7b(%rip),%rsi
jmp    1350 <compress+0x1d0>
mov    %rbx,%rdi
lea    0xe63(%rip),%rsi
nopl   0x0(%rax)
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cmp    %r13,%rax
jae    1371 <compress+0x1f1>
add    $0x1,%r15
cmp    %r15,%r12
jne    1200 <compress+0x80>
jmp    137d <compress+0x1fd>
lea    0xe92(%rip),%rdi
call   1040 <puts@plt>
lea    0xe5d(%rip),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    -0x40(%rbp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1090 <makeByteArray@plt>
cmp    %rax,%r12
jb     13bf <compress+0x23f>
cmpl   $0x0,-0x2c(%rbp)
je     13ed <compress+0x26d>
mov    %rbx,%rdi
mov    -0x38(%rbp),%rsi
call   1050 <make7BitString@plt>
lea    0xe36(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   10a0 <strcat@plt>
mov    %r14,%rdi
call   1060 <strlen@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"101\00"
@.str.1 = [4 x i8] c"011\00"
@.str.2 = [5 x i8] c"1101\00"
@.str.3 = [5 x i8] c"1100\00"
@.str.4 = [5 x i8] c"0010\00"
@.str.5 = [5 x i8] c"0001\00"
@.str.6 = [5 x i8] c"0000\00"
@.str.7 = [5 x i8] c"1001\00"
@.str.8 = [5 x i8] c"0100\00"
@.str.9 = [5 x i8] c"0101\00"
@.str.10 = [5 x i8] c"0011\00"
@.str.11 = [6 x i8] c"10000\00"
@.str.12 = [6 x i8] c"11110\00"
@.str.13 = [6 x i8] c"11101\00"
@.str.14 = [6 x i8] c"11100\00"
@.str.15 = [7 x i8] c"111110\00"
@.str.16 = [7 x i8] c"111111\00"
@.str.17 = [7 x i8] c"100010\00"
@.str.18 = [8 x i8] c"1000111\00"
@.str.19 = [9 x i8] c"10001101\00"
@.str.20 = [9 x i8] c"10001100\00"
@.str.21 = [30 x i8] c"uncompressible character: %c\0A\00"
@.str.22 = [11 x i8] c"too big!!\0A\00"
@.str.23 = [2 x i8] c"3\00"
define i64 @compress(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i32
%13 = alloca i8
%14 = alloca i64
%15 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%16 = load i8*, i8** %4
%17 = call i64 @strlen(i8* %16)
store i64 %17, i64* %8
%18 = load i64, i64* %6
%19 = add i64 %18, 1
%20 = mul i64 %19, 8
store i64 %20, i64* %9
%21 = load i64, i64* %9
%22 = add i64 %21, 1
%23 = call i8* @llvm.stacksave()
store i8* %23, i8** %10
%24 = alloca i8, i64 %22
store i64 %22, i64* %11
%25 = trunc i64 %22 to i32
%26 = call i32 @memset(i8* %24, i32 0, i32 %25)
store i32 0, i32* %12
store i64 0, i64* %7
br label %27
27: ; preds = %91, %3
%28 = load i64, i64* %7
%29 = load i64, i64* %8
%30 = icmp ult i64 %28, %29
br i1 %30, label %31, label %94
31: ; preds = %27
%32 = load i8*, i8** %4
%33 = load i64, i64* %7
%34 = getelementptr inbounds i8, i8* %32, i64 %33
%35 = load i8, i8* %34
store i8 %35, i8* %13
%36 = load i8, i8* %13
%37 = sext i8 %36 to i32
switch i32 %37, label %80 [
i32 58, label %38
i32 48, label %40
i32 55, label %42
i32 54, label %44
i32 97, label %46
i32 57, label %48
i32 50, label %50
i32 51, label %52
i32 49, label %54
i32 46, label %56
i32 52, label %58
i32 45, label %60
i32 53, label %62
i32 102, label %64
i32 56, label %66
i32 101, label %68
i32 98, label %70
i32 35, label %72
i32 100, label %74
i32 99, label %76
i32 3, label %78
]
38: ; preds = %31
%39 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %84
40: ; preds = %31
%41 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %84
42: ; preds = %31
%43 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %84
44: ; preds = %31
%45 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %84
46: ; preds = %31
%47 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %84
48: ; preds = %31
%49 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %84
50: ; preds = %31
%51 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %84
52: ; preds = %31
%53 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %84
54: ; preds = %31
%55 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %84
56: ; preds = %31
%57 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
br label %84
58: ; preds = %31
%59 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %84
60: ; preds = %31
%61 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %84
62: ; preds = %31
%63 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
br label %84
64: ; preds = %31
%65 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
br label %84
66: ; preds = %31
%67 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %84
68: ; preds = %31
%69 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
br label %84
70: ; preds = %31
%71 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %84
72: ; preds = %31
%73 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
br label %84
74: ; preds = %31
%75 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
br label %84
76: ; preds = %31
%77 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0))
br label %84
78: ; preds = %31
%79 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
br label %84
80: ; preds = %31
%81 = load i8, i8* %13
%82 = sext i8 %81 to i32
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0), i32 %82)
store i32 1, i32* %12
br label %84
84: ; preds = %80, %78, %76, %74, %72, %70, %68, %66, %64, %62, %60, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38
%85 = call i64 @strlen(i8* %24)
%86 = load i64, i64* %9
%87 = icmp uge i64 %85, %86
br i1 %87, label %88, label %90
88: ; preds = %84
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.22, i64 0, i64 0))
br label %94
90: ; preds = %84
br label %91
91: ; preds = %90
%92 = load i64, i64* %7
%93 = add i64 %92, 1
store i64 %93, i64* %7
br label %27
94: ; preds = %88, %27
%95 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%96 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%97 = call i64 @strlen(i8* %24)
store i64 %97, i64* %14
%98 = load i8*, i8** %5
%99 = load i64, i64* %14
%100 = call i64 @makeByteArray(i8* %98, i8* %24, i64 %99)
store i64 %100, i64* %15
%101 = load i64, i64* %8
%102 = load i64, i64* %15
%103 = icmp ult i64 %101, %102
br i1 %103, label %107, label %104
104: ; preds = %94
%105 = load i32, i32* %12
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %116
107: ; preds = %104, %94
%108 = load i8*, i8** %4
%109 = call i32 @make7BitString(i8* %24, i8* %108)
%110 = load i8*, i8** %5
%111 = call i32 @strcpy(i8* %110, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%112 = load i8*, i8** %5
%113 = call i32 @strcat(i8* %112, i8* %24)
%114 = load i8*, i8** %5
%115 = call i64 @strlen(i8* %114)
store i64 %115, i64* %15
br label %116
116: ; preds = %107, %104
%117 = load i64, i64* %15
%118 = load i8*, i8** %10
ret i64 %117
}

LLVM IR (-O2):
@.str = [4 x i8] c"101\00"
@.str.1 = [4 x i8] c"011\00"
@.str.2 = [5 x i8] c"1101\00"
@.str.3 = [5 x i8] c"1100\00"
@.str.4 = [5 x i8] c"0010\00"
@.str.5 = [5 x i8] c"0001\00"
@.str.6 = [5 x i8] c"0000\00"
@.str.7 = [5 x i8] c"1001\00"
@.str.8 = [5 x i8] c"0100\00"
@.str.9 = [5 x i8] c"0101\00"
@.str.10 = [5 x i8] c"0011\00"
@.str.11 = [6 x i8] c"10000\00"
@.str.12 = [6 x i8] c"11110\00"
@.str.13 = [6 x i8] c"11101\00"
@.str.14 = [6 x i8] c"11100\00"
@.str.15 = [7 x i8] c"111110\00"
@.str.16 = [7 x i8] c"111111\00"
@.str.17 = [7 x i8] c"100010\00"
@.str.18 = [8 x i8] c"1000111\00"
@.str.19 = [9 x i8] c"10001101\00"
@.str.20 = [9 x i8] c"10001100\00"
@.str.21 = [30 x i8] c"uncompressible character: %c\0A\00"
@.str.23 = [2 x i8] c"3\00"
@str = [10 x i8] c"too big!!\00"
define i64 @compress(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = shl i64 %2, 3
%6 = add i64 %5, 8
%7 = add i64 %5, 9
%8 = alloca i8, i64 %7
%9 = trunc i64 %7 to i32
%10 = call i32 @memset(i8* %8, i32 0, i32 %9)
%11 = icmp eq i64 %4, 0
br i1 %11, label %71, label %14
12: ; preds = %64
%13 = icmp eq i64 %68, %4
br i1 %13, label %71, label %14
14: ; preds = %3, %12
%15 = phi i64 [ %68, %12 ], [ 0, %3 ]
%16 = phi i32 [ %65, %12 ], [ 0, %3 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %15
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
switch i32 %19, label %62 [
i32 58, label %20
i32 48, label %22
i32 55, label %24
i32 54, label %26
i32 97, label %28
i32 57, label %30
i32 50, label %32
i32 51, label %34
i32 49, label %36
i32 46, label %38
i32 52, label %40
i32 45, label %42
i32 53, label %44
i32 102, label %46
i32 56, label %48
i32 101, label %50
i32 98, label %52
i32 35, label %54
i32 100, label %56
i32 99, label %58
i32 3, label %60
]
20: ; preds = %14
%21 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %64
22: ; preds = %14
%23 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %64
24: ; preds = %14
%25 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %64
26: ; preds = %14
%27 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %64
28: ; preds = %14
%29 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %64
30: ; preds = %14
%31 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %64
32: ; preds = %14
%33 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %64
34: ; preds = %14
%35 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %64
36: ; preds = %14
%37 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %64
38: ; preds = %14
%39 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
br label %64
40: ; preds = %14
%41 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %64
42: ; preds = %14
%43 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %64
44: ; preds = %14
%45 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
br label %64
46: ; preds = %14
%47 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
br label %64
48: ; preds = %14
%49 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %64
50: ; preds = %14
%51 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
br label %64
52: ; preds = %14
%53 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %64
54: ; preds = %14
%55 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
br label %64
56: ; preds = %14
%57 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
br label %64
58: ; preds = %14
%59 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0))
br label %64
60: ; preds = %14
%61 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
br label %64
62: ; preds = %14
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0), i32 %19)
br label %64
64: ; preds = %62, %60, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20
%65 = phi i32 [ 1, %62 ], [ %16, %60 ], [ %16, %58 ], [ %16, %56 ], [ %16, %54 ], [ %16, %52 ], [ %16, %50 ], [ %16, %48 ], [ %16, %46 ], [ %16, %44 ], [ %16, %42 ], [ %16, %40 ], [ %16, %38 ], [ %16, %36 ], [ %16, %34 ], [ %16, %32 ], [ %16, %30 ], [ %16, %28 ], [ %16, %26 ], [ %16, %24 ], [ %16, %22 ], [ %16, %20 ]
%66 = call i64 @strlen(i8* %8)
%67 = icmp ult i64 %66, %6
%68 = add nuw i64 %15, 1
br i1 %67, label %12, label %69
69: ; preds = %64
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %71
71: ; preds = %12, %3, %69
%72 = phi i32 [ %65, %69 ], [ 0, %3 ], [ %65, %12 ]
%73 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%74 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%75 = call i64 @strlen(i8* %8)
%76 = call i64 @makeByteArray(i8* %1, i8* %8, i64 %75)
%77 = icmp ult i64 %4, %76
%78 = icmp ne i32 %72, 0
%79 = select i1 %77, i1 true, i1 %78
br i1 %79, label %80, label %85
80: ; preds = %71
%81 = call i32 @make7BitString(i8* %8, i8* %0)
%82 = call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%83 = call i32 @strcat(i8* %1, i8* %8)
%84 = call i64 @strlen(i8* dereferenceable(1) %1)
br label %85
85: ; preds = %71, %80
%86 = phi i64 [ %84, %80 ], [ %76, %71 ]
ret i64 %86
}