#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 main(int argc, char *argv[]) {
  int x = 0;
  int y = 10;
  int z = 20;
  printf("int x value : %d, int x address : %p\n", x, &x);
  printf("int y value : %d, int y address : %p\n", y, &y);
  printf("int z value : %d, int z address : %p\n", z, &z);
  int *a = &x;
  int *b = &y;
  int *c = &z;
  printf("int *a value : %d, int *a address : %p\n", *a, &a);
  printf("int *b value : %d, int *b address : %p\n", *b, &b);
  printf("int *c value : %d, int *c address : %p\n", *c, &c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
movl   $0x14,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
lea    0xebb(%rip),%rdi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xecc(%rip),%rdi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xedd(%rip),%rdi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x14(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rdi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%esi
lea    0xee3(%rip),%rdi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%esi
lea    0xef3(%rip),%rdi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
movl   $0x0,0x14(%rsp)
movl   $0xa,0x10(%rsp)
movl   $0x14,0xc(%rsp)
lea    0xec8(%rip),%rdi
lea    0x14(%rsp),%r14
xor    %esi,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0x10(%rsp),%r15
mov    $0xa,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    $0x14,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,0x28(%rsp)
mov    %r15,0x20(%rsp)
mov    %rbx,0x18(%rsp)
mov    0x14(%rsp),%esi
lea    0xed9(%rip),%rdi
lea    0x28(%rsp),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xeea(%rip),%rdi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xefb(%rip),%rdi
lea    0x18(%rsp),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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