user: Please show me the C implementation that matches the assembly code listed below:

```asm
<BigInfo_SetValueForKey>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2008(%rsp)
  xor    %eax,%eax
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  call   <strlen@plt>
  cmp    $0x1fff,%eax
  jg     L135
L72:
  mov    $0x5c,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L130
  mov    $0x5c,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L23
L130:
  mov    0x2008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L123
  lea    D11(%rip),%rdi
L35:
  add    $0x2018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1120 <Com_Printf@plt>
  cs nopw 0x0(%rax,%rax,1)
L23:
  mov    $0x3b,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L13
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L4
L13:
  mov    0x2008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L123
  lea    D9(%rip),%rdi
  jmp    L35
  nopl   0x0(%rax)
L135:
  lea    D36(%rip),%rdi
  call   <Com_Printf@plt>
  jmp    L72
  nopl   0x0(%rax)
L4:
  mov    $0x22,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L99
  mov    $0x22,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L144
L99:
  mov    0x2008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L123
  lea    D41(%rip),%rdi
  jmp    L35
  nopw   0x0(%rax,%rax,1)
L144:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <BigInfo_RemoveKey@plt>
  test   %rbx,%rbx
  je     L177
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L177
  mov    %rsp,%r13
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    $0x2000,%esi
  lea    D24(%rip),%rdx
  mov    %r13,%rdi
  call   <Com_sprintf@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %rbp,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  add    %eax,%ebx
  cmp    $0x2000,%ebx
  jg     L16
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
L177:
  mov    0x2008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L123
  add    $0x2018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L16:
  lea    D54(%rip),%rdi
  call   <Com_Printf@plt>
  jmp    L177
L123:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D11
type: string
name: disassemble_data
arguments: data_label: D9
type: string
name: disassemble_data
arguments: data_label: D36
type: string
name: disassemble_data
arguments: data_label: D41
type: string
name: disassemble_data
arguments: data_label: D24
type: string
name: disassemble_data
arguments: data_label: D54
type: string

tool: D11: Error: Can't use keys or values with a \


tool: D9: Error: Can't use keys or values with a semicolon


tool: D36: Error: Info_SetValueForKey: oversize infostring

tool: D41: Error: Can't use keys or values with a "


tool: D24: \%s\%s

tool: D54: Error: Info string length exceeded


assistant: ```c
void BigInfo_SetValueForKey(char *s, const char *key, const char *value) {
  char newi[8192];
  if (strlen(s) >= 8192) {
    Com_Printf("Error: Info_SetValueForKey: oversize infostring");
  }
  if (strchr(key, '\\') || strchr(value, '\\')) {
    Com_Printf("Error: Can't use keys or values with a \\\n");
    return;
  }
  if (strchr(key, ';') || strchr(value, ';')) {
    Com_Printf("Error: Can't use keys or values with a semicolon\n");
    return;
  }
  if (strchr(key, '\"') || strchr(value, '\"')) {
    Com_Printf("Error: Can't use keys or values with a \"\n");
    return;
  }
  BigInfo_RemoveKey(s, key);
  if (!value || !strlen(value))
    return;
  Com_sprintf(newi, sizeof(newi), "\\%s\\%s", key, value);
  if (strlen(newi) + strlen(s) > 8192) {
    Com_Printf("Error: Info string length exceeded\n");
    return;
  }
  strcat(newi, s);
  strcpy(s, newi);
}
```