#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*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
void nombre_apellido() {
  char texto1[40], texto2[40], texto3[40];
  printf("Introduce tu nombre: ");
  gets(texto1);
  printf("Introduce tu apellido: ");
  gets(texto2);
  strcat(texto1, " ");
  strcat(texto1, texto2);
  printf("Te llamas: %s\n", texto1);
}


x86 assembly (clang, -O0):
<nombre_apellido>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1040 <gets@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x30(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x30(%rbp),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nombre_apellido>:
push   %r14
push   %rbx
sub    $0x58,%rsp
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <gets@plt>
lea    0xea2(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Introduce tu nombre: \00"
@.str.1 = [24 x i8] c"Introduce tu apellido: \00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [15 x i8] c"Te llamas: %s\0A\00"
define void @nombre_apellido() {
%1 = alloca [40 x i8]
%2 = alloca [40 x i8]
%3 = alloca [40 x i8]
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%9 = call i32 @gets(i8* %8)
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%11 = call i32 @strcat(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%13 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%14 = call i32 @strcat(i8* %12, i8* %13)
%15 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Introduce tu nombre: \00"
@.str.1 = [24 x i8] c"Introduce tu apellido: \00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [15 x i8] c"Te llamas: %s\0A\00"
define void @nombre_apellido() {
%1 = alloca [40 x i8]
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @gets(i8* %3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @gets(i8* %4)
%9 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @strcat(i8* %3, i8* %4)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %3)
ret void
}