unsigned b64_char_to_byte(int c) {
  unsigned x;
  x = ((((((unsigned)(c) - (unsigned)('A')) >> 8) & 0xFF) ^ 0xFF) &
       (((((unsigned)('Z') - (unsigned)(c)) >> 8) & 0xFF) ^ 0xFF) & (c - 'A')) |
      ((((((unsigned)(c) - (unsigned)('a')) >> 8) & 0xFF) ^ 0xFF) &
       (((((unsigned)('z') - (unsigned)(c)) >> 8) & 0xFF) ^ 0xFF) &
       (c - ('a' - 26))) |
      ((((((unsigned)(c) - (unsigned)('0')) >> 8) & 0xFF) ^ 0xFF) &
       (((((unsigned)('9') - (unsigned)(c)) >> 8) & 0xFF) ^ 0xFF) &
       (c - ('0' - 52))) |
      (((((0U - ((unsigned)(c) ^ (unsigned)('+'))) >> 8) & 0xFF) ^ 0xFF) & 62) |
      (((((0U - ((unsigned)(c) ^ (unsigned)('/'))) >> 8) & 0xFF) ^ 0xFF) & 63);
  return x |
         (((((0U - ((unsigned)(x) ^ (unsigned)(0))) >> 8) & 0xFF) ^ 0xFF) &
          (((((0U - ((unsigned)(c) ^ (unsigned)('A'))) >> 8) & 0xFF) ^ 0xFF) ^
           0xFF));
}


x86 assembly (clang, -O0):
<b64_char_to_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
shr    $0x8,%eax
and    $0xff,%eax
xor    $0xff,%eax
mov    $0x5a,%ecx
sub    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
xor    $0xff,%ecx
and    %ecx,%eax
mov    -0x4(%rbp),%ecx
sub    $0x41,%ecx
and    %ecx,%eax
mov    -0x4(%rbp),%ecx
sub    $0x61,%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
xor    $0xff,%ecx
mov    $0x7a,%edx
sub    -0x4(%rbp),%edx
shr    $0x8,%edx
and    $0xff,%edx
xor    $0xff,%edx
and    %edx,%ecx
mov    -0x4(%rbp),%edx
sub    $0x47,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sub    $0x30,%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
xor    $0xff,%ecx
mov    $0x39,%edx
sub    -0x4(%rbp),%edx
shr    $0x8,%edx
and    $0xff,%edx
xor    $0xff,%edx
and    %edx,%ecx
mov    -0x4(%rbp),%edx
sub    $0xfffffffc,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%edx
xor    $0x2b,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
xor    $0xff,%ecx
and    $0x3e,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%edx
xor    $0x2f,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
xor    $0xff,%ecx
and    $0x3f,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%edx
xor    $0x0,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
xor    $0xff,%ecx
mov    -0x4(%rbp),%esi
xor    $0x41,%esi
xor    %edx,%edx
sub    %esi,%edx
shr    $0x8,%edx
and    $0xff,%edx
xor    $0xff,%edx
xor    $0xff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64_char_to_byte>:
lea    0xff9f(%rdi),%ecx
shr    $0x8,%ecx
not    %ecx
mov    $0x7a,%edx
sub    %edi,%edx
shr    $0x8,%edx
not    %edx
lea    0xb9(%rdi),%eax
and    %ecx,%eax
and    %edx,%eax
lea    0xffd0(%rdi),%ecx
movd   %edi,%xmm0
pshufd $0x50,%xmm0,%xmm0
movdqa 0xec8(%rip),%xmm1
paddd  %xmm0,%xmm1
movd   %ecx,%xmm2
punpcklqdq %xmm1,%xmm2
shufps $0xe2,%xmm1,%xmm2
psrld  $0x8,%xmm2
movdqa 0xebb(%rip),%xmm3
psubd  %xmm0,%xmm3
psrld  $0x8,%xmm3
pandn  %xmm1,%xmm2
pandn  %xmm2,%xmm3
pand   0xeb2(%rip),%xmm3
pxor   0xeba(%rip),%xmm0
movzbl %al,%eax
pcmpeqd %xmm1,%xmm1
psubd  %xmm1,%xmm0
psrld  $0x8,%xmm0
pandn  0xeb2(%rip),%xmm0
pshufd $0x55,%xmm0,%xmm1
por    %xmm0,%xmm1
movd   %xmm1,%ecx
or     %eax,%ecx
movd   %xmm3,%eax
or     %ecx,%eax
pshufd $0x55,%xmm3,%xmm0
movd   %xmm0,%ecx
or     %eax,%ecx
mov    %ecx,%eax
neg    %eax
shr    $0x8,%eax
not    %eax
xor    $0xffbe,%edi
add    $0x1,%edi
shr    $0x8,%edi
and    %eax,%edi
movzbl %dil,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @b64_char_to_byte(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 %4, 65
%6 = lshr i32 %5, 8
%7 = and i32 %6, 255
%8 = xor i32 %7, 255
%9 = load i32, i32* %2
%10 = sub i32 90, %9
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = xor i32 %12, 255
%14 = and i32 %8, %13
%15 = load i32, i32* %2
%16 = sub nsw i32 %15, 65
%17 = and i32 %14, %16
%18 = load i32, i32* %2
%19 = sub i32 %18, 97
%20 = lshr i32 %19, 8
%21 = and i32 %20, 255
%22 = xor i32 %21, 255
%23 = load i32, i32* %2
%24 = sub i32 122, %23
%25 = lshr i32 %24, 8
%26 = and i32 %25, 255
%27 = xor i32 %26, 255
%28 = and i32 %22, %27
%29 = load i32, i32* %2
%30 = sub nsw i32 %29, 71
%31 = and i32 %28, %30
%32 = or i32 %17, %31
%33 = load i32, i32* %2
%34 = sub i32 %33, 48
%35 = lshr i32 %34, 8
%36 = and i32 %35, 255
%37 = xor i32 %36, 255
%38 = load i32, i32* %2
%39 = sub i32 57, %38
%40 = lshr i32 %39, 8
%41 = and i32 %40, 255
%42 = xor i32 %41, 255
%43 = and i32 %37, %42
%44 = load i32, i32* %2
%45 = sub nsw i32 %44, -4
%46 = and i32 %43, %45
%47 = or i32 %32, %46
%48 = load i32, i32* %2
%49 = xor i32 %48, 43
%50 = sub i32 0, %49
%51 = lshr i32 %50, 8
%52 = and i32 %51, 255
%53 = xor i32 %52, 255
%54 = and i32 %53, 62
%55 = or i32 %47, %54
%56 = load i32, i32* %2
%57 = xor i32 %56, 47
%58 = sub i32 0, %57
%59 = lshr i32 %58, 8
%60 = and i32 %59, 255
%61 = xor i32 %60, 255
%62 = and i32 %61, 63
%63 = or i32 %55, %62
store i32 %63, i32* %3
%64 = load i32, i32* %3
%65 = load i32, i32* %3
%66 = xor i32 %65, 0
%67 = sub i32 0, %66
%68 = lshr i32 %67, 8
%69 = and i32 %68, 255
%70 = xor i32 %69, 255
%71 = load i32, i32* %2
%72 = xor i32 %71, 65
%73 = sub i32 0, %72
%74 = lshr i32 %73, 8
%75 = and i32 %74, 255
%76 = xor i32 %75, 255
%77 = xor i32 %76, 255
%78 = and i32 %70, %77
%79 = or i32 %64, %78
ret i32 %79
}

LLVM IR (-O2):
define i32 @b64_char_to_byte(i32 %0) {
%2 = add i32 %0, 65439
%3 = lshr i32 %2, 8
%4 = xor i32 %3, -1
%5 = sub i32 122, %0
%6 = lshr i32 %5, 8
%7 = and i32 %6, 255
%8 = xor i32 %7, 255
%9 = add i32 %0, 185
%10 = and i32 %9, %4
%11 = and i32 %10, %8
%12 = add i32 %0, 65488
%13 = insertelement <2 x i32> poison, i32 %0, i64 0
%14 = shufflevector <2 x i32> %13, <2 x i32> poison, <2 x i32> zeroinitializer
%15 = add <2 x i32> %14, <i32 -65, i32 4>
%16 = insertelement <2 x i32> %15, i32 %12, i64 1
%17 = lshr <2 x i32> %16, <i32 8, i32 8>
%18 = xor <2 x i32> %17, <i32 -1, i32 -1>
%19 = sub <2 x i32> <i32 90, i32 57>, %14
%20 = lshr <2 x i32> %19, <i32 8, i32 8>
%21 = and <2 x i32> %20, <i32 255, i32 255>
%22 = xor <2 x i32> %21, <i32 255, i32 255>
%23 = and <2 x i32> %15, %18
%24 = and <2 x i32> %23, %22
%25 = xor <2 x i32> %14, <i32 16336, i32 16340>
%26 = add <2 x i32> %25, <i32 1, i32 1>
%27 = lshr <2 x i32> %26, <i32 8, i32 8>
%28 = and <2 x i32> %27, <i32 63, i32 62>
%29 = xor <2 x i32> %28, <i32 63, i32 62>
%30 = shufflevector <2 x i32> %29, <2 x i32> poison, <2 x i32> <i32 1, i32 undef>
%31 = or <2 x i32> %29, %30
%32 = extractelement <2 x i32> %31, i64 0
%33 = or i32 %32, %11
%34 = extractelement <2 x i32> %24, i64 0
%35 = or i32 %33, %34
%36 = extractelement <2 x i32> %24, i64 1
%37 = or i32 %35, %36
%38 = sub nsw i32 0, %37
%39 = lshr i32 %38, 8
%40 = and i32 %39, 255
%41 = xor i32 %40, 255
%42 = xor i32 %0, 65470
%43 = add i32 %42, 1
%44 = lshr i32 %43, 8
%45 = and i32 %41, %44
%46 = or i32 %45, %37
ret i32 %46
}