user: 请将以下的汇编代码转换成C语言代码:

```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    L182
L309:
  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     L154
  add    $0x1,%rbx
  jmp    L68
L154:
  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     L150
  add    $0x2,%rbx
  jmp    L68
L150:
  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     L197
  add    $0x3,%rbx
  jmp    L68
L197:
  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     L216
  add    $0x4,%rbx
  jmp    L68
L216:
  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     L27
  add    $0x5,%rbx
  jmp    L68
L27:
  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     L326
  add    $0x6,%rbx
  jmp    L68
L326:
  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     L345
  add    $0x7,%rbx
  jmp    L68
L345:
  add    $0x8,%rbx
  jmp    L182
L212:
  cmpb   $0x7f,(%rbx)
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L343
  add    $0x1,%rbx
L182:
  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     L165
  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     L309
L68:
  cmpb   $0x1f,(%rbx)
  setbe  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L212
  cmpb   $0x9,(%rbx)
  setne  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L212
L343:
  cmpb   $0xd,(%rbx)
  sete   %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L46
  lea    0x1(%rbx),%rax
  cmp    %rax,%rbp
  je     L358
  lea    0x2(%rbx),%rax
  mov    %rbx,%rdx
  sub    %r12,%rdx
  cmpb   $0xa,0x1(%rbx)
  je     L74
  movl   $0xffffffff,(%r15)
  mov    $0x0,%eax
  jmp    L104
L165:
  cmp    %rbp,%rbx
  jne    L271
L348:
  movl   $0xfffffffe,(%r15)
  mov    $0x0,%eax
  jmp    L104
L112:
  cmpb   $0x7f,(%rbx)
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L343
L293:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L348
L271:
  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     L293
  cmpb   $0x1f,(%rbx)
  setbe  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L112
  cmpb   $0x9,(%rbx)
  setne  %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L112
  jmp    L343
L358:
  movl   $0xfffffffe,(%r15)
  mov    $0x0,%eax
  jmp    L104
L46:
  cmpb   $0xa,(%rbx)
  jne    L261
  mov    %rbx,%rdx
  sub    %r12,%rdx
  lea    0x1(%rbx),%rax
L74:
  mov    %rdx,(%r14)
  mov    %r12,0x0(%r13)
L104:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L261:
  movl   $0xffffffff,(%r15)
  mov    $0x0,%eax
  jmp    L104
```

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