#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *);
void main() {
  char nombre[1];
  printf("dame tu nombre ");
  scanf("%5s", nombre);
  printf("Bienvenido %5s a la clase...", nombre);
  puts("de programación en ");
  puts("lenguaje C");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x1(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    0xf(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"dame tu nombre \00"
@.str.1 = [4 x i8] c"%5s\00"
@.str.2 = [29 x i8] c"Bienvenido %5s a la clase...\00"
@.str.3 = [21 x i8] c"de programaci\C3\B3n en \00"
@.str.4 = [11 x i8] c"lenguaje C\00"
define void @main() {
%1 = alloca [1 x i8]
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"dame tu nombre \00"
@.str.1 = [4 x i8] c"%5s\00"
@.str.2 = [29 x i8] c"Bienvenido %5s a la clase...\00"
@.str.3 = [21 x i8] c"de programaci\C3\B3n en \00"
@.str.4 = [11 x i8] c"lenguaje C\00"
define void @main() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret void
}