unsigned short int convert_match_to_predefided(unsigned short int match) {
  if (match == 1) {
    return '1';
  }
  if (match == 2) {
    return '2';
  }
  if (match == 3) {
    return '3';
  }
  if (match == 4) {
    return '4';
  }
  if (match == 5) {
    return '5';
  }
  if (match == 6) {
    return '6';
  }
  if (match == 7) {
    return '7';
  }
  if (match == 8) {
    return '8';
  }
  if (match == 9) {
    return '9';
  }
  if (match == 10) {
    return '10';
  }
  if (match == 11) {
    return '11';
  }
}


x86 assembly (clang, -O0):
<convert_match_to_predefided>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
cmp    $0x1,%eax
jne    1123 <convert_match_to_predefided+0x23>
movw   $0x31,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x2,%eax
jne    113b <convert_match_to_predefided+0x3b>
movw   $0x32,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x3,%eax
jne    1153 <convert_match_to_predefided+0x53>
movw   $0x33,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x4,%eax
jne    116b <convert_match_to_predefided+0x6b>
movw   $0x34,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x5,%eax
jne    1183 <convert_match_to_predefided+0x83>
movw   $0x35,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x6,%eax
jne    119b <convert_match_to_predefided+0x9b>
movw   $0x36,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x7,%eax
jne    11b3 <convert_match_to_predefided+0xb3>
movw   $0x37,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x8,%eax
jne    11cb <convert_match_to_predefided+0xcb>
movw   $0x38,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0x9,%eax
jne    11e3 <convert_match_to_predefided+0xe3>
movw   $0x39,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0xa,%eax
jne    11fb <convert_match_to_predefided+0xfb>
movw   $0x3130,-0x2(%rbp)
jmp    120e <convert_match_to_predefided+0x10e>
movzwl -0x4(%rbp),%eax
cmp    $0xb,%eax
jne    120e <convert_match_to_predefided+0x10e>
movw   $0x3131,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_match_to_predefided>:
add    $0xfffffffe,%edi
mov    $0x31,%ax
cmp    $0x9,%di
ja     111c <convert_match_to_predefided+0x1c>
movswq %di,%rax
lea    0xee8(%rip),%rcx
movzwl (%rcx,%rax,2),%eax
ret

LLVM IR (-O0):
define zeroext i16 @convert_match_to_predefided(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i16 49, i16* %2
br label %58
8: ; preds = %1
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %13
12: ; preds = %8
store i16 50, i16* %2
br label %58
13: ; preds = %8
%14 = load i16, i16* %3
%15 = zext i16 %14 to i32
%16 = icmp eq i32 %15, 3
br i1 %16, label %17, label %18
17: ; preds = %13
store i16 51, i16* %2
br label %58
18: ; preds = %13
%19 = load i16, i16* %3
%20 = zext i16 %19 to i32
%21 = icmp eq i32 %20, 4
br i1 %21, label %22, label %23
22: ; preds = %18
store i16 52, i16* %2
br label %58
23: ; preds = %18
%24 = load i16, i16* %3
%25 = zext i16 %24 to i32
%26 = icmp eq i32 %25, 5
br i1 %26, label %27, label %28
27: ; preds = %23
store i16 53, i16* %2
br label %58
28: ; preds = %23
%29 = load i16, i16* %3
%30 = zext i16 %29 to i32
%31 = icmp eq i32 %30, 6
br i1 %31, label %32, label %33
32: ; preds = %28
store i16 54, i16* %2
br label %58
33: ; preds = %28
%34 = load i16, i16* %3
%35 = zext i16 %34 to i32
%36 = icmp eq i32 %35, 7
br i1 %36, label %37, label %38
37: ; preds = %33
store i16 55, i16* %2
br label %58
38: ; preds = %33
%39 = load i16, i16* %3
%40 = zext i16 %39 to i32
%41 = icmp eq i32 %40, 8
br i1 %41, label %42, label %43
42: ; preds = %38
store i16 56, i16* %2
br label %58
43: ; preds = %38
%44 = load i16, i16* %3
%45 = zext i16 %44 to i32
%46 = icmp eq i32 %45, 9
br i1 %46, label %47, label %48
47: ; preds = %43
store i16 57, i16* %2
br label %58
48: ; preds = %43
%49 = load i16, i16* %3
%50 = zext i16 %49 to i32
%51 = icmp eq i32 %50, 10
br i1 %51, label %52, label %53
52: ; preds = %48
store i16 12592, i16* %2
br label %58
53: ; preds = %48
%54 = load i16, i16* %3
%55 = zext i16 %54 to i32
%56 = icmp eq i32 %55, 11
br i1 %56, label %57, label %58
57: ; preds = %53
store i16 12593, i16* %2
br label %58
58: ; preds = %7, %12, %17, %22, %27, %32, %37, %42, %47, %52, %57, %53
%59 = load i16, i16* %2
ret i16 %59
}

LLVM IR (-O2):
@switch.table.convert_match_to_predefided = [10 x i16] [i16 50, i16 51, i16 52, i16 53, i16 54, i16 55, i16 56, i16 57, i16 12592, i16 12593]
define zeroext i16 @convert_match_to_predefided(i16 zeroext %0) {
%2 = add i16 %0, -2
%3 = icmp ult i16 %2, 10
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i16 %2 to i64
%6 = getelementptr inbounds [10 x i16], [10 x i16]* @switch.table.convert_match_to_predefided, i64 0, i64 %5
%7 = load i16, i16* %6
br label %8
8: ; preds = %4, %1
%9 = phi i16 [ 49, %1 ], [ %7, %4 ]
ret i16 %9
}