short null_mode_type(prefix)
long prefix;
{
  switch (prefix) {
  case 0x18000L:
    return (6);
  case 0x36000L:
    return (7);
  case 0x34000L:
    return (5);
  case 0x32000L:
    return (2);
  case 0x41000L:
    return (1);
  case 0x60C00L:
    return (8);
  case 0x60800L:
    return (4);
  case 0x70600L:
    return (9);
  case 0x70400L:
    return (3);
  case 0x80200L:
    return (11);
  case 0x90300L:
    return (11);
  case 0xA0380L:
    return (11);
  case 0xA03C0L:
    return (10);
  case 0x70000L:
    return (12);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<null_mode_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
sub    $0x18000,%rax
je     1232 <null_mode_type+0x132>
jmp    1121 <null_mode_type+0x21>
mov    -0x18(%rbp),%rax
sub    $0x32000,%rax
je     1253 <null_mode_type+0x153>
jmp    1136 <null_mode_type+0x36>
mov    -0x18(%rbp),%rax
sub    $0x34000,%rax
je     1248 <null_mode_type+0x148>
jmp    114b <null_mode_type+0x4b>
mov    -0x18(%rbp),%rax
sub    $0x36000,%rax
je     123d <null_mode_type+0x13d>
jmp    1160 <null_mode_type+0x60>
mov    -0x18(%rbp),%rax
sub    $0x41000,%rax
je     125e <null_mode_type+0x15e>
jmp    1175 <null_mode_type+0x75>
mov    -0x18(%rbp),%rax
sub    $0x60800,%rax
je     1274 <null_mode_type+0x174>
jmp    118a <null_mode_type+0x8a>
mov    -0x18(%rbp),%rax
sub    $0x60c00,%rax
je     1269 <null_mode_type+0x169>
jmp    119f <null_mode_type+0x9f>
mov    -0x18(%rbp),%rax
sub    $0x70000,%rax
je     12c1 <null_mode_type+0x1c1>
jmp    11b4 <null_mode_type+0xb4>
mov    -0x18(%rbp),%rax
sub    $0x70400,%rax
je     128a <null_mode_type+0x18a>
jmp    11c9 <null_mode_type+0xc9>
mov    -0x18(%rbp),%rax
sub    $0x70600,%rax
je     127f <null_mode_type+0x17f>
jmp    11de <null_mode_type+0xde>
mov    -0x18(%rbp),%rax
sub    $0x80200,%rax
je     1295 <null_mode_type+0x195>
jmp    11f3 <null_mode_type+0xf3>
mov    -0x18(%rbp),%rax
sub    $0x90300,%rax
je     12a0 <null_mode_type+0x1a0>
jmp    1208 <null_mode_type+0x108>
mov    -0x18(%rbp),%rax
sub    $0xa0380,%rax
je     12ab <null_mode_type+0x1ab>
jmp    121d <null_mode_type+0x11d>
mov    -0x18(%rbp),%rax
sub    $0xa03c0,%rax
je     12b6 <null_mode_type+0x1b6>
jmp    12cc <null_mode_type+0x1cc>
movw   $0x6,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x7,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x5,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x2,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x1,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x8,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x4,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x9,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0x3,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0xb,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0xb,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0xb,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0xa,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0xc,-0x2(%rbp)
jmp    12d2 <null_mode_type+0x1d2>
movw   $0xffff,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_mode_type>:
cmp    $0x6ffff,%rdi
jg     113e <null_mode_type+0x3e>
cmp    $0x35fff,%rdi
jle    1167 <null_mode_type+0x67>
cmp    $0x607ff,%rdi
jg     11a7 <null_mode_type+0xa7>
cmp    $0x36000,%rdi
je     11da <null_mode_type+0xda>
cmp    $0x41000,%rdi
jne    11f8 <null_mode_type+0xf8>
mov    $0x1,%ax
ret
cmp    $0x801ff,%rdi
jle    1187 <null_mode_type+0x87>
cmp    $0xa037f,%rdi
jg     11be <null_mode_type+0xbe>
cmp    $0x80200,%rdi
je     11d5 <null_mode_type+0xd5>
cmp    $0x90300,%rdi
je     11d5 <null_mode_type+0xd5>
jmp    11f8 <null_mode_type+0xf8>
cmp    $0x18000,%rdi
je     11df <null_mode_type+0xdf>
cmp    $0x32000,%rdi
je     11e4 <null_mode_type+0xe4>
cmp    $0x34000,%rdi
jne    11f8 <null_mode_type+0xf8>
mov    $0x5,%ax
ret
cmp    $0x70000,%rdi
je     11e9 <null_mode_type+0xe9>
cmp    $0x70400,%rdi
je     11ee <null_mode_type+0xee>
cmp    $0x70600,%rdi
jne    11f8 <null_mode_type+0xf8>
mov    $0x9,%ax
ret
cmp    $0x60800,%rdi
je     11f3 <null_mode_type+0xf3>
cmp    $0x60c00,%rdi
jne    11f8 <null_mode_type+0xf8>
mov    $0x8,%ax
ret
cmp    $0xa0380,%rdi
je     11d5 <null_mode_type+0xd5>
cmp    $0xa03c0,%rdi
jne    11f8 <null_mode_type+0xf8>
mov    $0xa,%ax
ret
mov    $0xb,%ax
ret
mov    $0x7,%ax
ret
mov    $0x6,%ax
ret
mov    $0x2,%ax
ret
mov    $0xc,%ax
ret
mov    $0x3,%ax
ret
mov    $0x4,%ax
ret
mov    $0xffff,%ax
ret

LLVM IR (-O0):
define signext i16 @null_mode_type(i64 %0) {
%2 = alloca i16
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
switch i64 %4, label %19 [
i64 98304, label %5
i64 221184, label %6
i64 212992, label %7
i64 204800, label %8
i64 266240, label %9
i64 396288, label %10
i64 395264, label %11
i64 460288, label %12
i64 459776, label %13
i64 524800, label %14
i64 590592, label %15
i64 656256, label %16
i64 656320, label %17
i64 458752, label %18
]
5: ; preds = %1
store i16 6, i16* %2
br label %20
6: ; preds = %1
store i16 7, i16* %2
br label %20
7: ; preds = %1
store i16 5, i16* %2
br label %20
8: ; preds = %1
store i16 2, i16* %2
br label %20
9: ; preds = %1
store i16 1, i16* %2
br label %20
10: ; preds = %1
store i16 8, i16* %2
br label %20
11: ; preds = %1
store i16 4, i16* %2
br label %20
12: ; preds = %1
store i16 9, i16* %2
br label %20
13: ; preds = %1
store i16 3, i16* %2
br label %20
14: ; preds = %1
store i16 11, i16* %2
br label %20
15: ; preds = %1
store i16 11, i16* %2
br label %20
16: ; preds = %1
store i16 11, i16* %2
br label %20
17: ; preds = %1
store i16 10, i16* %2
br label %20
18: ; preds = %1
store i16 12, i16* %2
br label %20
19: ; preds = %1
store i16 -1, i16* %2
br label %20
20: ; preds = %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%21 = load i16, i16* %2
ret i16 %21
}

LLVM IR (-O2):
define signext i16 @null_mode_type(i64 %0) {
switch i64 %0, label %15 [
i64 98304, label %16
i64 221184, label %2
i64 212992, label %3
i64 204800, label %4
i64 266240, label %5
i64 396288, label %6
i64 395264, label %7
i64 460288, label %8
i64 459776, label %9
i64 524800, label %10
i64 590592, label %11
i64 656256, label %12
i64 656320, label %13
i64 458752, label %14
]
2: ; preds = %1
br label %16
3: ; preds = %1
br label %16
4: ; preds = %1
br label %16
5: ; preds = %1
br label %16
6: ; preds = %1
br label %16
7: ; preds = %1
br label %16
8: ; preds = %1
br label %16
9: ; preds = %1
br label %16
10: ; preds = %1
br label %16
11: ; preds = %1
br label %16
12: ; preds = %1
br label %16
13: ; preds = %1
br label %16
14: ; preds = %1
br label %16
15: ; preds = %1
br label %16
16: ; preds = %1, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%17 = phi i16 [ -1, %15 ], [ 12, %14 ], [ 10, %13 ], [ 11, %12 ], [ 11, %11 ], [ 11, %10 ], [ 3, %9 ], [ 9, %8 ], [ 4, %7 ], [ 8, %6 ], [ 1, %5 ], [ 2, %4 ], [ 5, %3 ], [ 7, %2 ], [ 6, %1 ]
ret i16 %17
}