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

```asm
<strtok_r>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jne    L47
  lea    D35(%rip),%r8
  lea    D103(%rip),%rax
  mov    %rax,%rcx
  lea    D109(%rip),%rax
  mov    %rax,%rdx
  mov    $0xe3,%esi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <debug_panic@plt>
L47:
  cmpq   $0x0,-0x28(%rbp)
  jne    L4
  lea    D105(%rip),%r8
  lea    D103(%rip),%rax
  mov    %rax,%rcx
  lea    D109(%rip),%rax
  mov    %rax,%rdx
  mov    $0xe4,%esi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <debug_panic@plt>
L4:
  cmpq   $0x0,-0x18(%rbp)
  jne    L89
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
L89:
  cmpq   $0x0,-0x18(%rbp)
  jne    L3
  lea    D98(%rip),%r8
  lea    D103(%rip),%rax
  mov    %rax,%rcx
  lea    D109(%rip),%rax
  mov    %rax,%rdx
  mov    $0xeb,%esi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <debug_panic@plt>
  jmp    L3
L115:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L40
  mov    -0x28(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x0,%eax
  jmp    L84
L40:
  addq   $0x1,-0x18(%rbp)
L3:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L115
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L17
L33:
  addq   $0x1,-0x18(%rbp)
L17:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L33
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L113
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L26
L113:
  mov    -0x28(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
L26:
  mov    -0x8(%rbp),%rax
L84:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D35
data_type: string
name: extract_symbolic_data
arguments: label: D103
data_type: string
name: extract_symbolic_data
arguments: label: D109
data_type: string
name: extract_symbolic_data
arguments: label: D70
data_type: string
name: extract_symbolic_data
arguments: label: D105
data_type: string
name: extract_symbolic_data
arguments: label: D98
data_type: string

tool: D35: delimiters != NULL

tool: D103: assertion `%s' failed.

tool: D109: strtok_r

tool: D70: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/waffleOS/waffle/refs/heads/master/src/lib/string.c

tool: D105: save_ptr != NULL

tool: D98: s != NULL

assistant: ```c
char *strtok_r(char *s, const char *delimiters, char **save_ptr) {
  char *token;
  if (delimiters != ((void *)0)) {
  } else {
    debug_panic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/waffleOS/waffle/refs/heads/master/src/lib/string.c", 227, __func__, "assertion `%s' failed.", "delimiters != NULL");
  };
  if (save_ptr != ((void *)0)) {
  } else {
    debug_panic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/waffleOS/waffle/refs/heads/master/src/lib/string.c", 228, __func__, "assertion `%s' failed.", "save_ptr != NULL");
  };
  if (s == ((void *)0))
    s = *save_ptr;
  if (s != ((void *)0)) {
  } else {
    debug_panic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/waffleOS/waffle/refs/heads/master/src/lib/string.c", 235, __func__, "assertion `%s' failed.", "s != NULL");
  };
  while (strchr(delimiters, *s) != ((void *)0)) {
    if (*s == '\0') {
      *save_ptr = s;
      return ((void *)0);
    }
    s++;
  }
  token = s;
  while (strchr(delimiters, *s) == ((void *)0))
    s++;
  if (*s != '\0') {
    *s = '\0';
    *save_ptr = s + 1;
  } else {
    *save_ptr = s;
  }
  return token;
}
```