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

```asm
<strtok_r>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,%r13
  test   %rsi,%rsi
  je     L120
L44:
  test   %r13,%r13
  je     L62
L123:
  test   %rbx,%rbx
  jne    L101
  mov    0x0(%r13),%rbx
  test   %rbx,%rbx
  jne    L101
  lea    D54(%rip),%r8
  lea    D47(%rip),%rcx
  lea    D65(%rip),%rdx
  mov    $0xeb,%esi
  lea    D71(%rip),%rdi
  mov    $0x0,%eax
  call   <debug_panic@plt>
  jmp    L101
L120:
  lea    D38(%rip),%r8
  lea    D47(%rip),%rcx
  lea    D65(%rip),%rdx
  mov    $0xe3,%esi
  lea    D71(%rip),%rdi
  mov    $0x0,%eax
  call   <debug_panic@plt>
  jmp    L44
L62:
  lea    D40(%rip),%r8
  lea    D47(%rip),%rcx
  lea    D65(%rip),%rdx
  mov    $0xe4,%esi
  lea    D71(%rip),%rdi
  mov    $0x0,%eax
  call   <debug_panic@plt>
  jmp    L123
L43:
  add    $0x1,%rbx
L101:
  movzbl (%rbx),%ebp
  movsbl %bpl,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L100
  test   %bpl,%bpl
  jne    L43
  mov    $0x0,%eax
L49:
  mov    %rbx,0x0(%r13)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L100:
  mov    %rbx,%rbp
L47:
  mov    %rbp,%r15
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%r14d
  movsbl %r14b,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L47
  test   %r14b,%r14b
  je     L117
  movb   $0x0,0x0(%rbp)
  mov    %rbx,%rax
  lea    0x2(%r15),%rbx
  jmp    L49
L117:
  mov    %rbx,%rax
  mov    %rbp,%rbx
  jmp    L49
```

tool_calls: name: disassemble_data
arguments: data_label: D54
type_infered: string
name: disassemble_data
arguments: data_label: D47
type_infered: string
name: disassemble_data
arguments: data_label: D65
type_infered: string
name: disassemble_data
arguments: data_label: D71
type_infered: string
name: disassemble_data
arguments: data_label: D38
type_infered: string
name: disassemble_data
arguments: data_label: D40
type_infered: string

tool: D54: s != NULL

tool: D47: assertion `%s' failed.

tool: D65: strtok_r

tool: D71: /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: D38: delimiters != NULL

tool: D40: save_ptr != 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;
}
```