user: What is the c source code of the assembly code below?

```asm
<tng_compress_uncompress_pos_gen>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    $0x1,%r14d
  push   %r13
  push   %r12
  mov    %r9,%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x78,%rsp
  mov    %rsi,0x8(%rsp)
  mov    $0x4,%esi
  mov    %rdx,0x10(%rsp)
  mov    %rcx,0x18(%rsp)
  call   <readbufferfix@plt>
  cmp    $0x50474e54,%eax
  je     L163
L373:
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x78,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L163:
  lea    0x4(%rbx),%rdi
  mov    $0x4,%esi
  call   <readbufferfix@plt>
  lea    0x8(%rbx),%rdi
  mov    $0x4,%esi
  mov    %eax,0x3c(%rsp)
  mov    %rax,%r13
  call   <readbufferfix@plt>
  lea    0xc(%rbx),%rdi
  mov    $0x4,%esi
  mov    %rax,0x30(%rsp)
  mov    %rax,%rbp
  mov    %eax,0x68(%rsp)
  call   <readbufferfix@plt>
  lea    0x10(%rbx),%rdi
  mov    $0x4,%esi
  mov    %rax,0x20(%rsp)
  call   <readbufferfix@plt>
  lea    0x14(%rbx),%rdi
  mov    $0x4,%esi
  mov    %rax,%r14
  call   <readbufferfix@plt>
  lea    0x18(%rbx),%rdi
  mov    $0x4,%esi
  mov    %rax,0x40(%rsp)
  call   <readbufferfix@plt>
  lea    0x1c(%rbx),%rdi
  mov    $0x4,%esi
  mov    %rax,0x50(%rsp)
  call   <readbufferfix@plt>
  mov    $0x4,%esi
  lea    0x20(%rbx),%rdi
  mov    %rax,(%r12)
  call   <readbufferfix@plt>
  mov    %ebp,%edx
  imul   %r13d,%edx
  mov    %rax,(%r15)
  lea    (%rdx,%rdx,2),%edi
  mov    %edx,0x58(%rsp)
  shl    $0x2,%edi
  call   <malloc@plt>
  lea    0x24(%rbx),%rdi
  mov    $0x4,%esi
  mov    %rax,%rbp
  call   <readbufferfix@plt>
  mov    %rax,0x60(%rsp)
  xor    %eax,%eax
  call   <Ptngc_coder_init@plt>
  sub    $0x8,%rsp
  lea    0x28(%rbx),%rsi
  mov    %r14d,%r9d
  lea    0x0(%r13,%r13,2),%edx
  mov    %rax,%rdi
  mov    %edx,0x50(%rsp)
  mov    %edx,%ecx
  mov    %rbp,%rdx
  push   %r13
  mov    0x30(%rsp),%r8d
  mov    %rax,0x38(%rsp)
  call   <Ptngc_unpack_array@plt>
  mov    0x38(%rsp),%rdi
  mov    %eax,%r14d
  call   <Ptngc_coder_deinit@plt>
  pop    %rcx
  pop    %rsi
  test   %r14d,%r14d
  jne    L373
  mov    0x20(%rsp),%rcx
  cmp    $0xa,%ecx
  ja     L330
  mov    $0x1,%eax
  shl    %cl,%rax
  test   $0x4a0,%eax
  jne    L108
  test   $0x208,%eax
  jne    L93
L330:
  cmpl   $0x1,0x30(%rsp)
  jle    L373
  xor    %eax,%eax
  call   <Ptngc_coder_init@plt>
  sub    $0x8,%rsp
  mov    %rax,%rdi
  mov    0x38(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x74(%rsp)
  mov    0x60(%rsp),%eax
  sub    %r13d,%eax
  lea    (%rax,%rax,2),%r11d
  movslq 0x50(%rsp),%rax
  mov    %r11d,%ecx
  mov    %rax,0x50(%rsp)
  shl    $0x2,%rax
  mov    %rax,0x60(%rsp)
  lea    0x0(%rbp,%rax,1),%r10
  mov    0x68(%rsp),%eax
  push   %r13
  mov    0x60(%rsp),%r9d
  mov    %r10,%rdx
  add    $0x2c,%eax
  cltq
  lea    (%rbx,%rax,1),%rsi
  mov    0x50(%rsp),%rbx
  mov    %r11d,0x40(%rsp)
  mov    %r10,0x38(%rsp)
  mov    %ebx,%r8d
  mov    %rdi,0x30(%rsp)
  call   <Ptngc_unpack_array@plt>
  mov    0x30(%rsp),%rdi
  mov    %eax,%r14d
  call   <Ptngc_coder_deinit@plt>
  pop    %rax
  pop    %rdx
  test   %r14d,%r14d
  jne    L373
  mov    %ebx,%eax
  sub    $0x1,%eax
  cmp    $0x1,%eax
  jbe    L216
  cmp    $0x8,%ebx
  mov    0x28(%rsp),%r10
  mov    0x30(%rsp),%r11d
  je     L216
  mov    0x40(%rsp),%rcx
  cmp    $0xa,%ecx
  ja     L373
  mov    $0x1,%eax
  shl    %cl,%rax
  test   $0x4a0,%eax
  jne    L260
  test   $0x208,%eax
  je     L373
  mov    0x8(%rsp),%rbx
  test   %rbx,%rbx
  je     L230
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  mov    %r10,0x8(%rsp)
  call   <Ptngc_i32x2_to_d@plt>
  mov    0x8(%rsp),%r8
  mov    0x6c(%rsp),%edx
  mov    %rax,%rcx
  mov    0x48(%rsp),%rax
  mov    0x3c(%rsp),%esi
  lea    (%rbx,%rax,8),%rdi
  call   <unquantize_intra_differences@plt>
  jmp    L373
  nop
L93:
  cmpq   $0x0,0x8(%rsp)
  je     L58
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  call   <Ptngc_i32x2_to_d@plt>
  mov    0x3c(%rsp),%esi
  mov    0x8(%rsp),%rdi
  mov    %rbp,%r8
  mov    %rax,%rcx
  mov    $0x1,%edx
  call   <unquantize_intra_differences@plt>
L315:
  mov    0x3c(%rsp),%esi
  mov    %rbp,%rdi
  call   <unquant_intra_differences_first_frame@plt>
  jmp    L330
  xchg   %ax,%ax
L108:
  cmpq   $0x0,0x8(%rsp)
  je     L374
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  call   <Ptngc_i32x2_to_d@plt>
  mov    0x3c(%rsp),%esi
  mov    0x8(%rsp),%rdi
  mov    %rbp,%r8
  mov    %rax,%rcx
  mov    $0x1,%edx
  call   <unquantize@plt>
  jmp    L330
  nopw   0x0(%rax,%rax,1)
L58:
  cmpq   $0x0,0x10(%rsp)
  je     L22
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  call   <Ptngc_i32x2_to_d@plt>
  pxor   %xmm0,%xmm0
  mov    0x3c(%rsp),%esi
  mov    %rbp,%rcx
  cvtsi2ss %rax,%xmm0
  mov    0x10(%rsp),%rdi
  mov    $0x1,%edx
  call   <unquantize_intra_differences_float@plt>
  jmp    L315
  nopl   0x0(%rax)
L374:
  cmpq   $0x0,0x10(%rsp)
  je     L269
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  call   <Ptngc_i32x2_to_d@plt>
  pxor   %xmm0,%xmm0
  mov    0x3c(%rsp),%esi
  mov    %rbp,%rcx
  cvtsi2ss %rax,%xmm0
  mov    0x10(%rsp),%rdi
  mov    $0x1,%edx
  call   <unquantize_float@plt>
  jmp    L330
  nopl   0x0(%rax)
L216:
  mov    0x8(%rsp),%rbx
  test   %rbx,%rbx
  je     L324
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  call   <Ptngc_i32x2_to_d@plt>
  mov    0x68(%rsp),%edx
  mov    0x3c(%rsp),%esi
  mov    %rbp,%r8
  mov    %rax,%rcx
  mov    %rbx,%rdi
  call   <unquantize_inter_differences@plt>
  jmp    L373
  nopl   (%rax)
L22:
  mov    0x18(%rsp),%rax
  test   %rax,%rax
  je     L315
  mov    0x3c(%rsp),%esi
  mov    %rbp,%rcx
  mov    $0x1,%edx
  mov    %rax,%rdi
  call   <unquantize_intra_differences_int@plt>
  jmp    L315
  nopw   0x0(%rax,%rax,1)
L269:
  mov    0x18(%rsp),%rdi
  test   %rdi,%rdi
  je     L330
  mov    0x48(%rsp),%eax
  mov    %rbp,%rsi
  lea    0x0(,%rax,4),%edx
  call   <memcpy@plt>
  jmp    L330
  cs nopw 0x0(%rax,%rax,1)
L324:
  mov    0x10(%rsp),%rbx
  test   %rbx,%rbx
  je     L237
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  call   <Ptngc_i32x2_to_d@plt>
  pxor   %xmm0,%xmm0
  mov    0x68(%rsp),%edx
  mov    %rbp,%rcx
  cvtsi2ss %rax,%xmm0
  mov    0x3c(%rsp),%esi
  mov    %rbx,%rdi
  call   <unquantize_inter_differences_float@plt>
  jmp    L373
L260:
  mov    0x8(%rsp),%rbx
  test   %rbx,%rbx
  je     L9
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  mov    %r10,0x8(%rsp)
  call   <Ptngc_i32x2_to_d@plt>
  mov    0x8(%rsp),%r8
  mov    0x6c(%rsp),%edx
  mov    %rax,%rcx
  mov    0x48(%rsp),%rax
  mov    0x3c(%rsp),%esi
  lea    (%rbx,%rax,8),%rdi
  call   <unquantize@plt>
  jmp    L373
L237:
  mov    0x18(%rsp),%rax
  test   %rax,%rax
  je     L373
  mov    0x68(%rsp),%edx
  mov    0x3c(%rsp),%esi
  mov    %rbp,%rcx
  mov    %rax,%rdi
  call   <unquantize_inter_differences_int@plt>
  jmp    L373
L230:
  mov    0x10(%rsp),%rbx
  test   %rbx,%rbx
  je     L73
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  mov    %r10,0x8(%rsp)
  call   <Ptngc_i32x2_to_d@plt>
  pxor   %xmm0,%xmm0
  add    0x58(%rsp),%rbx
  mov    0x8(%rsp),%rcx
  cvtsi2ss %rax,%xmm0
  mov    0x6c(%rsp),%edx
  mov    0x3c(%rsp),%esi
  mov    %rbx,%rdi
  call   <unquantize_intra_differences_float@plt>
  jmp    L373
L9:
  mov    0x10(%rsp),%rbx
  test   %rbx,%rbx
  je     L276
  mov    (%r12),%rsi
  mov    (%r15),%rdi
  mov    %r10,0x8(%rsp)
  call   <Ptngc_i32x2_to_d@plt>
  pxor   %xmm0,%xmm0
  add    0x58(%rsp),%rbx
  mov    0x8(%rsp),%rcx
  cvtsi2ss %rax,%xmm0
  mov    0x6c(%rsp),%edx
  mov    0x3c(%rsp),%esi
  mov    %rbx,%rdi
  call   <unquantize_float@plt>
  jmp    L373
L73:
  mov    0x18(%rsp),%rax
  test   %rax,%rax
  je     L373
  add    0x58(%rsp),%rax
  mov    0x6c(%rsp),%edx
  mov    %r10,%rcx
  mov    0x3c(%rsp),%esi
  mov    %rax,%rdi
  call   <unquantize_intra_differences_int@plt>
  jmp    L373
L276:
  mov    0x18(%rsp),%rax
  test   %rax,%rax
  je     L373
  add    0x58(%rsp),%rax
  lea    0x0(,%r11,4),%edx
  mov    %r10,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  jmp    L373
```

assistant: ```c
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;
}
```