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

```asm
<FormatString>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    $0x3f,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movl   $0x1,-0x1c(%rbp)
  jmp    L44
L15:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x22,%eax
  je     L79
  cmp    $0x5c,%eax
  jne    L114
  addl   $0x1,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x74,%eax
  jg     L32
  cmp    $0x5c,%eax
  jge    L111
  cmp    $0x22,%eax
  je     L210
  cmp    $0x2f,%eax
  je     L141
  jmp    L32
L111:
  sub    $0x5c,%eax
  cmp    $0x18,%eax
  ja     L32
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D3(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D3(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x5c,(%rax)
  jmp    L99
L210:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x22,(%rax)
  jmp    L99
L141:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2f,(%rax)
  jmp    L99
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x8,(%rax)
  jmp    L99
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0xc,(%rax)
  jmp    L99
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0xa,(%rax)
  jmp    L99
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0xd,(%rax)
  jmp    L99
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x9,(%rax)
  jmp    L99
L32:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L99:
  addl   $0x1,-0x18(%rbp)
  jmp    L84
L114:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x18(%rbp)
  jmp    L84
L79:
  nop
L84:
  addl   $0x1,-0x1c(%rbp)
L44:
  mov    -0x1c(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L15
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L39
L55:
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x20(%rbp)
L39:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L55
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D8
data_type: string

tool: D8: Warning: Invalid char \%c ignored.


assistant: ```c
char *FormatString(const char *value) {
  int i = 0;
  int index = 0;
  int len = strlen(value);
  int realLength = 0;
  char *newstr = (char *)malloc((len + 1) * sizeof(char));
  char *rtn = (0);
  memset(newstr, '?', len);
  newstr[len] = '\0';
  for (index = 1; index < len; index++) {
    switch (value[index]) {
    case '\\':
      index += 1;
      switch (value[index]) {
      case '\\':
        newstr[realLength] = '\\';
        break;
      case '\"':
        newstr[realLength] = '\"';
        break;
      case '/':
        newstr[realLength] = '/';
        break;
      case 'b':
        newstr[realLength] = '\b';
        break;
      case 'f':
        newstr[realLength] = '\f';
        break;
      case 'n':
        newstr[realLength] = '\n';
        break;
      case 'r':
        newstr[realLength] = '\r';
        break;
      case 't':
        newstr[realLength] = '\t';
        break;
      default:
        printf("Warning: Invalid char \\%c ignored.\n", value[index]);
      }
      realLength += 1;
      break;
    case '\"':
      break;
    default:
      newstr[realLength] = value[index];
      realLength += 1;
      break;
    }
  }
  rtn = (char *)malloc((realLength + 1) * sizeof(char));
  for (i = 0; i < realLength; ++i) {
    rtn[i] = newstr[i];
  }
  rtn[realLength] = '\0';
  free(newstr);
  newstr = (0);
  return rtn;
}
```