int main() {
  int c, a = 10, b, *p, **ptr;
  clr();
  p = &a;
  b = *p;
  c = p;
  ptr = &p;
  gotoxy(10, 10);
  printf("The value of 'a' is %d \n", a);
  printf("a %d is stored at address %u \n", a, &a);
  printf("*p %d is stored ad address %u \n", *p, p);
  printf("b %d is stored at address %u \n", b, &b);
  printf("c %d is stored at address %u \n", c, &c);
  printf("**ptr %d is stored at address %u \n", **ptr, ptr);
  printf("Assigning value 5 to variable a \n");
  a = 5;
  printf("a %d is stored at address %u \n", a, &a);
  printf("*p %d is stored ad address %u \n", *p, p);
  printf("b %d is stored at address %u \n", b, &b);
  printf("c %d is stored at address %u \n", c, &c);
  printf("**ptr %d is stored at address %u \n", **ptr, ptr);
  int ***ptr2;
  ptr2 = &ptr;
  printf("***ptr2 %d is stored at address %u \n", ***ptr2, ptr2);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0xa,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clr@plt>
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0xa,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1060 <gotoxy@plt>
mov    -0x8(%rbp),%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe7a(%rip),%rdi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe8c(%rip),%rdi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe96(%rip),%rdi
lea    -0x4(%rbp),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rdx
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdf3(%rip),%rdi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe05(%rip),%rdi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe0f(%rip),%rdi
lea    -0x4(%rbp),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rdx
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rdx
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movl   $0xa,0xc(%rsp)
xor    %eax,%eax
call   1030 <clr@plt>
lea    0xc(%rsp),%rbx
mov    %rbx,0x10(%rsp)
movl   $0xa,0x18(%rsp)
mov    %ebx,0x1c(%rsp)
lea    0x10(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    $0xa,%edi
mov    $0xa,%esi
xor    %eax,%eax
call   1070 <gotoxy@plt>
mov    0xc(%rsp),%esi
lea    0xe57(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xe5e(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rdx
mov    (%rdx),%esi
lea    0xe65(%rip),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe74(%rip),%rbp
lea    0x18(%rsp),%rdx
mov    %rbp,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe78(%rip),%r15
lea    0x1c(%rsp),%r14
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%esi
lea    0xe75(%rip),%r12
mov    %r12,%rdi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
call   1040 <puts@plt>
movl   $0x5,0xc(%rsp)
lea    0xdce(%rip),%rdi
mov    $0x5,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rdx
mov    (%rdx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
lea    0x18(%rsp),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %r15,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%esi
mov    %r12,%rdi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%esi
lea    0xe06(%rip),%rdi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"The value of 'a' is %d \0A\00"
@.str.1 = [31 x i8] c"a %d is stored at address %u \0A\00"
@.str.2 = [32 x i8] c"*p %d is stored ad address %u \0A\00"
@.str.3 = [31 x i8] c"b %d is stored at address %u \0A\00"
@.str.4 = [31 x i8] c"c %d is stored at address %u \0A\00"
@.str.5 = [35 x i8] c"**ptr %d is stored at address %u \0A\00"
@.str.6 = [34 x i8] c"Assigning value 5 to variable a \0A\00"
@.str.7 = [37 x i8] c"***ptr2 %d is stored at address %u \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32**
%6 = alloca i32***
store i32 10, i32* %2
%7 = call i32 (...) @clr()
store i32* %2, i32** %4
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
store i32 %9, i32* %3
%10 = load i32*, i32** %4
%11 = ptrtoint i32* %10 to i32
store i32 %11, i32* %1
store i32** %4, i32*** %5
%12 = call i32 (i32, i32, ...) bitcast (i32 (...)* @gotoxy to i32 (i32, i32, ...)*)(i32 10, i32 10)
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32* %2)
%17 = load i32*, i32** %4
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32* %19)
%21 = load i32, i32* %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 %21, i32* %3)
%23 = load i32, i32* %1
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %23, i32* %1)
%25 = load i32**, i32*** %5
%26 = load i32*, i32** %25
%27 = load i32, i32* %26
%28 = load i32**, i32*** %5
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %27, i32** %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
store i32 5, i32* %2
%31 = load i32, i32* %2
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %31, i32* %2)
%33 = load i32*, i32** %4
%34 = load i32, i32* %33
%35 = load i32*, i32** %4
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %34, i32* %35)
%37 = load i32, i32* %3
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 %37, i32* %3)
%39 = load i32, i32* %1
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %39, i32* %1)
%41 = load i32**, i32*** %5
%42 = load i32*, i32** %41
%43 = load i32, i32* %42
%44 = load i32**, i32*** %5
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %43, i32** %44)
store i32*** %5, i32**** %6
%46 = load i32***, i32**** %6
%47 = load i32**, i32*** %46
%48 = load i32*, i32** %47
%49 = load i32, i32* %48
%50 = load i32***, i32**** %6
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i32 %49, i32*** %50)
%52 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"The value of 'a' is %d \0A\00"
@.str.1 = [31 x i8] c"a %d is stored at address %u \0A\00"
@.str.2 = [32 x i8] c"*p %d is stored ad address %u \0A\00"
@.str.3 = [31 x i8] c"b %d is stored at address %u \0A\00"
@.str.4 = [31 x i8] c"c %d is stored at address %u \0A\00"
@.str.5 = [35 x i8] c"**ptr %d is stored at address %u \0A\00"
@.str.7 = [37 x i8] c"***ptr2 %d is stored at address %u \0A\00"
@str = [33 x i8] c"Assigning value 5 to variable a \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32**
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
store i32 10, i32* %2
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32** %4 to i8*
%10 = bitcast i32*** %5 to i8*
%11 = tail call i32 (...) @clr()
store i32* %2, i32** %4
store i32 10, i32* %3
%12 = ptrtoint i32* %2 to i64
%13 = trunc i64 %12 to i32
store i32 %13, i32* %1
store i32** %4, i32*** %5
%14 = call i32 (i32, i32, ...) bitcast (i32 (...)* @gotoxy to i32 (i32, i32, ...)*)(i32 10, i32 10)
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32* %2)
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %20, i32* %19)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 10, i32* %3)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %13, i32* %1)
%24 = load i32*, i32** %4
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %25, i32** %4)
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
store i32 5, i32* %2
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 5, i32* %2)
%29 = load i32*, i32** %4
%30 = load i32, i32* %29
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32* %29)
%32 = load i32, i32* %3
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 %32, i32* %3)
%34 = load i32, i32* %1
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %34, i32* %1)
%36 = load i32*, i32** %4
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %37, i32** %4)
%39 = load i32*, i32** %4
%40 = load i32, i32* %39
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i32 %40, i32*** %5)
%42 = call i32 (...) @getchar()
ret i32 0
}