#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, count, count2;
  int bit[50];
  int real_bit[50];
  while (a > 7 || a < 0) {
    scanf("%d", &a);
  }
  while (b > 200 || b < 0) {
    scanf("%d", &b);
  }
  for (count = 0; b > 0; count++) {
    bit[count] = b % 2;
    b = b / 2;
  }
  for (count2 = 0; count >= 0; count2++) {
    real_bit[count2] = bit[count];
    count--;
  }
  printf("%d \n", real_bit[a]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x7,-0x8(%rbp)
mov    %al,-0x1b1(%rbp)
jg     1151 <main+0x31>
cmpl   $0x0,-0x8(%rbp)
setl   %al
mov    %al,-0x1b1(%rbp)
mov    -0x1b1(%rbp),%al
test   $0x1,%al
jne    1164 <main+0x44>
jmp    1179 <main+0x59>
lea    0xe95(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    1132 <main+0x12>
jmp    117e <main+0x5e>
mov    $0x1,%al
cmpl   $0xc8,-0xc(%rbp)
mov    %al,-0x1b2(%rbp)
jg     11a0 <main+0x80>
cmpl   $0x0,-0xc(%rbp)
setl   %al
mov    %al,-0x1b2(%rbp)
mov    -0x1b2(%rbp),%al
test   $0x1,%al
jne    11b3 <main+0x93>
jmp    11c8 <main+0xa8>
lea    0xe46(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
jmp    117e <main+0x5e>
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    120b <main+0xeb>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq -0x10(%rbp),%rax
mov    %edx,-0xe0(%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    11cf <main+0xaf>
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1249 <main+0x129>
movslq -0x10(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x1b0(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1212 <main+0xf2>
movslq -0x8(%rbp),%rax
mov    -0x1b0(%rbp,%rax,4),%esi
lea    0xda8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xc8,%rsp
mov    (%rsp),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc8,%rsp
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 i32
%6 = alloca [50 x i32]
%7 = alloca [50 x i32]
store i32 0, i32* %1
br label %8
8: ; preds = %16, %0
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 7
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 0
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ true, %8 ], [ %13, %11 ]
br i1 %15, label %16, label %18
16: ; preds = %14
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %8
18: ; preds = %14
br label %19
19: ; preds = %27, %18
%20 = load i32, i32* %3
%21 = icmp sgt i32 %20, 200
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = load i32, i32* %3
%24 = icmp slt i32 %23, 0
br label %25
25: ; preds = %22, %19
%26 = phi i1 [ true, %19 ], [ %24, %22 ]
br i1 %26, label %27, label %29
27: ; preds = %25
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %19
29: ; preds = %25
store i32 0, i32* %4
br label %30
30: ; preds = %41, %29
%31 = load i32, i32* %3
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %44
33: ; preds = %30
%34 = load i32, i32* %3
%35 = srem i32 %34, 2
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 %37
store i32 %35, i32* %38
%39 = load i32, i32* %3
%40 = sdiv i32 %39, 2
store i32 %40, i32* %3
br label %41
41: ; preds = %33
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %30
44: ; preds = %30
store i32 0, i32* %5
br label %45
45: ; preds = %58, %44
%46 = load i32, i32* %4
%47 = icmp sge i32 %46, 0
br i1 %47, label %48, label %61
48: ; preds = %45
%49 = load i32, i32* %4
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = load i32, i32* %5
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %54
store i32 %52, i32* %55
%56 = load i32, i32* %4
%57 = add nsw i32 %56, -1
store i32 %57, i32* %4
br label %58
58: ; preds = %48
%59 = load i32, i32* %5
%60 = add nsw i32 %59, 1
store i32 %60, i32* %5
br label %45
61: ; preds = %45
%62 = load i32, i32* %2
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %65)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca [50 x i32]
%2 = bitcast [50 x i32]* %1 to i8*
%3 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 0
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}