#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 *, char);
int main() {
  short myShort = 8;
  int myInt = 32;
  long myLong = 64;
  float myFloat = 32;
  double myDouble = 64;
  long double myLongDouble = 128.00;
  char myChar = '8';
  printf("Short = %d bits\n", myShort);
  printf("Int = %d bits\n", myInt);
  printf("Long = %ld bits\n", myLong);
  printf("Float = %.0f bits\n", myFloat);
  printf("Double = %.0lf bits\n", myDouble);
  printf("Long double = %lf bits\n", myLongDouble);
  printf("Char = %c bits\n", myChar);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x8,-0x6(%rbp)
movl   $0x20,-0xc(%rbp)
movq   $0x40,-0x18(%rbp)
movl   $0x42000000,-0x1c(%rbp)
movabs $0x4050000000000000,%rax
mov    %rax,-0x28(%rbp)
flds   0xeb1(%rip)
fstpt  -0x40(%rbp)
movb   $0x38,-0x41(%rbp)
movsbl -0x6(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
movsbl -0xc(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x18(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
cvttss2si -0x1c(%rbp),%eax
movsbl %al,%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
cvttsd2si -0x28(%rbp),%eax
movsbl %al,%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
fldt   -0x40(%rbp)
fnstcw -0x46(%rbp)
movzwl -0x46(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x48(%rbp)
fldcw  -0x48(%rbp)
fistps -0x44(%rbp)
fldcw  -0x46(%rbp)
mov    -0x44(%rbp),%al
lea    0xe89(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    0xe92(%rip),%rdi
movsbl -0x41(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x40,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x40,%esi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x38,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Short = %d bits\0A\00"
@.str.1 = [15 x i8] c"Int = %d bits\0A\00"
@.str.2 = [17 x i8] c"Long = %ld bits\0A\00"
@.str.3 = [19 x i8] c"Float = %.0f bits\0A\00"
@.str.4 = [21 x i8] c"Double = %.0lf bits\0A\00"
@.str.5 = [24 x i8] c"Long double = %lf bits\0A\00"
@.str.6 = [16 x i8] c"Char = %c bits\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i32
%4 = alloca i64
%5 = alloca float
%6 = alloca double
%7 = alloca x86_fp80
%8 = alloca i8
store i32 0, i32* %1
store i16 8, i16* %2
store i32 32, i32* %3
store i64 64, i64* %4
store float 3.200000e+01, float* %5
store double 6.400000e+01, double* %6
store x86_fp80 0xK40068000000000000000, x86_fp80* %7
store i8 56, i8* %8
%9 = load i16, i16* %2
%10 = trunc i16 %9 to i8
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext %10)
%12 = load i32, i32* %3
%13 = trunc i32 %12 to i8
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8 signext %13)
%15 = load i64, i64* %4
%16 = trunc i64 %15 to i8
%17 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8 signext %16)
%18 = load float, float* %5
%19 = fptosi float %18 to i8
%20 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8 signext %19)
%21 = load double, double* %6
%22 = fptosi double %21 to i8
%23 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8 signext %22)
%24 = load x86_fp80, x86_fp80* %7
%25 = fptosi x86_fp80 %24 to i8
%26 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8 signext %25)
%27 = load i8, i8* %8
%28 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i8 signext %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Short = %d bits\0A\00"
@.str.1 = [15 x i8] c"Int = %d bits\0A\00"
@.str.2 = [17 x i8] c"Long = %ld bits\0A\00"
@.str.3 = [19 x i8] c"Float = %.0f bits\0A\00"
@.str.4 = [21 x i8] c"Double = %.0lf bits\0A\00"
@.str.5 = [24 x i8] c"Long double = %lf bits\0A\00"
@.str.6 = [16 x i8] c"Char = %c bits\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8 signext 32)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8 signext 64)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8 signext 32)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8 signext 64)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8 signext poison)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i8 signext 56)
ret i32 0
}