#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 *, float, ...);
int main(void) {
  int x;
  x = 1000;
  printf("integer value: %d\n", x);
  char ch;
  ch = 'M';
  printf("character value: %c\n", ch);
  float m;
  double n;
  m = 10.20;
  n = 10.20;
  printf("float: %f and double: %.10f\n", m, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3e8,-0x8(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
lea    0xeda(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movb   $0x4d,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cvtsi2ss %eax,%xmm0
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xead(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xeb6(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf00(%rip),%rdi
movss  0xee0(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
movss  0xece(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
movss  0xebc(%rip),%xmm0
movsd  0xebc(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"integer value: %d\0A\00"
@.str.1 = [21 x i8] c"character value: %c\0A\00"
@.str.2 = [29 x i8] c"float: %f and double: %.10f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca float
%5 = alloca double
store i32 0, i32* %1
store i32 1000, i32* %2
%6 = load i32, i32* %2
%7 = sitofp i32 %6 to float
%8 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %7)
store i8 77, i8* %3
%9 = load i8, i8* %3
%10 = sitofp i8 %9 to float
%11 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), float %10)
store float 0x4024666660000000, float* %4
store double 1.020000e+01, double* %5
%12 = load float, float* %4
%13 = load double, double* %5
%14 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), float %12, double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"integer value: %d\0A\00"
@.str.1 = [21 x i8] c"character value: %c\0A\00"
@.str.2 = [29 x i8] c"float: %f and double: %.10f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float 1.000000e+03)
%2 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), float 7.700000e+01)
%3 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), float 0x4024666660000000, double 1.020000e+01)
ret i32 0
}