user: 请从给定的汇编指令推导出C源代码:

```asm
<bi_bi2str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x430,%rsp
  mov    %rdi,-0x418(%rbp)
  mov    %esi,-0x41c(%rbp)
  mov    %rdx,-0x428(%rbp)
  mov    %ecx,-0x420(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0xa,-0x420(%rbp)
  jne    L39
  movl   $0x0,-0x408(%rbp)
  jmp    L68
L151:
  mov    -0x408(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x428(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x408(%rbp),%eax
  cltq
  mov    %rdx,-0x3f0(%rbp,%rax,8)
  addl   $0x1,-0x408(%rbp)
L68:
  mov    -0x408(%rbp),%eax
  cmp    -0x41c(%rbp),%eax
  jl     L151
  movl   $0x0,-0x408(%rbp)
  jmp    L124
L73:
  mov    -0x420(%rbp),%edx
  lea    -0x3f0(%rbp),%rcx
  mov    -0x41c(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <bi_mod1@plt>
  add    $0x30,%eax
  mov    %al,-0x409(%rbp)
  mov    -0x408(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x418(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x409(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x420(%rbp),%edx
  lea    -0x3f0(%rbp),%rcx
  mov    -0x41c(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <bi_div1@plt>
  mov    %eax,-0x41c(%rbp)
  addl   $0x1,-0x408(%rbp)
L124:
  cmpl   $0x0,-0x41c(%rbp)
  jle    L191
  mov    -0x41c(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x3f0(%rbp,%rax,8),%rax
  test   %rax,%rax
  jne    L73
  jmp    L191
L39:
  cmpl   $0x10,-0x420(%rbp)
  jne    L188
  movl   $0x0,-0x3fc(%rbp)
  movl   $0x0,-0x408(%rbp)
  mov    -0x41c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x400(%rbp)
  jmp    L171
L55:
  movl   $0x7,-0x404(%rbp)
  jmp    L169
L174:
  mov    -0x400(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x428(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x404(%rbp),%eax
  shl    $0x2,%eax
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0xf,%eax
  mov    %rax,-0x3f8(%rbp)
  cmpl   $0x0,-0x3fc(%rbp)
  jne    L59
  cmpq   $0x0,-0x3f8(%rbp)
  je     L59
  movl   $0x1,-0x3fc(%rbp)
L59:
  cmpl   $0x0,-0x3fc(%rbp)
  je     L155
  cmpq   $0x9,-0x3f8(%rbp)
  ja     L115
  mov    -0x3f8(%rbp),%rax
  add    $0x30,%eax
  mov    %al,-0x409(%rbp)
  jmp    L93
L115:
  mov    -0x3f8(%rbp),%rax
  add    $0x57,%eax
  mov    %al,-0x409(%rbp)
L93:
  mov    -0x408(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x418(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x409(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x408(%rbp)
  jmp    L46
L155:
  nop
L46:
  subl   $0x1,-0x404(%rbp)
L169:
  cmpl   $0x0,-0x404(%rbp)
  jns    L174
  subl   $0x1,-0x400(%rbp)
L171:
  cmpl   $0x0,-0x400(%rbp)
  jns    L55
  jmp    L191
L188:
  mov    -0x420(%rbp),%eax
  mov    %eax,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L191:
  mov    -0x408(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x418(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x408(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L44
  call   <__stack_chk_fail@plt>
L44:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D0
data_type: string

tool: D0: Error: invalid system: %d, quit


assistant: ```c
int bi_bi2str(char *str, int a_len, unsigned long *a_data, const unsigned int system) {
  unsigned long data[125];
  int i;
  char ch;
  if (system == 10) {
    for (i = 0; i < a_len; i++)
      data[i] = a_data[i];
    i = 0;
    while (a_len > 0 && data[a_len - 1] > 0) {
      ch = (char)bi_mod1(a_len, data, system) + 48;
      str[i] = ch;
      a_len = bi_div1(a_len, data, system);
      i++;
    }
  } else if (system == 16) {
    int j, k;
    int start = 0;
    unsigned long d;
    i = 0;
    for (k = a_len - 1; k >= 0; k--) {
      for (j = 7; j >= 0; j--) {
        d = (a_data[k] >> (j * 4)) & 0xf;
        if (!start && d != 0)
          start = 1;
        if (!start)
          continue;
        if (d < 10)
          ch = d + 48;
        else
          ch = d - 10 + 97;
        str[i] = ch;
        i++;
      }
    }
  } else {
    printf("Error: invalid system: %d, quit\n", system);
    exit(-1);
  }
  str[i] = 0;
  return i;
}
```