#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*/ A5;
typedef int /*<<< orphan*/ A4;
typedef int /*<<< orphan*/ A3;
typedef int /*<<< orphan*/ A2;
typedef int /*<<< orphan*/ A1;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void nest3() {
  int A1[3][5];
  int *A2[3][5];
  int(*A3)[3][5];
  int *(A4[3][5]);
  int(*A5[3])[5];
  printf("A1 -> %d\n", sizeof(A1));
  printf("A2 -> %d\n", sizeof(A2));
  printf("A3 -> %d\n", sizeof(A3));
  printf("A4 -> %d\n", sizeof(A4));
  printf("A5 -> %d\n", sizeof(A5));
  printf("*A1 -> %d\n", sizeof(*A1));
  printf("*A2 -> %d\n", sizeof(*A2));
  printf("*A3 -> %d\n", sizeof(*A3));
  printf("*A4 -> %d\n", sizeof(*A4));
  printf("*A5 -> %d\n", sizeof(*A5));
  printf("**A1 -> %d\n", sizeof(**A1));
  printf("**A2 -> %d\n", sizeof(**A2));
  printf("**A3 -> %d\n", sizeof(**A3));
  printf("**A4 -> %d\n", sizeof(**A4));
  printf("**A5 -> %d\n", sizeof(**A5));
  printf("***A2 -> %d\n", sizeof(***A2));
  printf("***A3 -> %d\n", sizeof(***A3));
  printf("***A4 -> %d\n", sizeof(***A4));
  printf("***A5 -> %d\n", sizeof(***A5));
}


x86 assembly (clang, -O0):
<nest3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
lea    0xee0(%rip),%rdi
mov    $0x3c,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x78,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x78,%esi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xe86(%rip),%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x3c,%esi
call   1030 <printf@plt>
lea    0xe7e(%rip),%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe30(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xe28(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe24(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xdeb(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xde7(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xde3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xddf(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nest3>:
push   %rax
lea    0xeea(%rip),%rdi
mov    $0x3c,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x78,%esi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x78,%esi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
mov    $0x3c,%esi
call   1030 <printf@plt>
lea    0xe88(%rip),%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe3a(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe36(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe2e(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xdf5(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xdf1(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xded(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xde9(%rip),%rdi
mov    $0x4,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"A1 -> %d\0A\00"
@.str.1 = [10 x i8] c"A2 -> %d\0A\00"
@.str.2 = [10 x i8] c"A3 -> %d\0A\00"
@.str.3 = [10 x i8] c"A4 -> %d\0A\00"
@.str.4 = [10 x i8] c"A5 -> %d\0A\00"
@.str.5 = [11 x i8] c"*A1 -> %d\0A\00"
@.str.6 = [11 x i8] c"*A2 -> %d\0A\00"
@.str.7 = [11 x i8] c"*A3 -> %d\0A\00"
@.str.8 = [11 x i8] c"*A4 -> %d\0A\00"
@.str.9 = [11 x i8] c"*A5 -> %d\0A\00"
@.str.10 = [12 x i8] c"**A1 -> %d\0A\00"
@.str.11 = [12 x i8] c"**A2 -> %d\0A\00"
@.str.12 = [12 x i8] c"**A3 -> %d\0A\00"
@.str.13 = [12 x i8] c"**A4 -> %d\0A\00"
@.str.14 = [12 x i8] c"**A5 -> %d\0A\00"
@.str.15 = [13 x i8] c"***A2 -> %d\0A\00"
@.str.16 = [13 x i8] c"***A3 -> %d\0A\00"
@.str.17 = [13 x i8] c"***A4 -> %d\0A\00"
@.str.18 = [13 x i8] c"***A5 -> %d\0A\00"
define void @nest3() {
%1 = alloca [3 x [5 x i32]]
%2 = alloca [3 x [5 x i32*]]
%3 = alloca [3 x [5 x i32]]*
%4 = alloca [3 x [5 x i32*]]
%5 = alloca [3 x [5 x i32]*]
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 60)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 120)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 8)
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 120)
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 24)
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 20)
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 40)
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 60)
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 40)
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 8)
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 4)
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 8)
%18 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 20)
%19 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i32 8)
%20 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i32 20)
%21 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0), i32 4)
%22 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i32 4)
%23 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 4)
%24 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"A1 -> %d\0A\00"
@.str.1 = [10 x i8] c"A2 -> %d\0A\00"
@.str.2 = [10 x i8] c"A3 -> %d\0A\00"
@.str.3 = [10 x i8] c"A4 -> %d\0A\00"
@.str.4 = [10 x i8] c"A5 -> %d\0A\00"
@.str.5 = [11 x i8] c"*A1 -> %d\0A\00"
@.str.6 = [11 x i8] c"*A2 -> %d\0A\00"
@.str.7 = [11 x i8] c"*A3 -> %d\0A\00"
@.str.8 = [11 x i8] c"*A4 -> %d\0A\00"
@.str.9 = [11 x i8] c"*A5 -> %d\0A\00"
@.str.10 = [12 x i8] c"**A1 -> %d\0A\00"
@.str.11 = [12 x i8] c"**A2 -> %d\0A\00"
@.str.12 = [12 x i8] c"**A3 -> %d\0A\00"
@.str.13 = [12 x i8] c"**A4 -> %d\0A\00"
@.str.14 = [12 x i8] c"**A5 -> %d\0A\00"
@.str.15 = [13 x i8] c"***A2 -> %d\0A\00"
@.str.16 = [13 x i8] c"***A3 -> %d\0A\00"
@.str.17 = [13 x i8] c"***A4 -> %d\0A\00"
@.str.18 = [13 x i8] c"***A5 -> %d\0A\00"
define void @nest3() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 60)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 120)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 8)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 120)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 24)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 20)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 40)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 60)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 40)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 8)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 4)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 8)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 20)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i32 8)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i32 20)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0), i32 4)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i32 4)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 4)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), i32 4)
ret void
}