user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<nextch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  js     L85
  cmpl   $0x1,-0x1c(%rbp)
  jle    L153
L85:
  mov    $0x0,%eax
  jmp    L248
L153:
  cmpq   $0x0,-0x18(%rbp)
  je     L131
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  lea    D72(%rip),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,(%rcx,%rdx,1)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  movl   $0x0,(%rdx,%rax,1)
  mov    $0x1,%eax
  jmp    L248
L131:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  test   %rax,%rax
  jne    L275
  mov    $0x0,%eax
  jmp    L248
L275:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jne    L112
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L112
  mov    $0x0,%eax
  jmp    L248
L112:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x5c,%eax
  je     L9
  cmp    $0x5c,%eax
  jg     L265
  test   %eax,%eax
  je     L199
  cmp    $0x2d,%eax
  jne    L265
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D77(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D160(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D77(%rip),%rdx
  mov    %cl,(%rax,%rdx,1)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  add    $0x1,%rax
  add    %rcx,%rax
  movzbl (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D77(%rip),%rcx
  movzbl (%rax,%rcx,1),%eax
  cmp    %al,%dl
  jne    L172
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x2(%rax),%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
L172:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D77(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  jmp    L248
L199:
  cmpl   $0x0,-0x1c(%rbp)
  je     L138
  movzbl D329(%rip),%eax
  jmp    L248
L138:
  mov    $0x0,%eax
  jmp    L248
L9:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x1(%rax),%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
L265:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rdi
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x1(%rax),%edx
  mov    -0x1c(%rbp),%ecx
  movslq %ecx,%rcx
  lea    0x0(,%rcx,4),%rsi
  lea    D364(%rip),%rcx
  mov    %edx,(%rsi,%rcx,1)
  cltq
  add    %rdi,%rax
  movzbl (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D77(%rip),%rcx
  mov    %dl,(%rax,%rcx,1)
  jmp    L230
L123:
  movl   $0x1,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%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    L116
  addl   $0x1,-0x4(%rbp)
L116:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%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    L105
  mov    $0x0,%eax
  jmp    L248
L105:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%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    L17
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%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    D364(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  jmp    L230
L17:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%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    D77(%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    D160(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D160(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jne    L140
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  lea    0x2(%rax),%ecx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  jmp    L230
L140:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D160(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jle    L245
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D160(%rip),%rax
  movl   $0x1,(%rdx,%rax,1)
  jmp    L155
L245:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D160(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  test   %eax,%eax
  jns    L230
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D160(%rip),%rax
  movl   $0xffffffff,(%rdx,%rax,1)
  jmp    L155
L230:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D364(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L123
L155:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D77(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
L248:
  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];
  }
  }
}
```