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

```asm
<nseel_simple_tokenizer>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x40(%rbp)
  je     L424
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L369
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x27,%eax
  je     L167
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x22,%eax
  jne    L7
L167:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    %al,-0x13(%rbp)
  jmp    L478
L320:
  addq   $0x1,-0x10(%rbp)
L7:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L182
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L320
  jmp    L182
L424:
  mov    -0x30(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <nseel_skip_space_and_comments@plt>
  mov    %rax,-0x10(%rbp)
L182:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jb     L288
  mov    -0x28(%rbp),%rax
  mov    -0x30(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0x0,(%rax)
  mov    $0x0,%eax
  jmp    L323
L288:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  jne    L57
  mov    -0x10(%rbp),%rax
  add    $0x3,%rax
  cmp    %rax,-0x30(%rbp)
  jbe    L57
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x27,%al
  jne    L57
  mov    -0x10(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x27,%al
  jne    L57
  addq   $0x4,-0x10(%rbp)
  jmp    L215
L57:
  cmpq   $0x0,-0x40(%rbp)
  je     L603
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L603
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x10(%rbp)
  jae    L603
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L638
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L603
L638:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L412
  jmp    L464
L129:
  addq   $0x1,-0x10(%rbp)
L464:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L527
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  je     L527
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L129
  jmp    L527
L412:
  cmpq   $0x0,-0x40(%rbp)
  je     L552
  mov    -0x40(%rbp),%rax
  movl   $0x1,(%rax)
L552:
  addq   $0x2,-0x10(%rbp)
  jmp    L570
L369:
  nop
  jmp    L570
L530:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x11(%rbp)
  cmpb   $0x2a,-0x11(%rbp)
  jne    L570
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L570
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L570
  addq   $0x1,-0x10(%rbp)
  cmpq   $0x0,-0x40(%rbp)
  je     L241
  mov    -0x40(%rbp),%rax
  movl   $0x0,(%rax)
  jmp    L241
L570:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jb     L530
  jmp    L527
L241:
  nop
  jmp    L527
L603:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L216
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L216
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x23,%al
  je     L216
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  jne    L291
L216:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  jne    L271
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x10(%rbp)
  jae    L271
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x7e,%al
  jne    L271
  addq   $0x1,-0x10(%rbp)
L271:
  addq   $0x1,-0x10(%rbp)
  jmp    L634
L476:
  addq   $0x1,-0x10(%rbp)
L634:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L343
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L476
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L476
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L476
  jmp    L343
L291:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x27,%al
  je     L154
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  jne    L557
L154:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x13(%rbp)
  cmpq   $0x0,-0x40(%rbp)
  je     L679
  movsbl -0x13(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L616
L679:
  nop
L478:
  jmp    L616
L266:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x12(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L614
  cmpb   $0x5c,-0x12(%rbp)
  jne    L614
  addq   $0x1,-0x10(%rbp)
  jmp    L616
L614:
  movzbl -0x12(%rbp),%eax
  cmp    -0x13(%rbp),%al
  jne    L616
  cmpq   $0x0,-0x40(%rbp)
  je     L425
  mov    -0x40(%rbp),%rax
  movl   $0x0,(%rax)
  jmp    L425
L616:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jb     L266
  jmp    L215
L425:
  nop
  jmp    L215
L557:
  addq   $0x1,-0x10(%rbp)
  jmp    L215
L527:
  nop
  jmp    L215
L343:
  nop
L215:
  mov    -0x28(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%rax
  sub    -0x8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jbe    L568
  mov    -0x8(%rbp),%rax
  jmp    L323
L568:
  mov    $0x0,%eax
L323:
  leave
  ret
```

assistant: ```c
const char *nseel_simple_tokenizer(const char **ptr, const char *endptr, int32_t *lenOut, int32_t *state) {
  const char *p = *ptr;
  const char *rv = p;
  char delim;
  if (state) {
    if (*state == 1)
      goto in_comment;
    if (*state == '\'' || *state == '\"') {
      delim = (char)*state;
      goto in_string;
    }
    while (p < endptr && isspace(p[0]))
      p++;
  } else {
    p = nseel_skip_space_and_comments(p, endptr);
  }
  if (p >= endptr) {
    *ptr = endptr;
    *lenOut = 0;
    return NULL;
  }
  rv = p;
  if (*p == '$' && p + 3 < endptr && p[1] == '\'' && p[3] == '\'') {
    p += 4;
  } else if (state && *p == '/' && p < endptr - 1 && (p[1] == '/' || p[1] == '*')) {
    if (p[1] == '/') {
      while (p < endptr && *p != '\r' && *p != '\n')
        p++;
    } else {
      if (state)
        *state = 1;
      p += 2;
    in_comment:
      while (p < endptr) {
        const char c = *p++;
        if (c == '*' && p < endptr && *p == '/') {
          p++;
          if (state)
            *state = 0;
          break;
        }
      }
    }
  } else if (isalnum(*p) || *p == '_' || *p == '#' || *p == '$') {
    if (*p == '$' && p < endptr - 1 && p[1] == '~')
      p++;
    p++;
    while (p < endptr && (isalnum(*p) || *p == '_' || *p == '.'))
      p++;
  } else if (*p == '\'' || *p == '\"') {
    delim = *p++;
    if (state)
      *state = delim;
  in_string:
    while (p < endptr) {
      const char c = *p++;
      if (p < endptr && c == '\\')
        p++;
      else if (c == delim) {
        if (state)
          *state = 0;
        break;
      }
    }
  } else {
    p++;
  }
  *ptr = p;
  *lenOut = (int32_t)(p - rv);
  return p > rv ? rv : NULL;
}
```