#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*/ x;
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ b;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int x;
  int *b;
  int **c;
  x = 5;
  b = &x;
  c = &b;
  printf(" x %d\n", x);
  printf(" b %p\n", b);
  printf(" c %p\n", c);
  printf("*b %x\n", *b);
  printf("&b %p\n", &b);
  printf("&c %p\n", &c);
  printf("int size   : %d\n", sizeof(int));
  printf("double size: %d\n", sizeof(double));
  printf("float size : %d\n", sizeof(float));
  printf("x size     : %d\n", sizeof(x));
  printf("b size     : %d\n", sizeof(b));
  printf("c size     : %d\n", sizeof(c));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe96(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8b(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe80(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7e(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0x5,0x14(%rsp)
lea    0x14(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,0x18(%rsp)
lea    0xec8(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%rsi
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%esi
lea    0xe9f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe80(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe7e(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c" x %d\0A\00"
@.str.1 = [7 x i8] c" b %p\0A\00"
@.str.2 = [7 x i8] c" c %p\0A\00"
@.str.3 = [7 x i8] c"*b %x\0A\00"
@.str.4 = [7 x i8] c"&b %p\0A\00"
@.str.5 = [7 x i8] c"&c %p\0A\00"
@.str.6 = [17 x i8] c"int size : %d\0A\00"
@.str.7 = [17 x i8] c"double size: %d\0A\00"
@.str.8 = [17 x i8] c"float size : %d\0A\00"
@.str.9 = [17 x i8] c"x size : %d\0A\00"
@.str.10 = [17 x i8] c"b size : %d\0A\00"
@.str.11 = [17 x i8] c"c size : %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32**
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32** %4 to i8*
%8 = bitcast i32*** %5 to i8*
store i32 5, i32* %3
store i32* %3, i32** %4
store i32** %4, i32*** %5
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 5)
%10 = load i32*, i32** %4
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32** %4)
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32** %4)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32*** %5)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i64 4)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i64 8)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i64 4)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i64 4)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i64 8)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i64 8)
ret i32 0
}