#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 *);
int main() {
  int n, v = 2, p = 8;
  while ((p < 0 || p > 7) && (v != 1 || v != 0)) {
    scanf("%d %d %d", &n, &v, &p);
  }
  printf("%d", n ^ (1 << p));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x8,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1156 <main+0x36>
xor    %eax,%eax
cmpl   $0x7,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jle    1175 <main+0x55>
mov    $0x1,%al
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0x12(%rbp)
jne    116f <main+0x4f>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1185 <main+0x65>
jmp    11a2 <main+0x82>
lea    0xe74(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    %eax,%esi
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x2,0x10(%rsp)
movl   $0x8,0xc(%rsp)
lea    0xebe(%rip),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x7,%eax
ja     1160 <main+0x40>
mov    0x14(%rsp),%esi
btc    %eax,%esi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %3
store i32 8, i32* %4
br label %5
5: ; preds = %21, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 7
br i1 %10, label %11, label %19
11: ; preds = %8, %5
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 1
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp ne i32 %15, 0
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ true, %11 ], [ %16, %14 ]
br label %19
19: ; preds = %17, %8
%20 = phi i1 [ false, %8 ], [ %18, %17 ]
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
br label %5
23: ; preds = %19
%24 = load i32, i32* %2
%25 = load i32, i32* %4
%26 = shl i32 1, %25
%27 = xor i32 %24, %26
%28 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [3 x i8] c"%d\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*
store i32 2, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 8, i32* %3
br label %7
7: ; preds = %0, %7
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %3
%10 = icmp ugt i32 %9, 7
br i1 %10, label %7, label %11
11: ; preds = %7
%12 = load i32, i32* %1
%13 = shl nuw nsw i32 1, %9
%14 = xor i32 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}