user: 下面的汇编指令对应的C源代码是什么：

```asm
<getline>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x18,%rsp
  test   %rsi,%rsi
  sete   %al
  test   %rdx,%rdx
  mov    %rdi,0x8(%rsp)
  sete   %dl
  or     %dl,%al
  jne    L79
  test   %rdi,%rdi
  je     L79
  mov    (%rdi),%rax
  mov    %rsi,%r14
  mov    %rax,(%rsp)
  test   %rax,%rax
  je     L91
  mov    (%rsi),%r12
L154:
  mov    D4(%rip),%rbp
  nopl   0x0(%rax)
L107:
  mov    %rbx,%rdi
  call   <getc@plt>
  mov    0x0(%rbp),%r15d
  mov    %eax,%r13d
  cmp    $0xd,%eax
  je     L107
  mov    0x8(%rsp),%rcx
  mov    (%r14),%rax
  xor    %edi,%edi
  add    (%rcx),%rax
  mov    (%rsp),%rcx
  lea    (%rcx,%r12,1),%rsi
  cmp    %rsi,%rax
  sete   %dil
  call   <assert@plt>
  mov    (%rsp),%rax
  mov    %rax,%rdx
  cmp    $0x1,%r12
  jbe    L95
L42:
  mov    %rbx,%rdi
  mov    %rdx,(%rsp)
  call   <ferror@plt>
  mov    (%rsp),%rdx
  test   %rax,%rax
  jne    L52
  mov    D52(%rip),%rax
  cmp    %r13d,(%rax)
  je     L38
  lea    0x1(%rdx),%rax
  mov    %r13b,(%rdx)
  sub    $0x1,%r12
  mov    %rax,(%rsp)
  cmp    $0xa,%r13d
  jne    L107
  mov    %rax,%rdx
L129:
  mov    0x8(%rsp),%rsi
  movb   $0x0,(%rdx)
  mov    %edx,%eax
  sub    (%rsi),%eax
L105:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L95:
  mov    (%r14),%rsi
  mov    0x8(%rsp),%rcx
  add    %rsi,%rsi
  mov    (%rcx),%rdi
  mov    %rsi,(%r14)
  lea    (%rdi,%rsi,1),%r12
  sub    %rax,%r12
  call   <realloc@plt>
  mov    0x8(%rsp),%rcx
  mov    %rax,(%rcx)
  test   %rax,%rax
  je     L54
  sub    %r12,%rax
  mov    $0x1,%edi
  add    (%r14),%rax
  mov    %rax,(%rsp)
  call   <assert@plt>
  mov    (%rsp),%rdx
  jmp    L42
L52:
  mov    %r15d,0x0(%rbp)
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L38:
  mov    0x8(%rsp),%rax
  cmp    %rdx,(%rax)
  jne    L129
  mov    $0xffffffff,%eax
  jmp    L105
  nopl   0x0(%rax,%rax,1)
L91:
  movq   $0x80,(%rsi)
  mov    $0x80,%edi
  call   <malloc@plt>
  mov    0x8(%rsp),%rsi
  mov    %rax,(%rsp)
  mov    %rax,(%rsi)
  test   %rax,%rax
  je     L76
  mov    $0x80,%r12d
  jmp    L154
L54:
  mov    D0(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x0(%rbp)
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L79:
  mov    D51(%rip),%rax
  mov    (%rax),%edx
  mov    D4(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L105
L76:
  mov    D0(%rip),%rax
  mov    (%rax),%edx
  mov    D4(%rip),%rax
  mov    %edx,(%rax)
  or     $0xffffffff,%eax
  jmp    L105
```

assistant: ```c
ssize_t getline(char **lineptr, size_t *n, FILE *stream) {
  size_t nchars_avail;
  char *read_pos;
  int save_errno;
  ssize_t ret;
  register int c;
  if (!lineptr || !n || !stream) {
    errno = EINVAL;
    return -1;
  }
  if (!*lineptr) {
    *n = 128;
    *lineptr = malloc(*n);
    if (!*lineptr) {
      errno = ENOMEM;
      return -1;
    }
  }
  nchars_avail = *n;
  read_pos = *lineptr;
  for (;;) {
    c = getc(stream);
    save_errno = errno;
    if (c != '\r') {
      assert((*lineptr + *n) == (read_pos + nchars_avail));
      if (nchars_avail < 2) {
        *n *= 2;
        nchars_avail = *n + *lineptr - read_pos;
        *lineptr = realloc(*lineptr, *n);
        if (!*lineptr) {
          errno = ENOMEM;
          return -1;
        }
        read_pos = *n - nchars_avail + *lineptr;
        assert((*lineptr + *n) == (read_pos + nchars_avail));
      }
      if (ferror(stream)) {
        errno = save_errno;
        return -1;
      }
      if (c == EOF) {
        if (read_pos == *lineptr)
          return -1;
        else
          break;
      }
      *read_pos++ = c;
      nchars_avail--;
      if (c == '\n')
        break;
    }
  }
  *read_pos = '\0';
  ret = read_pos - *lineptr;
  return ret;
}
```