user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<http_request_recv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0xc(%rsp)
  mov    %rsi,%rbp
  mov    %edx,%r14d
  mov    %rcx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0xa0d0a0d,0x13(%rsp)
  movb   $0x0,0x17(%rsp)
  cmpq   $0x0,(%rcx)
  je     L141
L57:
  lea    0x13(%rsp),%r15
  jmp    L29
L141:
  mov    %rsi,(%r12)
  movb   $0x0,(%rsi)
  jmp    L57
L15:
  lea    -0x1(%r14),%eax
  cmp    %ebx,%eax
  jne    L30
  jmp    L120
L4:
  movzbl (%rsi),%edx
  mov    $0x1,%eax
  mov    $0x0,%ebx
  mov    $0x0,%ecx
  test   %dl,%dl
  je     L77
L68:
  mov    %dl,-0x1(%rbp,%rax,1)
  mov    %eax,%ebx
  mov    (%r12),%rdx
  movzbl (%rdx,%rax,1),%edx
  mov    %rax,%rcx
  add    $0x1,%rax
  test   %dl,%dl
  jne    L68
L77:
  movb   $0x0,0x0(%rbp,%rcx,1)
L47:
  mov    %rbp,(%r12)
L30:
  lea    0x1(%rbx),%eax
  mov    %r14d,%edx
  sub    %eax,%edx
  movslq %ebx,%rsi
  add    %rbp,%rsi
  mov    D4(%rip),%rax
  mov    (%rax),%ecx
  mov    0xc(%rsp),%edi
  call   <recv@plt>
  test   %eax,%eax
  js     L78
  je     L151
  add    %ebx,%eax
  cltq
  movb   $0x0,0x0(%rbp,%rax,1)
L29:
  mov    (%r12),%rbx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L60
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    (%r12),%rsi
  cmp    %rbp,%rsi
  je     L15
  test   %eax,%eax
  jle    L47
  cltq
  mov    %rsi,%rdx
  sub    %rbp,%rdx
  cmp    %rdx,%rax
  jge    L4
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L47
L151:
  test   %ebx,%ebx
  je     L78
L120:
  mov    (%r12),%r13
  movslq %ebx,%rbx
  add    %r13,%rbx
  mov    %rbx,(%r12)
  jmp    L78
L60:
  lea    0x13(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  cltq
  add    %r13,%rax
  mov    %rax,(%r12)
  mov    %rbx,%r13
L78:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L134
  mov    %r13,%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L134:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *http_request_recv(int fd, char *buf, int buflen, char **data) {
  const char delim[] = "\r\n"
                       "\r\n";
  char *retval, *split;
  int len, recvlen;
  if (!*data) {
    *data = buf;
    *buf = '\0';
  }
  while ((split = strstr(*data, delim)) == NULL) {
    len = strlen(*data);
    if (*data == buf && len == (buflen - 1)) {
      break;
    }
    if (*data != buf) {
      if (len > 0) {
        if (len < *data - buf) {
          strcpy(buf, *data);
        } else {
          for (len = 0; (*data)[len] != '\0'; ++len)
            buf[len] = (*data)[len];
          buf[len] = '\0';
        }
      }
      *data = buf;
    }
    recvlen = recv(fd, buf + len, buflen - (len + 1), MSG_DONTWAIT);
    if (recvlen < 0) {
      return NULL;
    } else if (recvlen == 0) {
      if (len == 0) {
        return NULL;
      }
      break;
    }
    len += recvlen;
    buf[len] = '\0';
  }
  retval = *data;
  if (split) {
    memset(split, '\0', strlen(delim));
    *data = split + strlen(delim);
  } else {
    *data += len;
  }
  return retval;
}
```