#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*/ str1;
typedef int /*<<< orphan*/ str;
typedef int /*<<< orphan*/ p;
typedef int /*<<< orphan*/ n;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  char str[] = "Hello";
  char *str1 = "Hello";
  char *p = str;
  int n = 10;
  printf("sizeof(str) = %lu\n", sizeof(str));
  printf("sizeof(str1)= %lu\n", sizeof(str1));
  printf("sizeof(p)   = %lu\n", sizeof(p));
  printf("sizeof(n)   = %lu\n", sizeof(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    0xebf(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x16(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0xa,-0x2c(%rbp)
lea    0xeab(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x4,%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    $0x6,%esi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.str = [6 x i8] c"Hello\00"
@.str = [6 x i8] c"Hello\00"
@.str.1 = [19 x i8] c"sizeof(str) = %lu\0A\00"
@.str.2 = [19 x i8] c"sizeof(str1)= %lu\0A\00"
@.str.3 = [19 x i8] c"sizeof(p) = %lu\0A\00"
@.str.4 = [19 x i8] c"sizeof(n) = %lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i8]
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [6 x i8]* %6 to i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %7
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
store i8* %11, i8** %8
store i32 10, i32* %9
%12 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 6)
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 8)
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 8)
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"sizeof(str) = %lu\0A\00"
@.str.2 = [19 x i8] c"sizeof(str1)= %lu\0A\00"
@.str.3 = [19 x i8] c"sizeof(p) = %lu\0A\00"
@.str.4 = [19 x i8] c"sizeof(n) = %lu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 8)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 4)
ret i32 0
}