char selLet(int a) {
  int ris = 'z';
  if (a == 1)
    ris = '1';
  if (a == 2)
    ris = '2';
  if (a == 3)
    ris = '3';
  if (a == 4)
    ris = '4';
  if (a == 5)
    ris = '5';
  if (a == 6)
    ris = '6';
  if (a == 7)
    ris = '7';
  if (a == 8)
    ris = '8';
  if (a == 9)
    ris = '9';
  if (a == 0)
    ris = '0';
  return ris;
}


x86 assembly (clang, -O0):
<selLet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x7a,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111f <selLet+0x1f>
movl   $0x31,-0x8(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1130 <selLet+0x30>
movl   $0x32,-0x8(%rbp)
cmpl   $0x3,-0x4(%rbp)
jne    1141 <selLet+0x41>
movl   $0x33,-0x8(%rbp)
cmpl   $0x4,-0x4(%rbp)
jne    1152 <selLet+0x52>
movl   $0x34,-0x8(%rbp)
cmpl   $0x5,-0x4(%rbp)
jne    1163 <selLet+0x63>
movl   $0x35,-0x8(%rbp)
cmpl   $0x6,-0x4(%rbp)
jne    1174 <selLet+0x74>
movl   $0x36,-0x8(%rbp)
cmpl   $0x7,-0x4(%rbp)
jne    1185 <selLet+0x85>
movl   $0x37,-0x8(%rbp)
cmpl   $0x8,-0x4(%rbp)
jne    1196 <selLet+0x96>
movl   $0x38,-0x8(%rbp)
cmpl   $0x9,-0x4(%rbp)
jne    11a7 <selLet+0xa7>
movl   $0x39,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    11b8 <selLet+0xb8>
movl   $0x30,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<selLet>:
cmp    $0x1,%edi
mov    $0x31,%eax
mov    $0x7a,%ecx
cmove  %eax,%ecx
cmp    $0x2,%edi
mov    $0x32,%eax
cmovne %ecx,%eax
cmp    $0x3,%edi
mov    $0x33,%ecx
cmovne %eax,%ecx
cmp    $0x4,%edi
mov    $0x34,%eax
cmovne %ecx,%eax
cmp    $0x5,%edi
mov    $0x35,%ecx
cmovne %eax,%ecx
cmp    $0x6,%edi
mov    $0x36,%eax
cmovne %ecx,%eax
cmp    $0x7,%edi
mov    $0x37,%ecx
cmovne %eax,%ecx
cmp    $0x8,%edi
mov    $0x38,%eax
cmovne %ecx,%eax
cmp    $0x9,%edi
mov    $0x39,%ecx
cmovne %eax,%ecx
test   %edi,%edi
mov    $0x30,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i8 @selLet(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = icmp eq i32 %0, 2
%4 = icmp eq i32 %0, 3
%5 = icmp eq i32 %0, 4
%6 = icmp eq i32 %0, 5
%7 = icmp eq i32 %0, 6
%8 = icmp eq i32 %0, 7
%9 = icmp eq i32 %0, 8
%10 = icmp eq i32 %0, 9
%11 = icmp eq i32 %0, 0
%12 = select i1 %2, i8 49, i8 122
%13 = select i1 %3, i8 50, i8 %12
%14 = select i1 %4, i8 51, i8 %13
%15 = select i1 %5, i8 52, i8 %14
%16 = select i1 %6, i8 53, i8 %15
%17 = select i1 %7, i8 54, i8 %16
%18 = select i1 %8, i8 55, i8 %17
%19 = select i1 %9, i8 56, i8 %18
%20 = select i1 %10, i8 57, i8 %19
%21 = select i1 %11, i8 48, i8 %20
ret i8 %21
}