user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<strtok_r>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L68
L142:
  mov    -0x44(%rbp),%eax
  cltq
  movb   $0x0,-0x30(%rbp,%rax,1)
  addl   $0x1,-0x44(%rbp)
L68:
  cmpl   $0x1f,-0x44(%rbp)
  jle    L142
L105:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  sar    $0x3,%al
  movsbl %al,%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%edx
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  and    $0x7,%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  sar    $0x3,%al
  movsbl %al,%eax
  or     %ecx,%edx
  cltq
  mov    %dl,-0x30(%rbp,%rax,1)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L105
  cmpq   $0x0,-0x58(%rbp)
  je     L35
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  jmp    L130
L35:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x40(%rbp)
  jmp    L130
L32:
  addq   $0x1,-0x40(%rbp)
L130:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  sar    $0x3,%al
  movsbl %al,%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%eax
  movsbl %al,%edx
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L9
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L32
L9:
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  jmp    L127
L75:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  sar    $0x3,%al
  movsbl %al,%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%eax
  movsbl %al,%edx
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L52
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x0,(%rax)
  jmp    L27
L52:
  addq   $0x1,-0x40(%rbp)
L127:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L75
L27:
  mov    -0x68(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x58(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jne    L53
  mov    $0x0,%eax
  jmp    L41
L53:
  mov    -0x58(%rbp),%rax
L41:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L56
  call   <__stack_chk_fail@plt>
L56:
  leave
  ret
```

assistant: ```c
char *strtok_r(char *string, const char *control, char **lasts) {
  char *str;
  const char *ctrl = control;
  char map[32];
  int n;
  for (n = 0; n < 32; n++)
    map[n] = 0;
  do {
    map[*ctrl >> 3] |= (1 << (*ctrl & 7));
  } while (*ctrl++);
  if (string) {
    str = string;
  } else {
    str = *lasts;
  }
  while ((map[*str >> 3] & (1 << (*str & 7))) && *str)
    str++;
  string = str;
  for (; *str; str++) {
    if (map[*str >> 3] & (1 << (*str & 7))) {
      *str++ = '\0';
      break;
    }
  }
  *lasts = str;
  if (string == (char *)str) {
    return NULL;
  } else {
    return string;
  }
}
```