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

```asm
<eslib_file_path_check>:
  endbr64
  test   %rdi,%rdi
  je     L63
  push   %rbp
  mov    $0x800,%esi
  mov    %rdi,%rbp
  call   <strnlen@plt>
  lea    -0x1(%rax),%rdx
  cmp    $0x7fe,%rdx
  ja     L174
  movzbl 0x0(%rbp),%edx
  cmp    $0x2f,%dl
  jne    L213
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  jmp    L158
  cs nopw 0x0(%rax,%rax,1)
L3:
  test   %r9d,%r9d
  jne    L66
  and    %r10d,%r8d
  jne    L131
  mov    $0x1,%r10d
  mov    $0x1,%r9d
L25:
  lea    0x1(%rcx),%rdi
  cmp    %rdi,%rax
  je     L42
L99:
  movzbl 0x1(%rbp,%rcx,1),%edx
  mov    %rdi,%rcx
L158:
  cmp    $0x2e,%dl
  je     L129
  cmp    $0x2f,%dl
  je     L3
  lea    0x1(%rcx),%rdi
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  cmp    %rdi,%rax
  jne    L99
L42:
  xor    %r8d,%r8d
  cmp    $0x1,%rax
  je     L41
  cmp    $0x2f,%dl
  je     L127
  cmpb   $0x2f,-0x1(%rbp,%rcx,1)
  je     L45
L41:
  mov    %r8d,%eax
  pop    %rbp
  ret
  nopl   (%rax)
L129:
  test   %r8d,%r8d
  jne    L60
  xor    %r9d,%r9d
  mov    $0x1,%r8d
  jmp    L25
L66:
  lea    D70(%rip),%rdi
  call   <puts@plt>
L71:
  mov    %rbp,%rsi
  lea    D8(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%r8d
  pop    %rbp
  mov    %r8d,%eax
  ret
L60:
  lea    D65(%rip),%rdi
  call   <puts@plt>
  jmp    L71
L131:
  lea    D63(%rip),%rdi
  call   <puts@plt>
  jmp    L71
L45:
  cmp    $0x2e,%dl
  jne    L41
  lea    D63(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%r8d
  jmp    L41
  nopl   0x0(%rax,%rax,1)
L213:
  lea    D7(%rip),%rdi
  call   <puts@plt>
  jmp    L71
L63:
  mov    $0xffffffff,%eax
  ret
L174:
  mov    %rax,%rsi
  lea    D47(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%r8d
  jmp    L41
L127:
  mov    %rbp,%rsi
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  or     $0xffffffff,%r8d
  jmp    L41
```

tool_calls: name: read_data
arguments: label: D70
data_type: string
name: read_data
arguments: label: D8
data_type: string
name: read_data
arguments: label: D65
data_type: string
name: read_data
arguments: label: D63
data_type: string
name: read_data
arguments: label: D7
data_type: string
name: read_data
arguments: label: D47
data_type: string
name: read_data
arguments: label: D39
data_type: string

tool: D70: // not permitted

tool: D8: bad path: %s


tool: D65: .. not permitted

tool: D63: /. not permitted

tool: D7: path must begin with /

tool: D47: bad pathlen(%d)


tool: D39: trailing slash not permitted: %s


assistant: ```c
int eslib_file_path_check(char *path) {
  size_t len;
  size_t i;
  int adot = 0;
  int aslash = 0;
  int slashing = 0;
  if (path == NULL)
    return -1;
  len = strnlen(path, 2048);
  if (len >= 2048 || len == 0) {
    printf("bad pathlen(%d)\n", len);
    return -1;
  }
  if (path[0] != '/') {
    printf("path must begin with /\n");
    goto bad_path;
  }
  for (i = 0; i < len; ++i) {
    switch (path[i]) {
    case '.':
      if (adot) {
        printf(".. not permitted\n");
        goto bad_path;
      }
      adot = 1;
      aslash = 0;
      break;
    case '/':
      if (aslash) {
        printf("// not permitted\n");
        goto bad_path;
      }
      if (adot && slashing) {
        printf("/. not permitted\n");
        goto bad_path;
      }
      slashing = 1;
      aslash = 1;
      adot = 0;
      break;
    default:
      slashing = 0;
      adot = 0;
      aslash = 0;
      break;
    }
  }
  if (len >= 2 && path[i - 1] == '/') {
    printf("trailing slash not permitted: %s\n", path);
    return -1;
  } else if (len >= 2 && path[i - 2] == '/' && path[i - 1] == '.') {
    printf("/. not permitted\n");
    return -1;
  }
  return 0;
bad_path:
  printf("bad path: %s\n", path);
  return -1;
}
```