user: What would the C source look like for the assembly code provided here?

```asm
<nextdir>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L38
L33:
  addl   $0x1,-0x8(%rbp)
L38:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L33
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L33
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L33
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L33
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L88
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%edx
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L65
L88:
  movl   $0x0,-0x4(%rbp)
  jmp    L117
L72:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x8(%rbp)
L117:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L123
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L123
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L72
L123:
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <clean_line@plt>
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  jne    L12
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  jne    L12
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <clean_line@plt>
L12:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  setg   %al
  movzbl %al,%eax
L65:
  leave
  ret
```

assistant: ```c
int nextdir(char *dir, char *path, int *index) {
  int i, j;
  i = (*index);
  for (; path[i] == ';' || path[i] == ':' || path[i] == ' ' || path[i] == '\t'; i++)
    ;
  if (path[i] == '\0') {
    (*index) = i;
    return (0);
  }
  for (j = 0; path[i] != ';' && path[i] != ':' && path[i] != '\0'; i++)
    dir[j++] = path[i];
  (*index) = i;
  dir[j] = '\0';
  clean_line(dir);
  if (dir[0] == '\"' && dir[strlen(dir) - 1] == '\"') {
    memmove(dir, &dir[1], strlen(dir));
    dir[strlen(dir) - 1] = '\0';
    clean_line(dir);
  }
  return (strlen(dir) > 0);
}
```