char convertCharacter(char number) {
  char return_value;
  switch (number) {
  case 0x01: {
    return_value = '0';
    break;
  }
  case 0x10: {
    return_value = '1';
    break;
  }
  case 0x08: {
    return_value = '2';
    break;
  }
  case 0x19: {
    return_value = '3';
    break;
  }
  case 0x04: {
    return_value = '4';
    break;
  }
  case 0x15: {
    return_value = '5';
    break;
  }
  case 0x0d: {
    return_value = '6';
    break;
  }
  case 0x1c: {
    return_value = '7';
    break;
  }
  case 0x02: {
    return_value = '8';
    break;
  }
  case 0x13: {
    return_value = '9';
    break;
  }
  case 0x1a: {
    return_value = 'S';
    break;
  }
  case 0x16: {
    return_value = 'F';
    break;
  }
  case 0x1f: {
    return_value = 'E';
    break;
  }
  default: {
    return_value = 'Z';
    break;
  }
  }
  return (return_value);
}


x86 assembly (clang, -O0):
<convertCharacter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x1e,%eax
ja     11a9 <convertCharacter+0xa9>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x30,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x31,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x32,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x33,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x34,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x35,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x36,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x37,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x38,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x39,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x53,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x46,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x45,-0x2(%rbp)
jmp    11ad <convertCharacter+0xad>
movb   $0x5a,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertCharacter>:
movslq %edi,%rcx
add    $0xffffffffffffffff,%rcx
mov    $0x5a,%al
cmp    $0x1e,%ecx
ja     1118 <convertCharacter+0x18>
lea    0xeeb(%rip),%rax
mov    (%rcx,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @convertCharacter(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %19 [
i32 1, label %6
i32 16, label %7
i32 8, label %8
i32 25, label %9
i32 4, label %10
i32 21, label %11
i32 13, label %12
i32 28, label %13
i32 2, label %14
i32 19, label %15
i32 26, label %16
i32 22, label %17
i32 31, label %18
]
6: ; preds = %1
store i8 48, i8* %3
br label %20
7: ; preds = %1
store i8 49, i8* %3
br label %20
8: ; preds = %1
store i8 50, i8* %3
br label %20
9: ; preds = %1
store i8 51, i8* %3
br label %20
10: ; preds = %1
store i8 52, i8* %3
br label %20
11: ; preds = %1
store i8 53, i8* %3
br label %20
12: ; preds = %1
store i8 54, i8* %3
br label %20
13: ; preds = %1
store i8 55, i8* %3
br label %20
14: ; preds = %1
store i8 56, i8* %3
br label %20
15: ; preds = %1
store i8 57, i8* %3
br label %20
16: ; preds = %1
store i8 83, i8* %3
br label %20
17: ; preds = %1
store i8 70, i8* %3
br label %20
18: ; preds = %1
store i8 69, i8* %3
br label %20
19: ; preds = %1
store i8 90, i8* %3
br label %20
20: ; preds = %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%21 = load i8, i8* %3
ret i8 %21
}

LLVM IR (-O2):
@switch.table.convertCharacter = [31 x i8] c"08Z4ZZZ2ZZZZ6ZZ1ZZ9Z5FZZ3SZ7ZZE"
define signext i8 @convertCharacter(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -1
%4 = icmp ult i32 %3, 31
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [31 x i8], [31 x i8]* @switch.table.convertCharacter, i64 0, i64 %6
%8 = load i8, i8* %7
br label %9
9: ; preds = %1, %5
%10 = phi i8 [ %8, %5 ], [ 90, %1 ]
ret i8 %10
}