#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b, c;
  int **z, *y;
  scanf("%d %d", &a, &c);
  y = &c;
  z = (int **)&a;
  if (c)
    return 0;
  *z = y;
  z = (int **)&b;
  printf("%p", z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1169 <main+0x49>
movl   $0x0,-0x4(%rbp)
jmp    118c <main+0x6c>
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jne    1158 <main+0x38>
mov    %rbx,(%rsp)
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%p\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32**
%6 = alloca i32*
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %4)
store i32* %4, i32** %6
%8 = bitcast i32* %2 to i32**
store i32** %8, i32*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 0, i32* %1
br label %18
12: ; preds = %0
%13 = load i32*, i32** %6
%14 = load i32**, i32*** %5
store i32* %13, i32** %14
%15 = bitcast i32* %3 to i32**
store i32** %15, i32*** %5
%16 = load i32**, i32*** %5
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32** %16)
br label %18
18: ; preds = %12, %11
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%p\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %3)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = bitcast i32* %1 to i32**
store i32* %3, i32** %11
%12 = bitcast i32* %2 to i32**
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32** %12)
br label %14
14: ; preds = %0, %10
ret i32 0
}