#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*/ free(char *);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
void main() {
  char *s = (char *)malloc(strlen("daniel") + 1);
  char *t = (char *)malloc(strlen("ni") + 1);
  strcpy(s, "daniel");
  strcpy(t, "ni");
  squeeze(s, t);
  printf("s=%s \tt=%s\n", s, t);
  free(s);
  free(t);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
call   1060 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x8(%rbp)
lea    0xe7c(%rip),%rdi
call   1060 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xe4c(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <squeeze@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe2e(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x7,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
lea    0xe8b(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcpy@plt>
lea    0xe83(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <squeeze@plt>
lea    0xe6c(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <free@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <free@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"daniel\00"
@.str.1 = [3 x i8] c"ni\00"
@.str.2 = [12 x i8] c"s=%s \09t=%s\0A\00"
define void @main() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i64 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i64 %3, 1
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %1
%7 = call i64 @strlen(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = add nsw i64 %7, 1
%9 = call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %2
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%15 = load i8*, i8** %1
%16 = load i8*, i8** %2
%17 = call i32 @squeeze(i8* %15, i8* %16)
%18 = load i8*, i8** %1
%19 = load i8*, i8** %2
%20 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %18, i8* %19)
%21 = load i8*, i8** %1
%22 = call i32 @free(i8* %21)
%23 = load i8*, i8** %2
%24 = call i32 @free(i8* %23)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"daniel\00"
@.str.1 = [3 x i8] c"ni\00"
@.str.2 = [12 x i8] c"s=%s \09t=%s\0A\00"
define void @main() {
%1 = tail call i64 @malloc(i64 7)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i64 @malloc(i64 3)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @squeeze(i8* %2, i8* %4)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %2, i8* %4)
%9 = tail call i32 @free(i8* %2)
%10 = tail call i32 @free(i8* %4)
ret void
}