int fun_F(int cur_byte, int *bitfill) {
  *bitfill -= 5;
  switch (cur_byte & 0xf8) {
  case 0x80:
    return 0;
  case 0x88:
    return -1;
  case 0x90:
    return 1;
  case 0x98:
    return -2;
  case 0xa0:
    return 2;
  case 0xa8:
    return -3;
  case 0xb0:
    return 3;
  case 0xb8:
    return -4;
  case 0xc0:
    return 4;
  case 0xc8:
    return -5;
  case 0xd0:
    return 5;
  case 0xd8:
    return -6;
  case 0xe0:
    return 6;
  case 0xe8:
    return -7;
  case 0xf0:
    return 7;
  case 0xf8:
    return -8;
  }
  *bitfill -= 1;
  switch (cur_byte & 0xfc) {
  case 0x40:
    return 8;
  case 0x44:
    return -9;
  case 0x48:
    return 9;
  case 0x4c:
    return -10;
  case 0x50:
    return 10;
  case 0x54:
    return -11;
  case 0x58:
    return 11;
  case 0x5c:
    return -12;
  case 0x60:
    return 12;
  case 0x64:
    return -13;
  case 0x68:
    return 13;
  case 0x6c:
    return -14;
  case 0x70:
    return 14;
  case 0x74:
    return -15;
  case 0x78:
    return 15;
  case 0x7c:
    return -16;
  }
  *bitfill -= 1;
  switch (cur_byte & 0xfe) {
  case 0x20:
    return 16;
  case 0x22:
    return -17;
  case 0x24:
    return 17;
  case 0x26:
    return -18;
  case 0x28:
    return 18;
  case 0x2a:
    return -19;
  case 0x2c:
    return 19;
  }
  *bitfill += 7;
  return 0xff;
}


x86 assembly (clang, -O0):
<fun_F>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xfffffffb,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
and    $0xf8,%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x78,%eax
ja     1204 <fun_F+0x104>
mov    -0x18(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xffffffff,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x1,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffffe,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x2,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffffd,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x3,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffffc,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x4,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffffb,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x5,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffffa,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x6,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff9,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x7,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff8,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
and    $0xfc,%eax
add    $0xffffffc0,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x3c,%eax
ja     12fd <fun_F+0x1fd>
mov    -0x20(%rbp),%rax
lea    0xfb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x8,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff7,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x9,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff6,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xa,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff5,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xb,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff4,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xc,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff3,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xd,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff2,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xe,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff1,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xf,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xfffffff0,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
and    $0xfe,%eax
add    $0xffffffe0,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0xc,%eax
ja     138a <fun_F+0x28a>
mov    -0x28(%rbp),%rax
lea    0xfab(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x10,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xffffffef,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x11,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xffffffee,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x12,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0xffffffed,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
movl   $0x13,-0x4(%rbp)
jmp    139c <fun_F+0x29c>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x7,%ecx
mov    %ecx,(%rax)
movl   $0xff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_F>:
mov    (%rsi),%eax
lea    -0x5(%rax),%ecx
mov    %ecx,(%rsi)
mov    %edi,%ecx
and    $0xf8,%ecx
add    $0xffffff80,%ecx
cmp    $0x80,%ecx
jae    1128 <fun_F+0x28>
shr    $0x3,%ecx
lea    0xedc(%rip),%rax
mov    (%rax,%rcx,4),%eax
ret
lea    -0x6(%rax),%ecx
mov    %ecx,(%rsi)
mov    %edi,%ecx
and    $0xfc,%ecx
add    $0xffffffc0,%ecx
cmp    $0x40,%ecx
jae    114a <fun_F+0x4a>
mov    %ecx,%eax
lea    0xefa(%rip),%rcx
mov    (%rax,%rcx,1),%eax
ret
lea    -0x7(%rax),%ecx
mov    %ecx,(%rsi)
add    $0xe0,%dil
and    $0xfe,%dil
cmp    $0xd,%dil
jae    116b <fun_F+0x6b>
movzbl %dil,%ecx
mov    $0x1555,%edx
bt     %ecx,%edx
jb     1173 <fun_F+0x73>
mov    %eax,(%rsi)
mov    $0xff,%eax
ret
movsbq %dil,%rax
lea    0xf02(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @fun_F(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32*, i32** %5
%7 = load i32, i32* %6
%8 = sub nsw i32 %7, 5
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 248
switch i32 %10, label %27 [
i32 128, label %11
i32 136, label %12
i32 144, label %13
i32 152, label %14
i32 160, label %15
i32 168, label %16
i32 176, label %17
i32 184, label %18
i32 192, label %19
i32 200, label %20
i32 208, label %21
i32 216, label %22
i32 224, label %23
i32 232, label %24
i32 240, label %25
i32 248, label %26
]
11: ; preds = %2
store i32 0, i32* %3
br label %66
12: ; preds = %2
store i32 -1, i32* %3
br label %66
13: ; preds = %2
store i32 1, i32* %3
br label %66
14: ; preds = %2
store i32 -2, i32* %3
br label %66
15: ; preds = %2
store i32 2, i32* %3
br label %66
16: ; preds = %2
store i32 -3, i32* %3
br label %66
17: ; preds = %2
store i32 3, i32* %3
br label %66
18: ; preds = %2
store i32 -4, i32* %3
br label %66
19: ; preds = %2
store i32 4, i32* %3
br label %66
20: ; preds = %2
store i32 -5, i32* %3
br label %66
21: ; preds = %2
store i32 5, i32* %3
br label %66
22: ; preds = %2
store i32 -6, i32* %3
br label %66
23: ; preds = %2
store i32 6, i32* %3
br label %66
24: ; preds = %2
store i32 -7, i32* %3
br label %66
25: ; preds = %2
store i32 7, i32* %3
br label %66
26: ; preds = %2
store i32 -8, i32* %3
br label %66
27: ; preds = %2
%28 = load i32*, i32** %5
%29 = load i32, i32* %28
%30 = sub nsw i32 %29, 1
store i32 %30, i32* %28
%31 = load i32, i32* %4
%32 = and i32 %31, 252
switch i32 %32, label %49 [
i32 64, label %33
i32 68, label %34
i32 72, label %35
i32 76, label %36
i32 80, label %37
i32 84, label %38
i32 88, label %39
i32 92, label %40
i32 96, label %41
i32 100, label %42
i32 104, label %43
i32 108, label %44
i32 112, label %45
i32 116, label %46
i32 120, label %47
i32 124, label %48
]
33: ; preds = %27
store i32 8, i32* %3
br label %66
34: ; preds = %27
store i32 -9, i32* %3
br label %66
35: ; preds = %27
store i32 9, i32* %3
br label %66
36: ; preds = %27
store i32 -10, i32* %3
br label %66
37: ; preds = %27
store i32 10, i32* %3
br label %66
38: ; preds = %27
store i32 -11, i32* %3
br label %66
39: ; preds = %27
store i32 11, i32* %3
br label %66
40: ; preds = %27
store i32 -12, i32* %3
br label %66
41: ; preds = %27
store i32 12, i32* %3
br label %66
42: ; preds = %27
store i32 -13, i32* %3
br label %66
43: ; preds = %27
store i32 13, i32* %3
br label %66
44: ; preds = %27
store i32 -14, i32* %3
br label %66
45: ; preds = %27
store i32 14, i32* %3
br label %66
46: ; preds = %27
store i32 -15, i32* %3
br label %66
47: ; preds = %27
store i32 15, i32* %3
br label %66
48: ; preds = %27
store i32 -16, i32* %3
br label %66
49: ; preds = %27
%50 = load i32*, i32** %5
%51 = load i32, i32* %50
%52 = sub nsw i32 %51, 1
store i32 %52, i32* %50
%53 = load i32, i32* %4
%54 = and i32 %53, 254
switch i32 %54, label %62 [
i32 32, label %55
i32 34, label %56
i32 36, label %57
i32 38, label %58
i32 40, label %59
i32 42, label %60
i32 44, label %61
]
55: ; preds = %49
store i32 16, i32* %3
br label %66
56: ; preds = %49
store i32 -17, i32* %3
br label %66
57: ; preds = %49
store i32 17, i32* %3
br label %66
58: ; preds = %49
store i32 -18, i32* %3
br label %66
59: ; preds = %49
store i32 18, i32* %3
br label %66
60: ; preds = %49
store i32 -19, i32* %3
br label %66
61: ; preds = %49
store i32 19, i32* %3
br label %66
62: ; preds = %49
%63 = load i32*, i32** %5
%64 = load i32, i32* %63
%65 = add nsw i32 %64, 7
store i32 %65, i32* %63
store i32 255, i32* %3
br label %66
66: ; preds = %62, %61, %60, %59, %58, %57, %56, %55, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11
%67 = load i32, i32* %3
ret i32 %67
}

LLVM IR (-O2):
@switch.table.fun_F = [16 x i32] [i32 0, i32 -1, i32 1, i32 -2, i32 2, i32 -3, i32 3, i32 -4, i32 4, i32 -5, i32 5, i32 -6, i32 6, i32 -7, i32 7, i32 -8]
@switch.table.fun_F.1 = [16 x i32] [i32 8, i32 -9, i32 9, i32 -10, i32 10, i32 -11, i32 11, i32 -12, i32 12, i32 -13, i32 13, i32 -14, i32 14, i32 -15, i32 15, i32 -16]
@switch.table.fun_F.2 = [13 x i32] [i32 16, i32 16, i32 -17, i32 16, i32 17, i32 16, i32 -18, i32 16, i32 18, i32 16, i32 -19, i32 16, i32 19]
define i32 @fun_F(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, -5
store i32 %4, i32* %1
%5 = and i32 %0, 248
%6 = add nsw i32 %5, -128
%7 = icmp ult i32 %6, 128
br i1 %7, label %20, label %8
8: ; preds = %2
%9 = add nsw i32 %3, -6
store i32 %9, i32* %1
%10 = and i32 %0, 252
%11 = add nsw i32 %10, -64
%12 = icmp ult i32 %11, 64
br i1 %12, label %25, label %13
13: ; preds = %8
%14 = add nsw i32 %3, -7
store i32 %14, i32* %1
%15 = trunc i32 %0 to i8
%16 = add i8 %15, -32
%17 = and i8 %16, -2
%18 = icmp ult i8 %17, 13
br i1 %18, label %30, label %19
19: ; preds = %30, %13
store i32 %3, i32* %1
br label %39
20: ; preds = %2
%21 = lshr exact i32 %6, 3
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds [16 x i32], [16 x i32]* @switch.table.fun_F, i64 0, i64 %22
%24 = load i32, i32* %23
br label %39
25: ; preds = %8
%26 = lshr exact i32 %11, 2
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds [16 x i32], [16 x i32]* @switch.table.fun_F.1, i64 0, i64 %27
%29 = load i32, i32* %28
br label %39
30: ; preds = %13
%31 = zext i8 %17 to i16
%32 = lshr i16 5461, %31
%33 = and i16 %32, 1
%34 = icmp eq i16 %33, 0
br i1 %34, label %19, label %35
35: ; preds = %30
%36 = sext i8 %17 to i64
%37 = getelementptr inbounds [13 x i32], [13 x i32]* @switch.table.fun_F.2, i64 0, i64 %36
%38 = load i32, i32* %37
br label %39
39: ; preds = %35, %25, %20, %19
%40 = phi i32 [ 255, %19 ], [ %24, %20 ], [ %29, %25 ], [ %38, %35 ]
ret i32 %40
}