#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*/ Hello;
typedef int /*<<< orphan*/ Complex;
typedef int /*<<< orphan*/ Array;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("char"
         " size: %lu\n",
         sizeof(char));
  printf("short"
         " size: %lu\n",
         sizeof(short));
  printf("int"
         " size: %lu\n",
         sizeof(int));
  printf("long"
         " size: %lu\n",
         sizeof(long));
  printf("long long"
         " size: %lu\n",
         sizeof(long long));
  int Array[10];
  printf("Array size: %lu\n", sizeof(Array));
  printf("Array element (int) size: %lu\n", sizeof(Array[0]));
  struct complex {
    double Re, Im;
  } Complex;
  printf("Complex number size: %lu\n", sizeof(Complex));
  char *Hello = "Hello, World!";
  printf("Hello World string (char *) size: %lu\n", sizeof(Hello));
  printf("Hello World string character (char) size: %lu\n", sizeof(*Hello));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xee4(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x1,%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    $0x1,%esi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.complex = type { double, double }
@.str = [16 x i8] c"char size: %lu\0A\00"
@.str.1 = [17 x i8] c"short size: %lu\0A\00"
@.str.2 = [15 x i8] c"int size: %lu\0A\00"
@.str.3 = [16 x i8] c"long size: %lu\0A\00"
@.str.4 = [21 x i8] c"long long size: %lu\0A\00"
@.str.5 = [17 x i8] c"Array size: %lu\0A\00"
@.str.6 = [31 x i8] c"Array element (int) size: %lu\0A\00"
@.str.7 = [26 x i8] c"Complex number size: %lu\0A\00"
@.str.8 = [14 x i8] c"Hello, World!\00"
@.str.9 = [39 x i8] c"Hello World string (char *) size: %lu\0A\00"
@.str.10 = [47 x i8] c"Hello World string character (char) size: %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca %struct.complex
%4 = alloca i8*
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2)
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 4)
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 8)
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 8)
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 40)
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 4)
%12 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 16)
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8** %4
%13 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i32 8)
%14 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
%struct.complex = type { double, double }
@.str = [16 x i8] c"char size: %lu\0A\00"
@.str.1 = [17 x i8] c"short size: %lu\0A\00"
@.str.2 = [15 x i8] c"int size: %lu\0A\00"
@.str.3 = [16 x i8] c"long size: %lu\0A\00"
@.str.4 = [21 x i8] c"long long size: %lu\0A\00"
@.str.5 = [17 x i8] c"Array size: %lu\0A\00"
@.str.6 = [31 x i8] c"Array element (int) size: %lu\0A\00"
@.str.7 = [26 x i8] c"Complex number size: %lu\0A\00"
@.str.9 = [39 x i8] c"Hello World string (char *) size: %lu\0A\00"
@.str.10 = [47 x i8] c"Hello World string character (char) size: %lu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 8)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 40)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 4)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 16)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i32 8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i32 1)
ret i32 0
}