#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 b, a;
  scanf("%d %d", &a, &b);
  if (a >= 0 && a <= 7) {
    if (b >= 0 && b <= 200) {
      b = (b >> a) & 1;
      printf("%d", b);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jl     1190 <main+0x70>
cmpl   $0x7,-0xc(%rbp)
jg     1190 <main+0x70>
cmpl   $0x0,-0x8(%rbp)
jl     118b <main+0x6b>
cmpl   $0xc8,-0x8(%rbp)
jg     118b <main+0x6b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
jmp    1190 <main+0x70>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
cmp    $0x7,%ecx
ja     115d <main+0x3d>
mov    (%rsp),%esi
cmp    $0xc8,%esi
ja     115d <main+0x3d>
shr    %cl,%esi
and    $0x1,%esi
mov    %esi,(%rsp)
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
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
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %2)
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %24
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 7
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp sle i32 %14, 200
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = ashr i32 %17, %18
%20 = and i32 %19, 1
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %16, %13, %10
br label %24
24: ; preds = %23, %7, %0
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*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %1)
%6 = load i32, i32* %2
%7 = icmp ult i32 %6, 8
br i1 %7, label %8, label %15
8: ; preds = %0
%9 = load i32, i32* %1
%10 = icmp ult i32 %9, 201
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = lshr i32 %9, %6
%13 = and i32 %12, 1
store i32 %13, i32* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %8, %11, %0
ret i32 0
}