#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 *, double);
main() {
  char c;
  int i;
  float f;
  double d;
  c = 'a';
  i = 25;
  f = 3.1416F;
  d = 2.7172;
  printf("c vale %c\n", c);
  printf("i vale %d\n", i);
  printf("f vale %f\n", f);
  printf("d vale %f\n", d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movb   $0x61,-0x1(%rbp)
movl   $0x19,-0x8(%rbp)
movl   $0x40490ff9,-0xc(%rbp)
movabs $0x4005bcd35a858794,%rax
bc 05 40
mov    %rax,-0x18(%rbp)
movsbl -0x1(%rbp),%eax
cvtsi2sd %eax,%xmm0
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf08(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
movsd  0xed4(%rip),%xmm0
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xec8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
movsd  0xebc(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"c vale %c\0A\00"
@.str.1 = [11 x i8] c"i vale %d\0A\00"
@.str.2 = [11 x i8] c"f vale %f\0A\00"
@.str.3 = [11 x i8] c"d vale %f\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
%4 = alloca double
store i8 97, i8* %1
store i32 25, i32* %2
store float 0x400921FF20000000, float* %3
store double 2.717200e+00, double* %4
%5 = load i8, i8* %1
%6 = sitofp i8 %5 to double
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to double
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %12)
%14 = load double, double* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"c vale %c\0A\00"
@.str.1 = [11 x i8] c"i vale %d\0A\00"
@.str.2 = [11 x i8] c"f vale %f\0A\00"
@.str.3 = [11 x i8] c"d vale %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 9.700000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double 2.500000e+01)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double 0x400921FF20000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double 2.717200e+00)
ret i32 0
}