#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 */
typedef int int8_t;
typedef int /*<<< orphan*/ decoding;

/* Variables and functions */
int8_t base64_decode_value(char value_in) {
  static const int8_t decoding[] = {
      62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1,
      -1, -1, -2, -1, -1, -1, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
      10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
      -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
      36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
  unsigned idx = (unsigned)value_in - 43U;
  return (idx < sizeof(decoding)) ? decoding[idx] : -1;
}


x86 assembly (clang, -O0):
<base64_decode_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x2b,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x140,%rax
jae    113a <base64_decode_value+0x3a>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
lea    0xed1(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <base64_decode_value+0x47>
mov    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <base64_decode_value+0x47>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decode_value>:
add    $0xffffffd5,%edi
mov    $0xffffffff,%eax
cmp    $0x13f,%edi
ja     111a <base64_decode_value+0x1a>
lea    0xee9(%rip),%rax
mov    (%rax,%rdi,4),%eax
ret

LLVM IR (-O0):
@base64_decode_value.decoding = internal constant [80 x i32] [i32 62, i32 -1, i32 -1, i32 -1, i32 63, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 -1, i32 -1, i32 -1, i32 -2, i32 -1, i32 -1, i32 -1, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 44, i32 45, i32 46, i32 47, i32 48, i32 49, i32 50, i32 51]
define i32 @base64_decode_value(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub i32 %5, 43
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = icmp ult i64 %8, 320
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds [80 x i32], [80 x i32]* @base64_decode_value.decoding, i64 0, i64 %12
%14 = load i32, i32* %13
br label %16
15: ; preds = %1
br label %16
16: ; preds = %15, %10
%17 = phi i32 [ %14, %10 ], [ -1, %15 ]
ret i32 %17
}

LLVM IR (-O2):
@base64_decode_value.decoding = internal unnamed_addr constant [80 x i32] [i32 62, i32 -1, i32 -1, i32 -1, i32 63, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 -1, i32 -1, i32 -1, i32 -2, i32 -1, i32 -1, i32 -1, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 44, i32 45, i32 46, i32 47, i32 48, i32 49, i32 50, i32 51]
define i32 @base64_decode_value(i8 signext %0) {
%2 = sext i8 %0 to i64
%3 = add nsw i64 %2, 4294967253
%4 = and i64 %3, 4294967295
%5 = icmp ult i64 %4, 320
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = getelementptr inbounds [80 x i32], [80 x i32]* @base64_decode_value.decoding, i64 0, i64 %4
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ %8, %6 ], [ -1, %1 ]
ret i32 %10
}