user: 请从给定的汇编指令推导出C源代码：

```asm
<get_token_to_eol>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  jmp    L255
  cs nopw 0x0(%rax,%rax,1)
L136:
  add    $0x1,%rbx
L4:
  xor    %edi,%edi
  cmpb   $0x1f,(%rbx)
  mov    $0x1,%esi
  setbe  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L197
  xor    %edi,%edi
  cmpb   $0x9,(%rbx)
  mov    $0x1,%esi
  setne  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L85
L197:
  xor    %edi,%edi
  cmpb   $0x7f,(%rbx)
  sete   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L85
  add    $0x1,%rbx
L255:
  mov    %rbp,%rax
  xor    %edi,%edi
  mov    $0x1,%esi
  sub    %rbx,%rax
  cmp    $0x7,%rax
  setg   %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L287
  movzbl (%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L4
  movzbl 0x1(%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L136
  movzbl 0x2(%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L130
  add    $0x2,%rbx
  jmp    L4
  nopl   0x0(%rax)
L130:
  movzbl 0x3(%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L216
  add    $0x3,%rbx
  jmp    L4
  nopl   0x0(%rax)
L287:
  cmp    %rbp,%rbx
  jne    L275
  jmp    L76
  nopw   0x0(%rax,%rax,1)
L222:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L76
L275:
  movzbl (%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L222
  xor    %edi,%edi
  cmpb   $0x1f,(%rbx)
  mov    $0x1,%esi
  setbe  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L12
  xor    %edi,%edi
  cmpb   $0x9,(%rbx)
  mov    $0x1,%esi
  setne  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L85
L12:
  xor    %edi,%edi
  cmpb   $0x7f,(%rbx)
  sete   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L222
  nopl   (%rax)
L85:
  xor    %edi,%edi
  cmpb   $0xd,(%rbx)
  mov    $0x1,%esi
  sete   %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L308
  cmpb   $0xa,(%rbx)
  jne    L75
  mov    %rbx,%rdx
  lea    0x1(%rbx),%rax
  sub    %r12,%rdx
L68:
  mov    %rdx,(%r15)
  mov    %r12,(%r14)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L216:
  movzbl 0x4(%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L159
  add    $0x4,%rbx
  jmp    L4
  nopl   (%rax)
L308:
  lea    0x1(%rbx),%rax
  cmp    %rax,%rbp
  je     L76
  mov    %rbx,%rdx
  lea    0x2(%rbx),%rax
  sub    %r12,%rdx
  cmpb   $0xa,0x1(%rbx)
  je     L68
L75:
  movl   $0xffffffff,0x0(%r13)
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L159:
  movzbl 0x5(%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L160
  add    $0x5,%rbx
  jmp    L4
  nopl   (%rax)
L76:
  movl   $0xfffffffe,0x0(%r13)
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L160:
  movzbl 0x6(%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L93
  add    $0x6,%rbx
  jmp    L4
L93:
  movzbl 0x7(%rbx),%eax
  xor    %edi,%edi
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L256
  add    $0x7,%rbx
  jmp    L4
L256:
  add    $0x8,%rbx
  jmp    L255
```

assistant: ```c
const char *get_token_to_eol(const char *buf, const char *buf_end, const char **token, size_t *token_len, int *ret) {
  const char *token_start = buf;
  while (__builtin_expect(!!(buf_end - buf >= 8), 1)) {
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
      goto NonPrintable;
    ++buf;
    continue;
  NonPrintable:
    if ((__builtin_expect(!!((unsigned char)*buf < '\040'), 1) && __builtin_expect(!!(*buf != '\011'), 1)) || __builtin_expect(!!(*buf == '\177'), 0)) {
      goto FOUND_CTL;
    }
    ++buf;
  }
  for (;; ++buf) {
    if (buf == buf_end) {
      *ret = -2;
      return NULL;
    };
    if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0)) {
      if ((__builtin_expect(!!((unsigned char)*buf < '\040'), 1) && __builtin_expect(!!(*buf != '\011'), 1)) || __builtin_expect(!!(*buf == '\177'), 0)) {
        goto FOUND_CTL;
      }
    }
  }
FOUND_CTL:
  if (__builtin_expect(!!(*buf == '\015'), 1)) {
    ++buf;
    if (buf == buf_end) {
      *ret = -2;
      return NULL;
    };
    if (*buf++ != '\012') {
      *ret = -1;
      return NULL;
    };
    *token_len = buf - 2 - token_start;
  } else if (*buf == '\012') {
    *token_len = buf - token_start;
    ++buf;
  } else {
    *ret = -1;
    return NULL;
  }
  *token = token_start;
  return buf;
}
```