user: What would the C source look like for the assembly code provided here?

```asm
<dotunneling>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %edi,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <get_port_foo@plt>
  mov    %eax,%esi
  mov    $0x5,%edx
  mov    $0x0,%edi
  call   <bind_addr@plt>
  cmp    $0xffffffff,%eax
  je     L0
  mov    %eax,%ebp
  movq   $0x4,0x10(%rsp)
  lea    0x10(%rsp),%rdx
  lea    0x4(%rsp),%rsi
  mov    %eax,%edi
  call   <accept@plt>
  cmp    $0xffffffff,%eax
  je     L34
  mov    0x4(%rsp),%edi
  call   <inet_ntoa@plt>
  mov    %rax,%rsi
  lea    D16(%rip),%rdi
  call   <printf@plt>
  lea    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <FD_ZERO@plt>
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <FD_SET@plt>
  mov    %rbx,%rsi
  mov    %r12d,%edi
  call   <FD_SET@plt>
  cmp    %r12d,%ebp
  mov    %r12d,%r13d
  cmovge %ebp,%r13d
  lea    0xc(%rsp),%rbx
  add    $0x1,%r13d
  lea    D36(%rip),%r14
L64:
  mov    0x8(%rsp),%eax
  mov    %eax,0xc(%rsp)
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %rbx,%rsi
  mov    %r13d,%edi
  call   <select@plt>
  cmp    $0xffffffff,%eax
  je     L2
L37:
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  jne    L4
L17:
  mov    %rbx,%rsi
  mov    %r12d,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L64
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <gotdata@plt>
  jmp    L64
L0:
  lea    D6(%rip),%rdi
  call   <perror@plt>
L10:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L83
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L34:
  lea    D9(%rip),%rdi
  call   <perror@plt>
  jmp    L10
L2:
  mov    %r14,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L37
L4:
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <gotdata@plt>
  jmp    L17
L83:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D16
data_type: string
name: extract_symbolic_data
arguments: label: D36
data_type: string
name: extract_symbolic_data
arguments: label: D6
data_type: string
name: extract_symbolic_data
arguments: label: D9
data_type: string

tool: D16: commserver: got connection from %s


tool: D36: select

tool: D6: bind_addr

tool: D9: accept

assistant: ```c
void dotunneling(int clientsock) {
  int serversock;
  struct hostent *he;
  struct sockaddr_in remote_addr;
  int maxfd = 0;
  size_t sin_size;
  int new_fd;
  fd_set read_fds;
  if ((serversock = bind_addr(NULL, get_port_foo(), 5)) == -1) {
    perror("bind_addr");
    return;
  }
  sin_size = sizeof(struct sockaddr_in);
  if ((new_fd = accept(serversock, (struct sockaddr *)&remote_addr, &sin_size)) == -1) {
    perror("accept");
    return;
  }
  printf("commserver: got connection from %s\n", inet_ntoa(remote_addr.sin_addr));
  FD_ZERO(&read_fds);
  FD_SET(serversock, &read_fds);
  FD_SET(clientsock, &read_fds);
  maxfd = serversock > clientsock ? serversock : clientsock;
  for (;;) {
    fd_set tmpread_fds = read_fds;
    if (select(maxfd + 1, &tmpread_fds, NULL, NULL, NULL) == -1) {
      perror("select");
      exit(1);
    }
    if (FD_ISSET(serversock, &tmpread_fds)) {
      gotdata(serversock, clientsock);
    }
    if (FD_ISSET(clientsock, &tmpread_fds)) {
      gotdata(clientsock, serversock);
    }
  }
}
```