#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 */
int /*<<< orphan*/ Ptngc_comp_conv_from_huffman(unsigned char *, unsigned int *,
                                                int, int, unsigned char *, int,
                                                unsigned int *, int);
int /*<<< orphan*/ Ptngc_comp_conv_from_rle(unsigned int *, unsigned int *,
                                            int);
int /*<<< orphan*/ Ptngc_comp_conv_from_vals16(unsigned int *, int,
                                               unsigned int *, int *);
unsigned int *Ptngc_warnmalloc_x(int, char *, int);
int /*<<< orphan*/ free(unsigned int *);
void Ptngc_comp_huff_decompress(unsigned char *huffman, const int huffman_len,
                                unsigned int *vals) {
  int isvals16 = (int)huffman[0];
  unsigned int *vals16 = NULL;
  int algo = (int)huffman[1];
  int nvals16 =
      (int)((unsigned int)huffman[2] | (((unsigned int)huffman[3]) << 8) |
            (((unsigned int)huffman[4]) << 16) |
            (((unsigned int)huffman[5]) << 24));
  int nvals =
      (int)((unsigned int)huffman[6] | (((unsigned int)huffman[7]) << 8) |
            (((unsigned int)huffman[8]) << 16) |
            (((unsigned int)huffman[9]) << 24));
  int nhuff =
      (int)((unsigned int)huffman[10] | (((unsigned int)huffman[11]) << 8) |
            (((unsigned int)huffman[12]) << 16) |
            (((unsigned int)huffman[13]) << 24));
  int ndict = (int)((unsigned int)huffman[17 + nhuff] |
                    (((unsigned int)huffman[18 + nhuff]) << 8) |
                    (((unsigned int)huffman[19 + nhuff]) << 16));
  (void)huffman_len;
  if (!isvals16)
    vals16 = Ptngc_warnmalloc_x(
        nvals16 * sizeof *vals16,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/ctk3b/mdtraj/refs/heads/master/mdtraj/"
        "formats/tng/src/compression/huffmem.c",
        263);
  else {
    vals16 = vals;
    nvals16 = nvals;
  }
  if (algo == 0) {
    int nhuffdict = (int)((unsigned int)huffman[14 + nhuff] |
                          (((unsigned int)huffman[15 + nhuff]) << 8) |
                          (((unsigned int)huffman[16 + nhuff]) << 16));
    Ptngc_comp_conv_from_huffman(huffman + 14, vals16, nvals16, ndict,
                                 huffman + 20 + nhuff, nhuffdict, NULL, 0);
  } else if (algo == 1) {
    unsigned int *huffdictunpack = Ptngc_warnmalloc_x(
        0x20005 * sizeof *huffdictunpack,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/ctk3b/mdtraj/refs/heads/master/mdtraj/"
        "formats/tng/src/compression/huffmem.c",
        279);
    int nhuffdictunpack = (int)((unsigned int)huffman[14 + nhuff] |
                                (((unsigned int)huffman[15 + nhuff]) << 8) |
                                (((unsigned int)huffman[16 + nhuff]) << 16));
    int nhuff1 = (int)((unsigned int)huffman[20 + nhuff] |
                       (((unsigned int)huffman[21 + nhuff]) << 8) |
                       (((unsigned int)huffman[22 + nhuff]) << 16));
    int nhuffdict1 = (int)((unsigned int)huffman[23 + nhuff] |
                           (((unsigned int)huffman[24 + nhuff]) << 8) |
                           (((unsigned int)huffman[25 + nhuff]) << 16));
    int ndict1 = (int)((unsigned int)huffman[26 + nhuff] |
                       (((unsigned int)huffman[27 + nhuff]) << 8) |
                       (((unsigned int)huffman[28 + nhuff]) << 16));
    Ptngc_comp_conv_from_huffman(
        huffman + 29 + nhuff, huffdictunpack, nhuffdictunpack, ndict1,
        huffman + 29 + nhuff + nhuff1, nhuffdict1, NULL, 0);
    Ptngc_comp_conv_from_huffman(huffman + 14, vals16, nvals16, ndict, NULL, 0,
                                 huffdictunpack, nhuffdictunpack);
    free(huffdictunpack);
  } else if (algo == 2) {
    unsigned int *huffdictunpack = Ptngc_warnmalloc_x(
        0x20005 * sizeof *huffdictunpack,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/ctk3b/mdtraj/refs/heads/master/mdtraj/"
        "formats/tng/src/compression/huffmem.c",
        303);
    unsigned int *huffdictrle = Ptngc_warnmalloc_x(
        (3 * 0x20005 + 3) * sizeof *huffdictrle,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/ctk3b/mdtraj/refs/heads/master/mdtraj/"
        "formats/tng/src/compression/huffmem.c",
        304);
    int nhuffdictunpack = (int)((unsigned int)huffman[14 + nhuff] |
                                (((unsigned int)huffman[15 + nhuff]) << 8) |
                                (((unsigned int)huffman[16 + nhuff]) << 16));
    int nhuffrle = (int)((unsigned int)huffman[20 + nhuff] |
                         (((unsigned int)huffman[21 + nhuff]) << 8) |
                         (((unsigned int)huffman[22 + nhuff]) << 16));
    int nhuff2 = (int)((unsigned int)huffman[23 + nhuff] |
                       (((unsigned int)huffman[24 + nhuff]) << 8) |
                       (((unsigned int)huffman[25 + nhuff]) << 16));
    int nhuffdict2 = (int)((unsigned int)huffman[26 + nhuff] |
                           (((unsigned int)huffman[27 + nhuff]) << 8) |
                           (((unsigned int)huffman[28 + nhuff]) << 16));
    int ndict2 = (int)((unsigned int)huffman[29 + nhuff] |
                       (((unsigned int)huffman[30 + nhuff]) << 8) |
                       (((unsigned int)huffman[31 + nhuff]) << 16));
    Ptngc_comp_conv_from_huffman(huffman + 32 + nhuff, huffdictrle, nhuffrle,
                                 ndict2, huffman + 32 + nhuff + nhuff2,
                                 nhuffdict2, NULL, 0);
    Ptngc_comp_conv_from_rle(huffdictrle, huffdictunpack, nhuffdictunpack);
    Ptngc_comp_conv_from_huffman(huffman + 14, vals16, nvals16, ndict, NULL, 0,
                                 huffdictunpack, nhuffdictunpack);
    free(huffdictrle);
    free(huffdictunpack);
  }
  if (!isvals16) {
    int nvalsx;
    Ptngc_comp_conv_from_vals16(vals16, nvals16, vals, &nvalsx);
    free(vals16);
  }
}


x86 assembly (clang, -O0):
<Ptngc_comp_huff_decompress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x6(%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x7(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x8(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x9(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0xa(%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0xb(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xc(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xd(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x11,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x12,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x13,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1287 <Ptngc_comp_huff_decompress+0x137>
movslq -0x30(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
lea    0xd8c(%rip),%rsi
mov    $0x107,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,-0x28(%rbp)
jmp    1295 <Ptngc_comp_huff_decompress+0x145>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    1322 <Ptngc_comp_huff_decompress+0x1d2>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0xe,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0xf,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x10,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
add    $0xe,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x8(%rbp),%r8
add    $0x14,%r8
movslq -0x38(%rbp),%rax
add    %rax,%r8
mov    -0x40(%rbp),%r9d
xor    %eax,%eax
xor    %eax,%eax
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1040 <Ptngc_comp_conv_from_huffman@plt>
jmp    16ee <Ptngc_comp_huff_decompress+0x59e>
cmpl   $0x1,-0x2c(%rbp)
jne    14cc <Ptngc_comp_huff_decompress+0x37c>
mov    $0x80014,%edi
lea    0xcc8(%rip),%rsi
mov    $0x117,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0xe,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0xf,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x10,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x14,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x15,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x16,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x17,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x18,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x19,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x54(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1a,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x1b,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x1c,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1d,%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    -0x48(%rbp),%rsi
mov    -0x4c(%rbp),%edx
mov    -0x58(%rbp),%ecx
mov    -0x8(%rbp),%r8
add    $0x1d,%r8
movslq -0x38(%rbp),%rax
add    %rax,%r8
movslq -0x50(%rbp),%rax
add    %rax,%r8
mov    -0x54(%rbp),%r9d
xor    %eax,%eax
xor    %eax,%eax
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1040 <Ptngc_comp_conv_from_huffman@plt>
mov    -0x8(%rbp),%rdi
add    $0xe,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x48(%rbp),%r10
mov    -0x4c(%rbp),%eax
xor    %r8d,%r8d
xor    %r9d,%r9d
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <Ptngc_comp_conv_from_huffman@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
jmp    16e9 <Ptngc_comp_huff_decompress+0x599>
cmpl   $0x2,-0x2c(%rbp)
jne    16e4 <Ptngc_comp_huff_decompress+0x594>
mov    $0x80014,%edi
lea    0xb1e(%rip),%rsi
mov    $0x12f,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,-0x60(%rbp)
mov    $0x180048,%edi
lea    0xb04(%rip),%rsi
mov    $0x130,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0xe,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0xf,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x10,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x14,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x15,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x16,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x17,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x18,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x19,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x74(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1a,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x1b,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x1c,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x78(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1d,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x1e,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x1f,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    -0x68(%rbp),%rsi
mov    -0x70(%rbp),%edx
mov    -0x7c(%rbp),%ecx
mov    -0x8(%rbp),%r8
add    $0x20,%r8
movslq -0x38(%rbp),%rax
add    %rax,%r8
movslq -0x74(%rbp),%rax
add    %rax,%r8
mov    -0x78(%rbp),%r9d
xor    %eax,%eax
xor    %eax,%eax
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1040 <Ptngc_comp_conv_from_huffman@plt>
mov    -0x68(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x6c(%rbp),%edx
call   1060 <Ptngc_comp_conv_from_rle@plt>
mov    -0x8(%rbp),%rdi
add    $0xe,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x60(%rbp),%r10
mov    -0x6c(%rbp),%eax
xor    %r8d,%r8d
xor    %r9d,%r9d
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <Ptngc_comp_conv_from_huffman@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
jmp    16e9 <Ptngc_comp_huff_decompress+0x599>
jmp    16ee <Ptngc_comp_huff_decompress+0x59e>
cmpl   $0x0,-0x1c(%rbp)
jne    1715 <Ptngc_comp_huff_decompress+0x5c5>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    -0x80(%rbp),%rcx
call   1050 <Ptngc_comp_conv_from_vals16@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ptngc_comp_huff_decompress>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
mov    (%rdi),%r12b
mov    0x1(%rdi),%r14b
movslq 0xa(%rdi),%r13
movzwl 0x11(%r13,%rdi,1),%r15d
movzbl 0x13(%r13,%rdi,1),%ebp
shl    $0x10,%ebp
test   %r12b,%r12b
mov    %rdx,0x18(%rsp)
je     1194 <Ptngc_comp_huff_decompress+0x44>
mov    0x6(%rbx),%eax
mov    %rax,0x10(%rsp)
mov    %rdx,0x8(%rsp)
jmp    11b9 <Ptngc_comp_huff_decompress+0x69>
mov    0x2(%rbx),%eax
mov    %rax,0x10(%rsp)
lea    0x0(,%rax,4),%edi
lea    0xe56(%rip),%rsi
mov    $0x107,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,0x8(%rsp)
or     %ebp,%r15d
cmp    $0x2,%r14b
je     1227 <Ptngc_comp_huff_decompress+0xd7>
cmp    $0x1,%r14b
je     130e <Ptngc_comp_huff_decompress+0x1be>
test   %r14b,%r14b
jne    120f <Ptngc_comp_huff_decompress+0xbf>
movslq %r13d,%rax
movzwl 0xe(%rbx,%rax,1),%ecx
movzbl 0x10(%rbx,%rax,1),%r9d
shl    $0x10,%r9d
or     %ecx,%r9d
lea    (%rbx,%rax,1),%r8
add    $0x14,%r8
add    $0xe,%rbx
mov    %rbx,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15d,%ecx
push   $0x0
push   $0x0
call   1040 <Ptngc_comp_conv_from_huffman@plt>
add    $0x10,%rsp
test   %r12b,%r12b
je     13c0 <Ptngc_comp_huff_decompress+0x270>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdd2(%rip),%r14
mov    $0x80014,%edi
mov    %r14,%rsi
mov    $0x12f,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,%rbp
mov    $0x180048,%edi
mov    %r14,%rsi
mov    $0x130,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,%r14
movslq %r13d,%rax
movzwl 0xe(%rbx,%rax,1),%ecx
movzbl 0x10(%rbx,%rax,1),%r13d
shl    $0x10,%r13d
or     %ecx,%r13d
movzwl 0x14(%rbx,%rax,1),%ecx
movzbl 0x16(%rbx,%rax,1),%edx
shl    $0x10,%edx
or     %ecx,%edx
movzwl 0x17(%rbx,%rax,1),%ecx
movzbl 0x19(%rbx,%rax,1),%r8d
shl    $0x10,%r8
or     %rcx,%r8
movzwl 0x1a(%rbx,%rax,1),%ecx
movzbl 0x1c(%rbx,%rax,1),%r9d
shl    $0x10,%r9d
or     %ecx,%r9d
movzwl 0x1d(%rbx,%rax,1),%esi
movzbl 0x1f(%rbx,%rax,1),%ecx
shl    $0x10,%ecx
or     %esi,%ecx
lea    (%rbx,%rax,1),%rdi
add    $0x20,%rdi
add    %rdi,%r8
mov    %r14,%rsi
push   $0x0
push   $0x0
call   1040 <Ptngc_comp_conv_from_huffman@plt>
add    $0x10,%rsp
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r13d,%edx
call   1060 <Ptngc_comp_conv_from_rle@plt>
add    $0xe,%rbx
mov    %rbx,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15d,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %r13
push   %rbp
call   1040 <Ptngc_comp_conv_from_huffman@plt>
add    $0x10,%rsp
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
jmp    13b2 <Ptngc_comp_huff_decompress+0x262>
lea    0xceb(%rip),%rsi
mov    $0x80014,%edi
mov    $0x117,%edx
call   1070 <Ptngc_warnmalloc_x@plt>
mov    %rax,%r14
movslq %r13d,%rax
movzwl 0xe(%rbx,%rax,1),%ecx
movzbl 0x10(%rbx,%rax,1),%ebp
shl    $0x10,%ebp
or     %ecx,%ebp
movzwl 0x14(%rbx,%rax,1),%ecx
movzbl 0x16(%rbx,%rax,1),%r8d
shl    $0x10,%r8
or     %rcx,%r8
movzwl 0x17(%rbx,%rax,1),%ecx
movzbl 0x19(%rbx,%rax,1),%r9d
shl    $0x10,%r9d
or     %ecx,%r9d
movzwl 0x1a(%rbx,%rax,1),%edx
movzbl 0x1c(%rbx,%rax,1),%ecx
shl    $0x10,%ecx
or     %edx,%ecx
lea    (%rbx,%rax,1),%rdi
add    $0x1d,%rdi
add    %rdi,%r8
mov    %r14,%rsi
mov    %ebp,%edx
push   $0x0
push   $0x0
call   1040 <Ptngc_comp_conv_from_huffman@plt>
add    $0x10,%rsp
add    $0xe,%rbx
mov    %rbx,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15d,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rbp
push   %r14
call   1040 <Ptngc_comp_conv_from_huffman@plt>
add    $0x10,%rsp
mov    %r14,%rdi
call   1030 <free@plt>
test   %r12b,%r12b
jne    1218 <Ptngc_comp_huff_decompress+0xc8>
lea    0x24(%rsp),%rcx
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
mov    0x18(%rsp),%rdx
call   1050 <Ptngc_comp_conv_from_vals16@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    1218 <Ptngc_comp_huff_decompress+0xc8>

LLVM IR (-O0):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ctk3b/mdtraj/refs/heads/master/mdtraj/formats/tng/src/compression/huffmem.c\00"
define void @Ptngc_comp_huff_decompress(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%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 i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%28 = load i8*, i8** %4
%29 = getelementptr inbounds i8, i8* %28, i64 0
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
store i32 %31, i32* %7
store i32* null, i32** %8
%32 = load i8*, i8** %4
%33 = getelementptr inbounds i8, i8* %32, i64 1
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
store i32 %35, i32* %9
%36 = load i8*, i8** %4
%37 = getelementptr inbounds i8, i8* %36, i64 2
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = load i8*, i8** %4
%41 = getelementptr inbounds i8, i8* %40, i64 3
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = shl i32 %43, 8
%45 = or i32 %39, %44
%46 = load i8*, i8** %4
%47 = getelementptr inbounds i8, i8* %46, i64 4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = shl i32 %49, 16
%51 = or i32 %45, %50
%52 = load i8*, i8** %4
%53 = getelementptr inbounds i8, i8* %52, i64 5
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = shl i32 %55, 24
%57 = or i32 %51, %56
store i32 %57, i32* %10
%58 = load i8*, i8** %4
%59 = getelementptr inbounds i8, i8* %58, i64 6
%60 = load i8, i8* %59
%61 = zext i8 %60 to i32
%62 = load i8*, i8** %4
%63 = getelementptr inbounds i8, i8* %62, i64 7
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = shl i32 %65, 8
%67 = or i32 %61, %66
%68 = load i8*, i8** %4
%69 = getelementptr inbounds i8, i8* %68, i64 8
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = shl i32 %71, 16
%73 = or i32 %67, %72
%74 = load i8*, i8** %4
%75 = getelementptr inbounds i8, i8* %74, i64 9
%76 = load i8, i8* %75
%77 = zext i8 %76 to i32
%78 = shl i32 %77, 24
%79 = or i32 %73, %78
store i32 %79, i32* %11
%80 = load i8*, i8** %4
%81 = getelementptr inbounds i8, i8* %80, i64 10
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = load i8*, i8** %4
%85 = getelementptr inbounds i8, i8* %84, i64 11
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = shl i32 %87, 8
%89 = or i32 %83, %88
%90 = load i8*, i8** %4
%91 = getelementptr inbounds i8, i8* %90, i64 12
%92 = load i8, i8* %91
%93 = zext i8 %92 to i32
%94 = shl i32 %93, 16
%95 = or i32 %89, %94
%96 = load i8*, i8** %4
%97 = getelementptr inbounds i8, i8* %96, i64 13
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = shl i32 %99, 24
%101 = or i32 %95, %100
store i32 %101, i32* %12
%102 = load i8*, i8** %4
%103 = load i32, i32* %12
%104 = add nsw i32 17, %103
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i8, i8* %102, i64 %105
%107 = load i8, i8* %106
%108 = zext i8 %107 to i32
%109 = load i8*, i8** %4
%110 = load i32, i32* %12
%111 = add nsw i32 18, %110
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i8, i8* %109, i64 %112
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = shl i32 %115, 8
%117 = or i32 %108, %116
%118 = load i8*, i8** %4
%119 = load i32, i32* %12
%120 = add nsw i32 19, %119
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i8, i8* %118, i64 %121
%123 = load i8, i8* %122
%124 = zext i8 %123 to i32
%125 = shl i32 %124, 16
%126 = or i32 %117, %125
store i32 %126, i32* %13
%127 = load i32, i32* %5
%128 = load i32, i32* %7
%129 = icmp ne i32 %128, 0
br i1 %129, label %136, label %130
130: ; preds = %3
%131 = load i32, i32* %10
%132 = sext i32 %131 to i64
%133 = mul i64 %132, 4
%134 = trunc i64 %133 to i32
%135 = call i32* @Ptngc_warnmalloc_x(i32 %134, i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 263)
store i32* %135, i32** %8
br label %139
136: ; preds = %3
%137 = load i32*, i32** %6
store i32* %137, i32** %8
%138 = load i32, i32* %11
store i32 %138, i32* %10
br label %139
139: ; preds = %136, %130
%140 = load i32, i32* %9
%141 = icmp eq i32 %140, 0
br i1 %141, label %142, label %180
142: ; preds = %139
%143 = load i8*, i8** %4
%144 = load i32, i32* %12
%145 = add nsw i32 14, %144
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i8, i8* %143, i64 %146
%148 = load i8, i8* %147
%149 = zext i8 %148 to i32
%150 = load i8*, i8** %4
%151 = load i32, i32* %12
%152 = add nsw i32 15, %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds i8, i8* %150, i64 %153
%155 = load i8, i8* %154
%156 = zext i8 %155 to i32
%157 = shl i32 %156, 8
%158 = or i32 %149, %157
%159 = load i8*, i8** %4
%160 = load i32, i32* %12
%161 = add nsw i32 16, %160
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i8, i8* %159, i64 %162
%164 = load i8, i8* %163
%165 = zext i8 %164 to i32
%166 = shl i32 %165, 16
%167 = or i32 %158, %166
store i32 %167, i32* %14
%168 = load i8*, i8** %4
%169 = getelementptr inbounds i8, i8* %168, i64 14
%170 = load i32*, i32** %8
%171 = load i32, i32* %10
%172 = load i32, i32* %13
%173 = load i8*, i8** %4
%174 = getelementptr inbounds i8, i8* %173, i64 20
%175 = load i32, i32* %12
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %174, i64 %176
%178 = load i32, i32* %14
%179 = call i32 @Ptngc_comp_conv_from_huffman(i8* %169, i32* %170, i32 %171, i32 %172, i8* %177, i32 %178, i32* null, i32 0)
br label %480
180: ; preds = %139
%181 = load i32, i32* %9
%182 = icmp eq i32 %181, 1
br i1 %182, label %183, label %313
183: ; preds = %180
%184 = call i32* @Ptngc_warnmalloc_x(i32 524308, i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 279)
store i32* %184, i32** %15
%185 = load i8*, i8** %4
%186 = load i32, i32* %12
%187 = add nsw i32 14, %186
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds i8, i8* %185, i64 %188
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = load i8*, i8** %4
%193 = load i32, i32* %12
%194 = add nsw i32 15, %193
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i8, i8* %192, i64 %195
%197 = load i8, i8* %196
%198 = zext i8 %197 to i32
%199 = shl i32 %198, 8
%200 = or i32 %191, %199
%201 = load i8*, i8** %4
%202 = load i32, i32* %12
%203 = add nsw i32 16, %202
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds i8, i8* %201, i64 %204
%206 = load i8, i8* %205
%207 = zext i8 %206 to i32
%208 = shl i32 %207, 16
%209 = or i32 %200, %208
store i32 %209, i32* %16
%210 = load i8*, i8** %4
%211 = load i32, i32* %12
%212 = add nsw i32 20, %211
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds i8, i8* %210, i64 %213
%215 = load i8, i8* %214
%216 = zext i8 %215 to i32
%217 = load i8*, i8** %4
%218 = load i32, i32* %12
%219 = add nsw i32 21, %218
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds i8, i8* %217, i64 %220
%222 = load i8, i8* %221
%223 = zext i8 %222 to i32
%224 = shl i32 %223, 8
%225 = or i32 %216, %224
%226 = load i8*, i8** %4
%227 = load i32, i32* %12
%228 = add nsw i32 22, %227
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds i8, i8* %226, i64 %229
%231 = load i8, i8* %230
%232 = zext i8 %231 to i32
%233 = shl i32 %232, 16
%234 = or i32 %225, %233
store i32 %234, i32* %17
%235 = load i8*, i8** %4
%236 = load i32, i32* %12
%237 = add nsw i32 23, %236
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds i8, i8* %235, i64 %238
%240 = load i8, i8* %239
%241 = zext i8 %240 to i32
%242 = load i8*, i8** %4
%243 = load i32, i32* %12
%244 = add nsw i32 24, %243
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds i8, i8* %242, i64 %245
%247 = load i8, i8* %246
%248 = zext i8 %247 to i32
%249 = shl i32 %248, 8
%250 = or i32 %241, %249
%251 = load i8*, i8** %4
%252 = load i32, i32* %12
%253 = add nsw i32 25, %252
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds i8, i8* %251, i64 %254
%256 = load i8, i8* %255
%257 = zext i8 %256 to i32
%258 = shl i32 %257, 16
%259 = or i32 %250, %258
store i32 %259, i32* %18
%260 = load i8*, i8** %4
%261 = load i32, i32* %12
%262 = add nsw i32 26, %261
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds i8, i8* %260, i64 %263
%265 = load i8, i8* %264
%266 = zext i8 %265 to i32
%267 = load i8*, i8** %4
%268 = load i32, i32* %12
%269 = add nsw i32 27, %268
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds i8, i8* %267, i64 %270
%272 = load i8, i8* %271
%273 = zext i8 %272 to i32
%274 = shl i32 %273, 8
%275 = or i32 %266, %274
%276 = load i8*, i8** %4
%277 = load i32, i32* %12
%278 = add nsw i32 28, %277
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds i8, i8* %276, i64 %279
%281 = load i8, i8* %280
%282 = zext i8 %281 to i32
%283 = shl i32 %282, 16
%284 = or i32 %275, %283
store i32 %284, i32* %19
%285 = load i8*, i8** %4
%286 = getelementptr inbounds i8, i8* %285, i64 29
%287 = load i32, i32* %12
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds i8, i8* %286, i64 %288
%290 = load i32*, i32** %15
%291 = load i32, i32* %16
%292 = load i32, i32* %19
%293 = load i8*, i8** %4
%294 = getelementptr inbounds i8, i8* %293, i64 29
%295 = load i32, i32* %12
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds i8, i8* %294, i64 %296
%298 = load i32, i32* %17
%299 = sext i32 %298 to i64
%300 = getelementptr inbounds i8, i8* %297, i64 %299
%301 = load i32, i32* %18
%302 = call i32 @Ptngc_comp_conv_from_huffman(i8* %289, i32* %290, i32 %291, i32 %292, i8* %300, i32 %301, i32* null, i32 0)
%303 = load i8*, i8** %4
%304 = getelementptr inbounds i8, i8* %303, i64 14
%305 = load i32*, i32** %8
%306 = load i32, i32* %10
%307 = load i32, i32* %13
%308 = load i32*, i32** %15
%309 = load i32, i32* %16
%310 = call i32 @Ptngc_comp_conv_from_huffman(i8* %304, i32* %305, i32 %306, i32 %307, i8* null, i32 0, i32* %308, i32 %309)
%311 = load i32*, i32** %15
%312 = call i32 @free(i32* %311)
br label %479
313: ; preds = %180
%314 = load i32, i32* %9
%315 = icmp eq i32 %314, 2
br i1 %315, label %316, label %478
316: ; preds = %313
%317 = call i32* @Ptngc_warnmalloc_x(i32 524308, i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 303)
store i32* %317, i32** %20
%318 = call i32* @Ptngc_warnmalloc_x(i32 1572936, i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 304)
store i32* %318, i32** %21
%319 = load i8*, i8** %4
%320 = load i32, i32* %12
%321 = add nsw i32 14, %320
%322 = sext i32 %321 to i64
%323 = getelementptr inbounds i8, i8* %319, i64 %322
%324 = load i8, i8* %323
%325 = zext i8 %324 to i32
%326 = load i8*, i8** %4
%327 = load i32, i32* %12
%328 = add nsw i32 15, %327
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds i8, i8* %326, i64 %329
%331 = load i8, i8* %330
%332 = zext i8 %331 to i32
%333 = shl i32 %332, 8
%334 = or i32 %325, %333
%335 = load i8*, i8** %4
%336 = load i32, i32* %12
%337 = add nsw i32 16, %336
%338 = sext i32 %337 to i64
%339 = getelementptr inbounds i8, i8* %335, i64 %338
%340 = load i8, i8* %339
%341 = zext i8 %340 to i32
%342 = shl i32 %341, 16
%343 = or i32 %334, %342
store i32 %343, i32* %22
%344 = load i8*, i8** %4
%345 = load i32, i32* %12
%346 = add nsw i32 20, %345
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds i8, i8* %344, i64 %347
%349 = load i8, i8* %348
%350 = zext i8 %349 to i32
%351 = load i8*, i8** %4
%352 = load i32, i32* %12
%353 = add nsw i32 21, %352
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds i8, i8* %351, i64 %354
%356 = load i8, i8* %355
%357 = zext i8 %356 to i32
%358 = shl i32 %357, 8
%359 = or i32 %350, %358
%360 = load i8*, i8** %4
%361 = load i32, i32* %12
%362 = add nsw i32 22, %361
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds i8, i8* %360, i64 %363
%365 = load i8, i8* %364
%366 = zext i8 %365 to i32
%367 = shl i32 %366, 16
%368 = or i32 %359, %367
store i32 %368, i32* %23
%369 = load i8*, i8** %4
%370 = load i32, i32* %12
%371 = add nsw i32 23, %370
%372 = sext i32 %371 to i64
%373 = getelementptr inbounds i8, i8* %369, i64 %372
%374 = load i8, i8* %373
%375 = zext i8 %374 to i32
%376 = load i8*, i8** %4
%377 = load i32, i32* %12
%378 = add nsw i32 24, %377
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds i8, i8* %376, i64 %379
%381 = load i8, i8* %380
%382 = zext i8 %381 to i32
%383 = shl i32 %382, 8
%384 = or i32 %375, %383
%385 = load i8*, i8** %4
%386 = load i32, i32* %12
%387 = add nsw i32 25, %386
%388 = sext i32 %387 to i64
%389 = getelementptr inbounds i8, i8* %385, i64 %388
%390 = load i8, i8* %389
%391 = zext i8 %390 to i32
%392 = shl i32 %391, 16
%393 = or i32 %384, %392
store i32 %393, i32* %24
%394 = load i8*, i8** %4
%395 = load i32, i32* %12
%396 = add nsw i32 26, %395
%397 = sext i32 %396 to i64
%398 = getelementptr inbounds i8, i8* %394, i64 %397
%399 = load i8, i8* %398
%400 = zext i8 %399 to i32
%401 = load i8*, i8** %4
%402 = load i32, i32* %12
%403 = add nsw i32 27, %402
%404 = sext i32 %403 to i64
%405 = getelementptr inbounds i8, i8* %401, i64 %404
%406 = load i8, i8* %405
%407 = zext i8 %406 to i32
%408 = shl i32 %407, 8
%409 = or i32 %400, %408
%410 = load i8*, i8** %4
%411 = load i32, i32* %12
%412 = add nsw i32 28, %411
%413 = sext i32 %412 to i64
%414 = getelementptr inbounds i8, i8* %410, i64 %413
%415 = load i8, i8* %414
%416 = zext i8 %415 to i32
%417 = shl i32 %416, 16
%418 = or i32 %409, %417
store i32 %418, i32* %25
%419 = load i8*, i8** %4
%420 = load i32, i32* %12
%421 = add nsw i32 29, %420
%422 = sext i32 %421 to i64
%423 = getelementptr inbounds i8, i8* %419, i64 %422
%424 = load i8, i8* %423
%425 = zext i8 %424 to i32
%426 = load i8*, i8** %4
%427 = load i32, i32* %12
%428 = add nsw i32 30, %427
%429 = sext i32 %428 to i64
%430 = getelementptr inbounds i8, i8* %426, i64 %429
%431 = load i8, i8* %430
%432 = zext i8 %431 to i32
%433 = shl i32 %432, 8
%434 = or i32 %425, %433
%435 = load i8*, i8** %4
%436 = load i32, i32* %12
%437 = add nsw i32 31, %436
%438 = sext i32 %437 to i64
%439 = getelementptr inbounds i8, i8* %435, i64 %438
%440 = load i8, i8* %439
%441 = zext i8 %440 to i32
%442 = shl i32 %441, 16
%443 = or i32 %434, %442
store i32 %443, i32* %26
%444 = load i8*, i8** %4
%445 = getelementptr inbounds i8, i8* %444, i64 32
%446 = load i32, i32* %12
%447 = sext i32 %446 to i64
%448 = getelementptr inbounds i8, i8* %445, i64 %447
%449 = load i32*, i32** %21
%450 = load i32, i32* %23
%451 = load i32, i32* %26
%452 = load i8*, i8** %4
%453 = getelementptr inbounds i8, i8* %452, i64 32
%454 = load i32, i32* %12
%455 = sext i32 %454 to i64
%456 = getelementptr inbounds i8, i8* %453, i64 %455
%457 = load i32, i32* %24
%458 = sext i32 %457 to i64
%459 = getelementptr inbounds i8, i8* %456, i64 %458
%460 = load i32, i32* %25
%461 = call i32 @Ptngc_comp_conv_from_huffman(i8* %448, i32* %449, i32 %450, i32 %451, i8* %459, i32 %460, i32* null, i32 0)
%462 = load i32*, i32** %21
%463 = load i32*, i32** %20
%464 = load i32, i32* %22
%465 = call i32 @Ptngc_comp_conv_from_rle(i32* %462, i32* %463, i32 %464)
%466 = load i8*, i8** %4
%467 = getelementptr inbounds i8, i8* %466, i64 14
%468 = load i32*, i32** %8
%469 = load i32, i32* %10
%470 = load i32, i32* %13
%471 = load i32*, i32** %20
%472 = load i32, i32* %22
%473 = call i32 @Ptngc_comp_conv_from_huffman(i8* %467, i32* %468, i32 %469, i32 %470, i8* null, i32 0, i32* %471, i32 %472)
%474 = load i32*, i32** %21
%475 = call i32 @free(i32* %474)
%476 = load i32*, i32** %20
%477 = call i32 @free(i32* %476)
br label %478
478: ; preds = %316, %313
br label %479
479: ; preds = %478, %183
br label %480
480: ; preds = %479, %142
%481 = load i32, i32* %7
%482 = icmp ne i32 %481, 0
br i1 %482, label %490, label %483
483: ; preds = %480
%484 = load i32*, i32** %8
%485 = load i32, i32* %10
%486 = load i32*, i32** %6
%487 = call i32 @Ptngc_comp_conv_from_vals16(i32* %484, i32 %485, i32* %486, i32* %27)
%488 = load i32*, i32** %8
%489 = call i32 @free(i32* %488)
br label %490
490: ; preds = %483, %480
ret void
}

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