#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*/ str;
typedef int /*<<< orphan*/ ptr;
typedef int /*<<< orphan*/ pstr;
typedef int /*<<< orphan*/ i;
typedef int /*<<< orphan*/ f;
typedef int /*<<< orphan*/ d;
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char c;
  int i;
  float f;
  double d;
  int array[5];
  int *ptr;
  char str[] = "abcde";
  char *pstr = "pqrst";
  printf("sizeof(char) = %d\n", sizeof(char));
  printf("sizeof(int) = %d\n", sizeof(int));
  printf("sizeof(float) = %d\n", sizeof(float));
  printf("sizeof(double) = %d\n", sizeof(double));
  printf("sizeof(c) = %d\n", sizeof(c));
  printf("sizeof(i) = %d\n", sizeof(i));
  printf("sizeof(f) = %d\n", sizeof(f));
  printf("sizeof(d) = %d\n", sizeof(d));
  ptr = array;
  printf("sizeof(array) = %d\n", sizeof(array));
  printf("sizeof(ptr) = %d\n", sizeof(ptr));
  printf("sizeof(str) = %d\n", sizeof(str));
  printf("sizeof(pstr) = %d\n", sizeof(pstr));
  printf("sizeof(STR) = %d\n", sizeof("vwxyz"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x3e(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x3a(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    0xec5(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x6,%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    0xeea(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.str = [6 x i8] c"abcde\00"
@.str = [6 x i8] c"pqrst\00"
@.str.1 = [19 x i8] c"sizeof(char) = %d\0A\00"
@.str.2 = [18 x i8] c"sizeof(int) = %d\0A\00"
@.str.3 = [20 x i8] c"sizeof(float) = %d\0A\00"
@.str.4 = [21 x i8] c"sizeof(double) = %d\0A\00"
@.str.5 = [16 x i8] c"sizeof(c) = %d\0A\00"
@.str.6 = [16 x i8] c"sizeof(i) = %d\0A\00"
@.str.7 = [16 x i8] c"sizeof(f) = %d\0A\00"
@.str.8 = [16 x i8] c"sizeof(d) = %d\0A\00"
@.str.9 = [20 x i8] c"sizeof(array) = %d\0A\00"
@.str.10 = [18 x i8] c"sizeof(ptr) = %d\0A\00"
@.str.11 = [18 x i8] c"sizeof(str) = %d\0A\00"
@.str.12 = [19 x i8] c"sizeof(pstr) = %d\0A\00"
@.str.13 = [18 x i8] c"sizeof(STR) = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca float
%5 = alloca double
%6 = alloca [5 x i32]
%7 = alloca i32*
%8 = alloca [6 x i8]
%9 = alloca i8*
store i32 0, i32* %1
%10 = bitcast [6 x i8]* %8 to i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %9
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 1)
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 4)
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 4)
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 8)
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 1)
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 4)
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 4)
%18 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 8)
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
store i32* %19, i32** %7
%20 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 20)
%21 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 8)
%22 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 6)
%23 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 8)
%24 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 6)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"sizeof(char) = %d\0A\00"
@.str.2 = [18 x i8] c"sizeof(int) = %d\0A\00"
@.str.3 = [20 x i8] c"sizeof(float) = %d\0A\00"
@.str.4 = [21 x i8] c"sizeof(double) = %d\0A\00"
@.str.5 = [16 x i8] c"sizeof(c) = %d\0A\00"
@.str.6 = [16 x i8] c"sizeof(i) = %d\0A\00"
@.str.7 = [16 x i8] c"sizeof(f) = %d\0A\00"
@.str.8 = [16 x i8] c"sizeof(d) = %d\0A\00"
@.str.9 = [20 x i8] c"sizeof(array) = %d\0A\00"
@.str.10 = [18 x i8] c"sizeof(ptr) = %d\0A\00"
@.str.11 = [18 x i8] c"sizeof(str) = %d\0A\00"
@.str.12 = [19 x i8] c"sizeof(pstr) = %d\0A\00"
@.str.13 = [18 x i8] c"sizeof(STR) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 4)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 4)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 8)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 20)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 8)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 6)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 8)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 6)
ret i32 0
}