#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 uint8_t;

/* Variables and functions */
char Base64_ObterCaractereCodificado(uint8_t codigo) {
  if (codigo < 26) {
    return codigo + 'A';
  }
  if (codigo < 52) {
    return codigo + 71;
  }
  if (codigo < 62) {
    return codigo - 4;
  }
  if (codigo == 62) {
    return '+';
  }
  if (codigo == 63) {
    return '/';
  }
  if (codigo == 64) {
    return '=';
  } else {
    return '?';
  }
}


x86 assembly (clang, -O0):
<Base64_ObterCaractereCodificado>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    111f <Base64_ObterCaractereCodificado+0x1f>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    118c <Base64_ObterCaractereCodificado+0x8c>
cmpl   $0x34,-0x8(%rbp)
jge    1137 <Base64_ObterCaractereCodificado+0x37>
mov    -0x8(%rbp),%eax
add    $0x47,%eax
mov    %al,-0x1(%rbp)
jmp    118c <Base64_ObterCaractereCodificado+0x8c>
cmpl   $0x3e,-0x8(%rbp)
jge    114f <Base64_ObterCaractereCodificado+0x4f>
mov    -0x8(%rbp),%eax
sub    $0x4,%eax
mov    %al,-0x1(%rbp)
jmp    118c <Base64_ObterCaractereCodificado+0x8c>
cmpl   $0x3e,-0x8(%rbp)
jne    1162 <Base64_ObterCaractereCodificado+0x62>
movb   $0x2b,-0x1(%rbp)
jmp    118c <Base64_ObterCaractereCodificado+0x8c>
cmpl   $0x3f,-0x8(%rbp)
jne    1175 <Base64_ObterCaractereCodificado+0x75>
movb   $0x2f,-0x1(%rbp)
jmp    118c <Base64_ObterCaractereCodificado+0x8c>
cmpl   $0x40,-0x8(%rbp)
jne    1188 <Base64_ObterCaractereCodificado+0x88>
movb   $0x3d,-0x1(%rbp)
jmp    118c <Base64_ObterCaractereCodificado+0x8c>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Base64_ObterCaractereCodificado>:
cmp    $0x19,%edi
jg     110c <Base64_ObterCaractereCodificado+0xc>
add    $0x41,%dil
mov    %edi,%eax
ret
cmp    $0x33,%edi
ja     1118 <Base64_ObterCaractereCodificado+0x18>
add    $0x47,%dil
mov    %edi,%eax
ret
cmp    $0x3d,%edi
ja     1124 <Base64_ObterCaractereCodificado+0x24>
add    $0xfc,%dil
mov    %edi,%eax
ret
add    $0xffffffc2,%edi
mov    $0x3f,%al
cmp    $0x2,%edi
ja     113a <Base64_ObterCaractereCodificado+0x3a>
shl    $0x3,%edi
mov    $0x3d2f2b,%eax
mov    %edi,%ecx
shr    %cl,%eax
ret

LLVM IR (-O0):
define signext i8 @Base64_ObterCaractereCodificado(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 26
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 65
%9 = trunc i32 %8 to i8
store i8 %9, i8* %2
br label %37
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 52
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 71
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %37
17: ; preds = %10
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 62
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %3
%22 = sub nsw i32 %21, 4
%23 = trunc i32 %22 to i8
store i8 %23, i8* %2
br label %37
24: ; preds = %17
%25 = load i32, i32* %3
%26 = icmp eq i32 %25, 62
br i1 %26, label %27, label %28
27: ; preds = %24
store i8 43, i8* %2
br label %37
28: ; preds = %24
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 63
br i1 %30, label %31, label %32
31: ; preds = %28
store i8 47, i8* %2
br label %37
32: ; preds = %28
%33 = load i32, i32* %3
%34 = icmp eq i32 %33, 64
br i1 %34, label %35, label %36
35: ; preds = %32
store i8 61, i8* %2
br label %37
36: ; preds = %32
store i8 63, i8* %2
br label %37
37: ; preds = %36, %35, %31, %27, %20, %13, %6
%38 = load i8, i8* %2
ret i8 %38
}

LLVM IR (-O2):
define signext i8 @Base64_ObterCaractereCodificado(i32 %0) {
%2 = icmp slt i32 %0, 26
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = trunc i32 %0 to i8
%5 = add i8 %4, 65
br label %24
6: ; preds = %1
%7 = icmp ult i32 %0, 52
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = trunc i32 %0 to i8
%10 = add nuw nsw i8 %9, 71
br label %24
11: ; preds = %6
%12 = icmp ult i32 %0, 62
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = trunc i32 %0 to i8
%15 = add nsw i8 %14, -4
br label %24
16: ; preds = %11
%17 = add i32 %0, -62
%18 = icmp ult i32 %17, 3
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = trunc i32 %17 to i24
%21 = shl i24 %20, 3
%22 = lshr i24 4009771, %21
%23 = trunc i24 %22 to i8
br label %24
24: ; preds = %16, %19, %13, %8, %3
%25 = phi i8 [ %5, %3 ], [ %10, %8 ], [ %15, %13 ], [ %23, %19 ], [ 63, %16 ]
ret i8 %25
}