#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*/ iarray;
typedef int /*<<< orphan*/ fname_array;
typedef int /*<<< orphan*/ fname;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int iarray[] = {1, 2, 3, 4};
  char fname[] = "Ferdl";
  char fname_array[] = {'F', 'e', 'r', 'd', 'i', 'n', 'a', 'n', 'd', '\0'};
  printf("the size of an int is %lu bytes\n", sizeof(int));
  printf("the size of iarray is %ld bytes\n", sizeof(iarray));
  printf("the number of ints in iarray is %ld\n", sizeof(iarray) / sizeof(int));
  printf("the size of a char is %ld bytes\n", sizeof(char));
  printf("the size of fname is %ld bytes\n", sizeof(fname));
  printf("the number of chars in fname is %ld\n", sizeof(fname) / sizeof(char));
  printf("the size of fname_array is %ld bytes\n", sizeof(fname_array));
  printf("the number of chars in fname_array is %ld\n",
         sizeof(fname_array) / sizeof(char));
  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    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0x26(%rbp)
mov    0xec8(%rip),%ax
mov    %ax,-0x22(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebc(%rip),%ax
mov    %ax,-0x28(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
mov    $0xa,%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    $0x4,%esi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0xf3b(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xf64(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.iarray = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@__const.main.fname = [6 x i8] c"Ferdl\00"
@__const.main.fname_array = [10 x i8] c"Ferdinand\00"
@.str = [33 x i8] c"the size of an int is %lu bytes\0A\00"
@.str.1 = [33 x i8] c"the size of iarray is %ld bytes\0A\00"
@.str.2 = [37 x i8] c"the number of ints in iarray is %ld\0A\00"
@.str.3 = [33 x i8] c"the size of a char is %ld bytes\0A\00"
@.str.4 = [32 x i8] c"the size of fname is %ld bytes\0A\00"
@.str.5 = [37 x i8] c"the number of chars in fname is %ld\0A\00"
@.str.6 = [38 x i8] c"the size of fname_array is %ld bytes\0A\00"
@.str.7 = [43 x i8] c"the number of chars in fname_array is %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i32]
%7 = alloca [6 x i8]
%8 = alloca [10 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [4 x i32]* %6 to i8*
%10 = bitcast [6 x i8]* %7 to i8*
%11 = bitcast [10 x i8]* %8 to i8*
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 4)
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 16)
%14 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 4)
%15 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 1)
%16 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 6)
%17 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 6)
%18 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 10)
%19 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 10)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"the size of an int is %lu bytes\0A\00"
@.str.1 = [33 x i8] c"the size of iarray is %ld bytes\0A\00"
@.str.2 = [37 x i8] c"the number of ints in iarray is %ld\0A\00"
@.str.3 = [33 x i8] c"the size of a char is %ld bytes\0A\00"
@.str.4 = [32 x i8] c"the size of fname is %ld bytes\0A\00"
@.str.5 = [37 x i8] c"the number of chars in fname is %ld\0A\00"
@.str.6 = [38 x i8] c"the size of fname_array is %ld bytes\0A\00"
@.str.7 = [43 x i8] c"the number of chars in fname_array is %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 16)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 6)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 10)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 10)
ret i32 0
}