user: 请将以下的汇编代码转换成C语言代码:

```asm
<inflate>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x690,%rsp
  mov    %rdi,-0x678(%rbp)
  mov    %rsi,-0x680(%rbp)
  mov    %rdx,-0x688(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L231:
  mov    -0x680(%rbp),%rcx
  mov    -0x678(%rbp),%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <read_bits@plt>
  mov    %al,-0x663(%rbp)
  mov    -0x680(%rbp),%rcx
  mov    -0x678(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <read_bits@plt>
  mov    %al,-0x662(%rbp)
  cmpb   $0x1,-0x662(%rbp)
  je     L185
  cmpb   $0x2,-0x662(%rbp)
  jne    L99
L185:
  cmpb   $0x2,-0x662(%rbp)
  jne    L202
  lea    -0x650(%rbp),%r8
  lea    -0x150(%rbp),%rdi
  lea    -0x5d0(%rbp),%rcx
  lea    -0x130(%rbp),%rdx
  mov    -0x680(%rbp),%rsi
  mov    -0x678(%rbp),%rax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <get_tables@plt>
  test   %rax,%rax
  jns    L164
  mov    $0xffffffff,%eax
  jmp    L112
L202:
  movl   $0x0,-0x660(%rbp)
  jmp    L153
L199:
  mov    -0x660(%rbp),%eax
  cltq
  movb   $0x8,-0x130(%rbp,%rax,1)
  addl   $0x1,-0x660(%rbp)
L153:
  cmpl   $0x8f,-0x660(%rbp)
  jle    L199
  jmp    L211
L107:
  mov    -0x660(%rbp),%eax
  cltq
  movb   $0x9,-0x130(%rbp,%rax,1)
  addl   $0x1,-0x660(%rbp)
L211:
  cmpl   $0xff,-0x660(%rbp)
  jle    L107
  jmp    L233
L40:
  mov    -0x660(%rbp),%eax
  cltq
  movb   $0x7,-0x130(%rbp,%rax,1)
  addl   $0x1,-0x660(%rbp)
L233:
  cmpl   $0x117,-0x660(%rbp)
  jle    L40
  jmp    L230
L32:
  mov    -0x660(%rbp),%eax
  cltq
  movb   $0x8,-0x130(%rbp,%rax,1)
  addl   $0x1,-0x660(%rbp)
L230:
  cmpl   $0x11f,-0x660(%rbp)
  jle    L32
  lea    -0x5d0(%rbp),%rdx
  lea    -0x130(%rbp),%rax
  mov    $0xf,%ecx
  mov    $0x120,%esi
  mov    %rax,%rdi
  call   <make_code_table@plt>
  movl   $0x0,-0x660(%rbp)
  jmp    L246
L92:
  mov    -0x660(%rbp),%eax
  cltq
  movb   $0x5,-0x150(%rbp,%rax,1)
  addl   $0x1,-0x660(%rbp)
L246:
  cmpl   $0x1d,-0x660(%rbp)
  jle    L92
  lea    -0x650(%rbp),%rdx
  lea    -0x150(%rbp),%rax
  mov    $0xf,%ecx
  mov    $0x1e,%esi
  mov    %rax,%rdi
  call   <make_code_table@plt>
L164:
  lea    -0x650(%rbp),%r8
  lea    -0x150(%rbp),%rdi
  lea    -0x5d0(%rbp),%rcx
  lea    -0x130(%rbp),%rdx
  mov    -0x680(%rbp),%rsi
  mov    -0x678(%rbp),%rax
  sub    $0x8,%rsp
  push   -0x688(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <get_data@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L191
  mov    $0xffffffff,%eax
  jmp    L112
L99:
  cmpb   $0x0,-0x662(%rbp)
  jne    L69
  mov    -0x680(%rbp),%rax
  mov    (%rax),%rax
  add    $0x7,%rax
  lea    0x7(%rax),%rdx
  test   %rax,%rax
  cmovs  %rdx,%rax
  sar    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x680(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x680(%rbp),%rcx
  mov    -0x678(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <read_bits@plt>
  mov    %eax,-0x658(%rbp)
  mov    -0x680(%rbp),%rcx
  mov    -0x678(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <read_bits@plt>
  mov    %eax,-0x654(%rbp)
  movl   $0x0,-0x65c(%rbp)
  jmp    L56
L165:
  mov    -0x680(%rbp),%rcx
  mov    -0x678(%rbp),%rax
  mov    $0x8,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <read_bits@plt>
  mov    %al,-0x661(%rbp)
  movzbl -0x661(%rbp),%eax
  mov    %eax,%edi
  call   <pushout@plt>
  movzbl -0x661(%rbp),%eax
  mov    -0x688(%rbp),%rdx
  mov    %eax,%edi
  call   *%rdx
  addl   $0x1,-0x65c(%rbp)
L56:
  mov    -0x65c(%rbp),%eax
  cmp    -0x658(%rbp),%eax
  jb     L165
  jmp    L191
L69:
  mov    $0xffffffff,%eax
  jmp    L112
L191:
  cmpb   $0x0,-0x663(%rbp)
  jne    L19
  jmp    L231
L19:
  mov    $0x0,%eax
L112:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L137
  call   <__stack_chk_fail@plt>
L137:
  leave
  ret
```

assistant: ```c
int inflate(const unsigned char *data, long *p, void (*callback)(unsigned char d)) {
  char blast, btype;
  char hlit_size_table[288];
  unsigned int hlit_code_table[288];
  char hdist_size_table[30];
  unsigned int hdist_code_table[30];
again:
  blast = read_bits(data, p, 1);
  btype = read_bits(data, p, 2);
  if (btype == 1 || btype == 2) {
    if (btype == 2) {
      if (get_tables(data, p, hlit_size_table, hlit_code_table, hdist_size_table, hdist_code_table) < 0)
        return -1;
    } else {
      int j;
      for (j = 0; j < 144; j++)
        hlit_size_table[j] = 8;
      for (; j < 256; j++)
        hlit_size_table[j] = 9;
      for (; j < 280; j++)
        hlit_size_table[j] = 7;
      for (; j < 288; j++)
        hlit_size_table[j] = 8;
      make_code_table(hlit_size_table, 288, hlit_code_table, 15);
      for (j = 0; j < 30; j++)
        hdist_size_table[j] = 5;
      make_code_table(hdist_size_table, 30, hdist_code_table, 15);
    }
    if (get_data(data, p, hlit_size_table, hlit_code_table, hdist_size_table, hdist_code_table, callback) < 0)
      return -1;
    ;
  } else if (btype == 0) {
    unsigned int len, nlen;
    unsigned int l;
    unsigned char b;
    *p = (*p + 7) / 8;
    len = read_bits(data, p, 16);
    nlen = read_bits(data, p, 16);
    for (l = 0; l < len; l++) {
      b = read_bits(data, p, 8);
      pushout(b);
      callback(b);
    }
  } else {
    return -1;
  }
  if (!blast)
    goto again;
  return 0;
}
```