#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() {
  int a, b;
  scanf("%d", &a);
  while (a < 0 || a > 7)
    scanf("%d", &a);
  scanf("%d", &b);
  while (b < 0 || b > 200)
    scanf("%d", &b);
  if (((b >> a) & 1) == 1)
    printf("1");
  if (((b >> a) & 1) == 0)
    printf("0");
  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
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     1158 <main+0x38>
cmpl   $0x7,-0x8(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1168 <main+0x48>
jmp    117d <main+0x5d>
lea    0xe91(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    113f <main+0x1f>
lea    0xe7c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xe(%rbp)
jl     11a9 <main+0x89>
cmpl   $0xc8,-0xc(%rbp)
setg   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
test   $0x1,%al
jne    11b9 <main+0x99>
jmp    11ce <main+0xae>
lea    0xe40(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
jmp    118d <main+0x6d>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    11ee <main+0xce>
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    120e <main+0xee>
lea    0xdfc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmpl   $0x8,(%rsp)
jb     1161 <main+0x41>
lea    0xec0(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmpl   $0x7,(%rsp)
ja     1150 <main+0x30>
lea    0xe98(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0xc9,%eax
jb     11a6 <main+0x86>
lea    0xe7c(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0xc8,%eax
ja     1190 <main+0x70>
mov    (%rsp),%ecx
mov    $0x1,%ebx
mov    $0x1,%edx
shl    %cl,%edx
bt     %ecx,%eax
jae    11cf <main+0xaf>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%cl
shl    %cl,%ebx
mov    %ebx,%edx
test   %eax,%edx
jne    11dd <main+0xbd>
mov    $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [2 x i8] c"0\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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 7
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %5
15: ; preds = %11
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %17
17: ; preds = %25, %15
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sgt i32 %21, 200
br label %23
23: ; preds = %20, %17
%24 = phi i1 [ true, %17 ], [ %22, %20 ]
br i1 %24, label %25, label %27
25: ; preds = %23
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %17
27: ; preds = %23
%28 = load i32, i32* %3
%29 = load i32, i32* %2
%30 = ashr i32 %28, %29
%31 = and i32 %30, 1
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %35
33: ; preds = %27
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %33, %27
%36 = load i32, i32* %3
%37 = load i32, i32* %2
%38 = ashr i32 %36, %37
%39 = and i32 %38, 1
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %35
%42 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %43
43: ; preds = %41, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp ugt i32 %6, 7
br i1 %7, label %8, label %12
8: ; preds = %0, %8
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp ugt i32 %10, 7
br i1 %11, label %8, label %12
12: ; preds = %8, %0
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%14 = load i32, i32* %2
%15 = icmp ugt i32 %14, 200
br i1 %15, label %16, label %20
16: ; preds = %12, %16
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%18 = load i32, i32* %2
%19 = icmp ugt i32 %18, 200
br i1 %19, label %16, label %20
20: ; preds = %16, %12
%21 = phi i32 [ %14, %12 ], [ %18, %16 ]
%22 = load i32, i32* %1
%23 = shl nuw i32 1, %22
%24 = and i32 %23, %21
%25 = icmp eq i32 %24, 0
br i1 %25, label %31, label %26
26: ; preds = %20
%27 = call i32 @putchar(i32 49)
%28 = load i32, i32* %2
%29 = load i32, i32* %1
%30 = shl nuw i32 1, %29
br label %31
31: ; preds = %26, %20
%32 = phi i32 [ %30, %26 ], [ %23, %20 ]
%33 = phi i32 [ %28, %26 ], [ %21, %20 ]
%34 = and i32 %32, %33
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = call i32 @putchar(i32 48)
br label %38
38: ; preds = %36, %31
ret i32 0
}