int main(void) {
  int integerVar = 100;
  float floatingVar = 331.79;
  double doubleVar = 8.44e+11;
  char charVar = 'W';
  _Bool boolVar = 0;
  printf("integerVar = %i\n", integerVar);
  printf("floatingVar = %f\n", floatingVar);
  printf("floatingVar = %g\n", floatingVar);
  printf("doubleVar = %e\n", doubleVar);
  printf("doubleVar = %g\n", doubleVar);
  printf("charVar = %c\n", charVar);
  printf("boolVar = %i\n", boolVar);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movb   $0x57,-0x19(%rbp)
movb   $0x0,-0x1a(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeaf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xeae(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xeab(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x19(%rbp),%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1a(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xecd(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
movsd  0xeb7(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
movsd  0xea9(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0xe93(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x57,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"integerVar = %i\0A\00"
@.str.1 = [18 x i8] c"floatingVar = %f\0A\00"
@.str.2 = [18 x i8] c"floatingVar = %g\0A\00"
@.str.3 = [16 x i8] c"doubleVar = %e\0A\00"
@.str.4 = [16 x i8] c"doubleVar = %g\0A\00"
@.str.5 = [14 x i8] c"charVar = %c\0A\00"
@.str.6 = [14 x i8] c"boolVar = %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca double
%5 = alloca i8
%6 = alloca i8
store i32 0, i32* %1
store i32 100, i32* %2
store float 0x4074BCA3E0000000, float* %3
store double 8.440000e+11, double* %4
store i8 87, i8* %5
store i8 0, i8* %6
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %10)
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %13)
%15 = load double, double* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double %15)
%17 = load double, double* %4
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double %17)
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = load i8, i8* %6
%23 = trunc i8 %22 to i1
%24 = zext i1 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"integerVar = %i\0A\00"
@.str.1 = [18 x i8] c"floatingVar = %f\0A\00"
@.str.2 = [18 x i8] c"floatingVar = %g\0A\00"
@.str.3 = [16 x i8] c"doubleVar = %e\0A\00"
@.str.4 = [16 x i8] c"doubleVar = %g\0A\00"
@.str.5 = [14 x i8] c"charVar = %c\0A\00"
@.str.6 = [14 x i8] c"boolVar = %i\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 100)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double 0x4074BCA3E0000000)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double 0x4074BCA3E0000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double 8.440000e+11)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double 8.440000e+11)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 87)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 0)
ret i32 0
}