unsigned short get(short x, short y) {
  static unsigned short data[20][20] = {
      {8, 2, 22, 97, 38, 15, 0, 40, 0, 75, 4, 5, 7, 78, 52, 12, 50, 77, 91, 8},
      {49, 49, 99, 40, 17, 81, 18, 57, 60, 87,
       17, 40, 98, 43, 69, 48, 4,  56, 62, 0},
      {81, 49, 31, 73, 55, 79, 14, 29, 93, 71,
       40, 67, 53, 88, 30, 3,  49, 13, 36, 65},
      {52, 70, 95, 23, 4,  60, 11, 42, 69, 24,
       68, 56, 1,  32, 56, 71, 37, 2,  36, 91},
      {22, 31, 16, 71, 51, 67, 63, 89, 41, 92,
       36, 54, 22, 40, 40, 28, 66, 33, 13, 80},
      {24, 47, 32, 60, 99, 3,  45, 2,  44, 75,
       33, 53, 78, 36, 84, 20, 35, 17, 12, 50},
      {32, 98, 81, 28, 64, 23, 67, 10, 26, 38,
       40, 67, 59, 54, 70, 66, 18, 38, 64, 70},
      {67, 26, 20, 68, 2,  62, 12, 20, 95, 63,
       94, 39, 63, 8,  40, 91, 66, 49, 94, 21},
      {24, 55, 58, 5,  66, 73, 99, 26, 97, 17,
       78, 78, 96, 83, 14, 88, 34, 89, 63, 72},
      {21, 36, 23, 9,  75, 0,  76, 44, 20, 45,
       35, 14, 0,  61, 33, 97, 34, 31, 33, 95},
      {78, 17, 53, 28, 22, 75, 31, 67, 15, 94,
       3,  80, 4,  62, 16, 14, 9,  53, 56, 92},
      {16, 39, 5, 42, 96, 35, 31, 47, 55, 58,
       88, 24, 0, 17, 54, 24, 36, 29, 85, 57},
      {86, 56, 0,  48, 35, 71, 89, 7,  5,  44,
       44, 37, 44, 60, 21, 58, 51, 54, 17, 58},
      {19, 80, 81, 68, 5,  94, 47, 69, 28, 73,
       92, 13, 86, 52, 17, 77, 4,  89, 55, 40},
      {4,  52, 8,  83, 97, 35, 99, 16, 7,  97,
       57, 32, 16, 26, 26, 79, 33, 27, 98, 66},
      {88, 36, 68, 87, 57, 62, 20, 72, 3,  46,
       33, 67, 46, 55, 12, 32, 63, 93, 53, 69},
      {4,  42, 16, 73, 38, 25, 39, 11, 24, 94,
       72, 18, 8,  46, 29, 32, 40, 62, 76, 36},
      {20, 69, 36, 41, 72, 30, 23, 88, 34, 62,
       99, 69, 82, 67, 59, 85, 74, 4,  36, 16},
      {20, 73, 35, 29, 78, 31, 90, 1,  74, 31,
       49, 71, 48, 86, 81, 16, 23, 57, 5,  54},
      {1,  70, 54, 71, 83, 51, 54, 69, 16, 92,
       33, 48, 61, 43, 52, 1,  89, 19, 67, 48}};
  if (x >= 20 || x < 0 || y >= 20 || y < 0) {
    return 0;
  } else {
    return data[x][y];
  }
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x14,%eax
jge    1146 <get+0x46>
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jl     1146 <get+0x46>
movswl -0x6(%rbp),%eax
cmp    $0x14,%eax
jge    1146 <get+0x46>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
jge    1151 <get+0x51>
movw   $0x0,-0x2(%rbp)
jmp    1171 <get+0x71>
movswq -0x4(%rbp),%rcx
lea    0x2ed3(%rip),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movswq -0x6(%rbp),%rcx
mov    (%rax,%rcx,2),%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
xor    %eax,%eax
cmp    $0x13,%di
ja     1127 <get+0x27>
cmp    $0x13,%si
ja     1127 <get+0x27>
movzwl %di,%eax
movzwl %si,%ecx
lea    (%rax,%rax,4),%rax
lea    0xee1(%rip),%rdx
lea    (%rdx,%rax,8),%rax
movzwl (%rax,%rcx,2),%eax
ret

LLVM IR (-O0):
@get.data = internal global [20 x [20 x i16]] [[20 x i16] [i16 8, i16 2, i16 22, i16 97, i16 38, i16 15, i16 0, i16 40, i16 0, i16 75, i16 4, i16 5, i16 7, i16 78, i16 52, i16 12, i16 50, i16 77, i16 91, i16 8], [20 x i16] [i16 49, i16 49, i16 99, i16 40, i16 17, i16 81, i16 18, i16 57, i16 60, i16 87, i16 17, i16 40, i16 98, i16 43, i16 69, i16 48, i16 4, i16 56, i16 62, i16 0], [20 x i16] [i16 81, i16 49, i16 31, i16 73, i16 55, i16 79, i16 14, i16 29, i16 93, i16 71, i16 40, i16 67, i16 53, i16 88, i16 30, i16 3, i16 49, i16 13, i16 36, i16 65], [20 x i16] [i16 52, i16 70, i16 95, i16 23, i16 4, i16 60, i16 11, i16 42, i16 69, i16 24, i16 68, i16 56, i16 1, i16 32, i16 56, i16 71, i16 37, i16 2, i16 36, i16 91], [20 x i16] [i16 22, i16 31, i16 16, i16 71, i16 51, i16 67, i16 63, i16 89, i16 41, i16 92, i16 36, i16 54, i16 22, i16 40, i16 40, i16 28, i16 66, i16 33, i16 13, i16 80], [20 x i16] [i16 24, i16 47, i16 32, i16 60, i16 99, i16 3, i16 45, i16 2, i16 44, i16 75, i16 33, i16 53, i16 78, i16 36, i16 84, i16 20, i16 35, i16 17, i16 12, i16 50], [20 x i16] [i16 32, i16 98, i16 81, i16 28, i16 64, i16 23, i16 67, i16 10, i16 26, i16 38, i16 40, i16 67, i16 59, i16 54, i16 70, i16 66, i16 18, i16 38, i16 64, i16 70], [20 x i16] [i16 67, i16 26, i16 20, i16 68, i16 2, i16 62, i16 12, i16 20, i16 95, i16 63, i16 94, i16 39, i16 63, i16 8, i16 40, i16 91, i16 66, i16 49, i16 94, i16 21], [20 x i16] [i16 24, i16 55, i16 58, i16 5, i16 66, i16 73, i16 99, i16 26, i16 97, i16 17, i16 78, i16 78, i16 96, i16 83, i16 14, i16 88, i16 34, i16 89, i16 63, i16 72], [20 x i16] [i16 21, i16 36, i16 23, i16 9, i16 75, i16 0, i16 76, i16 44, i16 20, i16 45, i16 35, i16 14, i16 0, i16 61, i16 33, i16 97, i16 34, i16 31, i16 33, i16 95], [20 x i16] [i16 78, i16 17, i16 53, i16 28, i16 22, i16 75, i16 31, i16 67, i16 15, i16 94, i16 3, i16 80, i16 4, i16 62, i16 16, i16 14, i16 9, i16 53, i16 56, i16 92], [20 x i16] [i16 16, i16 39, i16 5, i16 42, i16 96, i16 35, i16 31, i16 47, i16 55, i16 58, i16 88, i16 24, i16 0, i16 17, i16 54, i16 24, i16 36, i16 29, i16 85, i16 57], [20 x i16] [i16 86, i16 56, i16 0, i16 48, i16 35, i16 71, i16 89, i16 7, i16 5, i16 44, i16 44, i16 37, i16 44, i16 60, i16 21, i16 58, i16 51, i16 54, i16 17, i16 58], [20 x i16] [i16 19, i16 80, i16 81, i16 68, i16 5, i16 94, i16 47, i16 69, i16 28, i16 73, i16 92, i16 13, i16 86, i16 52, i16 17, i16 77, i16 4, i16 89, i16 55, i16 40], [20 x i16] [i16 4, i16 52, i16 8, i16 83, i16 97, i16 35, i16 99, i16 16, i16 7, i16 97, i16 57, i16 32, i16 16, i16 26, i16 26, i16 79, i16 33, i16 27, i16 98, i16 66], [20 x i16] [i16 88, i16 36, i16 68, i16 87, i16 57, i16 62, i16 20, i16 72, i16 3, i16 46, i16 33, i16 67, i16 46, i16 55, i16 12, i16 32, i16 63, i16 93, i16 53, i16 69], [20 x i16] [i16 4, i16 42, i16 16, i16 73, i16 38, i16 25, i16 39, i16 11, i16 24, i16 94, i16 72, i16 18, i16 8, i16 46, i16 29, i16 32, i16 40, i16 62, i16 76, i16 36], [20 x i16] [i16 20, i16 69, i16 36, i16 41, i16 72, i16 30, i16 23, i16 88, i16 34, i16 62, i16 99, i16 69, i16 82, i16 67, i16 59, i16 85, i16 74, i16 4, i16 36, i16 16], [20 x i16] [i16 20, i16 73, i16 35, i16 29, i16 78, i16 31, i16 90, i16 1, i16 74, i16 31, i16 49, i16 71, i16 48, i16 86, i16 81, i16 16, i16 23, i16 57, i16 5, i16 54], [20 x i16] [i16 1, i16 70, i16 54, i16 71, i16 83, i16 51, i16 54, i16 69, i16 16, i16 92, i16 33, i16 48, i16 61, i16 43, i16 52, i16 1, i16 89, i16 19, i16 67, i16 48]]
define zeroext i16 @get(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
%6 = load i16, i16* %4
%7 = sext i16 %6 to i32
%8 = icmp sge i32 %7, 20
br i1 %8, label %21, label %9
9: ; preds = %2
%10 = load i16, i16* %4
%11 = sext i16 %10 to i32
%12 = icmp slt i32 %11, 0
br i1 %12, label %21, label %13
13: ; preds = %9
%14 = load i16, i16* %5
%15 = sext i16 %14 to i32
%16 = icmp sge i32 %15, 20
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i16, i16* %5
%19 = sext i16 %18 to i32
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17, %13, %9, %2
store i16 0, i16* %3
br label %30
22: ; preds = %17
%23 = load i16, i16* %4
%24 = sext i16 %23 to i64
%25 = getelementptr inbounds [20 x [20 x i16]], [20 x [20 x i16]]* @get.data, i64 0, i64 %24
%26 = load i16, i16* %5
%27 = sext i16 %26 to i64
%28 = getelementptr inbounds [20 x i16], [20 x i16]* %25, i64 0, i64 %27
%29 = load i16, i16* %28
store i16 %29, i16* %3
br label %30
30: ; preds = %22, %21
%31 = load i16, i16* %3
ret i16 %31
}

LLVM IR (-O2):
@get.data = internal unnamed_addr constant [20 x [20 x i16]] [[20 x i16] [i16 8, i16 2, i16 22, i16 97, i16 38, i16 15, i16 0, i16 40, i16 0, i16 75, i16 4, i16 5, i16 7, i16 78, i16 52, i16 12, i16 50, i16 77, i16 91, i16 8], [20 x i16] [i16 49, i16 49, i16 99, i16 40, i16 17, i16 81, i16 18, i16 57, i16 60, i16 87, i16 17, i16 40, i16 98, i16 43, i16 69, i16 48, i16 4, i16 56, i16 62, i16 0], [20 x i16] [i16 81, i16 49, i16 31, i16 73, i16 55, i16 79, i16 14, i16 29, i16 93, i16 71, i16 40, i16 67, i16 53, i16 88, i16 30, i16 3, i16 49, i16 13, i16 36, i16 65], [20 x i16] [i16 52, i16 70, i16 95, i16 23, i16 4, i16 60, i16 11, i16 42, i16 69, i16 24, i16 68, i16 56, i16 1, i16 32, i16 56, i16 71, i16 37, i16 2, i16 36, i16 91], [20 x i16] [i16 22, i16 31, i16 16, i16 71, i16 51, i16 67, i16 63, i16 89, i16 41, i16 92, i16 36, i16 54, i16 22, i16 40, i16 40, i16 28, i16 66, i16 33, i16 13, i16 80], [20 x i16] [i16 24, i16 47, i16 32, i16 60, i16 99, i16 3, i16 45, i16 2, i16 44, i16 75, i16 33, i16 53, i16 78, i16 36, i16 84, i16 20, i16 35, i16 17, i16 12, i16 50], [20 x i16] [i16 32, i16 98, i16 81, i16 28, i16 64, i16 23, i16 67, i16 10, i16 26, i16 38, i16 40, i16 67, i16 59, i16 54, i16 70, i16 66, i16 18, i16 38, i16 64, i16 70], [20 x i16] [i16 67, i16 26, i16 20, i16 68, i16 2, i16 62, i16 12, i16 20, i16 95, i16 63, i16 94, i16 39, i16 63, i16 8, i16 40, i16 91, i16 66, i16 49, i16 94, i16 21], [20 x i16] [i16 24, i16 55, i16 58, i16 5, i16 66, i16 73, i16 99, i16 26, i16 97, i16 17, i16 78, i16 78, i16 96, i16 83, i16 14, i16 88, i16 34, i16 89, i16 63, i16 72], [20 x i16] [i16 21, i16 36, i16 23, i16 9, i16 75, i16 0, i16 76, i16 44, i16 20, i16 45, i16 35, i16 14, i16 0, i16 61, i16 33, i16 97, i16 34, i16 31, i16 33, i16 95], [20 x i16] [i16 78, i16 17, i16 53, i16 28, i16 22, i16 75, i16 31, i16 67, i16 15, i16 94, i16 3, i16 80, i16 4, i16 62, i16 16, i16 14, i16 9, i16 53, i16 56, i16 92], [20 x i16] [i16 16, i16 39, i16 5, i16 42, i16 96, i16 35, i16 31, i16 47, i16 55, i16 58, i16 88, i16 24, i16 0, i16 17, i16 54, i16 24, i16 36, i16 29, i16 85, i16 57], [20 x i16] [i16 86, i16 56, i16 0, i16 48, i16 35, i16 71, i16 89, i16 7, i16 5, i16 44, i16 44, i16 37, i16 44, i16 60, i16 21, i16 58, i16 51, i16 54, i16 17, i16 58], [20 x i16] [i16 19, i16 80, i16 81, i16 68, i16 5, i16 94, i16 47, i16 69, i16 28, i16 73, i16 92, i16 13, i16 86, i16 52, i16 17, i16 77, i16 4, i16 89, i16 55, i16 40], [20 x i16] [i16 4, i16 52, i16 8, i16 83, i16 97, i16 35, i16 99, i16 16, i16 7, i16 97, i16 57, i16 32, i16 16, i16 26, i16 26, i16 79, i16 33, i16 27, i16 98, i16 66], [20 x i16] [i16 88, i16 36, i16 68, i16 87, i16 57, i16 62, i16 20, i16 72, i16 3, i16 46, i16 33, i16 67, i16 46, i16 55, i16 12, i16 32, i16 63, i16 93, i16 53, i16 69], [20 x i16] [i16 4, i16 42, i16 16, i16 73, i16 38, i16 25, i16 39, i16 11, i16 24, i16 94, i16 72, i16 18, i16 8, i16 46, i16 29, i16 32, i16 40, i16 62, i16 76, i16 36], [20 x i16] [i16 20, i16 69, i16 36, i16 41, i16 72, i16 30, i16 23, i16 88, i16 34, i16 62, i16 99, i16 69, i16 82, i16 67, i16 59, i16 85, i16 74, i16 4, i16 36, i16 16], [20 x i16] [i16 20, i16 73, i16 35, i16 29, i16 78, i16 31, i16 90, i16 1, i16 74, i16 31, i16 49, i16 71, i16 48, i16 86, i16 81, i16 16, i16 23, i16 57, i16 5, i16 54], [20 x i16] [i16 1, i16 70, i16 54, i16 71, i16 83, i16 51, i16 54, i16 69, i16 16, i16 92, i16 33, i16 48, i16 61, i16 43, i16 52, i16 1, i16 89, i16 19, i16 67, i16 48]]
define zeroext i16 @get(i16 signext %0, i16 signext %1) {
%3 = icmp ugt i16 %0, 19
%4 = icmp ugt i16 %1, 19
%5 = or i1 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = zext i16 %0 to i64
%8 = zext i16 %1 to i64
%9 = getelementptr inbounds [20 x [20 x i16]], [20 x [20 x i16]]* @get.data, i64 0, i64 %7, i64 %8
%10 = load i16, i16* %9
br label %11
11: ; preds = %2, %6
%12 = phi i16 [ %10, %6 ], [ 0, %2 ]
ret i16 %12
}