user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<TclWordEnd>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rcx,%rcx
  je     L152
  movl   $0x0,(%rcx)
L152:
  movzbl 0x0(%rbp),%edi
  mov    %edi,%ebx
  call   <isspace@plt>
  test   %eax,%eax
  jne    L131
  cmp    $0x5c,%bl
  jne    L88
L292:
  cmpb   $0xa,0x1(%rbp)
  jne    L54
  lea    0x2(%rbp),%rax
  cmp    %rax,%r12
  je     L25
L131:
  movzbl 0x1(%rbp),%edi
  add    $0x1,%rbp
  mov    %edi,%ebx
  call   <isspace@plt>
  test   %eax,%eax
  jne    L131
  cmp    $0x5c,%bl
  je     L292
L88:
  cmp    $0x22,%bl
  je     L206
  cmp    $0x7b,%bl
  jne    L54
  movl   $0x1,0xc(%rsp)
  lea    0x14(%rsp),%rbx
  nopl   0x0(%rax,%rax,1)
L274:
  movzbl 0x1(%rbp),%eax
  lea    0x1(%rbp),%r15
  cmp    $0x5c,%al
  jne    L8
  nopl   0x0(%rax)
L116:
  mov    %r15,%rdi
  mov    %rbx,%rsi
  xor    %eax,%eax
  call   <Tcl_Backslash@plt>
  movslq 0x14(%rsp),%rax
  add    %rax,%r15
  movzbl (%r15),%eax
  cmp    $0x5c,%al
  je     L116
L8:
  cmp    $0x7d,%al
  je     L139
  cmp    $0x7b,%al
  je     L66
  cmp    %r12,%r15
  je     L25
L214:
  mov    %r15,%rbp
  jmp    L274
  nopl   0x0(%rax,%rax,1)
L25:
  mov    %r12,%rax
L308:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L32
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L139:
  subl   $0x1,0xc(%rsp)
  jne    L214
  movzbl 0x1(%r15),%ebx
  lea    0x1(%r15),%rbp
L54:
  lea    0x14(%rsp),%r15
  jmp    L330
  nopw   0x0(%rax,%rax,1)
L141:
  cmp    $0x24,%bl
  je     L302
  cmp    $0x3b,%bl
  je     L248
  movzbl %bl,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L149
  test   %r13d,%r13d
  je     L154
  cmp    $0x5d,%bl
  je     L149
L154:
  cmp    %r12,%rbp
  je     L232
  add    $0x1,%rbp
L140:
  movzbl 0x0(%rbp),%ebx
L330:
  cmp    $0x5b,%bl
  je     L170
  cmp    $0x5c,%bl
  jne    L141
  cmpb   $0xa,0x1(%rbp)
  je     L149
  mov    %rbp,%rdi
  mov    %r15,%rsi
  xor    %eax,%eax
  call   <Tcl_Backslash@plt>
  movslq 0x14(%rsp),%rax
  add    %rax,%rbp
  jmp    L140
  nopl   0x0(%rax,%rax,1)
L170:
  lea    0x1(%rbp),%rdi
  mov    $0x1,%edx
  mov    %r12,%rsi
  xor    %eax,%eax
  call   <ScriptEnd@plt>
  cltq
  cmp    %rax,%r12
  je     L308
L181:
  lea    0x1(%rax),%rbp
  jmp    L140
  nopl   0x0(%rax)
L302:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <VarNameEnd@plt>
  cltq
  cmp    %rax,%r12
  jne    L181
  jmp    L308
  nopl   0x0(%rax)
L66:
  addl   $0x1,0xc(%rsp)
  jmp    L214
  nopw   0x0(%rax,%rax,1)
L149:
  lea    -0x1(%rbp),%rax
  jmp    L308
L206:
  lea    0x1(%rbp),%rdi
  mov    $0x22,%edx
  mov    %r12,%rsi
  xor    %eax,%eax
  call   <QuoteEnd@plt>
  cltq
  cmp    %rax,%r12
  je     L308
  movzbl 0x1(%rax),%ebx
  lea    0x1(%rax),%rbp
  jmp    L54
L248:
  mov    %rbp,%rax
  test   %r14,%r14
  je     L308
  movl   $0x1,(%r14)
  jmp    L308
L232:
  cmp    $0x1,%r13d
  mov    %rbp,%rax
  sbb    $0x0,%rax
  jmp    L308
L32:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *TclWordEnd(start, lastChar, nested, semiPtr)
char *start;
char *lastChar;
int nested;
int *semiPtr;
{
  register char *p;
  int count;
  if (semiPtr != 0) {
    *semiPtr = 0;
  }
  for (p = start;; p++) {
    if (isspace(((unsigned char)(*p)))) {
      continue;
    }
    if ((p[0] == '\\') && (p[1] == '\n')) {
      if (p + 2 == lastChar) {
        return p + 2;
      }
      continue;
    }
    break;
  }
  if (*p == '"') {
    p = QuoteEnd(p + 1, lastChar, '"');
    if (p == lastChar) {
      return p;
    }
    p++;
  } else if (*p == '{') {
    int braces = 1;
    while (braces != 0) {
      p++;
      while (*p == '\\') {
        (void)Tcl_Backslash(p, &count);
        p += count;
      }
      if (*p == '}') {
        braces--;
      } else if (*p == '{') {
        braces++;
      } else if (p == lastChar) {
        return p;
      }
    }
    p++;
  }
  while (1) {
    if (*p == '[') {
      p = ScriptEnd(p + 1, lastChar, 1);
      if (p == lastChar) {
        return p;
      }
      p++;
    } else if (*p == '\\') {
      if (p[1] == '\n') {
        return p - 1;
      }
      (void)Tcl_Backslash(p, &count);
      p += count;
    } else if (*p == '$') {
      p = VarNameEnd(p, lastChar);
      if (p == lastChar) {
        return p;
      }
      p++;
    } else if (*p == ';') {
      if (semiPtr != 0) {
        *semiPtr = 1;
      }
      return p;
    } else if (isspace(((unsigned char)(*p)))) {
      return p - 1;
    } else if ((*p == ']') && nested) {
      return p - 1;
    } else if (p == lastChar) {
      if (nested) {
        return p;
      }
      return p - 1;
    } else {
      p++;
    }
  }
}
```