int main(void) {
  int a = 5;
  int *b = &a;
  int **c = &b;
  func_0(a);
  func_0(*b);
  func_0(**c);
  puts("");
  func_1a(&a);
  func_1a(b);
  func_1a(*c);
  puts("");
  func_1b(&a);
  func_1b(b);
  func_1b(*c);
  puts("");
  func_1c(&a);
  func_1c(b);
  func_1c(*c);
  puts("");
  func_2a((int const **)&b);
  func_2a((int const **)c);
  puts("");
  func_2b(&b);
  func_2b(c);
  puts("");
  func_2c(&b);
  func_2c(c);
  puts("");
  func_2d((int const *const *)&b);
  func_2d((int const *const *)c);
  puts("");
  func_2e((int const **const)&b);
  func_2e((int const **const)c);
  puts("");
  func_2f(&b);
  func_2f(c);
  puts("");
  func_2g((int const *const *const)&b);
  func_2g((int const *const *const)c);
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1070 <func_0@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1070 <func_0@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1070 <func_0@plt>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <func_1a@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1080 <func_1a@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1080 <func_1a@plt>
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x8(%rbp),%rdi
mov    $0x0,%al
call   10e0 <func_1b@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10e0 <func_1b@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   10e0 <func_1b@plt>
lea    0xd88(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1090 <func_1c@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1090 <func_1c@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1090 <func_1c@plt>
lea    0xd56(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10a0 <func_2a@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   10a0 <func_2a@plt>
lea    0xd32(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <func_2b@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <func_2b@plt>
lea    0xd0e(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10c0 <func_2c@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   10c0 <func_2c@plt>
lea    0xcea(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <func_2d@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <func_2d@plt>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10b0 <func_2e@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   10b0 <func_2e@plt>
lea    0xca2(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1060 <func_2f@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1060 <func_2f@plt>
lea    0xc7e(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10d0 <func_2g@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   10d0 <func_2g@plt>
lea    0xc5a(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x5,0x14(%rsp)
lea    0x14(%rsp),%rbx
mov    %rbx,0x8(%rsp)
mov    $0x5,%edi
xor    %eax,%eax
call   1070 <func_0@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%edi
xor    %eax,%eax
call   1070 <func_0@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%edi
xor    %eax,%eax
call   1070 <func_0@plt>
lea    0xdf8(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <func_1a@plt>
mov    0x8(%rsp),%rdi
xor    %eax,%eax
call   1080 <func_1a@plt>
mov    0x8(%rsp),%rdi
xor    %eax,%eax
call   1080 <func_1a@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <func_1b@plt>
mov    0x8(%rsp),%rdi
xor    %eax,%eax
call   10e0 <func_1b@plt>
mov    0x8(%rsp),%rdi
xor    %eax,%eax
call   10e0 <func_1b@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <func_1c@plt>
mov    0x8(%rsp),%rdi
xor    %eax,%eax
call   1090 <func_1c@plt>
mov    0x8(%rsp),%rdi
xor    %eax,%eax
call   1090 <func_1c@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <func_2a@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <func_2a@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <func_2b@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <func_2b@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10c0 <func_2c@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10c0 <func_2c@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <func_2d@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <func_2d@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <func_2e@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <func_2e@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <func_2f@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <func_2f@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10d0 <func_2g@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10d0 <func_2g@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32**
store i32 0, i32* %1
store i32 5, i32* %2
store i32* %2, i32** %3
store i32** %3, i32*** %4
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @func_0 to i32 (i32, ...)*)(i32 %5)
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = call i32 (i32, ...) bitcast (i32 (...)* @func_0 to i32 (i32, ...)*)(i32 %8)
%10 = load i32**, i32*** %4
%11 = load i32*, i32** %10
%12 = load i32, i32* %11
%13 = call i32 (i32, ...) bitcast (i32 (...)* @func_0 to i32 (i32, ...)*)(i32 %12)
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1a to i32 (i32*, ...)*)(i32* %2)
%16 = load i32*, i32** %3
%17 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1a to i32 (i32*, ...)*)(i32* %16)
%18 = load i32**, i32*** %4
%19 = load i32*, i32** %18
%20 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1a to i32 (i32*, ...)*)(i32* %19)
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%22 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1b to i32 (i32*, ...)*)(i32* %2)
%23 = load i32*, i32** %3
%24 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1b to i32 (i32*, ...)*)(i32* %23)
%25 = load i32**, i32*** %4
%26 = load i32*, i32** %25
%27 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1b to i32 (i32*, ...)*)(i32* %26)
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%29 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1c to i32 (i32*, ...)*)(i32* %2)
%30 = load i32*, i32** %3
%31 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1c to i32 (i32*, ...)*)(i32* %30)
%32 = load i32**, i32*** %4
%33 = load i32*, i32** %32
%34 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1c to i32 (i32*, ...)*)(i32* %33)
%35 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%36 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2a to i32 (i32**, ...)*)(i32** %3)
%37 = load i32**, i32*** %4
%38 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2a to i32 (i32**, ...)*)(i32** %37)
%39 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%40 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2b to i32 (i32**, ...)*)(i32** %3)
%41 = load i32**, i32*** %4
%42 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2b to i32 (i32**, ...)*)(i32** %41)
%43 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%44 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2c to i32 (i32**, ...)*)(i32** %3)
%45 = load i32**, i32*** %4
%46 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2c to i32 (i32**, ...)*)(i32** %45)
%47 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%48 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2d to i32 (i32**, ...)*)(i32** %3)
%49 = load i32**, i32*** %4
%50 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2d to i32 (i32**, ...)*)(i32** %49)
%51 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%52 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2e to i32 (i32**, ...)*)(i32** %3)
%53 = load i32**, i32*** %4
%54 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2e to i32 (i32**, ...)*)(i32** %53)
%55 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%56 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2f to i32 (i32**, ...)*)(i32** %3)
%57 = load i32**, i32*** %4
%58 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2f to i32 (i32**, ...)*)(i32** %57)
%59 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%60 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2g to i32 (i32**, ...)*)(i32** %3)
%61 = load i32**, i32*** %4
%62 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2g to i32 (i32**, ...)*)(i32** %61)
%63 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @func_0 to i32 (i32, ...)*)(i32 5)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 (i32, ...) bitcast (i32 (...)* @func_0 to i32 (i32, ...)*)(i32 %7)
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = call i32 (i32, ...) bitcast (i32 (...)* @func_0 to i32 (i32, ...)*)(i32 %10)
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1a to i32 (i32*, ...)*)(i32* %1)
%14 = load i32*, i32** %2
%15 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1a to i32 (i32*, ...)*)(i32* %14)
%16 = load i32*, i32** %2
%17 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1a to i32 (i32*, ...)*)(i32* %16)
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1b to i32 (i32*, ...)*)(i32* %1)
%20 = load i32*, i32** %2
%21 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1b to i32 (i32*, ...)*)(i32* %20)
%22 = load i32*, i32** %2
%23 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1b to i32 (i32*, ...)*)(i32* %22)
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%25 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1c to i32 (i32*, ...)*)(i32* %1)
%26 = load i32*, i32** %2
%27 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1c to i32 (i32*, ...)*)(i32* %26)
%28 = load i32*, i32** %2
%29 = call i32 (i32*, ...) bitcast (i32 (...)* @func_1c to i32 (i32*, ...)*)(i32* %28)
%30 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%31 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2a to i32 (i32**, ...)*)(i32** %2)
%32 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2a to i32 (i32**, ...)*)(i32** %2)
%33 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%34 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2b to i32 (i32**, ...)*)(i32** %2)
%35 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2b to i32 (i32**, ...)*)(i32** %2)
%36 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%37 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2c to i32 (i32**, ...)*)(i32** %2)
%38 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2c to i32 (i32**, ...)*)(i32** %2)
%39 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%40 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2d to i32 (i32**, ...)*)(i32** %2)
%41 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2d to i32 (i32**, ...)*)(i32** %2)
%42 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%43 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2e to i32 (i32**, ...)*)(i32** %2)
%44 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2e to i32 (i32**, ...)*)(i32** %2)
%45 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%46 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2f to i32 (i32**, ...)*)(i32** %2)
%47 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2f to i32 (i32**, ...)*)(i32** %2)
%48 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%49 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2g to i32 (i32**, ...)*)(i32** %2)
%50 = call i32 (i32**, ...) bitcast (i32 (...)* @func_2g to i32 (i32**, ...)*)(i32** %2)
%51 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}