#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 */
scalar_t__ EOF;
int EXIT_SUCCESS;
scalar_t__ floor(unsigned int);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, unsigned int *, unsigned int *);
double sqrt(double);
int main() {
  unsigned a = 0;
  unsigned b = 0;
  double const phi = (1.0 + sqrt(5.0)) / 2.0;
  while (EOF != scanf("%d %d", &a, &b)) {
    if (a > b) {
      a ^= b;
      b ^= a;
      a ^= b;
    }
    printf("%d\n", (unsigned)floor((b - a) * phi) == a ? 0 : 1);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movsd  0xeab(%rip),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe93(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe7f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    0x2e57(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
lea    0xe79(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
je     1227 <main+0xe7>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jbe    11e3 <main+0xa3>
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    %ecx,%eax
cvtsi2sd %rax,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,%edi
call   1060 <floor@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%edx
mov    $0x1,%esi
xor    %eax,%eax
cmp    %edx,%ecx
cmove  %eax,%esi
lea    0xe01(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <main+0x4a>
mov    0x2daa(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movl   $0x0,(%rsp)
movl   $0x0,0x4(%rsp)
mov    0x2e97(%rip),%r13
mov    0x0(%r13),%rbx
lea    0xeac(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <scanf@plt>
cmp    %rax,%rbx
jne    1186 <main+0x56>
mov    0x2e63(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe81(%rip),%r14
lea    0xe74(%rip),%r15
mov    %rsp,%r12
lea    0x4(%rsp),%rbx
jmp    11ed <main+0xbd>
xchg   %ax,%ax
mov    %eax,0x4(%rsp)
mov    %edx,(%rsp)
mov    %edx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  0xe45(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <floor@plt>
xor    %esi,%esi
cmp    %eax,(%rsp)
setne  %sil
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x0(%r13),%rbp
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    %rax,%rbp
je     116e <main+0x3e>
mov    (%rsp),%eax
mov    0x4(%rsp),%edx
cmp    %edx,%eax
ja     11a0 <main+0x70>
mov    %eax,%ecx
mov    %edx,%eax
jmp    11a9 <main+0x79>

LLVM IR (-O0):
@EOF = global i64 0
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%5 = call double @sqrt(double 5.000000e+00)
%6 = fadd double 1.000000e+00, %5
%7 = fdiv double %6, 2.000000e+00
store double %7, double* %4
br label %8
8: ; preds = %26, %0
%9 = load i64, i64* @EOF
%10 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %41
12: ; preds = %8
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = icmp ugt i32 %13, %14
br i1 %15, label %16, label %26
16: ; preds = %12
%17 = load i32, i32* %3
%18 = load i32, i32* %2
%19 = xor i32 %18, %17
store i32 %19, i32* %2
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = xor i32 %21, %20
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = load i32, i32* %2
%25 = xor i32 %24, %23
store i32 %25, i32* %2
br label %26
26: ; preds = %16, %12
%27 = load i32, i32* %3
%28 = load i32, i32* %2
%29 = sub i32 %27, %28
%30 = uitofp i32 %29 to double
%31 = load double, double* %4
%32 = fmul double %30, %31
%33 = fptoui double %32 to i32
%34 = call i64 @floor(i32 %33)
%35 = trunc i64 %34 to i32
%36 = load i32, i32* %2
%37 = icmp eq i32 %35, %36
%38 = zext i1 %37 to i64
%39 = select i1 %37, i32 0, i32 1
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
br label %8
41: ; preds = %8
%42 = load i32, i32* @EXIT_SUCCESS
ret i32 %42
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = load i64, i64* @EOF
%6 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%7 = icmp eq i64 %5, %6
br i1 %7, label %29, label %8
8: ; preds = %0, %13
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp ugt i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 %9, i32* %2
store i32 %10, i32* %1
br label %13
13: ; preds = %12, %8
%14 = phi i32 [ %10, %12 ], [ %9, %8 ]
%15 = phi i32 [ %9, %12 ], [ %10, %8 ]
%16 = sub i32 %15, %14
%17 = uitofp i32 %16 to double
%18 = fmul double %17, 0x3FF9E3779B97F4A8
%19 = fptoui double %18 to i32
%20 = call i64 @floor(i32 %19)
%21 = trunc i64 %20 to i32
%22 = load i32, i32* %1
%23 = icmp ne i32 %22, %21
%24 = zext i1 %23 to i32
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = load i64, i64* @EOF
%27 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%28 = icmp eq i64 %26, %27
br i1 %28, label %29, label %8
29: ; preds = %13, %0
%30 = load i32, i32* @EXIT_SUCCESS
ret i32 %30
}