user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<ascii2int>:
  endbr64
  push   %r15
  mov    $0x1000,%edx
  push   %r14
  push   %r13
  push   %r12
  lea    D7(%rip),%r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %r12,%rdi
  push   %rbx
  mov    %rsi,%rbx
  xor    %esi,%esi
  sub    $0x8,%rsp
  call   <memset@plt>
  xor    %edx,%edx
  test   %rbx,%rbx
  je     L58
  xor    %r13d,%r13d
  xor    %eax,%eax
  lea    D18(%rip),%r14
  jmp    L31
  nopw   0x0(%rax,%rax,1)
L106:
  cmp    $0xa,%sil
  je     L78
  cmp    $0x9,%sil
  je     L0
  cmp    $0x1f,%sil
  jg     L127
  mov    %edx,%r9d
  movsbl %sil,%edi
  movb   $0x5c,(%r12,%r9,1)
  cmp    $0x9,%sil
  jle    L11
  movslq %edi,%rsi
  mov    %edi,%r9d
  imul   $0x66666667,%rsi,%rsi
  sar    $0x1f,%r9d
  sar    $0x22,%rsi
  sub    %r9d,%esi
  lea    (%rsi,%rsi,4),%r9d
  mov    %edi,%esi
  add    %r9d,%r9d
  sub    %r9d,%esi
  lea    0x30(%rsi),%r9d
  imul   $0xfffffff6,%esi,%esi
  mov    %r9b,(%r12,%rcx,1)
  lea    0x2(%rdx),%ecx
  add    %esi,%edi
L11:
  add    $0x30,%edi
  lea    0x1(%rcx),%r15d
  mov    %dil,(%r12,%rcx,1)
  nop
L28:
  mov    %r15d,%edx
  lea    0x2(%r15),%edi
  mov    $0x1000,%esi
  movb   $0x20,(%r12,%rdx,1)
  lea    0x1(%r15),%edx
  sub    %edi,%esi
  add    %r12,%rdi
  movb   $0x28,(%r12,%rdx,1)
  movsbl (%rax),%ecx
  mov    %r14,%rdx
  call   <snprintf@plt>
  lea    0x5(%r15),%eax
  lea    0x7(%r15),%edx
  movb   $0x29,(%r12,%rax,1)
  lea    0x6(%r15),%eax
  movb   $0x20,(%r12,%rax,1)
  cmp    $0xfec,%edx
  ja     L58
  lea    0x1(%r13),%eax
  mov    %rax,%r13
  cmp    %rbx,%rax
  jae    L58
L31:
  add    %rbp,%rax
  lea    0x1(%rdx),%ecx
  movzbl (%rax),%esi
  cmp    $0xd,%sil
  jne    L106
  mov    %edx,%esi
  lea    0x2(%rdx),%r15d
  movb   $0x5c,(%r12,%rsi,1)
  movb   $0x72,(%r12,%rcx,1)
  jmp    L28
  nopl   0x0(%rax)
L78:
  mov    %edx,%esi
  lea    0x2(%rdx),%r15d
  movb   $0x5c,(%r12,%rsi,1)
  movb   $0x6e,(%r12,%rcx,1)
  jmp    L28
  nopl   (%rax)
L0:
  mov    %edx,%esi
  lea    0x2(%rdx),%r15d
  movb   $0x5c,(%r12,%rsi,1)
  movb   $0x74,(%r12,%rcx,1)
  jmp    L28
  nopl   (%rax)
L127:
  mov    %sil,(%r12,%rdx,1)
  mov    %ecx,%r15d
  jmp    L28
  nopl   0x0(%rax)
L58:
  movb   $0x0,(%r12,%rdx,1)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: tag: D18
type_infered: string

tool: D18: %3d

assistant: ```c
char *ascii2int(const char *string, size_t len) {
  static char buffer[4096];
  unsigned int idx, bufIdx = 0;
  memset(buffer, 0, sizeof(buffer));
  for (idx = 0; idx < len; ++idx) {
    if (string[idx] == '\r') {
      buffer[bufIdx++] = '\\';
      buffer[bufIdx++] = 'r';
    } else if (string[idx] == '\n') {
      buffer[bufIdx++] = '\\';
      buffer[bufIdx++] = 'n';
    } else if (string[idx] == '\t') {
      buffer[bufIdx++] = '\\';
      buffer[bufIdx++] = 't';
    } else if (string[idx] < 32) {
      int ascii = string[idx];
      buffer[bufIdx++] = '\\';
      if (ascii > 9) {
        buffer[bufIdx++] = (ascii % 10) + 48;
        ascii -= (ascii % 10) * 10;
      }
      buffer[bufIdx++] = ascii + 48;
    } else
      buffer[bufIdx++] = string[idx];
    buffer[bufIdx++] = ' ';
    buffer[bufIdx++] = '(';
    snprintf(buffer + bufIdx, sizeof(buffer) - bufIdx, "%3d", (unsigned int)string[idx]);
    bufIdx += 3;
    buffer[bufIdx++] = ')';
    buffer[bufIdx++] = ' ';
    if (bufIdx > (sizeof(buffer) - 20))
      break;
  }
  buffer[bufIdx] = '\0';
  return buffer;
}
```