#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 *, size_t, int, ...);
int main() {
  char x_char = 65;
  char y_char = 'y';
  printf("sizeof(char)\t= %lu, where it = %c\n", sizeof(char), x_char);
  int x_int = 0x12345678;
  printf("sizeof(int)\t= %lu, where it = %d\n", sizeof(int), x_int);
  short x_short = 0x1234;
  printf("sizeof(short)\t= %lu, where it = 0x%x = %d = 0%o\n", sizeof(short),
         x_short, x_short, x_short);
  long x_long = 0x1234567890123456;
  printf("sizeof(long)\t= %lu, where it = 0x%lx\n", sizeof(long), x_long);
  long long x_long_long = 0x1234567890123456;
  printf("sizeof(long long)\t = %lu, where it = %lld\n", sizeof(long long),
         x_long_long);
  float x_float = 3.141593;
  printf("sizeof(float)\t= %lu, where it = %f\n", sizeof(float), x_float);
  double x_double = 2.718285;
  printf("sizeof(double)\t= %lu, where it = %f\n", sizeof(double), x_double);
  unsigned short ux_short = 0;
  unsigned int ux_int = 0;
  unsigned long long ux_long_long = 0;
  '0';
  'A';
  int a = 1;
  size_t size = sizeof(a++);
  printf("sizeof(a++)\t= %lu, where a = %d\n", size, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movb   $0x79,-0x6(%rbp)
movsbl -0x5(%rbp),%edx
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x12345678,-0xc(%rbp)
mov    -0xc(%rbp),%edx
lea    0xee0(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x1234,-0xe(%rbp)
movswl -0xe(%rbp),%edx
movswl -0xe(%rbp),%ecx
movswl -0xe(%rbp),%r8d
lea    0xedc(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movabs $0x1234567890123456,%rax
56 34 12
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%edx
lea    0xee6(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movabs $0x1234567890123456,%rax
56 34 12
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,%edx
lea    0xee5(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xe31(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
cvttss2si -0x24(%rbp),%edx
lea    0xeeb(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xe04(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
cvttsd2si -0x30(%rbp),%edx
lea    0xeea(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x0,-0x32(%rbp)
movl   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movl   $0x1,-0x44(%rbp)
movq   $0x4,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
mov    -0x44(%rbp),%edx
lea    0xed1(%rip),%rdi
mov    $0x0,%al
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    $0x1,%esi
mov    $0x41,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x4,%esi
mov    $0x12345678,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    $0x2,%esi
mov    $0x1234,%edx
mov    $0x1234,%ecx
mov    $0x1234,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x8,%esi
mov    $0x90123456,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0x8,%esi
mov    $0x90123456,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf38(%rip),%rdi
mov    $0x8,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf45(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"sizeof(char)\09= %lu, where it = %c\0A\00"
@.str.1 = [34 x i8] c"sizeof(int)\09= %lu, where it = %d\0A\00"
@.str.2 = [49 x i8] c"sizeof(short)\09= %lu, where it = 0x%x = %d = 0%o\0A\00"
@.str.3 = [38 x i8] c"sizeof(long)\09= %lu, where it = 0x%lx\0A\00"
@.str.4 = [43 x i8] c"sizeof(long long)\09 = %lu, where it = %lld\0A\00"
@.str.5 = [36 x i8] c"sizeof(float)\09= %lu, where it = %f\0A\00"
@.str.6 = [37 x i8] c"sizeof(double)\09= %lu, where it = %f\0A\00"
@.str.7 = [33 x i8] c"sizeof(a++)\09= %lu, where a = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
%5 = alloca i16
%6 = alloca i64
%7 = alloca i64
%8 = alloca float
%9 = alloca double
%10 = alloca i16
%11 = alloca i32
%12 = alloca i64
%13 = alloca i32
%14 = alloca i64
store i32 0, i32* %1
store i8 65, i8* %2
store i8 121, i8* %3
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 1, i32 %16)
store i32 305419896, i32* %4
%18 = load i32, i32* %4
%19 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i64 4, i32 %18)
store i16 4660, i16* %5
%20 = load i16, i16* %5
%21 = sext i16 %20 to i32
%22 = load i16, i16* %5
%23 = sext i16 %22 to i32
%24 = load i16, i16* %5
%25 = sext i16 %24 to i32
%26 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i64 2, i32 %21, i32 %23, i32 %25)
store i64 1311768467284833366, i64* %6
%27 = load i64, i64* %6
%28 = trunc i64 %27 to i32
%29 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i64 8, i32 %28)
store i64 1311768467284833366, i64* %7
%30 = load i64, i64* %7
%31 = trunc i64 %30 to i32
%32 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i64 8, i32 %31)
store float 0x400921FB80000000, float* %8
%33 = load float, float* %8
%34 = fptosi float %33 to i32
%35 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i64 4, i32 %34)
store double 0x4005BF0C34C1A8AC, double* %9
%36 = load double, double* %9
%37 = fptosi double %36 to i32
%38 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i64 8, i32 %37)
store i16 0, i16* %10
store i32 0, i32* %11
store i64 0, i64* %12
store i32 1, i32* %13
store i64 4, i64* %14
%39 = load i64, i64* %14
%40 = load i32, i32* %13
%41 = call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i64 %39, i32 %40)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"sizeof(char)\09= %lu, where it = %c\0A\00"
@.str.1 = [34 x i8] c"sizeof(int)\09= %lu, where it = %d\0A\00"
@.str.2 = [49 x i8] c"sizeof(short)\09= %lu, where it = 0x%x = %d = 0%o\0A\00"
@.str.3 = [38 x i8] c"sizeof(long)\09= %lu, where it = 0x%lx\0A\00"
@.str.4 = [43 x i8] c"sizeof(long long)\09 = %lu, where it = %lld\0A\00"
@.str.5 = [36 x i8] c"sizeof(float)\09= %lu, where it = %f\0A\00"
@.str.6 = [37 x i8] c"sizeof(double)\09= %lu, where it = %f\0A\00"
@.str.7 = [33 x i8] c"sizeof(a++)\09= %lu, where a = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 1, i32 65)
%2 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i64 4, i32 305419896)
%3 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i64 2, i32 4660, i32 4660, i32 4660)
%4 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i64 8, i32 -1877855146)
%5 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i64 8, i32 -1877855146)
%6 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i64 4, i32 3)
%7 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i64 8, i32 2)
%8 = tail call i32 (i8*, i64, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i64 4, i32 1)
ret i32 0
}