#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() {
  char a = -2;
  unsigned char b = 2;
  short c = -300;
  unsigned short d = 300;
  float f = 1.25484;
  printf("%d\n", a);
  printf("%d\n", b);
  printf("%d\n", c);
  printf("%d\n", d);
  printf("%f\n", f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xfe,-0x5(%rbp)
movb   $0x2,-0x6(%rbp)
movw   $0xfed4,-0x8(%rbp)
movw   $0x12c,-0xa(%rbp)
movl   $0x3fa09e99,-0x10(%rbp)
movsbl -0x5(%rbp),%eax
cvtsi2ss %eax,%xmm0
lea    0xeb7(%rip),%rdi
mov    %rdi,-0x18(%rbp)
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
movzbl -0x6(%rbp),%eax
cvtsi2ss %eax,%xmm0
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
movswl -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
call   1030 <printf@plt>
movzwl -0xa(%rbp),%eax
cvtsi2ss %eax,%xmm0
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xefc(%rip),%rbx
movss  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xed4(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xec8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xebc(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
movss  0xea9(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i16
%5 = alloca i16
%6 = alloca float
store i32 0, i32* %1
store i8 -2, i8* %2
store i8 2, i8* %3
store i16 -300, i16* %4
store i16 300, i16* %5
store float 0x3FF413D320000000, float* %6
%7 = load i8, i8* %2
%8 = sitofp i8 %7 to float
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %8)
%10 = load i8, i8* %3
%11 = uitofp i8 %10 to float
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %11)
%13 = load i16, i16* %4
%14 = sitofp i16 %13 to float
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %14)
%16 = load i16, i16* %5
%17 = uitofp i16 %16 to float
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %17)
%19 = load float, float* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float -2.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 2.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float -3.000000e+02)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 3.000000e+02)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float 0x3FF413D320000000)
ret i32 0
}