#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);
int main() {
  int a;
  float b;
  char c;
  double d;
  a = 123;
  b = -89.6548754;
  c = 'b';
  d = 19.987243;
  printf("a is: %7d\n", a);
  printf("b is: %10.4f\n", b);
  printf("c is: %c\n", c);
  printf("d is: %6.2f\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
movl   $0xc2b34f4c,-0xc(%rbp)
movb   $0x62,-0xd(%rbp)
movabs $0x4033fcbbf50e3476,%rax
fc 33 40
mov    %rax,-0x18(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
movsbl -0xd(%rbp),%eax
cvtsi2sd %eax,%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe9e(%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    0xef9(%rip),%rdi
movsd  0xec8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
movsd  0xebc(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"a is: %7d\0A\00"
@.str.1 = [14 x i8] c"b is: %10.4f\0A\00"
@.str.2 = [10 x i8] c"c is: %c\0A\00"
@.str.3 = [13 x i8] c"d is: %6.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca i8
%5 = alloca double
store i32 0, i32* %1
store i32 123, i32* %2
store float 0xC05669E980000000, float* %3
store i8 98, i8* %4
store double 0x4033FCBBF50E3476, double* %5
%6 = load i32, i32* %2
%7 = sitofp i32 %6 to double
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %7)
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %10)
%12 = load i8, i8* %4
%13 = sitofp i8 %12 to double
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %13)
%15 = load double, double* %5
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"a is: %7d\0A\00"
@.str.1 = [14 x i8] c"b is: %10.4f\0A\00"
@.str.2 = [10 x i8] c"c is: %c\0A\00"
@.str.3 = [13 x i8] c"d is: %6.2f\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 1.230000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 0xC05669E980000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double 9.800000e+01)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 0x4033FCBBF50E3476)
ret i32 0
}