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

```asm
<dataConnect>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,-0x6c(%rbp)
  mov    %rsi,%r12
  mov    %rdx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
L134:
  cmp    %rax,%rsp
  je     L44
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L134
L44:
  sub    $0x400,%rsp
  orq    $0x0,0x3f8(%rsp)
  mov    %rsp,%r13
  mov    $0x100,%esi
  mov    %rsp,%rdi
  call   <bzero@plt>
  test   %r12,%r12
  je     L34
L23:
  lea    D76(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  mov    %rax,-0x68(%rbp)
  test   %rax,%rax
  je     L122
L56:
  lea    D66(%rip),%rdi
  call   <printf@plt>
  lea    -0x54(%rbp),%rbx
  mov    %rbx,%rdi
  call   <FD_ZERO@plt>
  mov    %rbx,%rsi
  mov    -0x6c(%rbp),%ebx
  mov    %ebx,%edi
  call   <FD_SET@plt>
  lea    0x1(%rbx),%r15d
  mov    $0x3e8,%ebx
  lea    -0x50(%rbp),%r14
  jmp    L78
L34:
  lea    D22(%rip),%rdi
  call   <perror@plt>
  jmp    L23
L122:
  lea    D17(%rip),%rdi
  call   <perror@plt>
  jmp    L56
L53:
  mov    -0x68(%rbp),%rdi
  call   <fclose@plt>
  lea    D39(%rip),%rdi
  call   <perror@plt>
  jmp    L1
L82:
  lea    D4(%rip),%rdi
  call   <perror@plt>
L79:
  mov    -0x68(%rbp),%rcx
  mov    %r12,%rdx
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <fwrite@plt>
  jmp    L1
L10:
  mov    -0x68(%rbp),%rdi
  call   <fclose@plt>
  lea    D53(%rip),%rdi
  call   <perror@plt>
L1:
  sub    $0x1,%ebx
  je     L69
L78:
  mov    $0x400,%esi
  mov    %r13,%rdi
  call   <bzero@plt>
  movl   $0x14,-0x50(%rbp)
  movq   $0x0,-0x48(%rbp)
  lea    -0x54(%rbp),%rsi
  mov    %r14,%r8
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %r15d,%edi
  call   <select@plt>
  cmp    $0xffffffff,%eax
  je     L53
  test   %eax,%eax
  je     L10
  mov    $0x0,%ecx
  mov    $0x400,%edx
  mov    %r13,%rsi
  mov    -0x6c(%rbp),%edi
  call   <recv@plt>
  mov    %rax,%r12
  test   %rax,%rax
  js     L82
  je     L1
  jmp    L79
L69:
  lea    D13(%rip),%rdi
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D76
type_infered: string
name: parse_data
arguments: data_label: D66
type_infered: string
name: parse_data
arguments: data_label: D22
type_infered: string
name: parse_data
arguments: data_label: D17
type_infered: string
name: parse_data
arguments: data_label: D39
type_infered: string
name: parse_data
arguments: data_label: D4
type_infered: string
name: parse_data
arguments: data_label: D53
type_infered: string
name: parse_data
arguments: data_label: D13
type_infered: string

tool: D76: w

tool: D66: In dataConnect.


tool: D22: useless thing

tool: D17: Error creating file.

tool: D39: select()

tool: D4: ERROR reading from socket

tool: D53: Timeout

tool: D13: Out of loop


assistant: ```c
void dataConnect(int sock, struct sockaddr_in *client_addr, char *filename) {
  int maxfd;
  ssize_t n;
  size_t BUFFER_SIZE = 1024;
  char buffer[BUFFER_SIZE];
  bzero(buffer, 256);
  fd_set rfds;
  struct timeval tv;
  int retval;
  if (client_addr == NULL)
    perror("useless thing");
  FILE *fp = fopen(filename, "w");
  if (!fp)
    perror("Error creating file.");
  printf("In dataConnect.\n");
  FD_ZERO(&rfds);
  FD_SET(sock, &rfds);
  maxfd = sock + 1;
  int i = 0;
  while (i++ < 1000) {
    bzero(buffer, BUFFER_SIZE);
    tv.tv_sec = 20;
    tv.tv_usec = 0;
    retval = select(maxfd, &rfds, NULL, NULL, &tv);
    if (retval == -1) {
      fclose(fp);
      perror("select()");
    } else if (retval) {
      n = recv(sock, buffer, BUFFER_SIZE, 0);
      if (n < 0)
        perror("ERROR reading from socket");
      if (n != 0) {
        fwrite(buffer, 1, n, fp);
      }
    } else {
      fclose(fp);
      perror("Timeout");
    }
  }
  printf("Out of loop\n");
}
```