#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);
  if (a < 0 && a > 7) {
    printf("a is not in range");
    return -1;
  }
  scanf("%d", &b);
  if (b < 0 && b > 200) {
    printf("b is not in range");
    return -1;
  }
  if (b >> a & 1)
    printf("1");
  else
    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>
cmpl   $0x0,-0x8(%rbp)
jge    116b <main+0x4b>
cmpl   $0x7,-0x8(%rbp)
jle    116b <main+0x4b>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11e2 <main+0xc2>
lea    0xe8e(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jge    11aa <main+0x8a>
cmpl   $0xc8,-0xc(%rbp)
jle    11aa <main+0x8a>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11e2 <main+0xc2>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     11cf <main+0xaf>
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
jmp    11db <main+0xbb>
lea    0xe53(%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   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
mov    0xc(%rsp),%ecx
bt     %ecx,%eax
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = load i32, i32* %1
%9 = shl nuw i32 1, %8
%10 = and i32 %9, %7
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i32 48, i32 49
%13 = call i32 @putchar(i32 %12)
ret i32 0
}