#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 */

/* Variables and functions */
scalar_t__ floor(int /*<<< orphan*/);
int /*<<< orphan*/ log2(double);
scalar_t__ pow(double, double);
int /*<<< orphan*/ shift_one_bit(char *, int *, int *, unsigned char *);
int compressed_parse_deltas(unsigned char *bits_header, int *median,
                            int *quantization, int *deltas) {
  int i, j, k, d = 0;
  int bitshift = 0;
  int byteshift = 0;
  int elias_n = 0;
  char cur_byte = 0;
  char quotient_parsed = 0;
  int quotient_value = 0;
  int remainder_value = 0;
  int sign_value = 0;
  cur_byte = bits_header[byteshift];
  for (i = 0; i < 4; i++) {
    if (median[i] == 0) {
      for (j = 0; j < 16; j++) {
        deltas[j + i * 16] = 0;
      }
      byteshift += 6;
    } else {
      for (j = 0; j < 16; j++) {
        quotient_parsed = 0;
        quotient_value = 0;
        while (quotient_parsed == 0 && quotient_value < 15) {
          if ((cur_byte & 0x80)) {
            quotient_value++;
          } else {
            quotient_parsed = 1;
          }
          shift_one_bit(&cur_byte, &byteshift, &bitshift, bits_header);
        }
        if (quotient_value == 15) {
          quotient_value = 0;
          elias_n = 0;
          while (!(cur_byte & 0x80)) {
            elias_n++;
            shift_one_bit(&cur_byte, &byteshift, &bitshift, bits_header);
          }
          quotient_value += pow(2, elias_n);
          shift_one_bit(&cur_byte, &byteshift, &bitshift, bits_header);
          for (k = elias_n; k > 0; k--) {
            if (cur_byte & 0x80) {
              quotient_value += pow(2, k - 1);
            }
            shift_one_bit(&cur_byte, &byteshift, &bitshift, bits_header);
          }
        }
        remainder_value = 0;
        int maxreminderbits = (int)floor(log2((double)median[i]));
        int max1less = (int)pow(2.0, (double)(maxreminderbits + 1)) - median[i];
        if (median[i] == 1) {
          maxreminderbits = 1;
        }
        for (d = 0; d < maxreminderbits; d++) {
          remainder_value = remainder_value << 1;
          if (cur_byte & 0x80) {
            remainder_value = remainder_value | 0x01;
          }
          shift_one_bit(&cur_byte, &byteshift, &bitshift, bits_header);
        }
        if (remainder_value >= max1less) {
          maxreminderbits++;
          for (; d < maxreminderbits; d++) {
            remainder_value = remainder_value << 1;
            if (cur_byte & 0x80) {
              remainder_value = remainder_value | 0x01;
            }
            shift_one_bit(&cur_byte, &byteshift, &bitshift, bits_header);
          }
          remainder_value = remainder_value - max1less;
        }
        if (cur_byte & 0x80) {
          sign_value = -1;
        } else {
          sign_value = 1;
        }
        shift_one_bit(&cur_byte, &byteshift, &bitshift, bits_header);
        deltas[j + i * 16] = (quotient_value * median[i] + remainder_value) *
                             sign_value * quantization[i];
      }
    }
  }
  return byteshift * 8 + bitshift;
}


x86 assembly (clang, -O0):
<compressed_parse_deltas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movb   $0x0,-0x3d(%rbp)
movb   $0x0,-0x3e(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x3d(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    154c <compressed_parse_deltas+0x40c>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1208 <compressed_parse_deltas+0xc8>
movl   $0x0,-0x28(%rbp)
cmpl   $0x10,-0x28(%rbp)
jge    11fa <compressed_parse_deltas+0xba>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%edx
shl    $0x4,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11c9 <compressed_parse_deltas+0x89>
mov    -0x38(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x38(%rbp)
jmp    1539 <compressed_parse_deltas+0x3f9>
movl   $0x0,-0x28(%rbp)
cmpl   $0x10,-0x28(%rbp)
jge    1534 <compressed_parse_deltas+0x3f4>
movb   $0x0,-0x3e(%rbp)
movl   $0x0,-0x44(%rbp)
movsbl -0x3e(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x55(%rbp)
jne    1240 <compressed_parse_deltas+0x100>
cmpl   $0xf,-0x44(%rbp)
setl   %al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
test   $0x1,%al
jne    1250 <compressed_parse_deltas+0x110>
jmp    128e <compressed_parse_deltas+0x14e>
movsbl -0x3d(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1270 <compressed_parse_deltas+0x130>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1274 <compressed_parse_deltas+0x134>
movb   $0x1,-0x3e(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x3d(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   1040 <shift_one_bit@plt>
jmp    1224 <compressed_parse_deltas+0xe4>
cmpl   $0xf,-0x44(%rbp)
jne    1389 <compressed_parse_deltas+0x249>
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x3c(%rbp)
movsbl -0x3d(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12c4 <compressed_parse_deltas+0x184>
jmp    12e7 <compressed_parse_deltas+0x1a7>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x3d(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   1040 <shift_one_bit@plt>
jmp    12a6 <compressed_parse_deltas+0x166>
cvtsi2sdl -0x3c(%rbp),%xmm1
movsd  0xd0c(%rip),%xmm0
call   1050 <pow@plt>
mov    %rax,%rcx
movslq -0x44(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x44(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x3d(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   1040 <shift_one_bit@plt>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jle    1384 <compressed_parse_deltas+0x244>
movsbl -0x3d(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1361 <compressed_parse_deltas+0x221>
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xcb1(%rip),%xmm0
call   1050 <pow@plt>
mov    %rax,%rcx
movslq -0x44(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x44(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x3d(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   1040 <shift_one_bit@plt>
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    1321 <compressed_parse_deltas+0x1e1>
jmp    1389 <compressed_parse_deltas+0x249>
movl   $0x0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
call   1030 <log2@plt>
mov    %eax,%edi
call   1060 <floor@plt>
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xc42(%rip),%xmm0
call   1050 <pow@plt>
mov    -0x10(%rbp),%rcx
movslq -0x24(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    13ea <compressed_parse_deltas+0x2aa>
movl   $0x1,-0x50(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    1444 <compressed_parse_deltas+0x304>
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x48(%rbp)
movsbl -0x3d(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1421 <compressed_parse_deltas+0x2e1>
mov    -0x48(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x3d(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   1040 <shift_one_bit@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13f1 <compressed_parse_deltas+0x2b1>
mov    -0x48(%rbp),%eax
cmp    -0x54(%rbp),%eax
jl     14b5 <compressed_parse_deltas+0x375>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    14ac <compressed_parse_deltas+0x36c>
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x48(%rbp)
movsbl -0x3d(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1489 <compressed_parse_deltas+0x349>
mov    -0x48(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x3d(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   1040 <shift_one_bit@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1459 <compressed_parse_deltas+0x319>
mov    -0x48(%rbp),%eax
sub    -0x54(%rbp),%eax
mov    %eax,-0x48(%rbp)
movsbl -0x3d(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     14d3 <compressed_parse_deltas+0x393>
movl   $0xffffffff,-0x4c(%rbp)
jmp    14da <compressed_parse_deltas+0x39a>
movl   $0x1,-0x4c(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x3d(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x34(%rbp),%rdx
call   1040 <shift_one_bit@plt>
mov    -0x44(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   (%rax,%rcx,4),%edx
add    -0x48(%rbp),%edx
imul   -0x4c(%rbp),%edx
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   (%rax,%rcx,4),%edx
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%esi
shl    $0x4,%esi
add    %esi,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    120f <compressed_parse_deltas+0xcf>
jmp    1539 <compressed_parse_deltas+0x3f9>
jmp    153e <compressed_parse_deltas+0x3fe>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a6 <compressed_parse_deltas+0x66>
mov    -0x38(%rbp),%eax
shl    $0x3,%eax
add    -0x34(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compressed_parse_deltas>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,0x20(%rsp)
mov    %rdx,0x38(%rsp)
mov    %rsi,0x18(%rsp)
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
mov    (%rdi),%al
mov    %al,0x7(%rsp)
xor    %r13d,%r13d
lea    0x8(%rsp),%r12
lea    0xc(%rsp),%r14
mov    %rdi,0x30(%rsp)
jmp    11be <compressed_parse_deltas+0x7e>
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x30(%rax,%rsi,4)
movups %xmm0,0x20(%rax,%rsi,4)
movups %xmm0,0x10(%rax,%rsi,4)
movups %xmm0,(%rax,%rsi,4)
addl   $0x6,0x8(%rsp)
add    $0x1,%r13
cmp    $0x4,%r13
je     1456 <compressed_parse_deltas+0x316>
mov    %r13,%rsi
shl    $0x4,%rsi
mov    0x18(%rsp),%rax
cmpl   $0x0,(%rax,%r13,4)
je     1190 <compressed_parse_deltas+0x50>
xor    %edi,%edi
mov    %r13,0x28(%rsp)
mov    %rsi,0x40(%rsp)
jmp    1249 <compressed_parse_deltas+0x109>
nop
sub    %eax,%ebp
mov    0x7(%rsp),%r13b
lea    0x7(%rsp),%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <shift_one_bit@plt>
mov    0x18(%rsp),%rax
mov    0x28(%rsp),%rcx
imul   (%rax,%rcx,4),%r15d
add    %ebp,%r15d
mov    %r15d,%eax
neg    %eax
test   %r13b,%r13b
mov    %rcx,%r13
cmovns %r15d,%eax
mov    0x38(%rsp),%rcx
imul   (%rcx,%r13,4),%eax
mov    0x40(%rsp),%rsi
mov    0x50(%rsp),%rdi
lea    (%rdi,%rsi,1),%rcx
mov    0x20(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
add    $0x1,%rdi
cmp    $0x10,%rdi
je     11b0 <compressed_parse_deltas+0x70>
mov    %rdi,0x50(%rsp)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15d,%eax
movzbl 0x7(%rsp),%ebp
mov    %ebp,%r15d
shr    $0x7,%r15d
add    %eax,%r15d
lea    0x7(%rsp),%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <shift_one_bit@plt>
test   %bpl,%bpl
jns    1290 <compressed_parse_deltas+0x150>
cmp    $0xf,%r15d
jb     1260 <compressed_parse_deltas+0x120>
cmp    $0xf,%r15d
jne    1350 <compressed_parse_deltas+0x210>
cmpb   $0x0,0x7(%rsp)
js     12cd <compressed_parse_deltas+0x18d>
xor    %ebp,%ebp
lea    0x7(%rsp),%r15
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <shift_one_bit@plt>
cmpb   $0x0,0x7(%rsp)
jns    12b0 <compressed_parse_deltas+0x170>
jmp    12d4 <compressed_parse_deltas+0x194>
xor    %ebp,%ebp
lea    0x7(%rsp),%r15
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  0xd1d(%rip),%xmm0
call   1050 <pow@plt>
mov    %r15,%rdi
mov    %rax,%r15
mov    %r12,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <shift_one_bit@plt>
test   %ebp,%ebp
jle    1350 <compressed_parse_deltas+0x210>
add    $0xffffffff,%ebp
jmp    1330 <compressed_parse_deltas+0x1f0>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x7(%rsp),%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <shift_one_bit@plt>
lea    -0x1(%rbp),%eax
add    $0x1,%ebp
cmp    $0x1,%ebp
mov    %eax,%ebp
jle    1350 <compressed_parse_deltas+0x210>
cmpb   $0x0,0x7(%rsp)
jns    1310 <compressed_parse_deltas+0x1d0>
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  0xcba(%rip),%xmm0
call   1050 <pow@plt>
add    %eax,%r15d
jmp    1310 <compressed_parse_deltas+0x1d0>
mov    0x18(%rsp),%rbp
xorps  %xmm0,%xmm0
cvtsi2sdl 0x0(%rbp,%r13,4),%xmm0
call   1030 <log2@plt>
mov    %eax,%edi
call   1060 <floor@plt>
mov    %rax,%r13
add    $0x1,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xc80(%rip),%xmm0
call   1050 <pow@plt>
mov    0x28(%rsp),%rcx
mov    0x0(%rbp,%rcx,4),%ecx
sub    %ecx,%eax
cmp    $0x1,%ecx
cmove  %ecx,%r13d
test   %r13d,%r13d
jle    1410 <compressed_parse_deltas+0x2d0>
mov    %rax,0x10(%rsp)
xor    %ebp,%ebp
mov    %r13,0x48(%rsp)
mov    %r14,%rbx
mov    %r12,%r14
lea    0x7(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x7(%rsp),%eax
shr    $0x7,%eax
lea    (%rax,%rbp,2),%ebp
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    0x30(%rsp),%rcx
call   1040 <shift_one_bit@plt>
add    $0xffffffff,%r13d
jne    13c0 <compressed_parse_deltas+0x280>
mov    0x48(%rsp),%r13
mov    %r13d,%ecx
mov    %r14,%r12
mov    %rbx,%r14
mov    0x30(%rsp),%rbx
mov    0x10(%rsp),%rax
cmp    %eax,%ebp
jl     11e2 <compressed_parse_deltas+0xa2>
jmp    141c <compressed_parse_deltas+0x2dc>
cs nopw 0x0(%rax,%rax,1)
xor    %ecx,%ecx
xor    %ebp,%ebp
cmp    %eax,%ebp
jl     11e2 <compressed_parse_deltas+0xa2>
cmp    %r13d,%ecx
jg     11e0 <compressed_parse_deltas+0xa0>
movzbl 0x7(%rsp),%r13d
lea    0x7(%rsp),%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %rax,0x10(%rsp)
mov    %rbx,%rcx
call   1040 <shift_one_bit@plt>
mov    0x10(%rsp),%rax
shr    $0x7,%r13d
lea    0x0(%r13,%rbp,2),%ebp
jmp    11e0 <compressed_parse_deltas+0xa0>
mov    0x8(%rsp),%eax
shl    $0x3,%eax
add    0xc(%rsp),%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @compressed_parse_deltas(i8* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8
%17 = alloca i8
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i8 0, i8* %16
store i8 0, i8* %17
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
%23 = load i8*, i8** %5
%24 = load i32, i32* %14
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
%27 = load i8, i8* %26
store i8 %27, i8* %16
store i32 0, i32* %9
br label %28
28: ; preds = %251, %4
%29 = load i32, i32* %9
%30 = icmp slt i32 %29, 4
br i1 %30, label %31, label %254
31: ; preds = %28
%32 = load i32*, i32** %6
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %32, i64 %34
%36 = load i32, i32* %35
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %56
38: ; preds = %31
store i32 0, i32* %10
br label %39
39: ; preds = %50, %38
%40 = load i32, i32* %10
%41 = icmp slt i32 %40, 16
br i1 %41, label %42, label %53
42: ; preds = %39
%43 = load i32*, i32** %8
%44 = load i32, i32* %10
%45 = load i32, i32* %9
%46 = mul nsw i32 %45, 16
%47 = add nsw i32 %44, %46
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %43, i64 %48
store i32 0, i32* %49
br label %50
50: ; preds = %42
%51 = load i32, i32* %10
%52 = add nsw i32 %51, 1
store i32 %52, i32* %10
br label %39
53: ; preds = %39
%54 = load i32, i32* %14
%55 = add nsw i32 %54, 6
store i32 %55, i32* %14
br label %250
56: ; preds = %31
store i32 0, i32* %10
br label %57
57: ; preds = %246, %56
%58 = load i32, i32* %10
%59 = icmp slt i32 %58, 16
br i1 %59, label %60, label %249
60: ; preds = %57
store i8 0, i8* %17
store i32 0, i32* %18
br label %61
61: ; preds = %79, %60
%62 = load i8, i8* %17
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %68
65: ; preds = %61
%66 = load i32, i32* %18
%67 = icmp slt i32 %66, 15
br label %68
68: ; preds = %65, %61
%69 = phi i1 [ false, %61 ], [ %67, %65 ]
br i1 %69, label %70, label %82
70: ; preds = %68
%71 = load i8, i8* %16
%72 = sext i8 %71 to i32
%73 = and i32 %72, 128
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %78
75: ; preds = %70
%76 = load i32, i32* %18
%77 = add nsw i32 %76, 1
store i32 %77, i32* %18
br label %79
78: ; preds = %70
store i8 1, i8* %17
br label %79
79: ; preds = %78, %75
%80 = load i8*, i8** %5
%81 = call i32 @shift_one_bit(i8* %16, i32* %14, i32* %13, i8* %80)
br label %61
82: ; preds = %68
%83 = load i32, i32* %18
%84 = icmp eq i32 %83, 15
br i1 %84, label %85, label %132
85: ; preds = %82
store i32 0, i32* %18
store i32 0, i32* %15
br label %86
86: ; preds = %92, %85
%87 = load i8, i8* %16
%88 = sext i8 %87 to i32
%89 = and i32 %88, 128
%90 = icmp ne i32 %89, 0
%91 = xor i1 %90, true
br i1 %91, label %92, label %97
92: ; preds = %86
%93 = load i32, i32* %15
%94 = add nsw i32 %93, 1
store i32 %94, i32* %15
%95 = load i8*, i8** %5
%96 = call i32 @shift_one_bit(i8* %16, i32* %14, i32* %13, i8* %95)
br label %86
97: ; preds = %86
%98 = load i32, i32* %15
%99 = sitofp i32 %98 to double
%100 = call i64 @pow(double 2.000000e+00, double %99)
%101 = load i32, i32* %18
%102 = sext i32 %101 to i64
%103 = add nsw i64 %102, %100
%104 = trunc i64 %103 to i32
store i32 %104, i32* %18
%105 = load i8*, i8** %5
%106 = call i32 @shift_one_bit(i8* %16, i32* %14, i32* %13, i8* %105)
%107 = load i32, i32* %15
store i32 %107, i32* %11
br label %108
108: ; preds = %128, %97
%109 = load i32, i32* %11
%110 = icmp sgt i32 %109, 0
br i1 %110, label %111, label %131
111: ; preds = %108
%112 = load i8, i8* %16
%113 = sext i8 %112 to i32
%114 = and i32 %113, 128
%115 = icmp ne i32 %114, 0
br i1 %115, label %116, label %125
116: ; preds = %111
%117 = load i32, i32* %11
%118 = sub nsw i32 %117, 1
%119 = sitofp i32 %118 to double
%120 = call i64 @pow(double 2.000000e+00, double %119)
%121 = load i32, i32* %18
%122 = sext i32 %121 to i64
%123 = add nsw i64 %122, %120
%124 = trunc i64 %123 to i32
store i32 %124, i32* %18
br label %125
125: ; preds = %116, %111
%126 = load i8*, i8** %5
%127 = call i32 @shift_one_bit(i8* %16, i32* %14, i32* %13, i8* %126)
br label %128
128: ; preds = %125
%129 = load i32, i32* %11
%130 = add nsw i32 %129, -1
store i32 %130, i32* %11
br label %108
131: ; preds = %108
br label %132
132: ; preds = %131, %82
store i32 0, i32* %19
%133 = load i32*, i32** %6
%134 = load i32, i32* %9
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %133, i64 %135
%137 = load i32, i32* %136
%138 = sitofp i32 %137 to double
%139 = call i32 @log2(double %138)
%140 = call i64 @floor(i32 %139)
%141 = trunc i64 %140 to i32
store i32 %141, i32* %21
%142 = load i32, i32* %21
%143 = add nsw i32 %142, 1
%144 = sitofp i32 %143 to double
%145 = call i64 @pow(double 2.000000e+00, double %144)
%146 = trunc i64 %145 to i32
%147 = load i32*, i32** %6
%148 = load i32, i32* %9
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds i32, i32* %147, i64 %149
%151 = load i32, i32* %150
%152 = sub nsw i32 %146, %151
store i32 %152, i32* %22
%153 = load i32*, i32** %6
%154 = load i32, i32* %9
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i32, i32* %153, i64 %155
%157 = load i32, i32* %156
%158 = icmp eq i32 %157, 1
br i1 %158, label %159, label %160
159: ; preds = %132
store i32 1, i32* %21
br label %160
160: ; preds = %159, %132
store i32 0, i32* %12
br label %161
161: ; preds = %178, %160
%162 = load i32, i32* %12
%163 = load i32, i32* %21
%164 = icmp slt i32 %162, %163
br i1 %164, label %165, label %181
165: ; preds = %161
%166 = load i32, i32* %19
%167 = shl i32 %166, 1
store i32 %167, i32* %19
%168 = load i8, i8* %16
%169 = sext i8 %168 to i32
%170 = and i32 %169, 128
%171 = icmp ne i32 %170, 0
br i1 %171, label %172, label %175
172: ; preds = %165
%173 = load i32, i32* %19
%174 = or i32 %173, 1
store i32 %174, i32* %19
br label %175
175: ; preds = %172, %165
%176 = load i8*, i8** %5
%177 = call i32 @shift_one_bit(i8* %16, i32* %14, i32* %13, i8* %176)
br label %178
178: ; preds = %175
%179 = load i32, i32* %12
%180 = add nsw i32 %179, 1
store i32 %180, i32* %12
br label %161
181: ; preds = %161
%182 = load i32, i32* %19
%183 = load i32, i32* %22
%184 = icmp sge i32 %182, %183
br i1 %184, label %185, label %212
185: ; preds = %181
%186 = load i32, i32* %21
%187 = add nsw i32 %186, 1
store i32 %187, i32* %21
br label %188
188: ; preds = %205, %185
%189 = load i32, i32* %12
%190 = load i32, i32* %21
%191 = icmp slt i32 %189, %190
br i1 %191, label %192, label %208
192: ; preds = %188
%193 = load i32, i32* %19
%194 = shl i32 %193, 1
store i32 %194, i32* %19
%195 = load i8, i8* %16
%196 = sext i8 %195 to i32
%197 = and i32 %196, 128
%198 = icmp ne i32 %197, 0
br i1 %198, label %199, label %202
199: ; preds = %192
%200 = load i32, i32* %19
%201 = or i32 %200, 1
store i32 %201, i32* %19
br label %202
202: ; preds = %199, %192
%203 = load i8*, i8** %5
%204 = call i32 @shift_one_bit(i8* %16, i32* %14, i32* %13, i8* %203)
br label %205
205: ; preds = %202
%206 = load i32, i32* %12
%207 = add nsw i32 %206, 1
store i32 %207, i32* %12
br label %188
208: ; preds = %188
%209 = load i32, i32* %19
%210 = load i32, i32* %22
%211 = sub nsw i32 %209, %210
store i32 %211, i32* %19
br label %212
212: ; preds = %208, %181
%213 = load i8, i8* %16
%214 = sext i8 %213 to i32
%215 = and i32 %214, 128
%216 = icmp ne i32 %215, 0
br i1 %216, label %217, label %218
217: ; preds = %212
store i32 -1, i32* %20
br label %219
218: ; preds = %212
store i32 1, i32* %20
br label %219
219: ; preds = %218, %217
%220 = load i8*, i8** %5
%221 = call i32 @shift_one_bit(i8* %16, i32* %14, i32* %13, i8* %220)
%222 = load i32, i32* %18
%223 = load i32*, i32** %6
%224 = load i32, i32* %9
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds i32, i32* %223, i64 %225
%227 = load i32, i32* %226
%228 = mul nsw i32 %222, %227
%229 = load i32, i32* %19
%230 = add nsw i32 %228, %229
%231 = load i32, i32* %20
%232 = mul nsw i32 %230, %231
%233 = load i32*, i32** %7
%234 = load i32, i32* %9
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds i32, i32* %233, i64 %235
%237 = load i32, i32* %236
%238 = mul nsw i32 %232, %237
%239 = load i32*, i32** %8
%240 = load i32, i32* %10
%241 = load i32, i32* %9
%242 = mul nsw i32 %241, 16
%243 = add nsw i32 %240, %242
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i32, i32* %239, i64 %244
store i32 %238, i32* %245
br label %246
246: ; preds = %219
%247 = load i32, i32* %10
%248 = add nsw i32 %247, 1
store i32 %248, i32* %10
br label %57
249: ; preds = %57
br label %250
250: ; preds = %249, %53
br label %251
251: ; preds = %250
%252 = load i32, i32* %9
%253 = add nsw i32 %252, 1
store i32 %253, i32* %9
br label %28
254: ; preds = %28
%255 = load i32, i32* %14
%256 = mul nsw i32 %255, 8
%257 = load i32, i32* %13
%258 = add nsw i32 %256, %257
ret i32 %258
}

LLVM IR (-O2):
define i32 @compressed_parse_deltas(i8* %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%9 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%10 = load i8, i8* %0
store i8 %10, i8* %7
br label %11
11: ; preds = %4, %128
%12 = phi i64 [ 0, %4 ], [ %129, %128 ]
%13 = shl nsw i64 %12, 4
%14 = getelementptr inbounds i32, i32* %1, i64 %12
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %11
%18 = getelementptr inbounds i32, i32* %2, i64 %12
br label %24
19: ; preds = %11
%20 = getelementptr i32, i32* %3, i64 %13
%21 = bitcast i32* %20 to i8*
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 6
store i32 %23, i32* %6
br label %128
24: ; preds = %17, %112
%25 = phi i64 [ 0, %17 ], [ %126, %112 ]
br label %26
26: ; preds = %24, %26
%27 = phi i32 [ 0, %24 ], [ %31, %26 ]
%28 = load i8, i8* %7
%29 = lshr i8 %28, 7
%30 = zext i8 %29 to i32
%31 = add nuw nsw i32 %27, %30
%32 = call i32 @shift_one_bit(i8* %7, i32* %6, i32* %5, i8* %0)
%33 = icmp slt i8 %28, 0
%34 = icmp ult i32 %31, 15
%35 = select i1 %33, i1 %34, i1 false
br i1 %35, label %26, label %36
36: ; preds = %26
%37 = icmp eq i32 %31, 15
br i1 %37, label %38, label %69
38: ; preds = %36
%39 = load i8, i8* %7
%40 = icmp sgt i8 %39, -1
br i1 %40, label %41, label %47
41: ; preds = %38, %41
%42 = phi i32 [ %43, %41 ], [ 0, %38 ]
%43 = add nuw nsw i32 %42, 1
%44 = call i32 @shift_one_bit(i8* %7, i32* %6, i32* %5, i8* %0)
%45 = load i8, i8* %7
%46 = icmp sgt i8 %45, -1
br i1 %46, label %41, label %47
47: ; preds = %41, %38
%48 = phi i32 [ 0, %38 ], [ %43, %41 ]
%49 = sitofp i32 %48 to double
%50 = call i64 @pow(double 2.000000e+00, double %49)
%51 = trunc i64 %50 to i32
%52 = call i32 @shift_one_bit(i8* %7, i32* %6, i32* %5, i8* %0)
%53 = icmp sgt i32 %48, 0
br i1 %53, label %54, label %69
54: ; preds = %47, %65
%55 = phi i32 [ %66, %65 ], [ %51, %47 ]
%56 = phi i32 [ %59, %65 ], [ %48, %47 ]
%57 = load i8, i8* %7
%58 = icmp sgt i8 %57, -1
%59 = add nsw i32 %56, -1
br i1 %58, label %65, label %60
60: ; preds = %54
%61 = sitofp i32 %59 to double
%62 = call i64 @pow(double 2.000000e+00, double %61)
%63 = trunc i64 %62 to i32
%64 = add i32 %55, %63
br label %65
65: ; preds = %54, %60
%66 = phi i32 [ %64, %60 ], [ %55, %54 ]
%67 = call i32 @shift_one_bit(i8* %7, i32* %6, i32* %5, i8* %0)
%68 = icmp sgt i32 %56, 1
br i1 %68, label %54, label %69
69: ; preds = %65, %47, %36
%70 = phi i32 [ %31, %36 ], [ %51, %47 ], [ %66, %65 ]
%71 = load i32, i32* %14
%72 = sitofp i32 %71 to double
%73 = call i32 @log2(double %72)
%74 = call i64 @floor(i32 %73)
%75 = trunc i64 %74 to i32
%76 = add nsw i32 %75, 1
%77 = sitofp i32 %76 to double
%78 = call i64 @pow(double 2.000000e+00, double %77)
%79 = trunc i64 %78 to i32
%80 = load i32, i32* %14
%81 = sub nsw i32 %79, %80
%82 = icmp eq i32 %80, 1
%83 = select i1 %82, i32 1, i32 %75
%84 = icmp sgt i32 %83, 0
br i1 %84, label %85, label %96
85: ; preds = %69, %85
%86 = phi i32 [ %92, %85 ], [ 0, %69 ]
%87 = phi i32 [ %94, %85 ], [ 0, %69 ]
%88 = shl i32 %86, 1
%89 = load i8, i8* %7
%90 = lshr i8 %89, 7
%91 = zext i8 %90 to i32
%92 = or i32 %88, %91
%93 = call i32 @shift_one_bit(i8* %7, i32* %6, i32* %5, i8* %0)
%94 = add nuw nsw i32 %87, 1
%95 = icmp eq i32 %94, %83
br i1 %95, label %96, label %85
96: ; preds = %85, %69
%97 = phi i32 [ 0, %69 ], [ %83, %85 ]
%98 = phi i32 [ 0, %69 ], [ %92, %85 ]
%99 = icmp slt i32 %98, %81
br i1 %99, label %112, label %100
100: ; preds = %96
%101 = icmp sgt i32 %97, %83
br i1 %101, label %109, label %102
102: ; preds = %100
%103 = load i8, i8* %7
%104 = call i32 @shift_one_bit(i8* %7, i32* %6, i32* %5, i8* %0)
%105 = shl i32 %98, 1
%106 = lshr i8 %103, 7
%107 = zext i8 %106 to i32
%108 = or i32 %105, %107
br label %109
109: ; preds = %102, %100
%110 = phi i32 [ %98, %100 ], [ %108, %102 ]
%111 = sub nsw i32 %110, %81
br label %112
112: ; preds = %109, %96
%113 = phi i32 [ %111, %109 ], [ %98, %96 ]
%114 = load i8, i8* %7
%115 = icmp sgt i8 %114, -1
%116 = call i32 @shift_one_bit(i8* %7, i32* %6, i32* %5, i8* %0)
%117 = load i32, i32* %14
%118 = mul nsw i32 %117, %70
%119 = add nsw i32 %118, %113
%120 = sub nsw i32 0, %119
%121 = select i1 %115, i32 %119, i32 %120
%122 = load i32, i32* %18
%123 = mul nsw i32 %121, %122
%124 = add nuw nsw i64 %25, %13
%125 = getelementptr inbounds i32, i32* %3, i64 %124
store i32 %123, i32* %125
%126 = add nuw nsw i64 %25, 1
%127 = icmp eq i64 %126, 16
br i1 %127, label %128, label %24
128: ; preds = %112, %19
%129 = add nuw nsw i64 %12, 1
%130 = icmp eq i64 %129, 4
br i1 %130, label %131, label %11
131: ; preds = %128
%132 = load i32, i32* %6
%133 = shl nsw i32 %132, 3
%134 = load i32, i32* %5
%135 = add nsw i32 %133, %134
ret i32 %135
}