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

```asm
<fgetl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movl   $0x80,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L109
  mov    $0x0,%eax
  jmp    L108
L109:
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movq   $0x0,-0x8(%rbp)
  jmp    L21
L76:
  mov    -0x20(%rbp),%eax
  cmp    %rax,-0x8(%rbp)
  jb     L13
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  shll   -0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %rcx,%rdi
  call   <memset@plt>
L13:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0xd,-0x18(%rbp)
  jne    L140
  cmpl   $0xa,-0x1c(%rbp)
  je     L65
L140:
  cmpl   $0xd,-0x18(%rbp)
  je     L61
  cmpl   $0xa,-0x1c(%rbp)
  je     L65
L61:
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  je     L65
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x1c(%rbp),%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x8(%rbp)
L21:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L76
L65:
  cmpq   $0x0,-0x8(%rbp)
  jne    L34
  cmpl   $0xd,-0x1c(%rbp)
  je     L145
  cmpl   $0xa,-0x1c(%rbp)
  je     L145
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jne    L34
L145:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L108
L34:
  cmpq   $0x0,-0x8(%rbp)
  je     L8
  mov    -0x8(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L8
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L8
  mov    -0x8(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L8:
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
L108:
  leave
  ret
```

assistant: ```c
char *fgetl(FILE *stream) {
  unsigned int length = 128, old_length;
  char *line;
  int byte, previous_byte;
  size_t idx_line;
  line = calloc(length, sizeof(*line));
  if (!line)
    return NULL;
  previous_byte = 0;
  byte = 0;
  idx_line = 0;
  while (!feof(stream)) {
    if (idx_line >= length) {
      old_length = length;
      length = length * 2;
      line = realloc(line, length * sizeof(*line));
      memset(line + old_length, 0, old_length);
    }
    byte = fgetc(stream);
    if ((previous_byte == '\r' && byte == '\n') || (previous_byte != '\r' && byte == '\n') || byte == EOF)
      break;
    previous_byte = byte;
    line[idx_line] = byte;
    idx_line++;
  }
  if (idx_line == 0 && (byte == '\r' || byte == '\n' || byte == EOF)) {
    free(line);
    return NULL;
  }
  if (idx_line && line[idx_line - 1] == '\r' && line[idx_line] == '\n')
    line[idx_line - 1] = '\0';
  line[idx_line] = '\0';
  return line;
}
```