#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*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char fuente1[17], fuente2[17], destino[60];
  strcpy(fuente1, " Esta es la primera fuente");
  strcpy(fuente2, " Este es la segunda fuente ");
  strcpy(destino, "Este es el destino ");
  strcat(destino, fuente1);
  strcat(destino, fuente2);
  printf("Cadena de destino final: ++%s++ \n", destino);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x80(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x80(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x80(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x80(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
lea    0xebd(%rip),%rsi
lea    0x20(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
call   1030 <strcpy@plt>
lea    0xece(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcat@plt>
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c" Esta es la primera fuente\00"
@.str.1 = [28 x i8] c" Este es la segunda fuente \00"
@.str.2 = [20 x i8] c"Este es el destino \00"
@.str.3 = [34 x i8] c"Cadena de destino final: ++%s++ \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [17 x i8]
%3 = alloca [17 x i8]
%4 = alloca [60 x i8]
store i32 0, i32* %1
%5 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%9 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%13 = call i32 @strcat(i8* %11, i8* %12)
%14 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%16 = call i32 @strcat(i8* %14, i8* %15)
%17 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c" Esta es la primera fuente\00"
@.str.1 = [28 x i8] c" Este es la segunda fuente \00"
@.str.2 = [20 x i8] c"Este es el destino \00"
@.str.3 = [34 x i8] c"Cadena de destino final: ++%s++ \0A\00"
define i32 @main() {
%1 = alloca [17 x i8]
%2 = alloca [17 x i8]
%3 = alloca [60 x i8]
%4 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [60 x i8], [60 x i8]* %3, i64 0, i64 0
%7 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @strcat(i8* %6, i8* %4)
%11 = call i32 @strcat(i8* %6, i8* %5)
%12 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %6)
ret i32 0
}