#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 *);
main(void) {
  char cadena[81];
  strcpy(cadena, "Hola, ");
  strcat(cadena, "strcpy ");
  strcat(cadena, "y ");
  strcat(cadena, "strcat te saludan!");
  printf("cadena = %s\n", cadena);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x60(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x60(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x60(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x60(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xec4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Hola, \00"
@.str.1 = [8 x i8] c"strcpy \00"
@.str.2 = [3 x i8] c"y \00"
@.str.3 = [19 x i8] c"strcat te saludan!\00"
@.str.4 = [13 x i8] c"cadena = %s\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%5 = call i32 @strcat(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%7 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%9 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Hola, \00"
@.str.1 = [8 x i8] c"strcpy \00"
@.str.2 = [3 x i8] c"y \00"
@.str.3 = [19 x i8] c"strcat te saludan!\00"
@.str.4 = [13 x i8] c"cadena = %s\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %2)
ret i32 0
}