#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*/ fscanf(int /*<<< orphan*/, char *, char *, int *, float *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
void ES_teclado_3() {
  char str[100];
  int val;
  float r;
  printf("Enter a value: ");
  fscanf(stdin, "%s %d %f", str, &val, &r);
  printf("\n");
  printf("You entered: ");
  printf("%s, %d, %f ", str, val, r);
  printf("\n");
  return;
}


x86 assembly (clang, -O0):
<ES_teclado_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    -0x70(%rbp),%rdx
lea    0xec3(%rip),%rsi
lea    -0x74(%rbp),%rcx
lea    -0x78(%rbp),%r8
call   1040 <fscanf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rsi
mov    -0x74(%rbp),%edx
movss  -0x78(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ES_teclado_3>:
push   %rbx
sub    $0x80,%rsp
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    %rbx,%rdx
call   1050 <fscanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8d(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter a value: \00"
@stdin = global i32 0
@.str.1 = [9 x i8] c"%s %d %f\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [14 x i8] c"You entered: \00"
@.str.4 = [12 x i8] c"%s, %d, %f \00"
define void @ES_teclado_3() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = alloca float
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%7 = call i32 @fscanf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %6, i32* %2, float* %3)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%11 = load i32, i32* %2
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %10, i32 %11, double %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter a value: \00"
@stdin = global i32 0
@.str.1 = [9 x i8] c"%s %d %f\00"
@.str.3 = [14 x i8] c"You entered: \00"
@.str.4 = [12 x i8] c"%s, %d, %f \00"
define void @ES_teclado_3() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = alloca float
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdin
%9 = call i32 @fscanf(i32 %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32* %2, float* %3)
%10 = call i32 @putchar(i32 10)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %4, i32 %12, double %14)
%16 = call i32 @putchar(i32 10)
ret void
}