#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 */
struct coder {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Ptngc_coder_deinit(struct coder *);
struct coder *Ptngc_coder_init();
scalar_t__ Ptngc_i32x2_to_d(unsigned long, unsigned long);
int Ptngc_unpack_array(struct coder *, unsigned char *, int *, int, int, int,
                       int);
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ memcpy(int *, int *, int);
unsigned long readbufferfix(unsigned char *, int);
int /*<<< orphan*/ unquant_intra_differences_first_frame(int *, int);
int /*<<< orphan*/ unquantize(double *, int, int, scalar_t__, int *);
int /*<<< orphan*/ unquantize_float(float *, int, int, float, int *);
int /*<<< orphan*/ unquantize_inter_differences(double *, int, int, scalar_t__,
                                                int *);
int /*<<< orphan*/ unquantize_inter_differences_float(float *, int, int, float,
                                                      int *);
int /*<<< orphan*/ unquantize_inter_differences_int(int *, int, int, int *);
int /*<<< orphan*/ unquantize_intra_differences(double *, int, int, scalar_t__,
                                                int *);
int /*<<< orphan*/ unquantize_intra_differences_float(float *, int, int, float,
                                                      int *);
int /*<<< orphan*/ unquantize_intra_differences_int(int *, int, int, int *);
int tng_compress_uncompress_pos_gen(char *data, double *posd, float *posf,
                                    int *posi, unsigned long *prec_hi,
                                    unsigned long *prec_lo) {
  int bufloc = 0;
  int length;
  int natoms, nframes;
  int initial_coding, initial_coding_parameter;
  int coding, coding_parameter;
  int *quant = NULL;
  struct coder *coder = NULL;
  int rval = 0;
  int magic_int;
  magic_int = (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  if (magic_int != 0x50474E54) {
    rval = 1;
    goto error;
  }
  natoms = (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  nframes = (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  initial_coding = (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  initial_coding_parameter =
      (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  coding = (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  coding_parameter = (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  *prec_lo = readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  *prec_hi = readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  quant = malloc(natoms * nframes * 3 * sizeof *quant);
  length = (int)readbufferfix((unsigned char *)data + bufloc, 4);
  bufloc += 4;
  coder = Ptngc_coder_init();
  rval = Ptngc_unpack_array(coder, (unsigned char *)data + bufloc, quant,
                            natoms * 3, initial_coding,
                            initial_coding_parameter, natoms);
  Ptngc_coder_deinit(coder);
  if (rval)
    goto error;
  bufloc += length;
  if ((initial_coding == 5) || (initial_coding == 7) ||
      (initial_coding == 10)) {
    if (posd)
      unquantize(posd, natoms, 1, (Ptngc_i32x2_to_d(*prec_hi, *prec_lo)),
                 quant);
    else if (posf)
      unquantize_float(posf, natoms, 1,
                       (float)(Ptngc_i32x2_to_d(*prec_hi, *prec_lo)), quant);
    else if (posi)
      memcpy(posi, quant, natoms * 3 * sizeof *posi);
  } else if ((initial_coding == 3) || (initial_coding == 9)) {
    if (posd)
      unquantize_intra_differences(
          posd, natoms, 1, (Ptngc_i32x2_to_d(*prec_hi, *prec_lo)), quant);
    else if (posf)
      unquantize_intra_differences_float(
          posf, natoms, 1, (float)(Ptngc_i32x2_to_d(*prec_hi, *prec_lo)),
          quant);
    else if (posi)
      unquantize_intra_differences_int(posi, natoms, 1, quant);
    unquant_intra_differences_first_frame(quant, natoms);
  }
  if (nframes > 1) {
    bufloc += 4;
    coder = Ptngc_coder_init();
    rval = Ptngc_unpack_array(coder, (unsigned char *)data + bufloc,
                              quant + natoms * 3, (nframes - 1) * natoms * 3,
                              coding, coding_parameter, natoms);
    Ptngc_coder_deinit(coder);
    if (rval)
      goto error;
    if ((coding == 1) || (coding == 2) || (coding == 8)) {
      if (posd)
        unquantize_inter_differences(posd, natoms, nframes,
                                     (Ptngc_i32x2_to_d(*prec_hi, *prec_lo)),
                                     quant);
      else if (posf)
        unquantize_inter_differences_float(
            posf, natoms, nframes,
            (float)(Ptngc_i32x2_to_d(*prec_hi, *prec_lo)), quant);
      else if (posi)
        unquantize_inter_differences_int(posi, natoms, nframes, quant);
    } else if ((coding == 5) || (coding == 10) || (coding == 7)) {
      if (posd)
        unquantize(posd + natoms * 3, natoms, nframes - 1,
                   (Ptngc_i32x2_to_d(*prec_hi, *prec_lo)), quant + natoms * 3);
      else if (posf)
        unquantize_float(posf + natoms * 3, natoms, nframes - 1,
                         (float)(Ptngc_i32x2_to_d(*prec_hi, *prec_lo)),
                         quant + natoms * 3);
      else if (posi)
        memcpy(posi + natoms * 3, quant + natoms * 3,
               natoms * 3 * (nframes - 1) * sizeof *posi);
    } else if ((coding == 3) || (coding == 9)) {
      if (posd)
        unquantize_intra_differences(posd + natoms * 3, natoms, nframes - 1,
                                     (Ptngc_i32x2_to_d(*prec_hi, *prec_lo)),
                                     quant + natoms * 3);
      else if (posf)
        unquantize_intra_differences_float(
            posf + natoms * 3, natoms, nframes - 1,
            (float)(Ptngc_i32x2_to_d(*prec_hi, *prec_lo)), quant + natoms * 3);
      else if (posi)
        unquantize_intra_differences_int(posi + natoms * 3, natoms, nframes - 1,
                                         quant + natoms * 3);
    }
  }
error:
  free(quant);
  return rval;
}


x86 assembly (clang, -O0):
<tng_compress_uncompress_pos_gen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x68(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x50474e54,-0x68(%rbp)
je     128b <tng_compress_uncompress_pos_gen+0x7b>
movl   $0x1,-0x64(%rbp)
jmp    1a7e <tng_compress_uncompress_pos_gen+0x86e>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x48(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x50(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%eax
imul   -0x40(%rbp),%eax
imul   $0x3,%eax,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1090 <Ptngc_coder_init@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x34(%rbp),%rax
add    %rax,%rsi
mov    -0x58(%rbp),%rdx
imul   $0x3,-0x3c(%rbp),%ecx
mov    -0x44(%rbp),%r8d
mov    -0x48(%rbp),%r9d
mov    -0x3c(%rbp),%eax
mov    %eax,(%rsp)
call   1120 <Ptngc_unpack_array@plt>
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%rdi
call   1080 <Ptngc_coder_deinit@plt>
cmpl   $0x0,-0x64(%rbp)
je     142d <tng_compress_uncompress_pos_gen+0x21d>
jmp    1a7e <tng_compress_uncompress_pos_gen+0x86e>
mov    -0x38(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x5,-0x44(%rbp)
je     1454 <tng_compress_uncompress_pos_gen+0x244>
cmpl   $0x7,-0x44(%rbp)
je     1454 <tng_compress_uncompress_pos_gen+0x244>
cmpl   $0xa,-0x44(%rbp)
jne    1521 <tng_compress_uncompress_pos_gen+0x311>
cmpq   $0x0,-0x10(%rbp)
je     149d <tng_compress_uncompress_pos_gen+0x28d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0x78(%rbp),%rdi
mov    -0x6c(%rbp),%esi
mov    %rax,%rcx
mov    -0x58(%rbp),%r8
mov    $0x1,%edx
call   10f0 <unquantize@plt>
jmp    151c <tng_compress_uncompress_pos_gen+0x30c>
cmpq   $0x0,-0x18(%rbp)
je     14ee <tng_compress_uncompress_pos_gen+0x2de>
mov    -0x18(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0x88(%rbp),%rdi
mov    -0x7c(%rbp),%esi
cvtsi2ss %rax,%xmm0
mov    -0x58(%rbp),%rcx
mov    $0x1,%edx
call   10d0 <unquantize_float@plt>
jmp    1517 <tng_compress_uncompress_pos_gen+0x307>
cmpq   $0x0,-0x20(%rbp)
je     1512 <tng_compress_uncompress_pos_gen+0x302>
mov    -0x20(%rbp),%rdi
mov    -0x58(%rbp),%rsi
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edx
call   10b0 <memcpy@plt>
jmp    1517 <tng_compress_uncompress_pos_gen+0x307>
jmp    151c <tng_compress_uncompress_pos_gen+0x30c>
jmp    161c <tng_compress_uncompress_pos_gen+0x40c>
cmpl   $0x3,-0x44(%rbp)
je     1535 <tng_compress_uncompress_pos_gen+0x325>
cmpl   $0x9,-0x44(%rbp)
jne    1617 <tng_compress_uncompress_pos_gen+0x407>
cmpq   $0x0,-0x10(%rbp)
je     158a <tng_compress_uncompress_pos_gen+0x37a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0x98(%rbp),%rdi
mov    -0x8c(%rbp),%esi
mov    %rax,%rcx
mov    -0x58(%rbp),%r8
mov    $0x1,%edx
call   10e0 <unquantize_intra_differences@plt>
jmp    160b <tng_compress_uncompress_pos_gen+0x3fb>
cmpq   $0x0,-0x18(%rbp)
je     15e1 <tng_compress_uncompress_pos_gen+0x3d1>
mov    -0x18(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0xa8(%rbp),%rdi
mov    -0x9c(%rbp),%esi
cvtsi2ss %rax,%xmm0
mov    -0x58(%rbp),%rcx
mov    $0x1,%edx
call   1110 <unquantize_intra_differences_float@plt>
jmp    1606 <tng_compress_uncompress_pos_gen+0x3f6>
cmpq   $0x0,-0x20(%rbp)
je     1601 <tng_compress_uncompress_pos_gen+0x3f1>
mov    -0x20(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x58(%rbp),%rcx
mov    $0x1,%edx
call   10a0 <unquantize_intra_differences_int@plt>
jmp    1606 <tng_compress_uncompress_pos_gen+0x3f6>
jmp    160b <tng_compress_uncompress_pos_gen+0x3fb>
mov    -0x58(%rbp),%rdi
mov    -0x3c(%rbp),%esi
call   1060 <unquant_intra_differences_first_frame@plt>
jmp    161c <tng_compress_uncompress_pos_gen+0x40c>
cmpl   $0x1,-0x40(%rbp)
jle    1a79 <tng_compress_uncompress_pos_gen+0x869>
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1090 <Ptngc_coder_init@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x34(%rbp),%rax
add    %rax,%rsi
mov    -0x58(%rbp),%rdx
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
imul   -0x3c(%rbp),%eax
imul   $0x3,%eax,%ecx
mov    -0x4c(%rbp),%r8d
mov    -0x50(%rbp),%r9d
mov    -0x3c(%rbp),%eax
mov    %eax,(%rsp)
call   1120 <Ptngc_unpack_array@plt>
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%rdi
call   1080 <Ptngc_coder_deinit@plt>
cmpl   $0x0,-0x64(%rbp)
je     1695 <tng_compress_uncompress_pos_gen+0x485>
jmp    1a7e <tng_compress_uncompress_pos_gen+0x86e>
cmpl   $0x1,-0x4c(%rbp)
je     16b3 <tng_compress_uncompress_pos_gen+0x4a3>
cmpl   $0x2,-0x4c(%rbp)
je     16b3 <tng_compress_uncompress_pos_gen+0x4a3>
cmpl   $0x8,-0x4c(%rbp)
jne    17a0 <tng_compress_uncompress_pos_gen+0x590>
cmpq   $0x0,-0x10(%rbp)
je     1712 <tng_compress_uncompress_pos_gen+0x502>
mov    -0x10(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0xb8(%rbp),%rdi
mov    -0xb0(%rbp),%esi
mov    -0xac(%rbp),%edx
mov    %rax,%rcx
mov    -0x58(%rbp),%r8
call   1070 <unquantize_inter_differences@plt>
jmp    179b <tng_compress_uncompress_pos_gen+0x58b>
cmpq   $0x0,-0x18(%rbp)
je     1773 <tng_compress_uncompress_pos_gen+0x563>
mov    -0x18(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xc0(%rbp),%esi
mov    -0xbc(%rbp),%edx
cvtsi2ss %rax,%xmm0
mov    -0x58(%rbp),%rcx
call   1050 <unquantize_inter_differences_float@plt>
jmp    1796 <tng_compress_uncompress_pos_gen+0x586>
cmpq   $0x0,-0x20(%rbp)
je     1791 <tng_compress_uncompress_pos_gen+0x581>
mov    -0x20(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x40(%rbp),%edx
mov    -0x58(%rbp),%rcx
call   1100 <unquantize_inter_differences_int@plt>
jmp    1796 <tng_compress_uncompress_pos_gen+0x586>
jmp    179b <tng_compress_uncompress_pos_gen+0x58b>
jmp    1a74 <tng_compress_uncompress_pos_gen+0x864>
cmpl   $0x5,-0x4c(%rbp)
je     17be <tng_compress_uncompress_pos_gen+0x5ae>
cmpl   $0xa,-0x4c(%rbp)
je     17be <tng_compress_uncompress_pos_gen+0x5ae>
cmpl   $0x7,-0x4c(%rbp)
jne    1910 <tng_compress_uncompress_pos_gen+0x700>
cmpq   $0x0,-0x10(%rbp)
je     183b <tng_compress_uncompress_pos_gen+0x62b>
mov    -0x10(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd8(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0xd0(%rbp)
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xcc(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0xd8(%rbp),%rdi
mov    -0xd0(%rbp),%esi
mov    -0xcc(%rbp),%edx
mov    %rax,%rcx
mov    -0x58(%rbp),%r8
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%r8
call   10f0 <unquantize@plt>
jmp    190b <tng_compress_uncompress_pos_gen+0x6fb>
cmpq   $0x0,-0x18(%rbp)
je     18ba <tng_compress_uncompress_pos_gen+0x6aa>
mov    -0x18(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xe8(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0xe0(%rbp)
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xdc(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0xe8(%rbp),%rdi
mov    -0xe0(%rbp),%esi
mov    -0xdc(%rbp),%edx
cvtsi2ss %rax,%xmm0
mov    -0x58(%rbp),%rcx
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
call   10d0 <unquantize_float@plt>
jmp    1906 <tng_compress_uncompress_pos_gen+0x6f6>
cmpq   $0x0,-0x20(%rbp)
je     1901 <tng_compress_uncompress_pos_gen+0x6f1>
mov    -0x20(%rbp),%rdi
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x58(%rbp),%rsi
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
imul   $0x3,-0x3c(%rbp),%eax
mov    -0x40(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edx
call   10b0 <memcpy@plt>
jmp    1906 <tng_compress_uncompress_pos_gen+0x6f6>
jmp    190b <tng_compress_uncompress_pos_gen+0x6fb>
jmp    1a6f <tng_compress_uncompress_pos_gen+0x85f>
cmpl   $0x3,-0x4c(%rbp)
je     1924 <tng_compress_uncompress_pos_gen+0x714>
cmpl   $0x9,-0x4c(%rbp)
jne    1a6a <tng_compress_uncompress_pos_gen+0x85a>
cmpq   $0x0,-0x10(%rbp)
je     19a1 <tng_compress_uncompress_pos_gen+0x791>
mov    -0x10(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xf8(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0xf0(%rbp)
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xec(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0xf8(%rbp),%rdi
mov    -0xf0(%rbp),%esi
mov    -0xec(%rbp),%edx
mov    %rax,%rcx
mov    -0x58(%rbp),%r8
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%r8
call   10e0 <unquantize_intra_differences@plt>
jmp    1a65 <tng_compress_uncompress_pos_gen+0x855>
cmpq   $0x0,-0x18(%rbp)
je     1a20 <tng_compress_uncompress_pos_gen+0x810>
mov    -0x18(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x108(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xfc(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    -0x108(%rbp),%rdi
mov    -0x100(%rbp),%esi
mov    -0xfc(%rbp),%edx
cvtsi2ss %rax,%xmm0
mov    -0x58(%rbp),%rcx
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
call   1110 <unquantize_intra_differences_float@plt>
jmp    1a60 <tng_compress_uncompress_pos_gen+0x850>
cmpq   $0x0,-0x20(%rbp)
je     1a5b <tng_compress_uncompress_pos_gen+0x84b>
mov    -0x20(%rbp),%rdi
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x3c(%rbp),%esi
mov    -0x40(%rbp),%edx
sub    $0x1,%edx
mov    -0x58(%rbp),%rcx
imul   $0x3,-0x3c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
call   10a0 <unquantize_intra_differences_int@plt>
jmp    1a60 <tng_compress_uncompress_pos_gen+0x850>
jmp    1a65 <tng_compress_uncompress_pos_gen+0x855>
jmp    1a6a <tng_compress_uncompress_pos_gen+0x85a>
jmp    1a6f <tng_compress_uncompress_pos_gen+0x85f>
jmp    1a74 <tng_compress_uncompress_pos_gen+0x864>
jmp    1a79 <tng_compress_uncompress_pos_gen+0x869>
jmp    1a7e <tng_compress_uncompress_pos_gen+0x86e>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x64(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tng_compress_uncompress_pos_gen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,%r12
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r13
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
cmp    $0x50474e54,%eax
jne    1373 <tng_compress_uncompress_pos_gen+0x163>
mov    %rbp,0x30(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r15,0x20(%rsp)
lea    0x4(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,%r15
lea    0x8(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,%rbx
lea    0xc(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,0x48(%rsp)
lea    0x10(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,0x10(%rsp)
lea    0x14(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,0x58(%rsp)
lea    0x18(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,0x50(%rsp)
lea    0x1c(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,(%r12)
lea    0x20(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,(%r14)
mov    %r15d,%eax
mov    %rbx,0x60(%rsp)
imul   %ebx,%eax
shl    $0x20,%rax
lea    (%rax,%rax,2),%rdi
shr    $0x1e,%rdi
call   10c0 <malloc@plt>
mov    %r12,0x8(%rsp)
mov    %rax,%rbx
lea    0x24(%r13),%rdi
mov    $0x4,%esi
call   1040 <readbufferfix@plt>
mov    %rax,0x40(%rsp)
xor    %eax,%eax
call   1090 <Ptngc_coder_init@plt>
mov    %r14,0x38(%rsp)
mov    %rax,%r14
lea    0x28(%r13),%rsi
lea    (%r15,%r15,2),%ebp
mov    %r15d,(%rsp)
mov    %rax,%rdi
mov    %rbx,0x18(%rsp)
mov    %rbx,%rdx
mov    %ebp,%ecx
mov    0x48(%rsp),%r8
mov    %r8,%rbx
mov    0x10(%rsp),%r9
call   1120 <Ptngc_unpack_array@plt>
mov    %eax,%r12d
mov    %r14,%rdi
call   1080 <Ptngc_coder_deinit@plt>
test   %r12d,%r12d
je     1394 <tng_compress_uncompress_pos_gen+0x184>
mov    %r12d,%eax
mov    0x18(%rsp),%r14
mov    %r12d,%ebx
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    $0x1,%ebx
xor    %r14d,%r14d
mov    %r14,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,0x10(%rsp)
cmp    $0xa,%ebx
mov    0x18(%rsp),%r14
mov    0x38(%rsp),%rcx
mov    0x60(%rsp),%rbp
ja     14e4 <tng_compress_uncompress_pos_gen+0x2d4>
mov    $0x4a0,%eax
bt     %ebx,%eax
jae    13ef <tng_compress_uncompress_pos_gen+0x1df>
mov    0x30(%rsp),%rbx
test   %rbx,%rbx
je     1432 <tng_compress_uncompress_pos_gen+0x222>
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %rax,%rcx
mov    %r14,%r8
call   10f0 <unquantize@plt>
jmp    14e4 <tng_compress_uncompress_pos_gen+0x2d4>
mov    $0x208,%eax
bt     %ebx,%eax
jae    14e4 <tng_compress_uncompress_pos_gen+0x2d4>
mov    0x30(%rsp),%rbx
test   %rbx,%rbx
je     1466 <tng_compress_uncompress_pos_gen+0x256>
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %rax,%rcx
mov    %r14,%r8
call   10e0 <unquantize_intra_differences@plt>
jmp    14d9 <tng_compress_uncompress_pos_gen+0x2c9>
mov    0x28(%rsp),%rbx
test   %rbx,%rbx
je     149a <tng_compress_uncompress_pos_gen+0x28a>
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
cvtsi2ss %rax,%xmm0
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10d0 <unquantize_float@plt>
jmp    14e4 <tng_compress_uncompress_pos_gen+0x2d4>
mov    0x28(%rsp),%rbx
test   %rbx,%rbx
je     14bc <tng_compress_uncompress_pos_gen+0x2ac>
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
cvtsi2ss %rax,%xmm0
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1110 <unquantize_intra_differences_float@plt>
jmp    14d9 <tng_compress_uncompress_pos_gen+0x2c9>
cmpq   $0x0,0x20(%rsp)
je     14e4 <tng_compress_uncompress_pos_gen+0x2d4>
lea    0x0(,%r15,4),%eax
lea    (%rax,%rax,2),%edx
mov    0x20(%rsp),%rdi
mov    %r14,%rsi
call   10b0 <memcpy@plt>
jmp    14e4 <tng_compress_uncompress_pos_gen+0x2d4>
cmpq   $0x0,0x20(%rsp)
je     14d9 <tng_compress_uncompress_pos_gen+0x2c9>
mov    0x20(%rsp),%rdi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <unquantize_intra_differences_int@plt>
mov    %r14,%rdi
mov    %r15d,%esi
call   1060 <unquant_intra_differences_first_frame@plt>
xor    %ebx,%ebx
cmp    $0x2,%ebp
jl     137b <tng_compress_uncompress_pos_gen+0x16b>
xor    %ebx,%ebx
xor    %eax,%eax
call   1090 <Ptngc_coder_init@plt>
mov    %r15,%rcx
mov    %rax,%r15
mov    0x40(%rsp),%rax
add    $0x2c,%eax
cltq
add    %rax,%r13
mov    %rcx,%rax
mov    0x10(%rsp),%ecx
movslq %ecx,%rdx
mov    %rdx,0x40(%rsp)
lea    (%r14,%rdx,4),%rdx
lea    -0x1(%rbp),%r14d
imul   %r14d,%ecx
mov    %rax,0x48(%rsp)
mov    %eax,(%rsp)
mov    %r15,%rdi
mov    %r13,%rsi
mov    %rdx,0x10(%rsp)
mov    0x58(%rsp),%r12
mov    %r12d,%r8d
mov    0x50(%rsp),%r9
call   1120 <Ptngc_unpack_array@plt>
mov    %rbp,%r13
mov    %eax,%ebp
mov    %r15,%rdi
call   1080 <Ptngc_coder_deinit@plt>
test   %ebp,%ebp
je     1568 <tng_compress_uncompress_pos_gen+0x358>
mov    %ebp,%ebx
mov    0x18(%rsp),%r14
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x40(%rsp),%rdi
mov    0x48(%rsp),%r15
cmp    $0xa,%r12d
ja     172e <tng_compress_uncompress_pos_gen+0x51e>
mov    %r14d,%ebp
mov    $0x106,%eax
bt     %r12d,%eax
mov    0x18(%rsp),%r14
jb     15e0 <tng_compress_uncompress_pos_gen+0x3d0>
mov    $0x4a0,%eax
bt     %r12d,%eax
mov    0x38(%rsp),%rcx
mov    0x30(%rsp),%rdx
jae    161c <tng_compress_uncompress_pos_gen+0x40c>
test   %rdx,%rdx
je     1667 <tng_compress_uncompress_pos_gen+0x457>
lea    (%rdx,%rdi,8),%r14
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    %r14,%rdi
mov    0x18(%rsp),%r14
mov    %r15d,%esi
mov    %ebp,%edx
mov    %rax,%rcx
mov    0x10(%rsp),%r8
call   10f0 <unquantize@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x30(%rsp),%rbp
test   %rbp,%rbp
mov    0x38(%rsp),%rax
je     16aa <tng_compress_uncompress_pos_gen+0x49a>
mov    (%rax),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r13d,%edx
mov    %rax,%rcx
mov    %r14,%r8
call   1070 <unquantize_inter_differences@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    $0x208,%eax
bt     %r12d,%eax
jae    137b <tng_compress_uncompress_pos_gen+0x16b>
test   %rdx,%rdx
je     16eb <tng_compress_uncompress_pos_gen+0x4db>
lea    (%rdx,%rdi,8),%r14
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
mov    %r14,%rdi
mov    0x18(%rsp),%r14
mov    %r15d,%esi
mov    %ebp,%edx
mov    %rax,%rcx
mov    0x10(%rsp),%r8
call   10e0 <unquantize_intra_differences@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x28(%rsp),%rax
test   %rax,%rax
je     1738 <tng_compress_uncompress_pos_gen+0x528>
lea    (%rax,%rdi,4),%r14
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
cvtsi2ss %rax,%xmm0
mov    %r14,%rdi
mov    0x18(%rsp),%r14
mov    %r15d,%esi
mov    %ebp,%edx
mov    0x10(%rsp),%rcx
call   10d0 <unquantize_float@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x28(%rsp),%rbp
test   %rbp,%rbp
je     1765 <tng_compress_uncompress_pos_gen+0x555>
mov    0x38(%rsp),%rax
mov    (%rax),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r13d,%edx
mov    %r14,%rcx
call   1050 <unquantize_inter_differences_float@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x28(%rsp),%rax
test   %rax,%rax
je     1786 <tng_compress_uncompress_pos_gen+0x576>
lea    (%rax,%rdi,4),%r14
mov    (%rcx),%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rsi
call   1130 <Ptngc_i32x2_to_d@plt>
cvtsi2ss %rax,%xmm0
mov    %r14,%rdi
mov    0x18(%rsp),%r14
mov    %r15d,%esi
mov    %ebp,%edx
mov    0x10(%rsp),%rcx
call   1110 <unquantize_intra_differences_float@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x18(%rsp),%r14
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x20(%rsp),%rax
test   %rax,%rax
je     137b <tng_compress_uncompress_pos_gen+0x16b>
lea    (%rax,%rdi,4),%rdi
imul   %ebp,%r15d
shl    $0x2,%r15d
lea    (%r15,%r15,2),%edx
mov    0x10(%rsp),%rsi
call   10b0 <memcpy@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x20(%rsp),%rdi
test   %rdi,%rdi
je     137b <tng_compress_uncompress_pos_gen+0x16b>
mov    %r15d,%esi
mov    %r13d,%edx
mov    %r14,%rcx
call   1100 <unquantize_inter_differences_int@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>
mov    0x20(%rsp),%rax
test   %rax,%rax
je     137b <tng_compress_uncompress_pos_gen+0x16b>
lea    (%rax,%rdi,4),%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    0x10(%rsp),%rcx
call   10a0 <unquantize_intra_differences_int@plt>
jmp    137b <tng_compress_uncompress_pos_gen+0x16b>

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

LLVM IR (-O2):
%struct.coder = type { i32 }
define i32 @tng_compress_uncompress_pos_gen(i8* %0, double* %1, float* %2, i32* %3, i64* nocapture %4, i64* nocapture %5) {
%7 = tail call i64 @readbufferfix(i8* %0, i32 4)
%8 = trunc i64 %7 to i32
%9 = icmp eq i32 %8, 1346850388
br i1 %9, label %10, label %169
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 4
%12 = tail call i64 @readbufferfix(i8* %11, i32 4)
%13 = trunc i64 %12 to i32
%14 = getelementptr inbounds i8, i8* %0, i64 8
%15 = tail call i64 @readbufferfix(i8* %14, i32 4)
%16 = trunc i64 %15 to i32
%17 = getelementptr inbounds i8, i8* %0, i64 12
%18 = tail call i64 @readbufferfix(i8* %17, i32 4)
%19 = trunc i64 %18 to i32
%20 = getelementptr inbounds i8, i8* %0, i64 16
%21 = tail call i64 @readbufferfix(i8* %20, i32 4)
%22 = trunc i64 %21 to i32
%23 = getelementptr inbounds i8, i8* %0, i64 20
%24 = tail call i64 @readbufferfix(i8* %23, i32 4)
%25 = trunc i64 %24 to i32
%26 = getelementptr inbounds i8, i8* %0, i64 24
%27 = tail call i64 @readbufferfix(i8* %26, i32 4)
%28 = trunc i64 %27 to i32
%29 = getelementptr inbounds i8, i8* %0, i64 28
%30 = tail call i64 @readbufferfix(i8* %29, i32 4)
store i64 %30, i64* %5
%31 = getelementptr inbounds i8, i8* %0, i64 32
%32 = tail call i64 @readbufferfix(i8* %31, i32 4)
store i64 %32, i64* %4
%33 = mul i64 %12, 12884901888
%34 = mul i64 %33, %15
%35 = lshr exact i64 %34, 30
%36 = trunc i64 %35 to i32
%37 = tail call i32* @malloc(i32 %36)
%38 = getelementptr inbounds i8, i8* %0, i64 36
%39 = tail call i64 @readbufferfix(i8* %38, i32 4)
%40 = tail call %struct.coder* (...) @Ptngc_coder_init()
%41 = getelementptr inbounds i8, i8* %0, i64 40
%42 = mul i32 %13, 3
%43 = tail call i32 @Ptngc_unpack_array(%struct.coder* %40, i8* %41, i32* %37, i32 %42, i32 %19, i32 %22, i32 %13)
%44 = tail call i32 @Ptngc_coder_deinit(%struct.coder* %40)
%45 = icmp eq i32 %43, 0
br i1 %45, label %46, label %169
46: ; preds = %10
switch i32 %19, label %88 [
i32 10, label %47
i32 7, label %47
i32 5, label %47
i32 9, label %67
i32 3, label %67
]
47: ; preds = %46, %46, %46
%48 = icmp eq double* %1, null
br i1 %48, label %54, label %49
49: ; preds = %47
%50 = load i64, i64* %4
%51 = load i64, i64* %5
%52 = tail call i64 @Ptngc_i32x2_to_d(i64 %50, i64 %51)
%53 = tail call i32 @unquantize(double* %1, i32 %13, i32 1, i64 %52, i32* %37)
br label %88
54: ; preds = %47
%55 = icmp eq float* %2, null
br i1 %55, label %62, label %56
56: ; preds = %54
%57 = load i64, i64* %4
%58 = load i64, i64* %5
%59 = tail call i64 @Ptngc_i32x2_to_d(i64 %57, i64 %58)
%60 = sitofp i64 %59 to float
%61 = tail call i32 @unquantize_float(float* %2, i32 %13, i32 1, float %60, i32* %37)
br label %88
62: ; preds = %54
%63 = icmp eq i32* %3, null
br i1 %63, label %88, label %64
64: ; preds = %62
%65 = mul i32 %13, 12
%66 = tail call i32 @memcpy(i32* %3, i32* %37, i32 %65)
br label %88
67: ; preds = %46, %46
%68 = icmp eq double* %1, null
br i1 %68, label %74, label %69
69: ; preds = %67
%70 = load i64, i64* %4
%71 = load i64, i64* %5
%72 = tail call i64 @Ptngc_i32x2_to_d(i64 %70, i64 %71)
%73 = tail call i32 @unquantize_intra_differences(double* %1, i32 %13, i32 1, i64 %72, i32* %37)
br label %86
74: ; preds = %67
%75 = icmp eq float* %2, null
br i1 %75, label %82, label %76
76: ; preds = %74
%77 = load i64, i64* %4
%78 = load i64, i64* %5
%79 = tail call i64 @Ptngc_i32x2_to_d(i64 %77, i64 %78)
%80 = sitofp i64 %79 to float
%81 = tail call i32 @unquantize_intra_differences_float(float* %2, i32 %13, i32 1, float %80, i32* %37)
br label %86
82: ; preds = %74
%83 = icmp eq i32* %3, null
br i1 %83, label %86, label %84
84: ; preds = %82
%85 = tail call i32 @unquantize_intra_differences_int(i32* %3, i32 %13, i32 1, i32* %37)
br label %86
86: ; preds = %76, %84, %82, %69
%87 = tail call i32 @unquant_intra_differences_first_frame(i32* %37, i32 %13)
br label %88
88: ; preds = %46, %86, %49, %62, %64, %56
%89 = icmp sgt i32 %16, 1
br i1 %89, label %90, label %169
90: ; preds = %88
%91 = tail call %struct.coder* (...) @Ptngc_coder_init()
%92 = shl i64 %39, 32
%93 = add i64 %92, 188978561024
%94 = ashr exact i64 %93, 32
%95 = getelementptr inbounds i8, i8* %0, i64 %94
%96 = sext i32 %42 to i64
%97 = getelementptr inbounds i32, i32* %37, i64 %96
%98 = add nsw i32 %16, -1
%99 = mul i32 %42, %98
%100 = tail call i32 @Ptngc_unpack_array(%struct.coder* %91, i8* %95, i32* %97, i32 %99, i32 %25, i32 %28, i32 %13)
%101 = tail call i32 @Ptngc_coder_deinit(%struct.coder* %91)
%102 = icmp eq i32 %100, 0
br i1 %102, label %103, label %169
103: ; preds = %90
switch i32 %25, label %169 [
i32 8, label %104
i32 2, label %104
i32 1, label %104
i32 10, label %123
i32 7, label %123
i32 5, label %123
i32 9, label %147
i32 3, label %147
]
104: ; preds = %103, %103, %103
%105 = icmp eq double* %1, null
br i1 %105, label %111, label %106
106: ; preds = %104
%107 = load i64, i64* %4
%108 = load i64, i64* %5
%109 = tail call i64 @Ptngc_i32x2_to_d(i64 %107, i64 %108)
%110 = tail call i32 @unquantize_inter_differences(double* %1, i32 %13, i32 %16, i64 %109, i32* %37)
br label %169
111: ; preds = %104
%112 = icmp eq float* %2, null
br i1 %112, label %119, label %113
113: ; preds = %111
%114 = load i64, i64* %4
%115 = load i64, i64* %5
%116 = tail call i64 @Ptngc_i32x2_to_d(i64 %114, i64 %115)
%117 = sitofp i64 %116 to float
%118 = tail call i32 @unquantize_inter_differences_float(float* %2, i32 %13, i32 %16, float %117, i32* %37)
br label %169
119: ; preds = %111
%120 = icmp eq i32* %3, null
br i1 %120, label %169, label %121
121: ; preds = %119
%122 = tail call i32 @unquantize_inter_differences_int(i32* %3, i32 %13, i32 %16, i32* %37)
br label %169
123: ; preds = %103, %103, %103
%124 = icmp eq double* %1, null
br i1 %124, label %131, label %125
125: ; preds = %123
%126 = getelementptr inbounds double, double* %1, i64 %96
%127 = load i64, i64* %4
%128 = load i64, i64* %5
%129 = tail call i64 @Ptngc_i32x2_to_d(i64 %127, i64 %128)
%130 = tail call i32 @unquantize(double* %126, i32 %13, i32 %98, i64 %129, i32* %97)
br label %169
131: ; preds = %123
%132 = icmp eq float* %2, null
br i1 %132, label %140, label %133
133: ; preds = %131
%134 = getelementptr inbounds float, float* %2, i64 %96
%135 = load i64, i64* %4
%136 = load i64, i64* %5
%137 = tail call i64 @Ptngc_i32x2_to_d(i64 %135, i64 %136)
%138 = sitofp i64 %137 to float
%139 = tail call i32 @unquantize_float(float* %134, i32 %13, i32 %98, float %138, i32* %97)
br label %169
140: ; preds = %131
%141 = icmp eq i32* %3, null
br i1 %141, label %169, label %142
142: ; preds = %140
%143 = getelementptr inbounds i32, i32* %3, i64 %96
%144 = mul i32 %13, 12
%145 = mul i32 %144, %98
%146 = tail call i32 @memcpy(i32* %143, i32* %97, i32 %145)
br label %169
147: ; preds = %103, %103
%148 = icmp eq double* %1, null
br i1 %148, label %155, label %149
149: ; preds = %147
%150 = getelementptr inbounds double, double* %1, i64 %96
%151 = load i64, i64* %4
%152 = load i64, i64* %5
%153 = tail call i64 @Ptngc_i32x2_to_d(i64 %151, i64 %152)
%154 = tail call i32 @unquantize_intra_differences(double* %150, i32 %13, i32 %98, i64 %153, i32* %97)
br label %169
155: ; preds = %147
%156 = icmp eq float* %2, null
br i1 %156, label %164, label %157
157: ; preds = %155
%158 = getelementptr inbounds float, float* %2, i64 %96
%159 = load i64, i64* %4
%160 = load i64, i64* %5
%161 = tail call i64 @Ptngc_i32x2_to_d(i64 %159, i64 %160)
%162 = sitofp i64 %161 to float
%163 = tail call i32 @unquantize_intra_differences_float(float* %158, i32 %13, i32 %98, float %162, i32* %97)
br label %169
164: ; preds = %155
%165 = icmp eq i32* %3, null
br i1 %165, label %169, label %166
166: ; preds = %164
%167 = getelementptr inbounds i32, i32* %3, i64 %96
%168 = tail call i32 @unquantize_intra_differences_int(i32* %167, i32 %13, i32 %98, i32* %97)
br label %169
169: ; preds = %103, %6, %88, %133, %142, %140, %125, %149, %164, %166, %157, %106, %119, %121, %113, %90, %10
%170 = phi i32* [ %37, %10 ], [ %37, %90 ], [ %37, %106 ], [ %37, %113 ], [ %37, %121 ], [ %37, %119 ], [ %37, %125 ], [ %37, %133 ], [ %37, %142 ], [ %37, %140 ], [ %37, %149 ], [ %37, %157 ], [ %37, %166 ], [ %37, %164 ], [ %37, %88 ], [ null, %6 ], [ %37, %103 ]
%171 = phi i32 [ %43, %10 ], [ %100, %90 ], [ 0, %106 ], [ 0, %113 ], [ 0, %121 ], [ 0, %119 ], [ 0, %125 ], [ 0, %133 ], [ 0, %142 ], [ 0, %140 ], [ 0, %149 ], [ 0, %157 ], [ 0, %166 ], [ 0, %164 ], [ 0, %88 ], [ 1, %6 ], [ 0, %103 ]
%172 = tail call i32 @free(i32* %170)
ret i32 %171
}