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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int main() {
  char c;
  short int i;
  long x;
  float f;
  double d;
  short int temp[8];
  puts("\tVariable sizes\n");
  printf("char variable c = %d\n", sizeof(c));
  printf("int variable i = %d\n", sizeof(i));
  printf("long variable x = %d\n", sizeof(x));
  printf("float variable f = %d\n", sizeof(f));
  printf("double variable d = %d\n", sizeof(d));
  putchar('\n');
  puts("\n\n");
  printf("Size of the temp array = %d\n", sizeof(temp));
  x = 0;
  for (x = 0; x < 35; x++)
    putchar('*');
  puts("\n\n");
  printf("Memory location of char variable c = %p\n", &c);
  printf("Memory location of int variable i = %p\n", &i);
  printf("Memory location of long variable x = %p\n", &x);
  printf("Memory location of float variable f = %p\n", &f);
  printf("Memory location of double variable d = %p\n", &d);
  for (i = 0; i < 8; i++)
    printf("Memory location of temp[%d] = %p\n\r", i, &temp[i]);
  getchar();
  exit(32467);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9f(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea2(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea4(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeab(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xea6(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9d(%rip),%rdi
mov    $0x10,%esi
mov    $0x0,%al
call   1050 <printf@plt>
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x23,-0x10(%rbp)
jge    1229 <main+0xd9>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1203 <main+0xb3>
lea    0xe51(%rip),%rdi
call   1040 <puts@plt>
lea    0xe65(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe7c(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe92(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea9(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
movw   $0x0,-0x8(%rbp)
movswl -0x8(%rbp),%eax
cmp    $0x8,%eax
jge    12d5 <main+0x185>
movswl -0x8(%rbp),%esi
movswq -0x8(%rbp),%rax
lea    -0x30(%rbp),%rdx
shl    $0x1,%rax
add    %rax,%rdx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x8(%rbp)
jmp    1295 <main+0x145>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x7ed3,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xea4(%rip),%rdi
call   1040 <puts@plt>
lea    0xea9(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb5(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb0(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xea4(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
movq   $0x23,0x8(%rsp)
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xd3f(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd55(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd6a(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd80(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd97(%rip),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movw   $0x0,0x4(%rsp)
lea    0xda8(%rip),%rbx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movswl %ax,%esi
movswq %si,%rax
lea    (%rsp,%rax,2),%rdx
add    $0x20,%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzwl 0x4(%rsp),%eax
add    $0x1,%eax
mov    %ax,0x4(%rsp)
cmp    $0x8,%ax
jl     13d0 <main+0x280>
xor    %eax,%eax
call   1060 <getchar@plt>
mov    $0x7ed3,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"\09Variable sizes\0A\00"
@.str.1 = [22 x i8] c"char variable c = %d\0A\00"
@.str.2 = [21 x i8] c"int variable i = %d\0A\00"
@.str.3 = [22 x i8] c"long variable x = %d\0A\00"
@.str.4 = [23 x i8] c"float variable f = %d\0A\00"
@.str.5 = [24 x i8] c"double variable d = %d\0A\00"
@.str.6 = [3 x i8] c"\0A\0A\00"
@.str.7 = [29 x i8] c"Size of the temp array = %d\0A\00"
@.str.8 = [41 x i8] c"Memory location of char variable c = %p\0A\00"
@.str.9 = [40 x i8] c"Memory location of int variable i = %p\0A\00"
@.str.10 = [41 x i8] c"Memory location of long variable x = %p\0A\00"
@.str.11 = [42 x i8] c"Memory location of float variable f = %p\0A\00"
@.str.12 = [43 x i8] c"Memory location of double variable d = %p\0A\00"
@.str.13 = [35 x i8] c"Memory location of temp[%d] = %p\0A\0D\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i16
%4 = alloca i64
%5 = alloca float
%6 = alloca double
%7 = alloca [8 x i16]
store i32 0, i32* %1
%8 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 1)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i64 2)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i64 8)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i64 4)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i64 8)
%14 = call i32 @putchar(i8 signext 10)
%15 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i64 16)
store i64 0, i64* %4
store i64 0, i64* %4
br label %17
17: ; preds = %22, %0
%18 = load i64, i64* %4
%19 = icmp slt i64 %18, 35
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = call i32 @putchar(i8 signext 42)
br label %22
22: ; preds = %20
%23 = load i64, i64* %4
%24 = add nsw i64 %23, 1
store i64 %24, i64* %4
br label %17
25: ; preds = %17
%26 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), i8* %2)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i16* %3)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), i64* %4)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.11, i64 0, i64 0), float* %5)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0), double* %6)
store i16 0, i16* %3
br label %32
32: ; preds = %43, %25
%33 = load i16, i16* %3
%34 = sext i16 %33 to i32
%35 = icmp slt i32 %34, 8
br i1 %35, label %36, label %46
36: ; preds = %32
%37 = load i16, i16* %3
%38 = sext i16 %37 to i32
%39 = load i16, i16* %3
%40 = sext i16 %39 to i64
%41 = getelementptr inbounds [8 x i16], [8 x i16]* %7, i64 0, i64 %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i32 %38, i16* %41)
br label %43
43: ; preds = %36
%44 = load i16, i16* %3
%45 = add i16 %44, 1
store i16 %45, i16* %3
br label %32
46: ; preds = %32
%47 = call i32 (...) @getchar()
%48 = call i32 @exit(i32 32467)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"\09Variable sizes\0A\00"
@.str.1 = [22 x i8] c"char variable c = %d\0A\00"
@.str.2 = [21 x i8] c"int variable i = %d\0A\00"
@.str.3 = [22 x i8] c"long variable x = %d\0A\00"
@.str.4 = [23 x i8] c"float variable f = %d\0A\00"
@.str.5 = [24 x i8] c"double variable d = %d\0A\00"
@.str.6 = [3 x i8] c"\0A\0A\00"
@.str.7 = [29 x i8] c"Size of the temp array = %d\0A\00"
@.str.8 = [41 x i8] c"Memory location of char variable c = %p\0A\00"
@.str.9 = [40 x i8] c"Memory location of int variable i = %p\0A\00"
@.str.10 = [41 x i8] c"Memory location of long variable x = %p\0A\00"
@.str.11 = [42 x i8] c"Memory location of float variable f = %p\0A\00"
@.str.12 = [43 x i8] c"Memory location of double variable d = %p\0A\00"
@.str.13 = [35 x i8] c"Memory location of temp[%d] = %p\0A\0D\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i16
%3 = alloca i64
%4 = alloca float
%5 = alloca double
%6 = alloca [8 x i16]
%7 = bitcast i16* %2 to i8*
%8 = bitcast i64* %3 to i8*
%9 = bitcast float* %4 to i8*
%10 = bitcast double* %5 to i8*
%11 = bitcast [8 x i16]* %6 to i8*
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 1)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i64 2)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i64 8)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i64 4)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i64 8)
%18 = tail call i32 @putchar(i8 signext 10)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i64 16)
%21 = tail call i32 @putchar(i8 signext 42)
%22 = tail call i32 @putchar(i8 signext 42)
%23 = tail call i32 @putchar(i8 signext 42)
%24 = tail call i32 @putchar(i8 signext 42)
%25 = tail call i32 @putchar(i8 signext 42)
%26 = tail call i32 @putchar(i8 signext 42)
%27 = tail call i32 @putchar(i8 signext 42)
%28 = tail call i32 @putchar(i8 signext 42)
%29 = tail call i32 @putchar(i8 signext 42)
%30 = tail call i32 @putchar(i8 signext 42)
%31 = tail call i32 @putchar(i8 signext 42)
%32 = tail call i32 @putchar(i8 signext 42)
%33 = tail call i32 @putchar(i8 signext 42)
%34 = tail call i32 @putchar(i8 signext 42)
%35 = tail call i32 @putchar(i8 signext 42)
%36 = tail call i32 @putchar(i8 signext 42)
%37 = tail call i32 @putchar(i8 signext 42)
%38 = tail call i32 @putchar(i8 signext 42)
%39 = tail call i32 @putchar(i8 signext 42)
%40 = tail call i32 @putchar(i8 signext 42)
%41 = tail call i32 @putchar(i8 signext 42)
%42 = tail call i32 @putchar(i8 signext 42)
%43 = tail call i32 @putchar(i8 signext 42)
%44 = tail call i32 @putchar(i8 signext 42)
%45 = tail call i32 @putchar(i8 signext 42)
%46 = tail call i32 @putchar(i8 signext 42)
%47 = tail call i32 @putchar(i8 signext 42)
%48 = tail call i32 @putchar(i8 signext 42)
%49 = tail call i32 @putchar(i8 signext 42)
%50 = tail call i32 @putchar(i8 signext 42)
%51 = tail call i32 @putchar(i8 signext 42)
%52 = tail call i32 @putchar(i8 signext 42)
%53 = tail call i32 @putchar(i8 signext 42)
%54 = tail call i32 @putchar(i8 signext 42)
%55 = tail call i32 @putchar(i8 signext 42)
store i64 35, i64* %3
%56 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), i8* %1)
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i16* %2)
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), i64* %3)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.11, i64 0, i64 0), float* %4)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0), double* %5)
store i16 0, i16* %2
br label %62
62: ; preds = %0, %62
%63 = phi i16 [ 0, %0 ], [ %69, %62 ]
%64 = sext i16 %63 to i32
%65 = sext i16 %63 to i64
%66 = getelementptr inbounds [8 x i16], [8 x i16]* %6, i64 0, i64 %65
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i32 %64, i16* %66)
%68 = load i16, i16* %2
%69 = add i16 %68, 1
store i16 %69, i16* %2
%70 = icmp slt i16 %69, 8
br i1 %70, label %62, label %71
71: ; preds = %62
%72 = call i32 (...) @getchar()
%73 = call i32 @exit(i32 32467)
unreachable
}