#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*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
main() {
  char test1[] = "a man a plan a boat a can deaf fred";
  char test2[] = "abc";
  char test3[] = "def";
  printf("%s\n", test1);
  squeeze(test1, test2);
  printf("%s\n", test1);
  squeeze(test1, test3);
  printf("%s\n", test1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x24,%edx
call   1050 <memcpy@plt>
mov    0xeca(%rip),%eax
mov    %eax,-0x34(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x38(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    -0x34(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x30(%rbp),%rsi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x30(%rbp),%rsi
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x646572,0x30(%rsp)
movl   $0x636261,0xc(%rsp)
movl   $0x666564,0x8(%rsp)
lea    0xec6(%rip),%r14
lea    0x10(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.test1 = [36 x i8] c"a man a plan a boat a can deaf fred\00"
@__const.main.test2 = [4 x i8] c"abc\00"
@__const.main.test3 = [4 x i8] c"def\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [36 x i8]
%3 = alloca [4 x i8]
%4 = alloca [4 x i8]
store i32 0, i32* %1
%5 = bitcast [36 x i8]* %2 to i8*
%6 = bitcast [4 x i8]* %3 to i8*
%7 = bitcast [4 x i8]* %4 to i8*
%8 = getelementptr inbounds [36 x i8], [36 x i8]* %2, 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 = getelementptr inbounds [36 x i8], [36 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%12 = call i32 @squeeze(i8* %10, i8* %11)
%13 = getelementptr inbounds [36 x i8], [36 x i8]* %2, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [36 x i8], [36 x i8]* %2, i64 0, i64 0
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%17 = call i32 @squeeze(i8* %15, i8* %16)
%18 = getelementptr inbounds [36 x i8], [36 x i8]* %2, i64 0, i64 0
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
ret i32 0
}

LLVM IR (-O2):
@__const.main.test1 = [36 x i8] c"a man a plan a boat a can deaf fred\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [36 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = getelementptr inbounds [36 x i8], [36 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
store i32 6513249, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 6710628, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%8 = call i32 @squeeze(i8* %4, i8* %5)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = call i32 @squeeze(i8* %4, i8* %6)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}