#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);
void main(void) {
  int a[] = {10, 20, 30, 40, 50, 60};
  int *p[] = {a, a + 1, a + 2, a + 3, a + 4, a + 5};
  int **pp = p;
  pp++;
  printf("%ld,%ld,%d\n", pp - p, *pp - a, **pp);
  *pp++;
  printf("%ld,%ld,%d\n", pp - p, *pp - a, **pp);
  ++*pp;
  printf("%ld,%ld,%d\n", pp - p, *pp - a, **pp);
  ++**pp;
  printf("%ld,%ld,%d\n", pp - p, *pp - a, **pp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
lea    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x48(%rbp)
lea    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x40(%rbp)
lea    -0x20(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x38(%rbp)
lea    -0x20(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x30(%rbp)
lea    -0x20(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x28(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
lea    -0x50(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
mov    %eax,%esi
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%edx
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
mov    -0x58(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
lea    -0x50(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
mov    %eax,%esi
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%edx
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x58(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    -0x58(%rbp),%rax
lea    -0x50(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
mov    %eax,%esi
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%edx
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
lea    0xdc4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x58(%rbp),%rax
lea    -0x50(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
mov    %eax,%esi
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%edx
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
lea    0xd7c(%rip),%rdi
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0x1e,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x28,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x29,%ecx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__const.main.a = [6 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50, i32 60]
@.str = [12 x i8] c"%ld,%ld,%d\0A\00"
define void @main() {
%1 = alloca [6 x i32]
%2 = alloca [6 x i32*]
%3 = alloca i32**
%4 = bitcast [6 x i32]* %1 to i8*
%5 = getelementptr inbounds [6 x i32*], [6 x i32*]* %2, i64 0, i64 0
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
store i32* %6, i32** %5
%7 = getelementptr inbounds i32*, i32** %5, i64 1
%8 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32* %9, i32** %7
%10 = getelementptr inbounds i32*, i32** %7, i64 1
%11 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%12 = getelementptr inbounds i32, i32* %11, i64 2
store i32* %12, i32** %10
%13 = getelementptr inbounds i32*, i32** %10, i64 1
%14 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%15 = getelementptr inbounds i32, i32* %14, i64 3
store i32* %15, i32** %13
%16 = getelementptr inbounds i32*, i32** %13, i64 1
%17 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%18 = getelementptr inbounds i32, i32* %17, i64 4
store i32* %18, i32** %16
%19 = getelementptr inbounds i32*, i32** %16, i64 1
%20 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%21 = getelementptr inbounds i32, i32* %20, i64 5
store i32* %21, i32** %19
%22 = getelementptr inbounds [6 x i32*], [6 x i32*]* %2, i64 0, i64 0
store i32** %22, i32*** %3
%23 = load i32**, i32*** %3
%24 = getelementptr inbounds i32*, i32** %23, i32 1
store i32** %24, i32*** %3
%25 = load i32**, i32*** %3
%26 = getelementptr inbounds [6 x i32*], [6 x i32*]* %2, i64 0, i64 0
%27 = ptrtoint i32** %25 to i64
%28 = ptrtoint i32** %26 to i64
%29 = sub i64 %27, %28
%30 = sdiv exact i64 %29, 8
%31 = trunc i64 %30 to i32
%32 = load i32**, i32*** %3
%33 = load i32*, i32** %32
%34 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%35 = ptrtoint i32* %33 to i64
%36 = ptrtoint i32* %34 to i64
%37 = sub i64 %35, %36
%38 = sdiv exact i64 %37, 4
%39 = trunc i64 %38 to i32
%40 = load i32**, i32*** %3
%41 = load i32*, i32** %40
%42 = load i32, i32* %41
%43 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %31, i32 %39, i32 %42)
%44 = load i32**, i32*** %3
%45 = getelementptr inbounds i32*, i32** %44, i32 1
store i32** %45, i32*** %3
%46 = load i32*, i32** %44
%47 = load i32**, i32*** %3
%48 = getelementptr inbounds [6 x i32*], [6 x i32*]* %2, i64 0, i64 0
%49 = ptrtoint i32** %47 to i64
%50 = ptrtoint i32** %48 to i64
%51 = sub i64 %49, %50
%52 = sdiv exact i64 %51, 8
%53 = trunc i64 %52 to i32
%54 = load i32**, i32*** %3
%55 = load i32*, i32** %54
%56 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%57 = ptrtoint i32* %55 to i64
%58 = ptrtoint i32* %56 to i64
%59 = sub i64 %57, %58
%60 = sdiv exact i64 %59, 4
%61 = trunc i64 %60 to i32
%62 = load i32**, i32*** %3
%63 = load i32*, i32** %62
%64 = load i32, i32* %63
%65 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %53, i32 %61, i32 %64)
%66 = load i32**, i32*** %3
%67 = load i32*, i32** %66
%68 = getelementptr inbounds i32, i32* %67, i32 1
store i32* %68, i32** %66
%69 = load i32**, i32*** %3
%70 = getelementptr inbounds [6 x i32*], [6 x i32*]* %2, i64 0, i64 0
%71 = ptrtoint i32** %69 to i64
%72 = ptrtoint i32** %70 to i64
%73 = sub i64 %71, %72
%74 = sdiv exact i64 %73, 8
%75 = trunc i64 %74 to i32
%76 = load i32**, i32*** %3
%77 = load i32*, i32** %76
%78 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%79 = ptrtoint i32* %77 to i64
%80 = ptrtoint i32* %78 to i64
%81 = sub i64 %79, %80
%82 = sdiv exact i64 %81, 4
%83 = trunc i64 %82 to i32
%84 = load i32**, i32*** %3
%85 = load i32*, i32** %84
%86 = load i32, i32* %85
%87 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %75, i32 %83, i32 %86)
%88 = load i32**, i32*** %3
%89 = load i32*, i32** %88
%90 = load i32, i32* %89
%91 = add nsw i32 %90, 1
store i32 %91, i32* %89
%92 = load i32**, i32*** %3
%93 = getelementptr inbounds [6 x i32*], [6 x i32*]* %2, i64 0, i64 0
%94 = ptrtoint i32** %92 to i64
%95 = ptrtoint i32** %93 to i64
%96 = sub i64 %94, %95
%97 = sdiv exact i64 %96, 8
%98 = trunc i64 %97 to i32
%99 = load i32**, i32*** %3
%100 = load i32*, i32** %99
%101 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%102 = ptrtoint i32* %100 to i64
%103 = ptrtoint i32* %101 to i64
%104 = sub i64 %102, %103
%105 = sdiv exact i64 %104, 4
%106 = trunc i64 %105 to i32
%107 = load i32**, i32*** %3
%108 = load i32*, i32** %107
%109 = load i32, i32* %108
%110 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %98, i32 %106, i32 %109)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%ld,%ld,%d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 20)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i32 2, i32 30)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i32 3, i32 40)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i32 3, i32 41)
ret void
}