#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;
  int b;
  scanf("%d %d", &a, &b);
  if (a < 0 || a > 7) {
    return 0;
  }
  if (b < 0 || b > 200) {
    return 0;
  }
  b = (b >> a) & 1;
  printf("%d\n", 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    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1157 <main+0x37>
cmpl   $0x7,-0x8(%rbp)
jle    1163 <main+0x43>
movl   $0x0,-0x4(%rbp)
jmp    11aa <main+0x8a>
cmpl   $0x0,-0xc(%rbp)
jl     117a <main+0x5a>
cmpl   $0xc8,-0xc(%rbp)
jle    1186 <main+0x66>
movl   $0x0,-0x4(%rbp)
jmp    11aa <main+0x8a>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%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    0xeae(%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 = [4 x i8] c"%d\0A\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* %2, i32* %3)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 7
br i1 %9, label %10, label %11
10: ; preds = %7, %0
store i32 0, i32* %1
br label %25
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp sgt i32 %15, 200
br i1 %16, label %17, label %18
17: ; preds = %14, %11
store i32 0, i32* %1
br label %25
18: ; preds = %14
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = ashr i32 %19, %20
%22 = and i32 %21, 1
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
store i32 0, i32* %1
br label %25
25: ; preds = %18, %17, %10
%26 = load i32, i32* %1
ret i32 %26
}

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