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

```asm
<unstargun>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x8d0,%rsp
  mov    %rdi,-0x8b8(%rbp)
  mov    %rsi,-0x8c0(%rbp)
  mov    %rdx,-0x8c8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x8b0(%rbp)
  movl   $0x0,-0x8ac(%rbp)
  jmp    L89
L79:
  movl   $0x0,-0x8a8(%rbp)
  jmp    L209
L24:
  mov    -0x8a8(%rbp),%eax
  cltq
  mov    -0x8a8(%rbp),%edx
  mov    %edx,-0x810(%rbp,%rax,4)
  addl   $0x1,-0x8a8(%rbp)
L209:
  cmpl   $0xff,-0x8a8(%rbp)
  jle    L24
  movl   $0x0,-0x8a0(%rbp)
L61:
  mov    -0x8b0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8b0(%rbp)
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8a4(%rbp)
  cmpl   $0x7f,-0x8a4(%rbp)
  jle    L125
  mov    -0x8a4(%rbp),%edx
  mov    -0x8a0(%rbp),%eax
  add    %edx,%eax
  sub    $0x7f,%eax
  mov    %eax,-0x8a0(%rbp)
  movl   $0x0,-0x8a4(%rbp)
L125:
  cmpl   $0x100,-0x8a0(%rbp)
  je     L0
  movl   $0x0,-0x8a8(%rbp)
  jmp    L210
L57:
  cmpl   $0xff,-0x8a0(%rbp)
  jbe    L189
  mov    $0xffffffff,%eax
  jmp    L37
L189:
  mov    -0x8b0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8b0(%rbp)
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x894(%rbp)
  mov    -0x8a0(%rbp),%eax
  mov    -0x894(%rbp),%edx
  mov    %edx,-0x810(%rbp,%rax,4)
  mov    -0x894(%rbp),%eax
  cmp    %eax,-0x8a0(%rbp)
  je     L121
  mov    -0x8b0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8b0(%rbp)
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8a0(%rbp),%eax
  mov    %edx,-0x410(%rbp,%rax,4)
L121:
  addl   $0x1,-0x8a0(%rbp)
  addl   $0x1,-0x8a8(%rbp)
L210:
  mov    -0x8a8(%rbp),%eax
  cmp    -0x8a4(%rbp),%eax
  jle    L57
  cmpl   $0xff,-0x8a0(%rbp)
  jbe    L61
  jmp    L213
L0:
  nop
L213:
  mov    -0x8b0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8b0(%rbp)
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x89c(%rbp)
  mov    -0x8b0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8b0(%rbp)
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  or     %eax,-0x89c(%rbp)
  movl   $0x0,-0x898(%rbp)
L126:
  cmpl   $0x0,-0x898(%rbp)
  je     L49
  subl   $0x1,-0x898(%rbp)
  mov    -0x898(%rbp),%eax
  cltq
  mov    -0x890(%rbp,%rax,4),%eax
  mov    %eax,-0x8a4(%rbp)
  jmp    L188
L49:
  subl   $0x1,-0x89c(%rbp)
  cmpl   $0xffffffff,-0x89c(%rbp)
  je     L40
  mov    -0x8b0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8b0(%rbp)
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8a4(%rbp)
L188:
  mov    -0x8a4(%rbp),%eax
  cltq
  mov    -0x810(%rbp,%rax,4),%eax
  cmp    %eax,-0x8a4(%rbp)
  jne    L176
  mov    -0x8ac(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8ac(%rbp)
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8c8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8a4(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L126
L176:
  cmpl   $0x7d,-0x898(%rbp)
  jle    L170
  mov    $0xffffffff,%eax
  jmp    L37
L170:
  mov    -0x898(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x898(%rbp)
  mov    -0x8a4(%rbp),%edx
  movslq %edx,%rdx
  mov    -0x410(%rbp,%rdx,4),%edx
  cltq
  mov    %edx,-0x890(%rbp,%rax,4)
  mov    -0x898(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x898(%rbp)
  mov    -0x8a4(%rbp),%edx
  movslq %edx,%rdx
  mov    -0x810(%rbp,%rdx,4),%edx
  cltq
  mov    %edx,-0x890(%rbp,%rax,4)
  jmp    L126
L40:
  nop
L89:
  mov    -0x8ac(%rbp),%eax
  cmp    %rax,-0x8c0(%rbp)
  ja     L79
  mov    -0x8c0(%rbp),%rax
  mov    %eax,%edx
  mov    -0x8ac(%rbp),%eax
  sub    %edx,%eax
L37:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L190
  call   <__stack_chk_fail@plt>
L190:
  leave
  ret
```

assistant: ```c
unsigned int unstargun(const uint8_t *in, size_t expanded_size, uint8_t *out) {
  uint8_t tableA[256], tableB[256];
  unsigned int inpos = 0;
  unsigned int outpos = 0;
  int i;
  while (outpos < expanded_size) {
    for (i = 0; i < 256; i++)
      tableA[i] = i;
    uint8_t code;
    unsigned int tablepos = 0;
    do {
      code = in[inpos++];
      if (code > 127) {
        tablepos += code - 127;
        code = 0;
      }
      if (tablepos == 256)
        break;
      for (i = 0; i <= code; i++) {
        if (tablepos >= 256)
          return (-1);
        uint8_t data = in[inpos++];
        tableA[tablepos] = data;
        if (tablepos != data) {
          tableB[tablepos] = in[inpos++];
        }
        tablepos++;
      }
    } while (tablepos < 256);
    int len = in[inpos++];
    len |= in[inpos++] << 8;
    int expbufpos = 0;
    uint8_t expbuf[32];
    while (1) {
      if (expbufpos) {
        code = expbuf[--expbufpos];
      } else {
        if (--len == -1)
          break;
        code = in[inpos++];
      }
      if (code == tableA[code]) {
        out[outpos++] = code;
      } else {
        if (expbufpos >= (signed)sizeof(expbuf) - 2)
          return (-1);
        expbuf[expbufpos++] = tableB[code];
        expbuf[expbufpos++] = tableA[code];
      }
    }
  }
  return outpos - expanded_size;
}
```