user: What is the c source code of the assembly code below:

```asm
<nextch>:
  endbr64
  mov    $0x0,%r9d
  cmp    $0x1,%esi
  ja     L13
  mov    %esi,%edx
  test   %rdi,%rdi
  je     L35
  movslq %esi,%rdx
  lea    D82(%rip),%rax
  mov    %rdi,(%rax,%rdx,8)
  lea    D118(%rip),%rax
  movl   $0x0,(%rax,%rdx,4)
  mov    $0x1,%r9d
L13:
  mov    %r9d,%eax
  ret
L35:
  movslq %esi,%rax
  lea    D82(%rip),%rcx
  mov    (%rcx,%rax,8),%rdi
  test   %rdi,%rdi
  je     L211
  lea    D118(%rip),%rcx
  mov    (%rcx,%rax,4),%eax
  test   %eax,%eax
  jne    L59
  mov    $0x0,%r9d
  cmpb   $0x2d,(%rdi)
  je     L13
  movslq %eax,%rcx
  movzbl (%rdi,%rcx,1),%r9d
L51:
  cmp    $0x5c,%r9b
  je     L9
  test   %r9b,%r9b
  je     L200
L78:
  lea    D118(%rip),%r8
  movslq %edx,%rsi
  mov    (%r8,%rsi,4),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,(%r8,%rsi,4)
  cltq
  movzbl (%rdi,%rax,1),%r9d
  lea    D113(%rip),%rax
  mov    %r9b,(%rax,%rsi,1)
  movslq %ecx,%rax
  cmpb   $0x2d,(%rdi,%rax,1)
  jne    L13
  push   %rbp
  push   %rbx
  movsbl %r9b,%ebp
  lea    D134(%rip),%rbx
  mov    %rsi,%r10
  mov    %r8,%r11
  jmp    L219
L59:
  movslq %eax,%rcx
  movzbl (%rdi,%rcx,1),%r9d
  cmp    $0x2d,%r9b
  jne    L51
  lea    D113(%rip),%r8
  movslq %esi,%rsi
  movzbl (%r8,%rsi,1),%r9d
  lea    D134(%rip),%r10
  add    (%r10,%rsi,4),%r9b
  mov    %r9b,(%r8,%rsi,1)
  cmp    0x1(%rdi,%rcx,1),%r9b
  jne    L13
  add    $0x2,%eax
  lea    D118(%rip),%rcx
  mov    %eax,(%rcx,%rsi,4)
  jmp    L13
L200:
  test   %edx,%edx
  movzbl D28(%rip),%eax
  cmovne %eax,%r9d
  jmp    L13
L9:
  movslq %edx,%rcx
  add    $0x1,%eax
  lea    D118(%rip),%rsi
  mov    %eax,(%rsi,%rcx,4)
  jmp    L78
L34:
  lea    0x1(%rcx,%r8,1),%eax
  mov    %eax,(%r11,%r10,4)
  jmp    L171
L221:
  add    $0x2,%ecx
  mov    %ecx,(%r11,%r10,4)
L171:
  mov    (%r11,%r10,4),%ecx
  movslq %ecx,%rax
  cmpb   $0x2d,(%rdi,%rax,1)
  jne    L210
L219:
  lea    0x1(%rcx),%eax
  cltq
  cmpb   $0x5c,(%rdi,%rax,1)
  sete   %r8b
  movzbl %r8b,%r8d
  add    $0x1,%r8d
  lea    (%r8,%rcx,1),%esi
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%eax
  test   %al,%al
  je     L110
  cmpb   $0x2d,0x1(%rdi,%rsi,1)
  je     L34
  movsbl %al,%eax
  sub    %ebp,%eax
  mov    %eax,(%rbx,%r10,4)
  test   %eax,%eax
  je     L221
  jg     L235
  jns    L171
  movslq %edx,%rdx
  lea    D134(%rip),%rax
  movl   $0xffffffff,(%rax,%rdx,4)
  jmp    L210
L235:
  movslq %edx,%rdx
  lea    D134(%rip),%rax
  movl   $0x1,(%rax,%rdx,4)
  jmp    L210
L211:
  mov    $0x0,%r9d
  jmp    L13
L110:
  mov    %eax,%r9d
L210:
  mov    %r9d,%eax
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char nextch(str, who)
char *str;
int who;
{
  static char *what[2] = {0, 0};
  static char last[2] = {0, 0};
  static int increment[2];
  static int pos[2];
  if (who < 0 || who > 1) {
    return 0;
  }
  if (str) {
    what[who] = str;
    pos[who] = 0;
    return 1;
  } else if (!what[who]) {
    return 0;
  }
  if (!pos[who] && what[who][0] == '-') {
    return 0;
  }
  switch (what[who][pos[who]]) {
  case '-': {
    last[who] += increment[who];
    if (what[who][pos[who] + 1] == last[who]) {
      pos[who] += 2;
    }
    return last[who];
  }
  case '\0': {
    if (who) {
      return last[1];
    }
    return 0;
  }
  case '\\': {
    pos[who]++;
  }
  default: {
    last[who] = what[who][pos[who]++];
    while (what[who][pos[who]] == '-') {
      int inc = 1;
      if (what[who][pos[who] + inc] == '\\') {
        inc++;
      }
      if (!what[who][pos[who] + inc]) {
        return 0;
      }
      if (what[who][pos[who] + inc + 1] == '-') {
        pos[who] += inc + 1;
        continue;
      }
      increment[who] = what[who][pos[who] + inc] - last[who];
      if (!increment[who]) {
        pos[who] += 2;
        continue;
      }
      if (increment[who] > 0) {
        increment[who] = 1;
        break;
      } else if (increment[who] < 0) {
        increment[who] = -1;
        break;
      }
    }
    return last[who];
  }
  }
}
```