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

```asm
<fmt_to_str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movb   $0x0,-0x12(%rbp)
  mov    -0x24(%rbp),%eax
  sub    $0x3,%eax
  cmp    $0x6,%eax
  ja     L100
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D113(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D113(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D61(%rip),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%eax
  lea    0x1(%rax),%edx
  lea    -0x12(%rbp),%rax
  lea    D181(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L45
  lea    D212(%rip),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%edx
  lea    -0x12(%rbp),%rax
  lea    D181(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L45
  lea    D96(%rip),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%edx
  lea    -0x12(%rbp),%rax
  lea    D181(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L45
  lea    D74(%rip),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%edx
  lea    -0x12(%rbp),%rax
  lea    D181(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L45
  lea    D92(%rip),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%edx
  lea    -0x12(%rbp),%rax
  lea    D181(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L45
  cmpl   $0x0,-0x28(%rbp)
  jne    L72
  lea    D94(%rip),%rax
  jmp    L16
L72:
  lea    D209(%rip),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%edx
  lea    -0x12(%rbp),%rax
  lea    D181(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L45
  lea    D82(%rip),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%edx
  lea    -0x12(%rbp),%rax
  lea    D181(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L45
L100:
  mov    -0x24(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D153(%rip),%rax
  mov    %rax,%rdi
  call   <io_error_msg@plt>
  lea    D16(%rip),%rax
  mov    %rax,-0x20(%rbp)
  nop
L45:
  lea    -0x12(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rcx
  mov    %rax,%rdx
  lea    D40(%rip),%rax
  mov    %rax,%rsi
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    D53(%rip),%rax
L16:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D61
type_guessed: string
name: extract_symbolic_data
arguments: label: D181
type_guessed: string
name: extract_symbolic_data
arguments: label: D212
type_guessed: string
name: extract_symbolic_data
arguments: label: D96
type_guessed: string
name: extract_symbolic_data
arguments: label: D74
type_guessed: string
name: extract_symbolic_data
arguments: label: D92
type_guessed: string
name: extract_symbolic_data
arguments: label: D94
type_guessed: string
name: extract_symbolic_data
arguments: label: D209
type_guessed: string
name: extract_symbolic_data
arguments: label: D82
type_guessed: string
name: extract_symbolic_data
arguments: label: D153
type_guessed: string
name: extract_symbolic_data
arguments: label: D16
type_guessed: string
name: extract_symbolic_data
arguments: label: D40
type_guessed: string

tool: D61: user-

tool: D181: %d

tool: D212: general.

tool: D96: dollar.

tool: D74: comma.

tool: D92: percent.

tool: D94: integer

tool: D209: fixed.

tool: D82: exponent.

tool: D153: Unknown format %d (%x)

tool: D16: UNKNOWN

tool: D40: %s%s

assistant: ```c
char *fmt_to_str(int format, int precision) {
  char *ptr;
  static char buf[30];
  char nbuf[10];
  nbuf[0] = '\0';
  switch (format) {
  case 6:
    ptr = "user-";
    sprintf(nbuf, "%d", precision + 1);
    break;
  case 9:
    ptr = "general.";
    sprintf(nbuf, "%d", precision);
    break;
  case 3:
    ptr = "dollar.";
    sprintf(nbuf, "%d", precision);
    break;
  case 4:
    ptr = "comma.";
    sprintf(nbuf, "%d", precision);
    break;
  case 5:
    ptr = "percent.";
    sprintf(nbuf, "%d", precision);
    break;
  case 7:
    if (precision == 0)
      return "integer";
    ptr = "fixed.";
    sprintf(nbuf, "%d", precision);
    break;
  case 8:
    ptr = "exponent.";
    sprintf(nbuf, "%d", precision);
    break;
  default:
    io_error_msg("Unknown format %d (%x)", format, format);
    ptr = "UNKNOWN";
    break;
  }
  sprintf(buf, "%s%s", ptr, nbuf);
  return buf;
}
```