user: What is the c source code of the assembly code below:

```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    L230
  cs nopw 0x0(%rax,%rax,1)
L169:
  add    $0x1,%rbx
L151:
  xor    %edi,%edi
  cmpb   $0x1f,(%rbx)
  mov    $0x1,%esi
  setbe  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L278
  xor    %edi,%edi
  cmpb   $0x9,(%rbx)
  mov    $0x1,%esi
  setne  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L150
L278:
  xor    %edi,%edi
  cmpb   $0x7f,(%rbx)
  sete   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L150
  add    $0x1,%rbx
L230:
  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     L39
  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    L151
  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    L169
  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     L222
  add    $0x2,%rbx
  jmp    L151
  nopl   0x0(%rax)
L222:
  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     L166
  add    $0x3,%rbx
  jmp    L151
  nopl   0x0(%rax)
L39:
  cmp    %rbp,%rbx
  jne    L192
  jmp    L159
  nopw   0x0(%rax,%rax,1)
L146:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L159
L192:
  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     L146
  xor    %edi,%edi
  cmpb   $0x1f,(%rbx)
  mov    $0x1,%esi
  setbe  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L214
  xor    %edi,%edi
  cmpb   $0x9,(%rbx)
  mov    $0x1,%esi
  setne  %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L150
L214:
  xor    %edi,%edi
  cmpb   $0x7f,(%rbx)
  sete   %dil
  xor    %esi,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L146
  nopl   (%rax)
L150:
  xor    %edi,%edi
  cmpb   $0xd,(%rbx)
  mov    $0x1,%esi
  sete   %dil
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L156
  cmpb   $0xa,(%rbx)
  jne    L106
  mov    %rbx,%rdx
  lea    0x1(%rbx),%rax
  sub    %r12,%rdx
L302:
  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)
L166:
  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     L308
  add    $0x4,%rbx
  jmp    L151
  nopl   (%rax)
L156:
  lea    0x1(%rbx),%rax
  cmp    %rax,%rbp
  je     L159
  mov    %rbx,%rdx
  lea    0x2(%rbx),%rax
  sub    %r12,%rdx
  cmpb   $0xa,0x1(%rbx)
  je     L302
L106:
  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)
L308:
  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     L127
  add    $0x5,%rbx
  jmp    L151
  nopl   (%rax)
L159:
  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)
L127:
  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     L1
  add    $0x6,%rbx
  jmp    L151
L1:
  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     L228
  add    $0x7,%rbx
  jmp    L151
L228:
  add    $0x8,%rbx
  jmp    L230
```

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)) {
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    do {
      if (__builtin_expect(!!(!((unsigned char)(*buf) - 040u < 0137u)), 0))
        goto NonPrintable;
      ++buf;
    } while (0);
    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;
}
```