#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 */
typedef int /*<<< orphan*/ l;
typedef int /*<<< orphan*/ i;
typedef int /*<<< orphan*/ f;
typedef int /*<<< orphan*/ d;
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ b;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char c = 'c';
  short b = 20;
  int i = 125;
  long l = 56L;
  float f = 0.2F;
  double d = 7.8F;
  printf("the size of char is: %ld\n", sizeof(c));
  printf("the size of short is: %ld\n", sizeof(b));
  printf("the size of int is: %ld\n", sizeof(i));
  printf("the size of long is: %ld\n", sizeof(l));
  printf("the size of float is: %ld\n", sizeof(f));
  printf("the size of double is: %ld\n", sizeof(d));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x63,-0x5(%rbp)
movw   $0x14,-0x8(%rbp)
movl   $0x7d,-0xc(%rbp)
movq   $0x38,-0x18(%rbp)
movss  0xec8(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"the size of char is: %ld\0A\00"
@.str.1 = [27 x i8] c"the size of short is: %ld\0A\00"
@.str.2 = [25 x i8] c"the size of int is: %ld\0A\00"
@.str.3 = [26 x i8] c"the size of long is: %ld\0A\00"
@.str.4 = [27 x i8] c"the size of float is: %ld\0A\00"
@.str.5 = [28 x i8] c"the size of double is: %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i16
%4 = alloca i32
%5 = alloca i64
%6 = alloca float
%7 = alloca double
store i32 0, i32* %1
store i8 99, i8* %2
store i16 20, i16* %3
store i32 125, i32* %4
store i64 56, i64* %5
store float 0x3FC99999A0000000, float* %6
store double 0x401F333340000000, double* %7
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 1)
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 2)
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 4)
%11 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 8)
%12 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 4)
%13 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"the size of char is: %ld\0A\00"
@.str.1 = [27 x i8] c"the size of short is: %ld\0A\00"
@.str.2 = [25 x i8] c"the size of int is: %ld\0A\00"
@.str.3 = [26 x i8] c"the size of long is: %ld\0A\00"
@.str.4 = [27 x i8] c"the size of float is: %ld\0A\00"
@.str.5 = [28 x i8] c"the size of double is: %ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 8)
ret i32 0
}