user: Translate the below assembly code into C programming language:

```asm
<FormatString>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  mov    %eax,%r13d
  call   <malloc@plt>
  mov    %r13d,%edx
  mov    $0x3f,%esi
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <memset@plt>
  movslq %r13d,%rax
  movb   $0x0,(%r14,%rax,1)
  cmp    $0x1,%r13d
  jle    L6
  xor    %ebp,%ebp
  mov    $0x1,%ebx
  mov    $0x1,%r12d
  lea    D34(%rip),%rcx
  lea    D38(%rip),%rdx
  nopl   (%rax)
L111:
  movslq %ebx,%rax
  movzbl (%r15,%rax,1),%eax
  cmp    $0x22,%al
  je     L139
  cmp    $0x5c,%al
  jne    L130
  add    $0x1,%ebx
  movslq %ebx,%rax
  movsbl (%r15,%rax,1),%esi
  cmp    $0x74,%sil
  jg     L151
  cmp    $0x5b,%sil
  jle    L194
  lea    -0x5c(%rsi),%eax
  cmp    $0x18,%al
  ja     L151
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nop
L130:
  mov    %al,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
L139:
  add    $0x1,%ebx
  cmp    %ebx,%r13d
  jg     L111
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  movslq %ebp,%rax
  test   %ebp,%ebp
  je     L67
  lea    -0x1(%rbp),%edx
  mov    %r12,%rsi
  lea    0x1(%r14,%rdx,1),%rdi
  sub    %r14,%rsi
  mov    %r14,%rdx
  cs nopw 0x0(%rax,%rax,1)
L143:
  movzbl (%rdx),%ecx
  mov    %cl,(%rsi,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L143
L67:
  add    %r12,%rax
L160:
  movb   $0x0,(%rax)
  mov    %r14,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L194:
  cmp    $0x22,%sil
  je     L148
  cmp    $0x2f,%sil
  jne    L151
  movb   $0x2f,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
L151:
  mov    %rcx,%rdi
  movslq %r12d,%rbp
  add    $0x1,%r12d
  call   <printf@plt>
  lea    D38(%rip),%rdx
  lea    D34(%rip),%rcx
  jmp    L139
  nopw   0x0(%rax,%rax,1)
  movb   $0x9,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
  movb   $0xd,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
  movb   $0xa,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
  movb   $0xc,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
  movb   $0x8,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
  movb   $0x5c,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
L148:
  movb   $0x22,(%r14,%rbp,1)
  movslq %r12d,%rbp
  add    $0x1,%r12d
  jmp    L139
  nopl   0x0(%rax)
L6:
  mov    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  jmp    L160
```

tool_calls: name: disassemble_data
arguments: label: D34
type_guessed: string

tool: D34: 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;
}
```