#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*/ __VERIFIER_assert(int);
int main() {
  int a, b;
  int *x = &a;
  int *y = &b;
  int *p;
  *x = 0;
  *y = 1;
  __VERIFIER_assert(*x == 0);
  __VERIFIER_assert(*y == 1);
  p = x;
  x = y;
  y = p;
  __VERIFIER_assert(*x == 1);
  __VERIFIER_assert(*y == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x20(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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
store i32* %2, i32** %4
store i32* %3, i32** %5
%7 = load i32*, i32** %4
store i32 0, i32* %7
%8 = load i32*, i32** %5
store i32 1, i32* %8
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @__VERIFIER_assert(i32 %12)
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 1
%17 = zext i1 %16 to i32
%18 = call i32 @__VERIFIER_assert(i32 %17)
%19 = load i32*, i32** %4
store i32* %19, i32** %6
%20 = load i32*, i32** %5
store i32* %20, i32** %4
%21 = load i32*, i32** %6
store i32* %21, i32** %5
%22 = load i32*, i32** %4
%23 = load i32, i32* %22
%24 = icmp eq i32 %23, 1
%25 = zext i1 %24 to i32
%26 = call i32 @__VERIFIER_assert(i32 %25)
%27 = load i32*, i32** %5
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, 0
%30 = zext i1 %29 to i32
%31 = call i32 @__VERIFIER_assert(i32 %30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
%2 = tail call i32 @__VERIFIER_assert(i32 1)
%3 = tail call i32 @__VERIFIER_assert(i32 1)
%4 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}