user: 下面的汇编指令对应的C源代码是什么:

```asm
<fits_rdecomp_byte>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %rdx,0x20(%rsp)
  mov    %ecx,%r15d
  mov    %r8d,0x1c(%rsp)
  cmpq   $0x0,D14(%rip)
  je     L348
L51:
  movzbl (%rbx),%edi
  movslq %ebp,%rbp
  lea    (%rbx,%rbp,1),%rax
  mov    %rax,0x10(%rsp)
  lea    0x2(%rbx),%rax
  movzbl 0x1(%rbx),%edx
  mov    D14(%rip),%r14
  mov    $0x8,%esi
  mov    $0x0,%r13d
  mov    $0x1,%r11d
  mov    0x20(%rsp),%rbx
  add    $0x1,%rbx
  mov    %rbx,0x28(%rsp)
  mov    %r15d,%ebp
  jmp    L360
L348:
  mov    $0x400,%edi
  call   <malloc@plt>
  mov    %rax,%r8
  mov    %rax,D18(%rip)
  mov    $0x8,%ecx
  mov    $0x80,%esi
  mov    $0xff,%edi
  lea    -0x4(%rax),%r9
  test   %rax,%rax
  jne    L207
  lea    D18(%rip),%rdi
  call   <ffpmsg@plt>
  mov    $0x1,%edx
  jmp    L291
L303:
  movslq %edi,%rdx
  shl    $0x2,%rdx
  lea    (%rdx,%r8,1),%rax
  mov    %esi,%r10d
  add    %r9,%rdx
  sub    %esi,%edi
  shl    $0x2,%rdi
  sub    %rdi,%rdx
L58:
  mov    %ecx,(%rax)
  sub    $0x4,%rax
  cmp    %rdx,%rax
  jne    L58
  lea    -0x1(%r10),%edi
L192:
  mov    %esi,%eax
  shr    $0x1f,%eax
  add    %esi,%eax
  sar    %eax
  mov    %eax,%esi
  sub    $0x1,%ecx
  test   %edi,%edi
  js     L51
L207:
  cmp    %esi,%edi
  jge    L303
  jmp    L192
L118:
  mov    %ecx,%esi
  mov    %rax,%r8
  jmp    L47
L12:
  cmp    %r10d,%r13d
  jge    L227
  movslq %r13d,%rcx
  mov    0x20(%rsp),%rax
  add    %rcx,%rax
  add    0x28(%rsp),%rcx
  mov    %r10d,%r9d
  sub    %r13d,%r9d
  lea    -0x1(%r9),%r9d
  add    %r9,%rcx
L110:
  mov    %dil,(%rax)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L110
  mov    %r10d,%r13d
  mov    %r8,%rax
  jmp    L263
L215:
  cmp    %r10d,%r13d
  jge    L160
  movslq %r13d,%rbx
  mov    0x20(%rsp),%rax
  lea    (%rax,%rbx,1),%r9
  add    0x28(%rsp),%rbx
  mov    %r10d,%eax
  sub    %r13d,%eax
  lea    -0x1(%rax),%eax
  add    %rax,%rbx
  mov    %esi,%r13d
  neg    %r13d
  mov    %r13d,%eax
  shr    $0x3,%eax
  add    $0x1,%eax
  mov    %eax,%eax
  test   %esi,%esi
  mov    $0x1,%ecx
  cmovg  %rcx,%rax
  mov    %rax,0x8(%rsp)
  mov    %r8,%rax
  mov    $0x8,%r12d
  sub    %esi,%r12d
L96:
  mov    %r12d,%ecx
  shl    %cl,%edx
  mov    %edx,%r15d
  test   %esi,%esi
  jg     L128
  mov    %r13d,%ecx
  mov    %rax,%r8
L205:
  add    $0x1,%r8
  movzbl -0x1(%r8),%edx
  shl    %cl,%edx
  or     %edx,%r15d
  sub    $0x8,%ecx
  jns    L205
  add    0x8(%rsp),%rax
  mov    $0x0,%edx
L60:
  mov    %r15d,%r8d
  shr    %r8d
  mov    %r8d,%ecx
  not    %ecx
  test   $0x1,%r15b
  cmove  %r8d,%ecx
  add    %edi,%ecx
  mov    %cl,(%r9)
  movzbl %cl,%edi
  add    $0x1,%r9
  cmp    %rbx,%r9
  jne    L96
  mov    %r10d,%r13d
  jmp    L263
L331:
  add    $0x8,%esi
  add    $0x1,%rax
  movzbl -0x1(%rax),%edx
  test   %edx,%edx
  je     L331
L22:
  mov    %edx,%ecx
  mov    %esi,%r8d
  sub    (%r14,%rcx,4),%r8d
  lea    0x1(%r8),%ecx
  sub    %ecx,%esi
  btc    %esi,%edx
  sub    %ebx,%esi
  jns    L64
  mov    %esi,%r13d
  not    %r13d
  shr    $0x3,%r13d
  lea    0x1(%r13),%ecx
  mov    %ecx,%ecx
  add    %rax,%rcx
L206:
  shl    $0x8,%edx
  add    $0x1,%rax
  movzbl -0x1(%rax),%r15d
  or     %r15d,%edx
  cmp    %rcx,%rax
  jne    L206
  lea    0x8(%rsi,%r13,8),%esi
  mov    %rcx,%rax
L64:
  mov    %ebx,%ecx
  shl    %cl,%r8d
  mov    %edx,%r15d
  mov    %esi,%ecx
  shr    %cl,%r15d
  or     %r15d,%r8d
  mov    %r11d,%r15d
  shl    %cl,%r15d
  mov    %r15d,%ecx
  sub    $0x1,%ecx
  and    %ecx,%edx
  mov    %r8d,%r13d
  shr    %r13d
  mov    %r13d,%ecx
  not    %ecx
  test   $0x1,%r8b
  cmove  %r13d,%ecx
  add    %edi,%ecx
  mov    %cl,(%r9)
  movzbl %cl,%edi
  add    $0x1,%r9
  cmp    %r12,%r9
  je     L171
L17:
  test   %edx,%edx
  je     L331
  jmp    L22
L227:
  mov    %r8,%rax
  jmp    L263
L306:
  mov    %r8,%rax
  jmp    L263
L160:
  mov    %r8,%rax
  jmp    L263
L171:
  mov    %r10d,%r13d
L263:
  cmp    0x10(%rsp),%rax
  ja     L59
L360:
  cmp    %ebp,%r13d
  jge    L294
  mov    %esi,%ecx
  sub    $0x3,%ecx
  jns    L118
  mov    $0x2,%ecx
  sub    %esi,%ecx
  shr    $0x3,%ecx
  lea    0x1(%rcx),%r8d
  mov    %r8d,%r8d
  add    %rax,%r8
L199:
  shl    $0x8,%edx
  add    $0x1,%rax
  movzbl -0x1(%rax),%r9d
  or     %r9d,%edx
  cmp    %r8,%rax
  jne    L199
  lea    0x5(%rsi,%rcx,8),%esi
L47:
  mov    %edx,%ebx
  mov    %esi,%ecx
  shr    %cl,%ebx
  mov    %r11d,%eax
  shl    %cl,%eax
  sub    $0x1,%eax
  mov    %eax,0x18(%rsp)
  and    %eax,%edx
  mov    0x1c(%rsp),%eax
  lea    0x0(%r13,%rax,1),%r10d
  cmp    %ebp,%r10d
  cmovg  %ebp,%r10d
  sub    $0x1,%ebx
  js     L12
  cmp    $0x6,%ebx
  je     L215
  cmp    %r10d,%r13d
  jge    L306
  movslq %r13d,%r12
  mov    0x20(%rsp),%rax
  lea    (%rax,%r12,1),%r9
  add    0x28(%rsp),%r12
  mov    %r10d,%eax
  sub    %r13d,%eax
  lea    -0x1(%rax),%eax
  add    %rax,%r12
  mov    %r8,%rax
  jmp    L17
L59:
  lea    D30(%rip),%rdi
  call   <ffpmsg@plt>
  mov    $0x1,%edx
L291:
  mov    %edx,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L294:
  mov    $0x0,%edx
  cmp    0x10(%rsp),%rax
  jae    L291
  lea    D22(%rip),%rdi
  call   <ffpmsg@plt>
  mov    $0x0,%edx
  jmp    L291
L128:
  movzbl (%rax),%edx
  mov    %edx,%r8d
  mov    %esi,%ecx
  shr    %cl,%r8d
  or     %r8d,%r15d
  and    0x18(%rsp),%edx
  lea    0x1(%rax),%rax
  jmp    L60
```

tool_calls: name: read_data
arguments: label: D18
datatype: string
name: read_data
arguments: label: D30
datatype: string
name: read_data
arguments: label: D22
datatype: string

tool: D18: rdecomp: insufficient memory

tool: D30: decompression error: hit end of compressed byte stream

tool: D22: decompression warning: unused bytes at end of compressed buffer

assistant: ```c
int fits_rdecomp_byte(unsigned char *c, int clen, unsigned char array[], int nx, int nblock) {
  int i, imax;
  int k;
  int nbits, nzero, fs;
  unsigned char *cend;
  unsigned int b, diff, lastpix;
  int fsmax, fsbits, bbits;
  static int *nonzero_count = (int *)NULL;
  fsbits = 3;
  fsmax = 6;
  bbits = 1 << fsbits;
  ;
  if (nonzero_count == (int *)NULL) {
    nonzero_count = (int *)malloc(256 * sizeof(int));
    if (nonzero_count == (int *)NULL) {
      ffpmsg("rdecomp: insufficient memory");
      ;
      return 1;
    }
    nzero = 8;
    k = 128;
    for (i = 255; i >= 0;) {
      for (; i >= k; i--)
        nonzero_count[i] = nzero;
      k = k / 2;
      nzero--;
    }
  };
  lastpix = c[0];
  c += 1;
  cend = c + clen - 1;
  b = *c++;
  nbits = 8;
  for (i = 0; i < nx;) {
    nbits -= fsbits;
    while (nbits < 0) {
      b = (b << 8) | (*c++);
      nbits += 8;
    }
    fs = (b >> nbits) - 1;
    b &= (1 << nbits) - 1;
    imax = i + nblock;
    if (imax > nx)
      imax = nx;
    if (fs < 0) {
      for (; i < imax; i++)
        array[i] = lastpix;
    } else if (fs == fsmax) {
      for (; i < imax; i++) {
        k = bbits - nbits;
        diff = b << k;
        for (k -= 8; k >= 0; k -= 8) {
          b = *c++;
          diff |= b << k;
        }
        if (nbits > 0) {
          b = *c++;
          diff |= b >> (-k);
          b &= (1 << nbits) - 1;
        } else {
          b = 0;
        }
        if ((diff & 1) == 0) {
          diff = diff >> 1;
        } else {
          diff = ~(diff >> 1);
        }
        array[i] = diff + lastpix;
        lastpix = array[i];
      }
    } else {
      for (; i < imax; i++) {
        while (b == 0) {
          nbits += 8;
          b = *c++;
        }
        nzero = nbits - nonzero_count[b];
        nbits -= nzero + 1;
        b ^= 1 << nbits;
        nbits -= fs;
        while (nbits < 0) {
          b = (b << 8) | (*c++);
          nbits += 8;
        }
        diff = (nzero << fs) | (b >> nbits);
        b &= (1 << nbits) - 1;
        if ((diff & 1) == 0) {
          diff = diff >> 1;
        } else {
          diff = ~(diff >> 1);
        }
        array[i] = diff + lastpix;
        lastpix = array[i];
      }
    }
    if (c > cend) {
      ffpmsg("decompression error: hit end of compressed byte stream");
      return 1;
    }
  }
  if (c < cend) {
    ffpmsg("decompression warning: unused bytes at end of compressed buffer");
  }
  return 0;
}
```