user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x410,%rsp
  mov    %edi,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  je     L183
  mov    %rsi,%r12
  cmp    $0x2,%edi
  je     L121
  cmp    $0x3,%edi
  je     L157
  mov    0x8(%rsi),%rdi
  lea    D179(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L161
  mov    $0x0,%eax
  call   <connect_to_daemon@plt>
  mov    %eax,%r14d
  cmp    $0xffffffff,%eax
  je     L44
  mov    0x8(%r12),%rdx
  mov    %rsp,%rdi
  lea    D149(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  cmp    $0x2,%ebp
  jle    L261
  mov    $0x2,%ebx
  lea    D0(%rip),%r13
L167:
  mov    (%r12,%rbx,8),%rcx
  mov    %rsp,%rdi
  mov    %rdi,%rdx
  mov    %r13,%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x1,%rbx
  cmp    %ebx,%ebp
  jg     L167
L261:
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%ecx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <send@plt>
  cmp    $0xffffffff,%eax
  je     L89
  mov    %rsp,%rsi
  mov    $0x0,%ecx
  mov    $0x400,%edx
  mov    %r14d,%edi
  call   <recv@plt>
  test   %eax,%eax
  jle    L133
  cltq
  movb   $0x0,(%rsp,%rax,1)
  mov    %rsp,%rsi
  lea    D149(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r14d,%edi
  call   <close@plt>
  mov    $0x0,%eax
L15:
  mov    0x408(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L287
  add    $0x410,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L183:
  call   <print_usage@plt>
  mov    %ebp,%eax
  jmp    L15
L121:
  mov    0x8(%rsi),%rdi
  lea    D102(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L160
L270:
  mov    $0x0,%eax
  call   <connect_to_daemon@plt>
  mov    %eax,%r14d
  cmp    $0xffffffff,%eax
  jne    L299
L44:
  lea    D102(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%eax
  jmp    L15
L160:
  mov    0x8(%r12),%rdi
  lea    D14(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L270
  mov    0x8(%r12),%rdi
  lea    D122(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L270
  mov    0x8(%r12),%rdi
  lea    D88(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L270
  mov    0x8(%r12),%rdi
  lea    D82(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L270
  mov    0x8(%r12),%rdi
  lea    D64(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L270
  mov    0x8(%r12),%rdi
  lea    D85(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L270
  mov    $0x0,%eax
  call   <print_usage@plt>
  mov    $0x1,%eax
  jmp    L15
L157:
  mov    0x8(%rsi),%rdi
  lea    D185(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L207
  mov    $0x0,%eax
  call   <connect_to_daemon@plt>
  mov    %eax,%r14d
  cmp    $0xffffffff,%eax
  je     L44
  mov    0x8(%r12),%rdx
  mov    %rsp,%rbx
  lea    D149(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    0x10(%r12),%rcx
  mov    %rbx,%rdx
  lea    D0(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L261
L207:
  mov    $0x0,%eax
  call   <print_usage@plt>
  mov    $0x1,%eax
  jmp    L15
L161:
  mov    $0x0,%eax
  call   <print_usage@plt>
  mov    $0x1,%eax
  jmp    L15
L89:
  lea    D102(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%eax
  jmp    L15
L133:
  js     L73
  lea    D31(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L15
L73:
  lea    D182(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%eax
  jmp    L15
L299:
  mov    0x8(%r12),%rdx
  mov    %rsp,%rdi
  lea    D149(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L261
L287:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D179
type_infered: string
name: parse_data
arguments: label: D149
type_infered: string
name: parse_data
arguments: label: D0
type_infered: string
name: parse_data
arguments: label: D102
type_infered: string
name: parse_data
arguments: label: D14
type_infered: string
name: parse_data
arguments: label: D122
type_infered: string
name: parse_data
arguments: label: D88
type_infered: string
name: parse_data
arguments: label: D82
type_infered: string
name: parse_data
arguments: label: D64
type_infered: string
name: parse_data
arguments: label: D85
type_infered: string
name: parse_data
arguments: label: D185
type_infered: string
name: parse_data
arguments: label: D31
type_infered: string
name: parse_data
arguments: label: D182
type_infered: string

tool: D179: a

tool: D149: %s

tool: D0: %s %s

tool: D102: q

tool: D14: l

tool: D122: i

tool: D88: s

tool: D82: r

tool: D64: 8

tool: D85: f

tool: D185: d

tool: D31: Server closed connection

tool: D182: recv

assistant: ```c
int main(int argc, char **argv) {
  int socket, t, i;
  char str[1024];
  if (argc == 1) {
    print_usage();
    return 1;
  } else if (argc == 2) {
    if (!(strcmp(argv[1], "q") == 0 || strcmp(argv[1], "l") == 0 || strcmp(argv[1], "i") == 0 || strcmp(argv[1], "s") == 0 || strcmp(argv[1], "r") == 0 || strcmp(argv[1], "8") == 0 || strcmp(argv[1], "f") == 0)) {
      print_usage();
      return 1;
    }
  } else if (argc == 3) {
    if (!(strcmp(argv[1], "d") == 0)) {
      print_usage();
      return 1;
    }
  } else if (!(strcmp(argv[1], "a") == 0)) {
    print_usage();
    return 1;
  }
  if ((socket = connect_to_daemon()) == -1) {
    perror("q");
    return 1;
  }
  sprintf(str, "%s", argv[1]);
  for (i = 2; i < argc; i++)
    sprintf(str, "%s %s", str, argv[i]);
  if (send(socket, str, strlen(str), 0) == -1) {
    perror("q");
    return 1;
  }
  if ((t = recv(socket, str, 1024, 0)) > 0) {
    str[t] = '\0';
    printf("%s", str);
  } else {
    if (t < 0) {
      perror("recv");
    } else {
      printf("Server closed connection\n");
    }
    return 1;
  }
  close(socket);
  return 0;
}
```