#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*/ abort();
int b2a(int c) {
  c &= 0x3f;
  if (c <= 25)
    return ('A' + c);
  if (c <= 51)
    return ('a' + c - 26);
  if (c <= 61)
    return ('0' + c - 52);
  if (c == 62)
    return (',');
  if (c == 63)
    return ('.');
  abort();
}


x86 assembly (clang, -O0):
<b2a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x19,-0x8(%rbp)
jg     113c <b2a+0x2c>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    11a5 <b2a+0x95>
cmpl   $0x33,-0x8(%rbp)
jg     1157 <b2a+0x47>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0x1a,%eax
mov    %eax,-0x4(%rbp)
jmp    11a5 <b2a+0x95>
cmpl   $0x3d,-0x8(%rbp)
jg     1172 <b2a+0x62>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
sub    $0x34,%eax
mov    %eax,-0x4(%rbp)
jmp    11a5 <b2a+0x95>
cmpl   $0x3e,-0x8(%rbp)
jne    1188 <b2a+0x78>
movl   $0x2c,-0x4(%rbp)
jmp    11a5 <b2a+0x95>
cmpl   $0x3f,-0x8(%rbp)
jne    119e <b2a+0x8e>
movl   $0x2e,-0x4(%rbp)
jmp    11a5 <b2a+0x95>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b2a>:
mov    %edi,%eax
and    $0x3f,%eax
cmp    $0x19,%eax
ja     110e <b2a+0xe>
add    $0x41,%eax
ret
cmp    $0x33,%eax
ja     1117 <b2a+0x17>
add    $0x47,%eax
ret
cmp    $0x3d,%eax
ja     1120 <b2a+0x20>
add    $0xfffffffc,%eax
ret
xor    %ecx,%ecx
cmp    $0x3e,%eax
setne  %cl
lea    (%rcx,%rcx,1),%eax
add    $0x2c,%eax
ret

LLVM IR (-O0):
define i32 @b2a(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 63
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 25
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = add nsw i32 65, %9
store i32 %10, i32* %2
br label %35
11: ; preds = %1
%12 = load i32, i32* %3
%13 = icmp sle i32 %12, 51
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32, i32* %3
%16 = add nsw i32 97, %15
%17 = sub nsw i32 %16, 26
store i32 %17, i32* %2
br label %35
18: ; preds = %11
%19 = load i32, i32* %3
%20 = icmp sle i32 %19, 61
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load i32, i32* %3
%23 = add nsw i32 48, %22
%24 = sub nsw i32 %23, 52
store i32 %24, i32* %2
br label %35
25: ; preds = %18
%26 = load i32, i32* %3
%27 = icmp eq i32 %26, 62
br i1 %27, label %28, label %29
28: ; preds = %25
store i32 44, i32* %2
br label %35
29: ; preds = %25
%30 = load i32, i32* %3
%31 = icmp eq i32 %30, 63
br i1 %31, label %32, label %33
32: ; preds = %29
store i32 46, i32* %2
br label %35
33: ; preds = %29
%34 = call i32 (...) @abort()
unreachable
35: ; preds = %32, %28, %21, %14, %8
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @b2a(i32 %0) {
%2 = and i32 %0, 63
%3 = icmp ult i32 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nuw nsw i32 %2, 65
br label %17
6: ; preds = %1
%7 = icmp ult i32 %2, 52
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = add nuw nsw i32 %2, 71
br label %17
10: ; preds = %6
%11 = icmp ult i32 %2, 62
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = add nsw i32 %2, -4
br label %17
14: ; preds = %10
%15 = icmp eq i32 %2, 62
%16 = select i1 %15, i32 44, i32 46
br label %17
17: ; preds = %14, %12, %8, %4
%18 = phi i32 [ %5, %4 ], [ %9, %8 ], [ %13, %12 ], [ %16, %14 ]
ret i32 %18
}