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

```asm
<get_token_to_eol>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %rdx,%r13
  mov    %rcx,%r14
  mov    %r8,%r15
  mov    %rdi,%rbx
  jmp    L154
L297:
  movzbl 0x1(%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L22
  add    $0x1,%rbx
  jmp    L253
L22:
  movzbl 0x2(%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L67
  add    $0x2,%rbx
  jmp    L253
L67:
  movzbl 0x3(%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L254
  add    $0x3,%rbx
  jmp    L253
L254:
  movzbl 0x4(%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L160
  add    $0x4,%rbx
  jmp    L253
L160:
  movzbl 0x5(%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L23
  add    $0x5,%rbx
  jmp    L253
L23:
  movzbl 0x6(%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L145
  add    $0x6,%rbx
  jmp    L253
L145:
  movzbl 0x7(%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L339
  add    $0x7,%rbx
  jmp    L253
L339:
  add    $0x8,%rbx
  jmp    L154
L338:
  cmpb   $0x7f,(%rbx)
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L195
  add    $0x1,%rbx
L154:
  mov    %rbp,%rax
  sub    %rbx,%rax
  cmp    $0x7,%rax
  setg   %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L179
  movzbl (%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L297
L253:
  cmpb   $0x1f,(%rbx)
  setbe  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L338
  cmpb   $0x9,(%rbx)
  setne  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L338
L195:
  cmpb   $0xd,(%rbx)
  sete   %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L13
  lea    0x1(%rbx),%rax
  cmp    %rax,%rbp
  je     L142
  lea    0x2(%rbx),%rax
  mov    %rbx,%rdx
  sub    %r12,%rdx
  cmpb   $0xa,0x1(%rbx)
  je     L265
  movl   $0xffffffff,(%r15)
  mov    $0x0,%eax
  jmp    L260
L179:
  cmp    %rbp,%rbx
  jne    L247
L344:
  movl   $0xfffffffe,(%r15)
  mov    $0x0,%eax
  jmp    L260
L186:
  cmpb   $0x7f,(%rbx)
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L195
L269:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L344
L247:
  movzbl (%rbx),%eax
  sub    $0x20,%eax
  cmp    $0x5e,%eax
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L269
  cmpb   $0x1f,(%rbx)
  setbe  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L186
  cmpb   $0x9,(%rbx)
  setne  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L186
  jmp    L195
L142:
  movl   $0xfffffffe,(%r15)
  mov    $0x0,%eax
  jmp    L260
L13:
  cmpb   $0xa,(%rbx)
  jne    L355
  mov    %rbx,%rdx
  sub    %r12,%rdx
  lea    0x1(%rbx),%rax
L265:
  mov    %rdx,(%r14)
  mov    %r12,0x0(%r13)
L260:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L355:
  movl   $0xffffffff,(%r15)
  mov    $0x0,%eax
  jmp    L260
```

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;
}
```