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

```asm
<read_client_request>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  movq   $0xffffffffffffffff,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0xfff,-0x8(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L122
L65:
  mov    -0x8(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  add    %rax,%rcx
  mov    -0x24(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L84
L27:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L105
  movl   $0x0,-0x20(%rbp)
  jmp    L59
L105:
  addl   $0x1,-0x1c(%rbp)
L84:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x1c(%rbp)
  jl     L27
L59:
  cmpq   $0xffffffffffffffff,-0x18(%rbp)
  jne    L51
  mov    D9(%rip),%rax
  mov    (%rax),%rdx
  mov    D7(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L122
  mov    $0xfffffffe,%eax
  jmp    L36
L51:
  mov    -0x18(%rbp),%rax
  add    %rax,-0x10(%rbp)
L122:
  cmpq   $0x0,-0x18(%rbp)
  je     L43
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jae    L43
  cmpl   $0x0,-0x20(%rbp)
  jne    L65
L43:
  mov    -0x30(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L163
  mov    -0x10(%rbp),%rax
  lea    -0x2(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L163
  mov    -0x10(%rbp),%rax
  jmp    L36
L163:
  mov    -0x10(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L149
  mov    -0x10(%rbp),%rax
  lea    -0x2(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L149
  mov    -0x10(%rbp),%rax
  lea    -0x3(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L149
  mov    -0x10(%rbp),%rax
  jmp    L36
L149:
  mov    $0xffffffff,%eax
L36:
  leave
  ret
```

assistant: ```c
int read_client_request(int clientsd, char *buffer) {
  size_t maxread;
  ssize_t reader, readerc;
  int reading;
  reader = -1;
  readerc = 0;
  maxread = 4096 - 1;
  reading = 1;
  while ((reader != 0) && (readerc < maxread) && reading) {
    int i;
    reader = read(clientsd, buffer + readerc, maxread - readerc);
    for (i = 0; i < strlen(buffer); i++) {
      if (buffer[i] == '\n') {
        reading = 0;
        break;
      }
    }
    if (reader == -1) {
      if (errno != EINTR)
        return -2;
    } else
      readerc += reader;
  }
  buffer[readerc] = '\0';
  if (buffer[readerc - 1] == '\n' && buffer[readerc - 2] == '\n') {
    return readerc;
  } else if (buffer[readerc - 1] == '\n' && buffer[readerc - 2] == '\r' && buffer[readerc - 3] == '\n') {
    return readerc;
  } else {
    return -1;
  }
}
```