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

```asm
<nextch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  js     L254
  cmpl   $0x1,-0x1c(%rbp)
  jle    L318
L254:
  mov    $0x0,%eax
  jmp    L170
L318:
  cmpq   $0x0,-0x18(%rbp)
  je     L235
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  lea    D248(%rip),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,(%rcx,%rdx,1)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  movl   $0x0,(%rdx,%rax,1)
  mov    $0x1,%eax
  jmp    L170
L235:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  test   %rax,%rax
  jne    L313
  mov    $0x0,%eax
  jmp    L170
L313:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jne    L163
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L163
  mov    $0x0,%eax
  jmp    L170
L163:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x5c,%eax
  je     L20
  cmp    $0x5c,%eax
  jg     L109
  test   %eax,%eax
  je     L103
  cmp    $0x2d,%eax
  jne    L109
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D4(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D112(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D4(%rip),%rdx
  mov    %cl,(%rax,%rdx,1)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  add    $0x1,%rax
  add    %rcx,%rax
  movzbl (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D4(%rip),%rcx
  movzbl (%rax,%rcx,1),%eax
  cmp    %al,%dl
  jne    L66
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x2(%rax),%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
L66:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D4(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  jmp    L170
L103:
  cmpl   $0x0,-0x1c(%rbp)
  je     L45
  movzbl D442(%rip),%eax
  jmp    L170
L45:
  mov    $0x0,%eax
  jmp    L170
L20:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x1(%rax),%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
L109:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rdi
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x1(%rax),%edx
  mov    -0x1c(%rbp),%ecx
  movslq %ecx,%rcx
  lea    0x0(,%rcx,4),%rsi
  lea    D247(%rip),%rcx
  mov    %edx,(%rsi,%rcx,1)
  cltq
  add    %rdi,%rax
  movzbl (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D4(%rip),%rcx
  mov    %dl,(%rax,%rcx,1)
  jmp    L285
L172:
  movl   $0x1,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L284
  addl   $0x1,-0x4(%rbp)
L284:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L131
  mov    $0x0,%eax
  jmp    L170
L131:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L147
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  jmp    L285
L147:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D4(%rip),%rcx
  movzbl (%rax,%rcx,1),%eax
  movsbl %al,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D112(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D112(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jne    L105
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x2(%rax),%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  jmp    L285
L105:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D112(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jle    L215
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D112(%rip),%rax
  movl   $0x1,(%rdx,%rax,1)
  jmp    L132
L215:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D112(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jns    L285
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D112(%rip),%rax
  movl   $0xffffffff,(%rdx,%rax,1)
  jmp    L132
L285:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D248(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D247(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L172
L132:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D4(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
L170:
  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];
  }
  }
}
```