int ztype2ltype(int zaxistype) {
  int ltype = -1;
  if (zaxistype == 0)
    ltype = 1;
  else if (zaxistype == 4)
    ltype = 100;
  else if (zaxistype == 10)
    ltype = 103;
  else if (zaxistype == 5)
    ltype = 105;
  else if (zaxistype == 11)
    ltype = 107;
  else if (zaxistype == 2)
    ltype = 109;
  else if (zaxistype == 3)
    ltype = 109;
  else if (zaxistype == 7)
    ltype = 111;
  else if (zaxistype == 8)
    ltype = 113;
  else if (zaxistype == 6)
    ltype = 160;
  return (ltype);
}


x86 assembly (clang, -O0):
<ztype2ltype>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1124 <ztype2ltype+0x24>
movl   $0x1,-0x8(%rbp)
jmp    1212 <ztype2ltype+0x112>
cmpl   $0x4,-0x4(%rbp)
jne    113a <ztype2ltype+0x3a>
movl   $0x64,-0x8(%rbp)
jmp    120d <ztype2ltype+0x10d>
cmpl   $0xa,-0x4(%rbp)
jne    1150 <ztype2ltype+0x50>
movl   $0x67,-0x8(%rbp)
jmp    1208 <ztype2ltype+0x108>
cmpl   $0x5,-0x4(%rbp)
jne    1166 <ztype2ltype+0x66>
movl   $0x69,-0x8(%rbp)
jmp    1203 <ztype2ltype+0x103>
cmpl   $0xb,-0x4(%rbp)
jne    117c <ztype2ltype+0x7c>
movl   $0x6b,-0x8(%rbp)
jmp    11fe <ztype2ltype+0xfe>
cmpl   $0x2,-0x4(%rbp)
jne    1192 <ztype2ltype+0x92>
movl   $0x6d,-0x8(%rbp)
jmp    11f9 <ztype2ltype+0xf9>
cmpl   $0x3,-0x4(%rbp)
jne    11a8 <ztype2ltype+0xa8>
movl   $0x6d,-0x8(%rbp)
jmp    11f4 <ztype2ltype+0xf4>
cmpl   $0x7,-0x4(%rbp)
jne    11be <ztype2ltype+0xbe>
movl   $0x6f,-0x8(%rbp)
jmp    11ef <ztype2ltype+0xef>
cmpl   $0x8,-0x4(%rbp)
jne    11d4 <ztype2ltype+0xd4>
movl   $0x71,-0x8(%rbp)
jmp    11ea <ztype2ltype+0xea>
cmpl   $0x6,-0x4(%rbp)
jne    11e5 <ztype2ltype+0xe5>
movl   $0xa0,-0x8(%rbp)
jmp    11ea <ztype2ltype+0xea>
jmp    11ef <ztype2ltype+0xef>
jmp    11f4 <ztype2ltype+0xf4>
jmp    11f9 <ztype2ltype+0xf9>
jmp    11fe <ztype2ltype+0xfe>
jmp    1203 <ztype2ltype+0x103>
jmp    1208 <ztype2ltype+0x108>
jmp    120d <ztype2ltype+0x10d>
jmp    1212 <ztype2ltype+0x112>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ztype2ltype>:
mov    $0xffffffff,%eax
cmp    $0xb,%edi
ja     1117 <ztype2ltype+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @ztype2ltype(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %3
br label %52
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 4
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 100, i32* %3
br label %51
11: ; preds = %7
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 103, i32* %3
br label %50
15: ; preds = %11
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 5
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 105, i32* %3
br label %49
19: ; preds = %15
%20 = load i32, i32* %2
%21 = icmp eq i32 %20, 11
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 107, i32* %3
br label %48
23: ; preds = %19
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 2
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 109, i32* %3
br label %47
27: ; preds = %23
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 3
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 109, i32* %3
br label %46
31: ; preds = %27
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 7
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 111, i32* %3
br label %45
35: ; preds = %31
%36 = load i32, i32* %2
%37 = icmp eq i32 %36, 8
br i1 %37, label %38, label %39
38: ; preds = %35
store i32 113, i32* %3
br label %44
39: ; preds = %35
%40 = load i32, i32* %2
%41 = icmp eq i32 %40, 6
br i1 %41, label %42, label %43
42: ; preds = %39
store i32 160, i32* %3
br label %43
43: ; preds = %42, %39
br label %44
44: ; preds = %43, %38
br label %45
45: ; preds = %44, %34
br label %46
46: ; preds = %45, %30
br label %47
47: ; preds = %46, %26
br label %48
48: ; preds = %47, %22
br label %49
49: ; preds = %48, %18
br label %50
50: ; preds = %49, %14
br label %51
51: ; preds = %50, %10
br label %52
52: ; preds = %51, %6
%53 = load i32, i32* %3
ret i32 %53
}

LLVM IR (-O2):
@switch.table.ztype2ltype = [12 x i32] [i32 1, i32 -1, i32 109, i32 109, i32 100, i32 105, i32 160, i32 111, i32 113, i32 -1, i32 103, i32 107]
define i32 @ztype2ltype(i32 %0) {
%2 = icmp ult i32 %0, 12
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [12 x i32], [12 x i32]* @switch.table.ztype2ltype, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}