user: What would the C source look like for the assembly code provided here?

```asm
<itoan>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x28(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L57
  cmpq   $0x0,-0x38(%rbp)
  je     L57
  cmpl   $0x0,-0x28(%rbp)
  je     L57
  cmpl   $0x24,-0x28(%rbp)
  jbe    L38
L57:
  mov    $0x0,%eax
  jmp    L128
L38:
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x8(%rbp)
  cmpl   $0xa,-0x28(%rbp)
  jne    L0
  mov    -0x24(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x30(%rbp),%rax
  mov    %edx,%ecx
  lea    D5(%rip),%rdx
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    -0x30(%rbp),%rax
  jmp    L128
L0:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  movq   $0x0,-0x18(%rbp)
L37:
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L81
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x0,%eax
  jmp    L128
L81:
  mov    -0x1c(%rbp),%eax
  mov    $0x0,%edx
  divl   -0x28(%rbp)
  mov    %edx,%eax
  mov    %al,-0x1d(%rbp)
  cmpb   $0x9,-0x1d(%rbp)
  jg     L80
  movzbl -0x1d(%rbp),%eax
  add    $0x30,%eax
  mov    %al,-0x1d(%rbp)
  jmp    L33
L80:
  movzbl -0x1d(%rbp),%eax
  add    $0x37,%eax
  mov    %al,-0x1d(%rbp)
L33:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x30(%rbp),%rdx
  add    %rax,%rdx
  movzbl -0x1d(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x1c(%rbp),%eax
  mov    $0x0,%edx
  divl   -0x28(%rbp)
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L37
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movq   $0x0,-0x18(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strnlen@plt>
  sub    $0x1,%eax
  cltq
  mov    %rax,-0x10(%rbp)
  jmp    L95
L96:
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x1d(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x1d(%rbp),%eax
  mov    %al,(%rdx)
  addq   $0x1,-0x18(%rbp)
  subq   $0x1,-0x10(%rbp)
L95:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jb     L96
  mov    -0x30(%rbp),%rax
L128:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D5
data_type: string

tool: D5: %d

assistant: ```c
char *itoan(int n, char *buf, size_t buflen, unsigned base) {
  size_t i, j, maxlen;
  unsigned l;
  char c;
  if (buf == NULL || buflen == 0 || base == 0 || base > 36) {
    return NULL;
  }
  maxlen = buflen - 1;
  if (base == 10) {
    snprintf(buf, buflen, "%d", n);
    return buf;
  }
  l = n;
  i = 0;
  do {
    if (i >= maxlen) {
      buf[0] = '\0';
      return NULL;
    }
    c = l % base;
    if (c < 10) {
      c = '0' + c;
    } else {
      c = 'A' + (c - 10);
    }
    buf[i++] = c;
    l = l / base;
  } while (l);
  buf[i] = '\0';
  for (i = 0, j = (strnlen(buf, buflen) - 1); i < j; ++i, --j) {
    c = buf[i];
    buf[i] = buf[j];
    buf[j] = c;
  }
  return buf;
}
```