#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 *);
int main() {
  char s1[] = "Kernighan";
  char s2[] = "Ritchie";
  char s3[] = "Earth";
  char s4[] = "Venus";
  char s5[] = "UNIX";
  char s6[] = "LINUX";
  printf("%s\t\t\t\t%s\t%s\n", "Test", "Expected", "Actual");
  printf("%s\t\t\t\t%s\t%s\n", "----", "--------", "------");
  printf("%s\t%s\t\t", "squeeze(\"Kernighan\", \"Ritchie\")", "Krngan");
  squeeze(s1, s2);
  printf("%s\n", s1);
  printf("%s\t%s\t\t", "squeeze(\"Earth\", \"Venus\")", "Earth");
  squeeze(s3, s4);
  printf("%s\n", s3);
  printf("%s\t%s\t\t", "squeeze(\"UNIX\", \"LINUX\")", "");
  squeeze(s5, s6);
  printf("%s\n", s5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x16(%rbp)
mov    0xebc(%rip),%eax
mov    %eax,-0x1c(%rbp)
mov    0xeb6(%rip),%ax
mov    %ax,-0x18(%rbp)
mov    0xeae(%rip),%eax
mov    %eax,-0x22(%rbp)
mov    0xea8(%rip),%ax
mov    %ax,-0x1e(%rbp)
mov    0xea0(%rip),%eax
mov    %eax,-0x27(%rbp)
mov    0xe9b(%rip),%al
mov    %al,-0x23(%rbp)
mov    0xe93(%rip),%eax
mov    %eax,-0x2d(%rbp)
mov    0xe8d(%rip),%ax
mov    %ax,-0x29(%rbp)
lea    0xe84(%rip),%rdi
lea    0xe8a(%rip),%rsi
lea    0xe88(%rip),%rdx
lea    0xe8a(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe61(%rip),%rdi
lea    0xe80(%rip),%rsi
lea    0xe75(%rip),%rdx
lea    0xe70(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe69(%rip),%rdi
lea    0xe6a(%rip),%rsi
lea    0xe83(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xe(%rbp),%rdi
lea    -0x16(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0xe(%rbp),%rsi
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe2e(%rip),%rdi
lea    0xe56(%rip),%rsi
lea    0xdde(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1c(%rbp),%rdi
lea    -0x22(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x1c(%rbp),%rsi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf3(%rip),%rdi
lea    0xe35(%rip),%rsi
lea    0xdec(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x27(%rbp),%rdi
lea    -0x2d(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x27(%rbp),%rsi
lea    0xda4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
movabs $0x616867696e72654b,%rax
67 68 61
mov    %rax,0x20(%rsp)
movw   $0x6e,0x28(%rsp)
movabs $0x65696863746952,%rax
mov    %rax,0x30(%rsp)
movw   $0x68,0x1c(%rsp)
movl   $0x74726145,0x18(%rsp)
74
lea    0xf29(%rip),%r14
movw   $0x73,0x14(%rsp)
movl   $0x756e6556,0x10(%rsp)
75
movb   $0x0,0x4(%rsp)
movl   $0x58494e55,(%rsp)
movw   $0x58,0xc(%rsp)
movl   $0x554e494c,0x8(%rsp)
55
lea    0xe84(%rip),%rbx
lea    0xe8a(%rip),%rsi
lea    0xe88(%rip),%rdx
lea    0xe8a(%rip),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe84(%rip),%rsi
lea    0xe79(%rip),%rdx
lea    0xe74(%rip),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6a(%rip),%r15
lea    0xe6b(%rip),%rsi
lea    0xe84(%rip),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x20(%rsp),%rbx
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xe17(%rip),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe54(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe41(%rip),%rsi
lea    0xdf2(%rip),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.s1 = [10 x i8] c"Kernighan\00"
@__const.main.s2 = [8 x i8] c"Ritchie\00"
@__const.main.s3 = [6 x i8] c"Earth\00"
@__const.main.s4 = [6 x i8] c"Venus\00"
@__const.main.s5 = [5 x i8] c"UNIX\00"
@__const.main.s6 = [6 x i8] c"LINUX\00"
@.str = [13 x i8] c"%s\09\09\09\09%s\09%s\0A\00"
@.str.1 = [5 x i8] c"Test\00"
@.str.2 = [9 x i8] c"Expected\00"
@.str.3 = [7 x i8] c"Actual\00"
@.str.4 = [5 x i8] c"----\00"
@.str.5 = [9 x i8] c"--------\00"
@.str.6 = [7 x i8] c"------\00"
@.str.7 = [8 x i8] c"%s\09%s\09\09\00"
@.str.8 = [32 x i8] c"squeeze(\22Kernighan\22, \22Ritchie\22)\00"
@.str.9 = [7 x i8] c"Krngan\00"
@.str.10 = [4 x i8] c"%s\0A\00"
@.str.11 = [26 x i8] c"squeeze(\22Earth\22, \22Venus\22)\00"
@.str.12 = [6 x i8] c"Earth\00"
@.str.13 = [25 x i8] c"squeeze(\22UNIX\22, \22LINUX\22)\00"
@.str.14 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca [8 x i8]
%4 = alloca [6 x i8]
%5 = alloca [6 x i8]
%6 = alloca [5 x i8]
%7 = alloca [6 x i8]
store i32 0, i32* %1
%8 = bitcast [10 x i8]* %2 to i8*
%9 = bitcast [8 x i8]* %3 to i8*
%10 = bitcast [6 x i8]* %4 to i8*
%11 = bitcast [6 x i8]* %5 to i8*
%12 = bitcast [5 x i8]* %6 to i8*
%13 = bitcast [6 x i8]* %7 to i8*
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%19 = call i32 @squeeze(i8* %17, i8* %18)
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%21 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %20)
%22 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%24 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%25 = call i32 @squeeze(i8* %23, i8* %24)
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%27 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %26)
%28 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0))
%29 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%30 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%31 = call i32 @squeeze(i8* %29, i8* %30)
%32 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%33 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %32)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [10 x i8] c"Kernighan\00"
@__const.main.s4 = [6 x i8] c"Venus\00"
@__const.main.s5 = [5 x i8] c"UNIX\00"
@__const.main.s6 = [6 x i8] c"LINUX\00"
@.str = [13 x i8] c"%s\09\09\09\09%s\09%s\0A\00"
@.str.1 = [5 x i8] c"Test\00"
@.str.2 = [9 x i8] c"Expected\00"
@.str.3 = [7 x i8] c"Actual\00"
@.str.4 = [5 x i8] c"----\00"
@.str.5 = [9 x i8] c"--------\00"
@.str.6 = [7 x i8] c"------\00"
@.str.7 = [8 x i8] c"%s\09%s\09\09\00"
@.str.8 = [32 x i8] c"squeeze(\22Kernighan\22, \22Ritchie\22)\00"
@.str.9 = [7 x i8] c"Krngan\00"
@.str.10 = [4 x i8] c"%s\0A\00"
@.str.11 = [26 x i8] c"squeeze(\22Earth\22, \22Venus\22)\00"
@.str.12 = [6 x i8] c"Earth\00"
@.str.13 = [25 x i8] c"squeeze(\22UNIX\22, \22LINUX\22)\00"
@.str.14 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca i64
%3 = alloca [6 x i8]
%4 = alloca [6 x i8]
%5 = alloca [5 x i8]
%6 = alloca [6 x i8]
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%8 = bitcast i64* %2 to i8*
store i64 28544869713865042, i64* %2
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%13 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%15 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 @squeeze(i8* %7, i8* %8)
%17 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %7)
%18 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%19 = call i32 @squeeze(i8* %9, i8* %10)
%20 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %9)
%21 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0))
%22 = call i32 @squeeze(i8* %11, i8* %12)
%23 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %11)
ret i32 0
}