#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 *, int *, int, int **, int *, int, int ***,
                          int **, int *, int);
int main() {
  int a = 23;
  int *p = &a;
  int **pp = &p;
  int ***ppp = &pp;
  printf("p:%p\t*p:%d\npp:%p\t*pp:%p\t**pp:%d\nppp:%p\t*ppp:%p\t**ppp:%p\t***"
         "ppp:%d\n",
         p, *p, pp, *pp, **pp, ppp, *ppp, **ppp, ***ppp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
movl   $0x17,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    (%rax),%r8
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%r9d
mov    -0x28(%rbp),%rbx
mov    -0x28(%rbp),%rax
mov    (%rax),%r11
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%r10
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%eax
lea    0xe81(%rip),%rdi
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x17,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsi,0x10(%rsp)
lea    0x10(%rsp),%rcx
mov    %rcx,0x8(%rsp)
lea    0x8(%rsp),%rax
lea    0xec4(%rip),%rdi
mov    $0x17,%edx
mov    %rsi,%r8
mov    $0x17,%r9d
push   $0x17
push   %rsi
push   %rcx
push   %rax
call   1030 <printf@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [67 x i8] c"p:%p\09*p:%d\0App:%p\09*pp:%p\09**pp:%d\0Appp:%p\09*ppp:%p\09**ppp:%p\09***ppp:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32**
%4 = alloca i32***
store i32 23, i32* %1
store i32* %1, i32** %2
store i32** %2, i32*** %3
store i32*** %3, i32**** %4
%5 = load i32*, i32** %2
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = load i32**, i32*** %3
%9 = load i32**, i32*** %3
%10 = load i32*, i32** %9
%11 = load i32**, i32*** %3
%12 = load i32*, i32** %11
%13 = load i32, i32* %12
%14 = load i32***, i32**** %4
%15 = load i32***, i32**** %4
%16 = load i32**, i32*** %15
%17 = load i32***, i32**** %4
%18 = load i32**, i32*** %17
%19 = load i32*, i32** %18
%20 = load i32***, i32**** %4
%21 = load i32**, i32*** %20
%22 = load i32*, i32** %21
%23 = load i32, i32* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32* %5, i32 %7, i32** %8, i32* %10, i32 %13, i32*** %14, i32** %16, i32* %19, i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [67 x i8] c"p:%p\09*p:%d\0App:%p\09*pp:%p\09**pp:%d\0Appp:%p\09*ppp:%p\09**ppp:%p\09***ppp:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32**
%4 = bitcast i32* %1 to i8*
store i32 23, i32* %1
%5 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%6 = bitcast i32*** %3 to i8*
store i32** %2, i32*** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32* %1, i32 23, i32** %2, i32* %1, i32 23, i32*** %3, i32** %2, i32* %1, i32 23)
ret i32 0
}