#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*/ scanf(char *, char *, int *, float *, long *, double *);
main() {
  char c;
  int i;
  float f;
  long l;
  double d;
  printf("Input a char, an int, a float, a long and a double:\n");
  scanf("%c %d %f %lu %lf", &c, &i, &f, &l, &d);
  printf("You entered:\n%c \n%d \n%f \n%lu \n%lf", c, i, f, l, d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
lea    -0x1(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x20(%rbp),%r9
call   1040 <scanf@plt>
movsbl -0x1(%rbp),%esi
mov    -0x8(%rbp),%edx
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rcx
movsd  -0x20(%rbp),%xmm1
lea    0xed0(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0xf(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x18(%rsp),%r9
call   1050 <scanf@plt>
movsbl 0xf(%rsp),%esi
mov    0x14(%rsp),%edx
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x20(%rsp),%rcx
movsd  0x18(%rsp),%xmm1
lea    0xe87(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [53 x i8] c"Input a char, an int, a float, a long and a double:\0A\00"
@.str.1 = [17 x i8] c"%c %d %f %lu %lf\00"
@.str.2 = [34 x i8] c"You entered:\0A%c \0A%d \0A%f \0A%lu \0A%lf\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
%4 = alloca i64
%5 = alloca double
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32* %2, float* %3, i64* %4, double* %5)
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = load i32, i32* %2
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = load i64, i64* %4
%14 = load double, double* %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10, double %12, i64 %13, double %14)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"%c %d %f %lu %lf\00"
@.str.2 = [34 x i8] c"You entered:\0A%c \0A%d \0A%f \0A%lu \0A%lf\00"
@str = [52 x i8] c"Input a char, an int, a float, a long and a double:\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
%4 = alloca i64
%5 = alloca double
%6 = bitcast i32* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast i64* %4 to i8*
%9 = bitcast double* %5 to i8*
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32* %2, float* %3, i64* %4, double* %5)
%12 = load i8, i8* %1
%13 = sext i8 %12 to i32
%14 = load i32, i32* %2
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = load i64, i64* %4
%18 = load double, double* %5
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 %14, double %16, i64 %17, double %18)
ret i32 0
}