#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, i = 0, array[8];
  do {
    scanf("%d %d", &a, &b);
  } while (a < 0 || a > 7 || b < 0 || b > 200);
  while (b > 0) {
    array[i] = b % 2;
    b = b / 2;
    i++;
  }
  printf("%d", array[a]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x31(%rbp)
jl     1184 <main+0x64>
mov    $0x1,%al
cmpl   $0x7,-0x8(%rbp)
mov    %al,-0x31(%rbp)
jg     1184 <main+0x64>
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x31(%rbp)
jl     1184 <main+0x64>
cmpl   $0xc8,-0xc(%rbp)
setg   %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    1136 <main+0x16>
jmp    1194 <main+0x74>
cmpl   $0x0,-0xc(%rbp)
jle    11cd <main+0xad>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq -0x10(%rbp),%rax
mov    %edx,-0x30(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1194 <main+0x74>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%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>
movslq 0xc(%rsp),%rax
cmp    $0x7,%rax
ja     1140 <main+0x20>
mov    0x8(%rsp),%ecx
test   %ecx,%ecx
js     1140 <main+0x20>
cmp    $0xc8,%ecx
jg     1140 <main+0x20>
test   %ecx,%ecx
je     1198 <main+0x78>
lea    0x10(%rsp),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%esi
mov    %ecx,%edi
and    $0x1,%edi
mov    %edi,(%rdx)
shr    %ecx
add    $0x4,%rdx
cmp    $0x1,%esi
ja     1180 <main+0x60>
mov    %ecx,0x8(%rsp)
mov    0x10(%rsp,%rax,4),%esi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%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
%4 = alloca i32
%5 = alloca [8 x i32]
store i32 0, i32* %1
store i32 0, i32* %4
br label %6
6: ; preds = %20, %0
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 0
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 7
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %3
%19 = icmp sgt i32 %18, 200
br label %20
20: ; preds = %17, %14, %11, %8
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ %19, %17 ]
br i1 %21, label %6, label %22
22: ; preds = %20
br label %23
23: ; preds = %26, %22
%24 = load i32, i32* %3
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %36
26: ; preds = %23
%27 = load i32, i32* %3
%28 = srem i32 %27, 2
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 %30
store i32 %28, i32* %31
%32 = load i32, i32* %3
%33 = sdiv i32 %32, 2
store i32 %33, i32* %3
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
br label %23
36: ; preds = %23
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %1
ret i32 %42
}

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 = alloca [8 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [8 x i32]* %3 to i8*
br label %7
7: ; preds = %7, %0
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%9 = load i32, i32* %1
%10 = icmp ugt i32 %9, 7
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 0
%13 = select i1 %10, i1 true, i1 %12
%14 = icmp sgt i32 %11, 200
%15 = select i1 %13, i1 true, i1 %14
br i1 %15, label %7, label %16
16: ; preds = %7
%17 = icmp eq i32 %11, 0
br i1 %17, label %27, label %18
18: ; preds = %16, %18
%19 = phi i64 [ %24, %18 ], [ 0, %16 ]
%20 = phi i32 [ %23, %18 ], [ %11, %16 ]
%21 = and i32 %20, 1
%22 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %19
store i32 %21, i32* %22
%23 = lshr i32 %20, 1
%24 = add nuw nsw i64 %19, 1
%25 = icmp ult i32 %20, 2
br i1 %25, label %26, label %18
26: ; preds = %18
store i32 %23, i32* %2
br label %27
27: ; preds = %26, %16
%28 = sext i32 %9 to i64
%29 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %30)
ret i32 0
}