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

```asm
<fmtstr>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %r8,0x8(%rsp)
  mov    0x60(%rsp),%ecx
  test   %r8,%r8
  je     L31
  cmpb   $0x0,(%r8)
  je     L33
L111:
  mov    $0x1,%eax
  nop
L153:
  mov    0x8(%rsp),%rsi
  mov    %eax,%edx
  add    $0x1,%rax
  cmpb   $0x0,-0x1(%rsi,%rax,1)
  jne    L153
  sub    %edx,%ecx
  mov    $0x0,%ebx
  cmovns %ecx,%ebx
  and    $0x1,%r9d
  je     L105
  mov    0x8(%rsp),%rax
  neg    %ebx
  movsbl (%rax),%r8d
  test   %r8b,%r8b
  je     L228
  xor    %ebp,%ebp
L148:
  cmp    0x68(%rsp),%ebp
  jge    L160
  mov    0x68(%rsp),%eax
  mov    0x8(%rsp),%r9
  sub    $0x1,%eax
  sub    %ebp,%eax
  lea    0x1(%r9,%rax,1),%rax
  mov    %rax,0x18(%rsp)
  jmp    L74
L45:
  cmp    0x18(%rsp),%r9
  je     L160
L74:
  add    $0x1,%r9
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    %r9,0x10(%rsp)
  call   <doapr_outch@plt>
  mov    0x10(%rsp),%r9
  mov    %r9d,%eax
  movsbl (%r9),%r8d
  sub    0x8(%rsp),%eax
  add    %ebp,%eax
  mov    %eax,0x10(%rsp)
  test   %r8b,%r8b
  jne    L45
L229:
  test   %ebx,%ebx
  jns    L160
  mov    0x10(%rsp),%eax
  cmp    %eax,0x68(%rsp)
  jle    L160
  mov    %ebx,%ebp
  jmp    L22
  xchg   %ax,%ax
L191:
  cmp    %eax,0x68(%rsp)
  jle    L160
L22:
  mov    $0x20,%r8d
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  add    $0x1,%ebp
  call   <doapr_outch@plt>
  mov    0x10(%rsp),%eax
  add    %ebp,%eax
  sub    %ebx,%eax
  test   %ebp,%ebp
  js     L191
L160:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L33:
  xor    %ebx,%ebx
  test   %ecx,%ecx
  cmovns %ecx,%ebx
  and    $0x1,%r9d
  jne    L4
  nopl   (%rax)
L105:
  mov    0x68(%rsp),%eax
  test   %eax,%eax
  jle    L196
  xor    %ebp,%ebp
  test   %ecx,%ecx
  jle    L196
  xchg   %ax,%ax
L98:
  mov    $0x20,%r8d
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  sub    $0x1,%ebx
  add    $0x1,%ebp
  call   <doapr_outch@plt>
  test   %ebx,%ebx
  jle    L179
  cmp    %ebp,0x68(%rsp)
  jg     L98
L179:
  mov    0x8(%rsp),%rax
  movsbl (%rax),%r8d
  test   %r8b,%r8b
  jne    L148
  jmp    L160
  nopl   0x0(%rax,%rax,1)
L31:
  lea    D9(%rip),%rax
  mov    %rax,0x8(%rsp)
  jmp    L111
L4:
  neg    %ebx
L228:
  movl   $0x0,0x10(%rsp)
  jmp    L229
L196:
  xor    %ebp,%ebp
  jmp    L179
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D9
type_guessed: string

tool: D9: <NULL>

assistant: ```c
void fmtstr(char **sbuffer, char **buffer, size_t *currlen, size_t *maxlen, const char *value, int flags, int min, int max) {
  int padlen, strln;
  int cnt = 0;
  if (value == 0)
    value = "<NULL>";
  for (strln = 0; value[strln]; ++strln)
    ;
  padlen = min - strln;
  if (padlen < 0)
    padlen = 0;
  if (flags & (1 << 0))
    padlen = -padlen;
  while ((padlen > 0) && (cnt < max)) {
    doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
    --padlen;
    ++cnt;
  }
  while (*value && (cnt < max)) {
    doapr_outch(sbuffer, buffer, currlen, maxlen, *value++);
    ++cnt;
  }
  while ((padlen < 0) && (cnt < max)) {
    doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
    ++padlen;
    ++cnt;
  }
}
```