#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 */
scalar_t__ isalpha(unsigned char);
scalar_t__ isdigit(unsigned char);
scalar_t__ isupper(unsigned char);
int return_value(unsigned char c) {
  if (c == '+')
    return 62;
  else if (c == '/')
    return 63;
  else if (isalpha(c)) {
    if (isupper(c))
      return (c - 65);
    else
      return (c - 71);
  } else if (isdigit(c)) {
    return (c + 4);
  } else if (c == '=') {
    return 250;
  }
  return 255;
}


x86 assembly (clang, -O0):
<return_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
jne    1157 <return_value+0x27>
movl   $0x3e,-0x4(%rbp)
jmp    120a <return_value+0xda>
movzbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    1170 <return_value+0x40>
movl   $0x3f,-0x4(%rbp)
jmp    120a <return_value+0xda>
movzbl -0x5(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     11b4 <return_value+0x84>
movzbl -0x5(%rbp),%edi
call   1050 <isupper@plt>
cmp    $0x0,%rax
je     11a5 <return_value+0x75>
movzbl -0x5(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    120a <return_value+0xda>
movzbl -0x5(%rbp),%eax
sub    $0x47,%eax
mov    %eax,-0x4(%rbp)
jmp    120a <return_value+0xda>
movzbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     11d6 <return_value+0xa6>
movzbl -0x5(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x4(%rbp)
jmp    120a <return_value+0xda>
movzbl -0x5(%rbp),%eax
cmp    $0x3d,%eax
jne    11ef <return_value+0xbf>
movl   $0xfa,-0x4(%rbp)
jmp    120a <return_value+0xda>
jmp    11f4 <return_value+0xc4>
jmp    11f9 <return_value+0xc9>
jmp    11fe <return_value+0xce>
jmp    1203 <return_value+0xd3>
movl   $0xff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_value>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0x2b,%bl
je     1146 <return_value+0x16>
cmp    $0x2f,%bl
jne    114d <return_value+0x1d>
mov    $0x3f,%ebx
jmp    1192 <return_value+0x62>
mov    $0x3e,%ebx
jmp    1192 <return_value+0x62>
movzbl %bl,%ebp
mov    %ebp,%edi
call   1040 <isalpha@plt>
mov    %ebp,%edi
test   %rax,%rax
je     116d <return_value+0x3d>
call   1050 <isupper@plt>
test   %rax,%rax
je     117c <return_value+0x4c>
add    $0xffffffbf,%ebx
jmp    1192 <return_value+0x62>
call   1030 <isdigit@plt>
test   %rax,%rax
je     1181 <return_value+0x51>
add    $0x4,%ebx
jmp    1192 <return_value+0x62>
add    $0xffffffb9,%ebx
jmp    1192 <return_value+0x62>
xor    %eax,%eax
cmp    $0x3d,%bl
setne  %al
lea    (%rax,%rax,4),%ebx
add    $0xfa,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @return_value(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 43
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 62, i32* %2
br label %47
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 47
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 63, i32* %2
br label %47
13: ; preds = %8
%14 = load i8, i8* %3
%15 = call i64 @isalpha(i8 zeroext %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %29
17: ; preds = %13
%18 = load i8, i8* %3
%19 = call i64 @isupper(i8 zeroext %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load i8, i8* %3
%23 = zext i8 %22 to i32
%24 = sub nsw i32 %23, 65
store i32 %24, i32* %2
br label %47
25: ; preds = %17
%26 = load i8, i8* %3
%27 = zext i8 %26 to i32
%28 = sub nsw i32 %27, 71
store i32 %28, i32* %2
br label %47
29: ; preds = %13
%30 = load i8, i8* %3
%31 = call i64 @isdigit(i8 zeroext %30)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %37
33: ; preds = %29
%34 = load i8, i8* %3
%35 = zext i8 %34 to i32
%36 = add nsw i32 %35, 4
store i32 %36, i32* %2
br label %47
37: ; preds = %29
%38 = load i8, i8* %3
%39 = zext i8 %38 to i32
%40 = icmp eq i32 %39, 61
br i1 %40, label %41, label %42
41: ; preds = %37
store i32 250, i32* %2
br label %47
42: ; preds = %37
br label %43
43: ; preds = %42
br label %44
44: ; preds = %43
br label %45
45: ; preds = %44
br label %46
46: ; preds = %45
store i32 255, i32* %2
br label %47
47: ; preds = %46, %41, %33, %25, %21, %12, %7
%48 = load i32, i32* %2
ret i32 %48
}

LLVM IR (-O2):
define i32 @return_value(i8 zeroext %0) {
%2 = zext i8 %0 to i32
switch i8 %0, label %4 [
i8 43, label %22
i8 47, label %3
]
3: ; preds = %1
br label %22
4: ; preds = %1
%5 = tail call i64 @isalpha(i8 zeroext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4
%8 = tail call i64 @isupper(i8 zeroext %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = add nsw i32 %2, -65
br label %22
12: ; preds = %7
%13 = add nsw i32 %2, -71
br label %22
14: ; preds = %4
%15 = tail call i64 @isdigit(i8 zeroext %0)
%16 = icmp eq i64 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %14
%18 = add nuw nsw i32 %2, 4
br label %22
19: ; preds = %14
%20 = icmp eq i8 %0, 61
%21 = select i1 %20, i32 250, i32 255
br label %22
22: ; preds = %19, %1, %17, %12, %10, %3
%23 = phi i32 [ 63, %3 ], [ %11, %10 ], [ %13, %12 ], [ %18, %17 ], [ 62, %1 ], [ %21, %19 ]
ret i32 %23
}