#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*/ testname;
typedef int /*<<< orphan*/ name;
typedef int /*<<< orphan*/ areas;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int areas[] = {10, 20, 30, 31, 40};
  char name[] = "Ace";
  char testname[] = {'A', 'B', 'C', '\0'};
  printf("Sizeof int %ld\n", sizeof(int));
  printf("Sizeof areas %ld\n", sizeof(areas));
  printf("Sizeof char %ld\n", sizeof(char));
  printf("Sizeof testname %ld\n", sizeof(testname));
  printf("Name: %s\tFull Name%s\n", name, testname);
  printf("Size: %ld\tSize:%ld\n", sizeof(name), sizeof(testname));
  testname[3] = 'E';
  printf("testname: %sblahblah", testname);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xed0(%rip),%eax
mov    %eax,-0x34(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x38(%rbp)
lea    0xec5(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x34(%rbp),%rsi
lea    -0x38(%rbp),%rdx
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x4,%edx
mov    %rdx,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x45,-0x35(%rbp)
lea    -0x38(%rbp),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x656341,0xc(%rsp)
movl   $0x434241,0x8(%rsp)
lea    0xed4(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x4,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movb   $0x45,0xb(%rsp)
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.areas = [5 x i32] [i32 10, i32 20, i32 30, i32 31, i32 40]
@__const.main.name = [4 x i8] c"Ace\00"
@__const.main.testname = [4 x i8] c"ABC\00"
@.str = [16 x i8] c"Sizeof int %ld\0A\00"
@.str.1 = [18 x i8] c"Sizeof areas %ld\0A\00"
@.str.2 = [17 x i8] c"Sizeof char %ld\0A\00"
@.str.3 = [21 x i8] c"Sizeof testname %ld\0A\00"
@.str.4 = [22 x i8] c"Name: %s\09Full Name%s\0A\00"
@.str.5 = [20 x i8] c"Size: %ld\09Size:%ld\0A\00"
@.str.6 = [21 x i8] c"testname: %sblahblah\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [5 x i32]
%6 = alloca [4 x i8]
%7 = alloca [4 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = bitcast [5 x i32]* %5 to i8*
%9 = bitcast [4 x i8]* %6 to i8*
%10 = bitcast [4 x i8]* %7 to i8*
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 4)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i64 20)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i64 1)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i64 4)
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* %15, i8* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i64 4, i64 4)
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 3
store i8 69, i8* %19
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Sizeof int %ld\0A\00"
@.str.1 = [18 x i8] c"Sizeof areas %ld\0A\00"
@.str.2 = [17 x i8] c"Sizeof char %ld\0A\00"
@.str.3 = [21 x i8] c"Sizeof testname %ld\0A\00"
@.str.4 = [22 x i8] c"Name: %s\09Full Name%s\0A\00"
@.str.5 = [20 x i8] c"Size: %ld\09Size:%ld\0A\00"
@.str.6 = [21 x i8] c"testname: %sblahblah\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %4 to [4 x i8]*
%6 = bitcast i32* %3 to i8*
store i32 6644545, i32* %3
%7 = bitcast i32* %4 to i8*
store i32 4407873, i32* %4
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 4)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i64 20)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i64 1)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i64 4)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32* %3, i32* %4)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i64 4, i64 4)
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 3
store i8 69, i8* %14
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32* %4)
ret i32 0
}