#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, bit;
  do {
    scanf("%d %d", &a, &b);
  } while ((a < 0 || a > 7) || (b < 0 || b > 200));
  bit = (b >> a) & 1;
  printf("%d", bit);
  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
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jl     1183 <main+0x63>
mov    $0x1,%al
cmpl   $0x7,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jg     1183 <main+0x63>
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x12(%rbp)
jl     117d <main+0x5d>
cmpl   $0xc8,-0xc(%rbp)
setg   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe5d(%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   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
cmp    $0x7,%ecx
ja     1140 <main+0x20>
mov    0x8(%rsp),%esi
cmp    $0xc8,%esi
ja     1140 <main+0x20>
shr    %cl,%esi
and    $0x1,%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%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
br label %5
5: ; preds = %21, %0
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
br label %7
7: ; preds = %5
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 0
br i1 %9, label %21, label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 7
br i1 %12, label %21, label %13
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load i32, i32* %3
%18 = icmp sgt i32 %17, 200
br label %19
19: ; preds = %16, %13
%20 = phi i1 [ true, %13 ], [ %18, %16 ]
br label %21
21: ; preds = %19, %10, %7
%22 = phi i1 [ true, %10 ], [ true, %7 ], [ %20, %19 ]
br i1 %22, label %5, label %23
23: ; preds = %21
%24 = load i32, i32* %3
%25 = load i32, i32* %2
%26 = ashr i32 %24, %25
%27 = and i32 %26, 1
store i32 %27, i32* %4
%28 = load i32, i32* %4
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %28)
ret i32 0
}

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