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

```asm
<epr_str_tok_tok>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rbx
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %rax,%rbx
  jb     L42
  mov    $0x0,%eax
  jmp    L148
L42:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L5
L73:
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L116
  cmpq   $0x0,-0x30(%rbp)
  je     L35
L116:
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L144
  cmpq   $0x0,-0x30(%rbp)
  je     L144
  mov    -0x30(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L144
L35:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%rax
  sub    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <epr_create_string@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x50(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%rax
  jmp    L148
L144:
  addq   $0x1,-0x30(%rbp)
L5:
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L73
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %rax,%rax
  jle    L46
  cmpq   $0x0,-0x18(%rbp)
  jne    L45
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x50(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <epr_clone_string@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  jmp    L148
L45:
  cmpq   $0x0,-0x18(%rbp)
  je     L46
  mov    -0x30(%rbp),%rax
  sub    -0x18(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <epr_create_string@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x50(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%rax
  jmp    L148
L46:
  mov    $0x0,%eax
L148:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
char *epr_str_tok_tok(const char *str, const char *seps, const char *exceptions, uint *pos) {
  char *token = NULL;
  uint i, old_pos;
  uint token_len = 0;
  assert(str != NULL);
  if (*pos >= (uint)strlen(str))
    return NULL;
  old_pos = *pos;
  for (i = *pos; str[i] != '\0'; i++) {
    if (((strchr(seps, str[i]) != NULL) && (i == 0)) || ((strchr(seps, str[i]) != NULL) && (i > 0) && (strchr(exceptions, str[i - 1]) == NULL))) {
      token_len = i - *pos;
      token = epr_create_string(token_len);
      strncpy(token, str + *pos, token_len);
      token[token_len] = '\0';
      *pos = i + 1;
      return token;
    }
  }
  if (strlen(str) > 0) {
    if (old_pos == 0) {
      *pos = i + 1;
      token = epr_clone_string(str);
      return token;
    } else if (old_pos > 0) {
      token_len = i - old_pos;
      token = epr_create_string(token_len);
      strncpy(token, str + *pos, token_len);
      token[token_len] = '\0';
      *pos = (int)strlen(str);
      return token;
    }
  }
  return NULL;
}
```