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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void nest2() {
  int A1[3];
  int *A2[3];
  int(*A3)[3];
  int(*A4[3]);
  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("*A1 -> %d\n", sizeof(*A1));
  printf("*A2 -> %d\n", sizeof(*A2));
  printf("*A3 -> %d\n", sizeof(*A3));
  printf("*A4 -> %d\n", sizeof(*A4));
  printf("**A2 -> %d\n", sizeof(**A2));
  printf("**A3 -> %d\n", sizeof(**A3));
  printf("**A4 -> %d\n", sizeof(**A4));
}


x86 assembly (clang, -O0):
<nest2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xee2(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe64(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nest2>:
push   %rax
lea    0xee9(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xea4(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe9a(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xe61(%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 = [11 x i8] c"*A1 -> %d\0A\00"
@.str.5 = [11 x i8] c"*A2 -> %d\0A\00"
@.str.6 = [11 x i8] c"*A3 -> %d\0A\00"
@.str.7 = [11 x i8] c"*A4 -> %d\0A\00"
@.str.8 = [12 x i8] c"**A2 -> %d\0A\00"
@.str.9 = [12 x i8] c"**A3 -> %d\0A\00"
@.str.10 = [12 x i8] c"**A4 -> %d\0A\00"
define void @nest2() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32*]
%3 = alloca [3 x i32]*
%4 = alloca [3 x i32*]
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 12)
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 24)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 8)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 24)
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 4)
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 8)
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 12)
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 8)
%13 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 4)
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 4)
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, 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 = [11 x i8] c"*A1 -> %d\0A\00"
@.str.5 = [11 x i8] c"*A2 -> %d\0A\00"
@.str.6 = [11 x i8] c"*A3 -> %d\0A\00"
@.str.7 = [11 x i8] c"*A4 -> %d\0A\00"
@.str.8 = [12 x i8] c"**A2 -> %d\0A\00"
@.str.9 = [12 x i8] c"**A3 -> %d\0A\00"
@.str.10 = [12 x i8] c"**A4 -> %d\0A\00"
define void @nest2() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 12)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 24)
%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 24)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 8)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 12)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 8)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 4)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 4)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 4)
ret void
}