char *determine_token_type(char sample) {
  char *type;
  switch (sample) {
  case '#':
    type = "heading";
    break;
  case '-':
  case '=':
    type = "blank_line";
    break;
  case '*':
    type = "star";
    break;
  case '`':
    type = "tilde";
    break;
  }
  return type;
}


x86 assembly (clang, -O0):
<determine_token_type>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x23,%eax
je     1163 <determine_token_type+0x63>
jmp    111f <determine_token_type+0x1f>
mov    -0x14(%rbp),%eax
sub    $0x2a,%eax
je     1183 <determine_token_type+0x83>
jmp    1130 <determine_token_type+0x30>
mov    -0x14(%rbp),%eax
sub    $0x2d,%eax
je     1173 <determine_token_type+0x73>
jmp    1141 <determine_token_type+0x41>
mov    -0x14(%rbp),%eax
sub    $0x3d,%eax
je     1173 <determine_token_type+0x73>
jmp    1152 <determine_token_type+0x52>
mov    -0x14(%rbp),%eax
sub    $0x60,%eax
je     1193 <determine_token_type+0x93>
jmp    119e <determine_token_type+0x9e>
lea    0xe96(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    119e <determine_token_type+0x9e>
lea    0xe8e(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    119e <determine_token_type+0x9e>
lea    0xe89(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    119e <determine_token_type+0x9e>
lea    0xe7e(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<determine_token_type>:
lea    0xef9(%rip),%rax
cmp    $0x3c,%edi
jg     1117 <determine_token_type+0x17>
cmp    $0x2a,%edi
je     1129 <determine_token_type+0x29>
cmp    $0x2d,%edi
je     1121 <determine_token_type+0x21>
ret
cmp    $0x60,%edi
je     1131 <determine_token_type+0x31>
cmp    $0x3d,%edi
jne    1116 <determine_token_type+0x16>
lea    0xee0(%rip),%rax
ret
lea    0xee3(%rip),%rax
ret
lea    0xee0(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"heading\00"
@.str.1 = [11 x i8] c"blank_line\00"
@.str.2 = [5 x i8] c"star\00"
@.str.3 = [6 x i8] c"tilde\00"
define i8* @determine_token_type(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 %10 [
i32 35, label %6
i32 45, label %7
i32 61, label %7
i32 42, label %8
i32 96, label %9
]
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
br label %10
7: ; preds = %1, %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %10
10: ; preds = %1, %9, %8, %7, %6
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"heading\00"
@.str.1 = [11 x i8] c"blank_line\00"
@.str.2 = [5 x i8] c"star\00"
@.str.3 = [6 x i8] c"tilde\00"
define i8* @determine_token_type(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 96, label %5
i32 45, label %3
i32 61, label %3
i32 42, label %4
]
3: ; preds = %1, %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %7
}