#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*/ compress(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char str[] = "aaaaaaaaaaaaaaabbbcccd";
  printf("%s\n", str);
  compress(str);
  printf("%s\n", str);
  char str1[] = "abcdefg";
  printf("%s\n", str1);
  compress(str);
  printf("%s\n", str1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec6(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xebe(%rip),%al
mov    %al,-0xa(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <compress@plt>
lea    -0x20(%rbp),%rsi
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    0xe90(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x28(%rbp),%rsi
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <compress@plt>
lea    -0x28(%rbp),%rsi
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x64636363626262,%rax
mov    %rax,0x1f(%rsp)
lea    0xecc(%rip),%r14
lea    0x10(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <compress@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
movabs $0x67666564636261,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <compress@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.str = [23 x i8] c"aaaaaaaaaaaaaaabbbcccd\00"
@.str = [4 x i8] c"%s\0A\00"
@__const.main.str1 = [8 x i8] c"abcdefg\00"
define i32 @main() {
%1 = alloca [23 x i8]
%2 = alloca [8 x i8]
%3 = bitcast [23 x i8]* %1 to i8*
%4 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%7 = call i32 @compress(i8* %6)
%8 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = bitcast [8 x i8]* %2 to i8*
%11 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%14 = call i32 @compress(i8* %13)
%15 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %15)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [23 x i8] c"aaaaaaaaaaaaaaabbbcccd\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [23 x i8]
%2 = alloca i64
%3 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @compress(i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = bitcast i64* %2 to i8*
store i64 29104508263162465, i64* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @compress(i8* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}