#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char c = 'A';
  char *pc = &c;
  char *p[3], *p1[3][3], **p2[3], **p3[3][3], *(*p4)[3], (**p5)[3],
      (**p6)[3][3], (*(*p7))[3];
  p[1] = pc;
  printf("*pc is %c\n", *pc);
  printf("*p[1] is %c\n", *p[1]);
  printf("**(p + 1) is %c\n", **(p + 1));
  p1[0][0] = pc;
  printf("*p1[0][0] is %c\n", *p1[0][0]);
  printf("**p1[0] is %c\n", **p1[0]);
  printf("***p1 is %c\n", ***p1);
  p2[0] = &pc;
  printf("*p2[0][0] is %c\n", *p2[0][0]);
  printf("**p2[0] is %c\n", **p2[0]);
  printf("***p2 is %c\n", ***p2);
  p3[0][0] = &pc;
  printf("*p3[0][0][0] is %c\n", *p3[0][0][0]);
  printf("**p3[0][0] is %c\n", **p3[0][0]);
  printf("***p3[0] is %c\n", ***p3[0]);
  printf("****p3[0] is %c\n", ****p3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movb   $0x41,-0x1(%rbp)
lea    -0x1(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
lea    0xec6(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
lea    0xebe(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
lea    0xeb8(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
lea    0xeae(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x80(%rbp),%rax
lea    0xeac(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x80(%rbp),%rax
lea    0xea8(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
lea    -0x10(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    (%rax),%rax
lea    0xe91(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0xa0(%rbp),%rax
mov    (%rax),%rax
lea    0xe89(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0xa0(%rbp),%rax
mov    (%rax),%rax
lea    0xe7f(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
lea    -0x10(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rax
mov    (%rax),%rax
lea    0xe68(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0xf0(%rbp),%rax
mov    (%rax),%rax
lea    0xe63(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0xf0(%rbp),%rax
mov    (%rax),%rax
lea    0xe5d(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0xf0(%rbp),%rax
mov    (%rax),%rax
lea    0xe43(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"*pc is %c\0A\00"
@.str.1 = [13 x i8] c"*p[1] is %c\0A\00"
@.str.2 = [17 x i8] c"**(p + 1) is %c\0A\00"
@.str.3 = [17 x i8] c"*p1[0][0] is %c\0A\00"
@.str.4 = [15 x i8] c"**p1[0] is %c\0A\00"
@.str.5 = [13 x i8] c"***p1 is %c\0A\00"
@.str.6 = [17 x i8] c"*p2[0][0] is %c\0A\00"
@.str.7 = [15 x i8] c"**p2[0] is %c\0A\00"
@.str.8 = [13 x i8] c"***p2 is %c\0A\00"
@.str.9 = [20 x i8] c"*p3[0][0][0] is %c\0A\00"
@.str.10 = [18 x i8] c"**p3[0][0] is %c\0A\00"
@.str.11 = [16 x i8] c"***p3[0] is %c\0A\00"
@.str.12 = [17 x i8] c"****p3[0] is %c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8*
%3 = alloca [3 x i8*]
%4 = alloca [3 x [3 x i8*]]
%5 = alloca [3 x i8**]
%6 = alloca [3 x [3 x i8**]]
%7 = alloca [3 x i8*]*
%8 = alloca [3 x i8]**
%9 = alloca [3 x [3 x i8]]**
%10 = alloca [3 x i8]**
store i8 65, i8* %1
store i8* %1, i8** %2
%11 = load i8*, i8** %2
%12 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 1
store i8* %11, i8** %12
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext %14)
%16 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 1
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8 signext %18)
%20 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = load i8, i8* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8 signext %23)
%25 = load i8*, i8** %2
%26 = getelementptr inbounds [3 x [3 x i8*]], [3 x [3 x i8*]]* %4, i64 0, i64 0
%27 = getelementptr inbounds [3 x i8*], [3 x i8*]* %26, i64 0, i64 0
store i8* %25, i8** %27
%28 = getelementptr inbounds [3 x [3 x i8*]], [3 x [3 x i8*]]* %4, i64 0, i64 0
%29 = getelementptr inbounds [3 x i8*], [3 x i8*]* %28, i64 0, i64 0
%30 = load i8*, i8** %29
%31 = load i8, i8* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8 signext %31)
%33 = getelementptr inbounds [3 x [3 x i8*]], [3 x [3 x i8*]]* %4, i64 0, i64 0
%34 = getelementptr inbounds [3 x i8*], [3 x i8*]* %33, i64 0, i64 0
%35 = load i8*, i8** %34
%36 = load i8, i8* %35
%37 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8 signext %36)
%38 = getelementptr inbounds [3 x [3 x i8*]], [3 x [3 x i8*]]* %4, i64 0, i64 0
%39 = getelementptr inbounds [3 x i8*], [3 x i8*]* %38, i64 0, i64 0
%40 = load i8*, i8** %39
%41 = load i8, i8* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8 signext %41)
%43 = getelementptr inbounds [3 x i8**], [3 x i8**]* %5, i64 0, i64 0
store i8** %2, i8*** %43
%44 = getelementptr inbounds [3 x i8**], [3 x i8**]* %5, i64 0, i64 0
%45 = load i8**, i8*** %44
%46 = getelementptr inbounds i8*, i8** %45, i64 0
%47 = load i8*, i8** %46
%48 = load i8, i8* %47
%49 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8 signext %48)
%50 = getelementptr inbounds [3 x i8**], [3 x i8**]* %5, i64 0, i64 0
%51 = load i8**, i8*** %50
%52 = load i8*, i8** %51
%53 = load i8, i8* %52
%54 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8 signext %53)
%55 = getelementptr inbounds [3 x i8**], [3 x i8**]* %5, i64 0, i64 0
%56 = load i8**, i8*** %55
%57 = load i8*, i8** %56
%58 = load i8, i8* %57
%59 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8 signext %58)
%60 = getelementptr inbounds [3 x [3 x i8**]], [3 x [3 x i8**]]* %6, i64 0, i64 0
%61 = getelementptr inbounds [3 x i8**], [3 x i8**]* %60, i64 0, i64 0
store i8** %2, i8*** %61
%62 = getelementptr inbounds [3 x [3 x i8**]], [3 x [3 x i8**]]* %6, i64 0, i64 0
%63 = getelementptr inbounds [3 x i8**], [3 x i8**]* %62, i64 0, i64 0
%64 = load i8**, i8*** %63
%65 = getelementptr inbounds i8*, i8** %64, i64 0
%66 = load i8*, i8** %65
%67 = load i8, i8* %66
%68 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8 signext %67)
%69 = getelementptr inbounds [3 x [3 x i8**]], [3 x [3 x i8**]]* %6, i64 0, i64 0
%70 = getelementptr inbounds [3 x i8**], [3 x i8**]* %69, i64 0, i64 0
%71 = load i8**, i8*** %70
%72 = load i8*, i8** %71
%73 = load i8, i8* %72
%74 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8 signext %73)
%75 = getelementptr inbounds [3 x [3 x i8**]], [3 x [3 x i8**]]* %6, i64 0, i64 0
%76 = getelementptr inbounds [3 x i8**], [3 x i8**]* %75, i64 0, i64 0
%77 = load i8**, i8*** %76
%78 = load i8*, i8** %77
%79 = load i8, i8* %78
%80 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8 signext %79)
%81 = getelementptr inbounds [3 x [3 x i8**]], [3 x [3 x i8**]]* %6, i64 0, i64 0
%82 = getelementptr inbounds [3 x i8**], [3 x i8**]* %81, i64 0, i64 0
%83 = load i8**, i8*** %82
%84 = load i8*, i8** %83
%85 = load i8, i8* %84
%86 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8 signext %85)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"*pc is %c\0A\00"
@.str.1 = [13 x i8] c"*p[1] is %c\0A\00"
@.str.2 = [17 x i8] c"**(p + 1) is %c\0A\00"
@.str.3 = [17 x i8] c"*p1[0][0] is %c\0A\00"
@.str.4 = [15 x i8] c"**p1[0] is %c\0A\00"
@.str.5 = [13 x i8] c"***p1 is %c\0A\00"
@.str.6 = [17 x i8] c"*p2[0][0] is %c\0A\00"
@.str.7 = [15 x i8] c"**p2[0] is %c\0A\00"
@.str.8 = [13 x i8] c"***p2 is %c\0A\00"
@.str.9 = [20 x i8] c"*p3[0][0][0] is %c\0A\00"
@.str.10 = [18 x i8] c"**p3[0][0] is %c\0A\00"
@.str.11 = [16 x i8] c"***p3[0] is %c\0A\00"
@.str.12 = [17 x i8] c"****p3[0] is %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8 signext 65)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8 signext 65)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8 signext 65)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8 signext 65)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8 signext 65)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8 signext 65)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8 signext 65)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8 signext 65)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8 signext 65)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8 signext 65)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8 signext 65)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8 signext 65)
ret i32 0
}