#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 *, ...);
int /*<<< orphan*/ squeeze(char *, char *);
int main() {
  char a[6] = {'a', 'b', 'c', 'c', 'd', 0};
  char b[3] = {'c', 'b', 0};
  printf("Before function call...\n");
  printf("a = %s\n", a);
  printf("b = %s\n", b);
  squeeze(a, b);
  printf("After function call...\n");
  printf("a = %s\n", a);
  printf("b = %s\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xebc(%rip),%ax
mov    %ax,-0xd(%rbp)
mov    0xeb4(%rip),%al
mov    %al,-0xb(%rbp)
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xa(%rbp),%rsi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xd(%rbp),%rsi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xa(%rbp),%rdi
lea    -0xd(%rbp),%rsi
call   1030 <squeeze@plt>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xa(%rbp),%rsi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xd(%rbp),%rsi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movw   $0x64,0x14(%rsp)
movl   $0x63636261,0x10(%rsp)
63
movb   $0x0,0xe(%rsp)
movw   $0x6263,0xc(%rsp)
lea    0xebc(%rip),%rdi
call   1040 <puts@plt>
lea    0xea0(%rip),%r14
lea    0x10(%rsp),%r12
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8f(%rip),%r15
lea    0xc(%rsp),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <squeeze@plt>
lea    0xe8b(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.a = [6 x i8] c"abccd\00"
@__const.main.b = [3 x i8] c"cb\00"
@.str = [25 x i8] c"Before function call...\0A\00"
@.str.1 = [8 x i8] c"a = %s\0A\00"
@.str.2 = [8 x i8] c"b = %s\0A\00"
@.str.3 = [24 x i8] c"After function call...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [3 x i8]
store i32 0, i32* %1
%4 = bitcast [6 x i8]* %2 to i8*
%5 = bitcast [3 x i8]* %3 to i8*
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%13 = call i32 @squeeze(i8* %11, i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %17)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [6 x i8] c"abccd\00"
@__const.main.b = [3 x i8] c"cb\00"
@.str.1 = [8 x i8] c"a = %s\0A\00"
@.str.2 = [8 x i8] c"b = %s\0A\00"
@str = [24 x i8] c"Before function call...\00"
@str.4 = [23 x i8] c"After function call...\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%8 = call i32 @squeeze(i8* %3, i8* %4)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}