user: 下面的汇编指令对应的C源代码是什么：

```asm
<pat_next>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1c(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L432
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L358
L432:
  mov    -0x38(%rbp),%rax
  movq   $0x0,(%rax)
  mov    $0x0,%eax
  jmp    L278
L358:
  mov    -0x38(%rbp),%rax
  movq   $0x1,(%rax)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L55
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L55
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  and    -0x3c(%rbp),%eax
  test   %eax,%eax
  jne    L55
  mov    -0x38(%rbp),%rax
  movq   $0x2,(%rax)
  addq   $0x1,-0x28(%rbp)
  movl   $0x1,-0x1c(%rbp)
  jmp    L398
L55:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  jne    L115
  movq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L123
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5e,%al
  je     L138
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x21,%al
  jne    L123
L138:
  addq   $0x1,-0x10(%rbp)
L123:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L91
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L91
  addq   $0x1,-0x10(%rbp)
  jmp    L91
L448:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x30(%rbp)
  jbe    L129
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L129
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  jne    L129
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L163
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L163
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L129
L163:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x18(%rbp)
  addq   $0x2,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L73
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L73
  addq   $0x1,-0x10(%rbp)
  jmp    L73
L338:
  addq   $0x1,-0x10(%rbp)
L73:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L243
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L243
  mov    -0x10(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    %eax,-0x18(%rbp)
  jne    L338
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L338
L243:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  je     L197
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L197
L129:
  addq   $0x1,-0x10(%rbp)
L91:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L197
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L197
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L448
L197:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  je     L57
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L404
L57:
  mov    -0x38(%rbp),%rax
  movq   $0x1,(%rax)
  mov    $0x5b,%eax
  jmp    L278
L404:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0xfffffffd,%eax
  jmp    L278
L115:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L101
  mov    $0xfffffffb,%eax
  jmp    L278
L101:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  jne    L18
  mov    $0xfffffffc,%eax
  jmp    L278
L18:
  nop
L398:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jns    L199
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rcx
  lea    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <mbtowc@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L357
  mov    -0x38(%rbp),%rax
  movq   $0x0,(%rax)
  mov    $0xfffffffe,%eax
  jmp    L278
L357:
  mov    -0x14(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x20(%rbp),%eax
  jmp    L278
L199:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
L278:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L348
  call   <__stack_chk_fail@plt>
L348:
  leave
  ret
```

assistant: ```c
int pat_next(const char *pat, size_t m, size_t *step, int flags) {
  int esc = 0;
  if (!m || !*pat) {
    *step = 0;
    return 0;
  }
  *step = 1;
  if (pat[0] == '\\' && pat[1] && !(flags & FNM_NOESCAPE)) {
    *step = 2;
    pat++;
    esc = 1;
    goto escaped;
  }
  if (pat[0] == '[') {
    size_t k = 1;
    if (k < m)
      if (pat[k] == '^' || pat[k] == '!')
        k++;
    if (k < m)
      if (pat[k] == ']')
        k++;
    for (; k < m && pat[k] && pat[k] != ']'; k++) {
      if (k + 1 < m && pat[k + 1] && pat[k] == '[' && (pat[k + 1] == ':' || pat[k + 1] == '.' || pat[k + 1] == '=')) {
        int z = pat[k + 1];
        k += 2;
        if (k < m && pat[k])
          k++;
        while (k < m && pat[k] && (pat[k - 1] != z || pat[k] != ']'))
          k++;
        if (k == m || !pat[k])
          break;
      }
    }
    if (k == m || !pat[k]) {
      *step = 1;
      return '[';
    }
    *step = k + 1;
    return -3;
  }
  if (pat[0] == '*')
    return -5;
  if (pat[0] == '?')
    return -4;
escaped:
  if (pat[0] >= 128U) {
    wchar_t wc;
    int k = mbtowc(&wc, pat, m);
    if (k < 0) {
      *step = 0;
      return -2;
    }
    *step = k + esc;
    return wc;
  }
  return pat[0];
}
```