#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 main() {
  int a, b, i;
  int arr[31] = {0};
  do {
    scanf("%d", &a);
  } while (a > 7 || a < 0);
  do {
    scanf("%d", &b);
  } while (b > 200 || b < 0);
  for (i = 31; i >= 0; i--) {
    arr[i] = b % 2;
    b = b / 2;
  }
  printf("%d \n", arr[31 - a]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x7c,%edx
call   1040 <memset@plt>
lea    0xea4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x7,-0x8(%rbp)
mov    %al,-0x91(%rbp)
jg     1184 <main+0x54>
cmpl   $0x0,-0x8(%rbp)
setl   %al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
test   $0x1,%al
jne    1155 <main+0x25>
jmp    1197 <main+0x67>
lea    0xe62(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0xc8,-0xc(%rbp)
mov    %al,-0x92(%rbp)
jg     11c9 <main+0x99>
cmpl   $0x0,-0xc(%rbp)
setl   %al
mov    %al,-0x92(%rbp)
mov    -0x92(%rbp),%al
test   $0x1,%al
jne    1197 <main+0x67>
movl   $0x1f,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     121a <main+0xea>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq -0x10(%rbp),%rax
mov    %edx,-0x90(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    11de <main+0xae>
mov    $0x1f,%eax
sub    -0x8(%rbp),%eax
cltq
mov    -0x90(%rbp,%rax,4),%esi
lea    0xdd1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x98,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x7c(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0xea4(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmpl   $0x7,0xc(%rsp)
ja     1170 <main+0x50>
lea    0xe77(%rip),%r14
lea    0x8(%rsp),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0xc8,%eax
ja     1190 <main+0x70>
mov    $0x1e,%ecx
nopl   0x0(%rax,%rax,1)
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
mov    %edx,%esi
and    $0xfffffffe,%esi
mov    %eax,%edi
sub    %esi,%edi
mov    %edi,0x14(%rsp,%rcx,4)
mov    %edx,%esi
sar    %esi
shr    $0x1f,%edx
add    %esi,%edx
and    $0xfffffffe,%edx
sub    %edx,%esi
lea    0x3(%rax),%edx
test   %eax,%eax
cmovns %eax,%edx
mov    %esi,0x10(%rsp,%rcx,4)
mov    %edx,%eax
sar    $0x2,%eax
add    $0xfffffffffffffffe,%rcx
cmp    $0xfffffffffffffffe,%rcx
jne    11b0 <main+0x90>
mov    %eax,0x8(%rsp)
movslq 0xc(%rsp),%rax
mov    $0x1f,%ecx
sub    %rax,%rcx
mov    0x10(%rsp,%rcx,4),%esi
lea    0xdfa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [31 x i32]
store i32 0, i32* %1
%6 = bitcast [31 x i32]* %5 to i8*
br label %7
7: ; preds = %15, %0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %9
9: ; preds = %7
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 7
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 0
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ true, %9 ], [ %14, %12 ]
br i1 %16, label %7, label %17
17: ; preds = %15
br label %18
18: ; preds = %26, %17
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %20
20: ; preds = %18
%21 = load i32, i32* %3
%22 = icmp sgt i32 %21, 200
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %3
%25 = icmp slt i32 %24, 0
br label %26
26: ; preds = %23, %20
%27 = phi i1 [ true, %20 ], [ %25, %23 ]
br i1 %27, label %18, label %28
28: ; preds = %26
store i32 31, i32* %4
br label %29
29: ; preds = %40, %28
%30 = load i32, i32* %4
%31 = icmp sge i32 %30, 0
br i1 %31, label %32, label %43
32: ; preds = %29
%33 = load i32, i32* %3
%34 = srem i32 %33, 2
%35 = load i32, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 %36
store i32 %34, i32* %37
%38 = load i32, i32* %3
%39 = sdiv i32 %38, 2
store i32 %39, i32* %3
br label %40
40: ; preds = %32
%41 = load i32, i32* %4
%42 = add nsw i32 %41, -1
store i32 %42, i32* %4
br label %29
43: ; preds = %29
%44 = load i32, i32* %2
%45 = sub nsw i32 31, %44
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [31 x i32], [31 x i32]* %5, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %48)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [31 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [31 x i32]* %3 to i8*
br label %7
7: ; preds = %7, %0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = icmp ugt i32 %9, 7
br i1 %10, label %7, label %11
11: ; preds = %7, %11
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%13 = load i32, i32* %2
%14 = icmp ugt i32 %13, 200
br i1 %14, label %11, label %15
15: ; preds = %11, %15
%16 = phi i64 [ %25, %15 ], [ 31, %11 ]
%17 = phi i32 [ %24, %15 ], [ %13, %11 ]
%18 = srem i32 %17, 2
%19 = getelementptr inbounds [31 x i32], [31 x i32]* %3, i64 0, i64 %16
store i32 %18, i32* %19
%20 = sdiv i32 %17, 2
%21 = add nsw i64 %16, -1
%22 = srem i32 %20, 2
%23 = getelementptr inbounds [31 x i32], [31 x i32]* %3, i64 0, i64 %21
store i32 %22, i32* %23
%24 = sdiv i32 %17, 4
%25 = add nsw i64 %16, -2
%26 = icmp eq i64 %21, 0
br i1 %26, label %27, label %15
27: ; preds = %15
store i32 %24, i32* %2
%28 = load i32, i32* %1
%29 = sub nsw i32 31, %28
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [31 x i32], [31 x i32]* %3, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %32)
ret i32 0
}