#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;
  do {
    scanf("%d %d", &a, &b);
  } while ((0 > a) || (a > 7) || (0 > b) || (b > 200));
  printf("%d", (((b) >> (a)) & 1));
  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>
mov    $0x1,%al
xor    %ecx,%ecx
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jg     117f <main+0x5f>
mov    $0x1,%al
cmpl   $0x7,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jg     117f <main+0x5f>
mov    $0x1,%al
xor    %ecx,%ecx
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
jg     117f <main+0x5f>
cmpl   $0xc8,-0xc(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
sar    %cl,%esi
and    $0x1,%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%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
test   %esi,%esi
js     1140 <main+0x20>
cmp    $0xc8,%esi
jg     1140 <main+0x20>
shr    %cl,%esi
and    $0x1,%esi
lea    0xe90(%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
store i32 0, i32* %1
br label %4
4: ; preds = %18, %0
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
br label %6
6: ; preds = %4
%7 = load i32, i32* %2
%8 = icmp sgt i32 0, %7
br i1 %8, label %18, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 7
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sgt i32 0, %13
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sgt i32 %16, 200
br label %18
18: ; preds = %15, %12, %9, %6
%19 = phi i1 [ true, %12 ], [ true, %9 ], [ true, %6 ], [ %17, %15 ]
br i1 %19, label %4, label %20
20: ; preds = %18
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = ashr i32 %21, %22
%24 = and i32 %23, 1
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %24)
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 slt i32 %9, 0
%11 = select i1 %8, i1 true, i1 %10
%12 = icmp sgt i32 %9, 200
%13 = select i1 %11, i1 true, i1 %12
br i1 %13, label %5, label %14
14: ; preds = %5
%15 = lshr i32 %9, %7
%16 = and i32 %15, 1
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}