#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int ltf8_get(char *cp, int64_t *val_p) {
  unsigned char *up = (unsigned char *)cp;
  if (up[0] < 0x80) {
    *val_p = up[0];
    return 1;
  } else if (up[0] < 0xc0) {
    *val_p =
        (((uint64_t)up[0] << 8) | (uint64_t)up[1]) & (((1LL << (6 + 8))) - 1);
    return 2;
  } else if (up[0] < 0xe0) {
    *val_p =
        (((uint64_t)up[0] << 16) | ((uint64_t)up[1] << 8) | (uint64_t)up[2]) &
        ((1LL << (5 + 2 * 8)) - 1);
    return 3;
  } else if (up[0] < 0xf0) {
    *val_p = (((uint64_t)up[0] << 24) | ((uint64_t)up[1] << 16) |
              ((uint64_t)up[2] << 8) | (uint64_t)up[3]) &
             ((1LL << (4 + 3 * 8)) - 1);
    return 4;
  } else if (up[0] < 0xf8) {
    *val_p =
        (((uint64_t)up[0] << 32) | ((uint64_t)up[1] << 24) |
         ((uint64_t)up[2] << 16) | ((uint64_t)up[3] << 8) | (uint64_t)up[4]) &
        ((1LL << (3 + 4 * 8)) - 1);
    return 5;
  } else if (up[0] < 0xfc) {
    *val_p = (((uint64_t)up[0] << 40) | ((uint64_t)up[1] << 32) |
              ((uint64_t)up[2] << 24) | ((uint64_t)up[3] << 16) |
              ((uint64_t)up[4] << 8) | (uint64_t)up[5]) &
             ((1LL << (2 + 5 * 8)) - 1);
    return 6;
  } else if (up[0] < 0xfe) {
    *val_p =
        (((uint64_t)up[0] << 48) | ((uint64_t)up[1] << 40) |
         ((uint64_t)up[2] << 32) | ((uint64_t)up[3] << 24) |
         ((uint64_t)up[4] << 16) | ((uint64_t)up[5] << 8) | (uint64_t)up[6]) &
        ((1LL << (1 + 6 * 8)) - 1);
    return 7;
  } else if (up[0] < 0xff) {
    *val_p =
        (((uint64_t)up[1] << 48) | ((uint64_t)up[2] << 40) |
         ((uint64_t)up[3] << 32) | ((uint64_t)up[4] << 24) |
         ((uint64_t)up[5] << 16) | ((uint64_t)up[6] << 8) | (uint64_t)up[7]) &
        ((1LL << (7 * 8)) - 1);
    return 8;
  } else {
    *val_p = (((uint64_t)up[1] << 56) | ((uint64_t)up[2] << 48) |
              ((uint64_t)up[3] << 40) | ((uint64_t)up[4] << 32) |
              ((uint64_t)up[5] << 24) | ((uint64_t)up[6] << 16) |
              ((uint64_t)up[7] << 8) | (uint64_t)up[8]);
    return 9;
  }
}


x86 assembly (clang, -O0):
<ltf8_get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x80,%eax
jge    113f <ltf8_get+0x3f>
mov    -0x20(%rbp),%rax
movzbl (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xc0,%eax
jge    1181 <ltf8_get+0x81>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
cltq
and    $0x3fff,%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x2,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xe0,%eax
jge    11d0 <ltf8_get+0xd0>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
shl    $0x10,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
or     %ecx,%eax
cltq
and    $0x1fffff,%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x3,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xf0,%eax
jge    122c <ltf8_get+0x12c>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
cltq
and    $0xfffffff,%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x4,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xf8,%eax
jge    12a0 <ltf8_get+0x1a0>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
or     %ecx,%eax
cltq
movabs $0x7ffffffff,%rcx
and    %rcx,%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x5,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xfc,%eax
jge    1327 <ltf8_get+0x227>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
mov    $0x28,%ecx
shl    %cl,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x1(%rcx),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
or     %ecx,%eax
cltq
movabs $0x3ffffffffff,%rcx
and    %rcx,%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x6,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xfe,%eax
jge    13c1 <ltf8_get+0x2c1>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
mov    $0x30,%ecx
shl    %cl,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x1(%rcx),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x2(%rcx),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x6(%rcx),%ecx
or     %ecx,%eax
cltq
movabs $0x1ffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x7,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xff,%eax
jge    145c <ltf8_get+0x35c>
mov    -0x20(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    $0x30,%ecx
shl    %cl,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x2(%rcx),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x3(%rcx),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x6(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x7(%rcx),%ecx
or     %ecx,%eax
cltq
movabs $0xffffffffffffff,%rcx
and    %rcx,%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x8,-0x4(%rbp)
jmp    14e6 <ltf8_get+0x3e6>
mov    -0x20(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x2(%rcx),%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%rcx
movzbl 0x3(%rcx),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movzbl 0x4(%rax),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x24(%rbp),%ecx
or     %eax,%ecx
mov    -0x20(%rbp),%rax
movzbl 0x5(%rax),%eax
shl    $0x18,%eax
or     %eax,%ecx
mov    -0x20(%rbp),%rax
movzbl 0x6(%rax),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x20(%rbp),%rax
movzbl 0x7(%rax),%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x20(%rbp),%rax
movzbl 0x8(%rax),%eax
or     %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x9,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltf8_get>:
movzbl (%rdi),%ecx
test   %cl,%cl
js     110f <ltf8_get+0xf>
mov    %ecx,(%rsi)
mov    $0x1,%eax
ret
cmp    $0xbf,%cl
ja     1128 <ltf8_get+0x28>
movzbl 0x1(%rdi),%eax
and    $0x3f,%ecx
shl    $0x8,%ecx
or     %eax,%ecx
mov    %ecx,(%rsi)
mov    $0x2,%eax
ret
cmp    $0xdf,%cl
ja     114a <ltf8_get+0x4a>
movzbl 0x1(%rdi),%eax
shl    $0x8,%eax
movzbl 0x2(%rdi),%edx
and    $0x1f,%ecx
shl    $0x10,%ecx
or     %eax,%ecx
or     %edx,%ecx
mov    %ecx,(%rsi)
mov    $0x3,%eax
ret
cmp    $0xef,%cl
ja     1175 <ltf8_get+0x75>
movzbl 0x1(%rdi),%eax
shl    $0x10,%eax
movzbl 0x2(%rdi),%edx
shl    $0x8,%edx
movzbl 0x3(%rdi),%edi
and    $0xf,%ecx
shl    $0x18,%ecx
or     %eax,%ecx
or     %edx,%ecx
or     %edi,%ecx
mov    %ecx,(%rsi)
mov    $0x4,%eax
ret
mov    $0x5,%eax
cmp    $0xf8,%cl
jb     119e <ltf8_get+0x9e>
mov    $0x6,%eax
cmp    $0xfc,%cl
jb     119e <ltf8_get+0x9e>
mov    $0x7,%eax
cmp    $0xfe,%cl
jb     119e <ltf8_get+0x9e>
xor    %eax,%eax
cmp    $0xff,%cl
sete   %al
or     $0x8,%eax
ret

LLVM IR (-O0):
define i32 @ltf8_get(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
%7 = load i8*, i8** %4
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp slt i32 %11, 128
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i32*, i32** %5
store i32 %17, i32* %18
store i32 1, i32* %3
br label %334
19: ; preds = %2
%20 = load i8*, i8** %6
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = icmp slt i32 %23, 192
br i1 %24, label %25, label %40
25: ; preds = %19
%26 = load i8*, i8** %6
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = shl i32 %29, 8
%31 = load i8*, i8** %6
%32 = getelementptr inbounds i8, i8* %31, i64 1
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = or i32 %30, %34
%36 = sext i32 %35 to i64
%37 = and i64 %36, 16383
%38 = trunc i64 %37 to i32
%39 = load i32*, i32** %5
store i32 %38, i32* %39
store i32 2, i32* %3
br label %334
40: ; preds = %19
%41 = load i8*, i8** %6
%42 = getelementptr inbounds i8, i8* %41, i64 0
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = icmp slt i32 %44, 224
br i1 %45, label %46, label %67
46: ; preds = %40
%47 = load i8*, i8** %6
%48 = getelementptr inbounds i8, i8* %47, i64 0
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = shl i32 %50, 16
%52 = load i8*, i8** %6
%53 = getelementptr inbounds i8, i8* %52, i64 1
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = shl i32 %55, 8
%57 = or i32 %51, %56
%58 = load i8*, i8** %6
%59 = getelementptr inbounds i8, i8* %58, i64 2
%60 = load i8, i8* %59
%61 = zext i8 %60 to i32
%62 = or i32 %57, %61
%63 = sext i32 %62 to i64
%64 = and i64 %63, 2097151
%65 = trunc i64 %64 to i32
%66 = load i32*, i32** %5
store i32 %65, i32* %66
store i32 3, i32* %3
br label %334
67: ; preds = %40
%68 = load i8*, i8** %6
%69 = getelementptr inbounds i8, i8* %68, i64 0
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = icmp slt i32 %71, 240
br i1 %72, label %73, label %100
73: ; preds = %67
%74 = load i8*, i8** %6
%75 = getelementptr inbounds i8, i8* %74, i64 0
%76 = load i8, i8* %75
%77 = zext i8 %76 to i32
%78 = shl i32 %77, 24
%79 = load i8*, i8** %6
%80 = getelementptr inbounds i8, i8* %79, i64 1
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = shl i32 %82, 16
%84 = or i32 %78, %83
%85 = load i8*, i8** %6
%86 = getelementptr inbounds i8, i8* %85, i64 2
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = shl i32 %88, 8
%90 = or i32 %84, %89
%91 = load i8*, i8** %6
%92 = getelementptr inbounds i8, i8* %91, i64 3
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = or i32 %90, %94
%96 = sext i32 %95 to i64
%97 = and i64 %96, 268435455
%98 = trunc i64 %97 to i32
%99 = load i32*, i32** %5
store i32 %98, i32* %99
store i32 4, i32* %3
br label %334
100: ; preds = %67
%101 = load i8*, i8** %6
%102 = getelementptr inbounds i8, i8* %101, i64 0
%103 = load i8, i8* %102
%104 = zext i8 %103 to i32
%105 = icmp slt i32 %104, 248
br i1 %105, label %106, label %139
106: ; preds = %100
%107 = load i8*, i8** %6
%108 = getelementptr inbounds i8, i8* %107, i64 0
%109 = load i8, i8* %108
%110 = zext i8 %109 to i32
%111 = shl i32 %110, 32
%112 = load i8*, i8** %6
%113 = getelementptr inbounds i8, i8* %112, i64 1
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = shl i32 %115, 24
%117 = or i32 %111, %116
%118 = load i8*, i8** %6
%119 = getelementptr inbounds i8, i8* %118, i64 2
%120 = load i8, i8* %119
%121 = zext i8 %120 to i32
%122 = shl i32 %121, 16
%123 = or i32 %117, %122
%124 = load i8*, i8** %6
%125 = getelementptr inbounds i8, i8* %124, i64 3
%126 = load i8, i8* %125
%127 = zext i8 %126 to i32
%128 = shl i32 %127, 8
%129 = or i32 %123, %128
%130 = load i8*, i8** %6
%131 = getelementptr inbounds i8, i8* %130, i64 4
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = or i32 %129, %133
%135 = sext i32 %134 to i64
%136 = and i64 %135, 34359738367
%137 = trunc i64 %136 to i32
%138 = load i32*, i32** %5
store i32 %137, i32* %138
store i32 5, i32* %3
br label %334
139: ; preds = %100
%140 = load i8*, i8** %6
%141 = getelementptr inbounds i8, i8* %140, i64 0
%142 = load i8, i8* %141
%143 = zext i8 %142 to i32
%144 = icmp slt i32 %143, 252
br i1 %144, label %145, label %184
145: ; preds = %139
%146 = load i8*, i8** %6
%147 = getelementptr inbounds i8, i8* %146, i64 0
%148 = load i8, i8* %147
%149 = zext i8 %148 to i32
%150 = shl i32 %149, 40
%151 = load i8*, i8** %6
%152 = getelementptr inbounds i8, i8* %151, i64 1
%153 = load i8, i8* %152
%154 = zext i8 %153 to i32
%155 = shl i32 %154, 32
%156 = or i32 %150, %155
%157 = load i8*, i8** %6
%158 = getelementptr inbounds i8, i8* %157, i64 2
%159 = load i8, i8* %158
%160 = zext i8 %159 to i32
%161 = shl i32 %160, 24
%162 = or i32 %156, %161
%163 = load i8*, i8** %6
%164 = getelementptr inbounds i8, i8* %163, i64 3
%165 = load i8, i8* %164
%166 = zext i8 %165 to i32
%167 = shl i32 %166, 16
%168 = or i32 %162, %167
%169 = load i8*, i8** %6
%170 = getelementptr inbounds i8, i8* %169, i64 4
%171 = load i8, i8* %170
%172 = zext i8 %171 to i32
%173 = shl i32 %172, 8
%174 = or i32 %168, %173
%175 = load i8*, i8** %6
%176 = getelementptr inbounds i8, i8* %175, i64 5
%177 = load i8, i8* %176
%178 = zext i8 %177 to i32
%179 = or i32 %174, %178
%180 = sext i32 %179 to i64
%181 = and i64 %180, 4398046511103
%182 = trunc i64 %181 to i32
%183 = load i32*, i32** %5
store i32 %182, i32* %183
store i32 6, i32* %3
br label %334
184: ; preds = %139
%185 = load i8*, i8** %6
%186 = getelementptr inbounds i8, i8* %185, i64 0
%187 = load i8, i8* %186
%188 = zext i8 %187 to i32
%189 = icmp slt i32 %188, 254
br i1 %189, label %190, label %235
190: ; preds = %184
%191 = load i8*, i8** %6
%192 = getelementptr inbounds i8, i8* %191, i64 0
%193 = load i8, i8* %192
%194 = zext i8 %193 to i32
%195 = shl i32 %194, 48
%196 = load i8*, i8** %6
%197 = getelementptr inbounds i8, i8* %196, i64 1
%198 = load i8, i8* %197
%199 = zext i8 %198 to i32
%200 = shl i32 %199, 40
%201 = or i32 %195, %200
%202 = load i8*, i8** %6
%203 = getelementptr inbounds i8, i8* %202, i64 2
%204 = load i8, i8* %203
%205 = zext i8 %204 to i32
%206 = shl i32 %205, 32
%207 = or i32 %201, %206
%208 = load i8*, i8** %6
%209 = getelementptr inbounds i8, i8* %208, i64 3
%210 = load i8, i8* %209
%211 = zext i8 %210 to i32
%212 = shl i32 %211, 24
%213 = or i32 %207, %212
%214 = load i8*, i8** %6
%215 = getelementptr inbounds i8, i8* %214, i64 4
%216 = load i8, i8* %215
%217 = zext i8 %216 to i32
%218 = shl i32 %217, 16
%219 = or i32 %213, %218
%220 = load i8*, i8** %6
%221 = getelementptr inbounds i8, i8* %220, i64 5
%222 = load i8, i8* %221
%223 = zext i8 %222 to i32
%224 = shl i32 %223, 8
%225 = or i32 %219, %224
%226 = load i8*, i8** %6
%227 = getelementptr inbounds i8, i8* %226, i64 6
%228 = load i8, i8* %227
%229 = zext i8 %228 to i32
%230 = or i32 %225, %229
%231 = sext i32 %230 to i64
%232 = and i64 %231, 562949953421311
%233 = trunc i64 %232 to i32
%234 = load i32*, i32** %5
store i32 %233, i32* %234
store i32 7, i32* %3
br label %334
235: ; preds = %184
%236 = load i8*, i8** %6
%237 = getelementptr inbounds i8, i8* %236, i64 0
%238 = load i8, i8* %237
%239 = zext i8 %238 to i32
%240 = icmp slt i32 %239, 255
br i1 %240, label %241, label %286
241: ; preds = %235
%242 = load i8*, i8** %6
%243 = getelementptr inbounds i8, i8* %242, i64 1
%244 = load i8, i8* %243
%245 = zext i8 %244 to i32
%246 = shl i32 %245, 48
%247 = load i8*, i8** %6
%248 = getelementptr inbounds i8, i8* %247, i64 2
%249 = load i8, i8* %248
%250 = zext i8 %249 to i32
%251 = shl i32 %250, 40
%252 = or i32 %246, %251
%253 = load i8*, i8** %6
%254 = getelementptr inbounds i8, i8* %253, i64 3
%255 = load i8, i8* %254
%256 = zext i8 %255 to i32
%257 = shl i32 %256, 32
%258 = or i32 %252, %257
%259 = load i8*, i8** %6
%260 = getelementptr inbounds i8, i8* %259, i64 4
%261 = load i8, i8* %260
%262 = zext i8 %261 to i32
%263 = shl i32 %262, 24
%264 = or i32 %258, %263
%265 = load i8*, i8** %6
%266 = getelementptr inbounds i8, i8* %265, i64 5
%267 = load i8, i8* %266
%268 = zext i8 %267 to i32
%269 = shl i32 %268, 16
%270 = or i32 %264, %269
%271 = load i8*, i8** %6
%272 = getelementptr inbounds i8, i8* %271, i64 6
%273 = load i8, i8* %272
%274 = zext i8 %273 to i32
%275 = shl i32 %274, 8
%276 = or i32 %270, %275
%277 = load i8*, i8** %6
%278 = getelementptr inbounds i8, i8* %277, i64 7
%279 = load i8, i8* %278
%280 = zext i8 %279 to i32
%281 = or i32 %276, %280
%282 = sext i32 %281 to i64
%283 = and i64 %282, 72057594037927935
%284 = trunc i64 %283 to i32
%285 = load i32*, i32** %5
store i32 %284, i32* %285
store i32 8, i32* %3
br label %334
286: ; preds = %235
%287 = load i8*, i8** %6
%288 = getelementptr inbounds i8, i8* %287, i64 1
%289 = load i8, i8* %288
%290 = zext i8 %289 to i32
%291 = shl i32 %290, 56
%292 = load i8*, i8** %6
%293 = getelementptr inbounds i8, i8* %292, i64 2
%294 = load i8, i8* %293
%295 = zext i8 %294 to i32
%296 = shl i32 %295, 48
%297 = or i32 %291, %296
%298 = load i8*, i8** %6
%299 = getelementptr inbounds i8, i8* %298, i64 3
%300 = load i8, i8* %299
%301 = zext i8 %300 to i32
%302 = shl i32 %301, 40
%303 = or i32 %297, %302
%304 = load i8*, i8** %6
%305 = getelementptr inbounds i8, i8* %304, i64 4
%306 = load i8, i8* %305
%307 = zext i8 %306 to i32
%308 = shl i32 %307, 32
%309 = or i32 %303, %308
%310 = load i8*, i8** %6
%311 = getelementptr inbounds i8, i8* %310, i64 5
%312 = load i8, i8* %311
%313 = zext i8 %312 to i32
%314 = shl i32 %313, 24
%315 = or i32 %309, %314
%316 = load i8*, i8** %6
%317 = getelementptr inbounds i8, i8* %316, i64 6
%318 = load i8, i8* %317
%319 = zext i8 %318 to i32
%320 = shl i32 %319, 16
%321 = or i32 %315, %320
%322 = load i8*, i8** %6
%323 = getelementptr inbounds i8, i8* %322, i64 7
%324 = load i8, i8* %323
%325 = zext i8 %324 to i32
%326 = shl i32 %325, 8
%327 = or i32 %321, %326
%328 = load i8*, i8** %6
%329 = getelementptr inbounds i8, i8* %328, i64 8
%330 = load i8, i8* %329
%331 = zext i8 %330 to i32
%332 = or i32 %327, %331
%333 = load i32*, i32** %5
store i32 %332, i32* %333
store i32 9, i32* %3
br label %334
334: ; preds = %286, %241, %190, %145, %106, %73, %46, %25, %13
%335 = load i32, i32* %3
ret i32 %335
}

LLVM IR (-O2):
define i32 @ltf8_get(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = icmp sgt i8 %3, -1
br i1 %5, label %6, label %7
6: ; preds = %2
store i32 %4, i32* %1
br label %58
7: ; preds = %2
%8 = icmp ult i8 %3, -64
br i1 %8, label %9, label %16
9: ; preds = %7
%10 = shl nuw nsw i32 %4, 8
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %10, 16128
%15 = or i32 %14, %13
store i32 %15, i32* %1
br label %58
16: ; preds = %7
%17 = icmp ult i8 %3, -32
br i1 %17, label %18, label %30
18: ; preds = %16
%19 = shl nuw nsw i32 %4, 16
%20 = getelementptr inbounds i8, i8* %0, i64 1
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl nuw nsw i32 %22, 8
%24 = getelementptr inbounds i8, i8* %0, i64 2
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = and i32 %19, 2031616
%28 = or i32 %23, %27
%29 = or i32 %28, %26
store i32 %29, i32* %1
br label %58
30: ; preds = %16
%31 = icmp ult i8 %3, -16
br i1 %31, label %32, label %49
32: ; preds = %30
%33 = shl nuw i32 %4, 24
%34 = getelementptr inbounds i8, i8* %0, i64 1
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = shl nuw nsw i32 %36, 16
%38 = getelementptr inbounds i8, i8* %0, i64 2
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = shl nuw nsw i32 %40, 8
%42 = getelementptr inbounds i8, i8* %0, i64 3
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = and i32 %33, 251658240
%46 = or i32 %37, %45
%47 = or i32 %46, %41
%48 = or i32 %47, %44
store i32 %48, i32* %1
br label %58
49: ; preds = %30
%50 = icmp ult i8 %3, -8
br i1 %50, label %58, label %51
51: ; preds = %49
%52 = icmp ult i8 %3, -4
br i1 %52, label %58, label %53
53: ; preds = %51
%54 = icmp ult i8 %3, -2
br i1 %54, label %58, label %55
55: ; preds = %53
%56 = icmp eq i8 %3, -1
%57 = select i1 %56, i32 9, i32 8
br label %58
58: ; preds = %55, %53, %51, %49, %32, %18, %9, %6
%59 = phi i32 [ 1, %6 ], [ 2, %9 ], [ 3, %18 ], [ 4, %32 ], [ 5, %49 ], [ 6, %51 ], [ 7, %53 ], [ %57, %55 ]
ret i32 %59
}