#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 /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n, k, result, temp;
  while (1) {
    scanf("%d", &n);
    if (n == 0)
      break;
    result = 0;
    for (k = 2; k <= 31; k++) {
      temp = (1 << k) - 1;
      if (n == temp) {
        result = 1;
        break;
      } else {
        if (n < temp)
          break;
      }
    }
    if (result == 1)
      printf("Bob\n");
    else
      printf("Alice\n");
  }
  return 0;
}


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
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    114e <main+0x2e>
jmp    11e3 <main+0xc3>
movl   $0x0,-0x10(%rbp)
movl   $0x2,-0xc(%rbp)
cmpl   $0x1f,-0xc(%rbp)
jg     11b7 <main+0x97>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    118e <main+0x6e>
movl   $0x1,-0x10(%rbp)
jmp    11b7 <main+0x97>
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    119f <main+0x7f>
jmp    11b7 <main+0x97>
jmp    11a4 <main+0x84>
jmp    11a9 <main+0x89>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115c <main+0x3c>
cmpl   $0x1,-0x10(%rbp)
jne    11d2 <main+0xb2>
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xbe>
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     119e <main+0x7e>
lea    0xec1(%rip),%r15
lea    0xeb1(%rip),%r14
lea    0x4(%rsp),%rbx
lea    0xea8(%rip),%r12
jmp    117b <main+0x5b>
nopl   (%rax)
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     119e <main+0x7e>
mov    $0x2,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
not    %edx
cmp    %edx,%eax
je     1160 <main+0x40>
jl     1199 <main+0x79>
lea    0x1(%rcx),%edx
cmp    $0x1f,%ecx
mov    %edx,%ecx
jb     1180 <main+0x60>
mov    %r12,%rdi
jmp    1163 <main+0x43>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"Bob\0A\00"
@.str.2 = [7 x i8] c"Alice\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
br label %6
6: ; preds = %0, %40
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
br label %41
11: ; preds = %6
store i32 0, i32* %4
store i32 2, i32* %3
br label %12
12: ; preds = %30, %11
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 31
br i1 %14, label %15, label %33
15: ; preds = %12
%16 = load i32, i32* %3
%17 = shl i32 1, %16
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %5
%19 = load i32, i32* %2
%20 = load i32, i32* %5
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %15
store i32 1, i32* %4
br label %33
23: ; preds = %15
%24 = load i32, i32* %2
%25 = load i32, i32* %5
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %28
27: ; preds = %23
br label %33
28: ; preds = %23
br label %29
29: ; preds = %28
br label %30
30: ; preds = %29
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %12
33: ; preds = %27, %22, %12
%34 = load i32, i32* %4
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %40
38: ; preds = %33
%39 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38, %36
br label %6
41: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [6 x i8] c"Alice\00"
@str.3 = [4 x i8] c"Bob\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %24, label %6
6: ; preds = %0, %18
%7 = phi i32 [ %22, %18 ], [ %4, %0 ]
br label %8
8: ; preds = %13, %6
%9 = phi i32 [ 2, %6 ], [ %15, %13 ]
%10 = shl nsw i32 -1, %9
%11 = xor i32 %10, -1
%12 = icmp eq i32 %7, %11
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = icmp sge i32 %7, %11
%15 = add nuw nsw i32 %9, 1
%16 = icmp ult i32 %9, 31
%17 = select i1 %14, i1 %16, i1 false
br i1 %17, label %8, label %18
18: ; preds = %13, %8
%19 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), %8 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0), %13 ]
%20 = call i32 @puts(i8* dereferenceable(1) %19)
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%22 = load i32, i32* %1
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %6
24: ; preds = %18, %0
ret i32 0
}