user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<process_cmd>:
  endbr64
  push   %r13
  xor    %eax,%eax
  push   %r12
  mov    %esi,%r12d
  mov    %rdi,%rsi
  push   %rbp
  mov    %rdi,%rbp
  lea    D105(%rip),%rdi
  call   <printf@plt>
  mov    $0xa,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L31
  cmpb   $0xd,-0x1(%rax)
  movb   $0x0,(%rax)
  jne    L73
  movb   $0x0,-0x1(%rax)
L73:
  mov    $0x20,%esi
  mov    %rbp,%rdi
  xor    %r13d,%r13d
  call   <strchr@plt>
  test   %rax,%rax
  je     L49
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r13
L49:
  lea    D112(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L104
  lea    D103(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L189
  test   %r13,%r13
  je     L55
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <get_dependencies@plt>
  mov    $0x1,%eax
L107:
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L104:
  mov    %r12d,%edi
  xor    %ecx,%ecx
  mov    $0x1,%edx
  lea    D60(%rip),%rsi
  call   <send@plt>
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L189:
  lea    D24(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L6
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <get_filesystem@plt>
  mov    $0x1,%eax
  jmp    L107
  cs nopw 0x0(%rax,%rax,1)
L6:
  lea    D39(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L45
  lea    D47(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L203
  mov    %r12d,%edi
  call   <get_bound_sockets@plt>
  mov    $0x1,%eax
  jmp    L107
  nopw   0x0(%rax,%rax,1)
L31:
  lea    D100(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L107
  nopl   0x0(%rax,%rax,1)
L55:
  lea    D55(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L107
  nopl   0x0(%rax,%rax,1)
L45:
  mov    %r12d,%edi
  call   <get_installed@plt>
  mov    $0x1,%eax
  jmp    L107
  nopw   0x0(%rax,%rax,1)
L203:
  lea    D76(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L75
  mov    %r12d,%edi
  call   <get_ps@plt>
  mov    $0x1,%eax
  jmp    L107
  xchg   %ax,%ax
L75:
  lea    D6(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L216
  test   %r13,%r13
  je     L210
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <get_active_processes@plt>
  mov    $0x1,%eax
  jmp    L107
L216:
  lea    D77(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L67
  mov    %r12d,%edi
  call   <get_pid@plt>
  mov    $0x1,%eax
  jmp    L107
L67:
  lea    D115(%rip),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  xor    %ecx,%ecx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  lea    0x1(%rax),%edx
  call   <send@plt>
  mov    $0x1,%eax
  jmp    L107
L210:
  lea    D33(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L107
```

tool_calls: name: read_data
arguments: data_label: D105
type: string
name: read_data
arguments: data_label: D112
type: string
name: read_data
arguments: data_label: D103
type: string
name: read_data
arguments: data_label: D60
type: string
name: read_data
arguments: data_label: D24
type: string
name: read_data
arguments: data_label: D39
type: string
name: read_data
arguments: data_label: D47
type: string
name: read_data
arguments: data_label: D100
type: string
name: read_data
arguments: data_label: D55
type: string
name: read_data
arguments: data_label: D76
type: string
name: read_data
arguments: data_label: D6
type: string
name: read_data
arguments: data_label: D77
type: string
name: read_data
arguments: data_label: D115
type: string
name: read_data
arguments: data_label: D33
type: string

tool: D105: CMD: %s

tool: D112: exit

tool: D103: get_dependencies

tool: 

tool: D24: get_filesystem

tool: D39: get_installed

tool: D47: get_bound_sockets

tool: D100: expected new line!;

tool: D55: expected argument with get dependencies

tool: D76: get_ps

tool: D6: get_active_processes

tool: D77: get_pid

tool: D115: UNKNOWN_CMD

tool: D33: expected argument with get_active_processes

assistant: ```c
bool process_cmd(char *cmd, int clientfd) {
  printf("CMD: %s", cmd);
  char *newline = strchr(cmd, '\n');
  if (newline == NULL) {
    printf("expected new line!;\n");
    return false;
  }
  *newline = '\0';
  if (*(newline - 1) == '\r') {
    *(newline - 1) = '\0';
  }
  char *space = strchr(cmd, ' ');
  char *arg = NULL;
  if (space != NULL) {
    arg = space + 1;
    *space = '\0';
  }
  if (strcmp(cmd, "exit") == 0) {
    char *empty = "";
    send(clientfd, empty, 1, 0);
    return false;
  } else if (strcmp(cmd, "get_dependencies") == 0) {
    if (arg == NULL) {
      printf("expected argument with get dependencies\n");
      return false;
    } else {
      get_dependencies(arg, clientfd);
    }
  } else if (strcmp(cmd, "get_filesystem") == 0) {
    get_filesystem(arg, clientfd);
  } else if (strcmp(cmd, "get_installed") == 0) {
    get_installed(clientfd);
  } else if (strcmp(cmd, "get_bound_sockets") == 0) {
    get_bound_sockets(clientfd);
  } else if (strcmp(cmd, "get_ps") == 0) {
    get_ps(clientfd);
  } else if (strcmp(cmd, "get_active_processes") == 0) {
    if (arg == NULL) {
      printf("expected argument with get_active_processes\n");
      return false;
    } else {
      get_active_processes(arg, clientfd);
    }
  } else if (strcmp(cmd, "get_pid") == 0) {
    get_pid(clientfd);
  } else {
    char *unknown = "UNKNOWN_CMD";
    int len = strlen(unknown);
    send(clientfd, unknown, len + 1, 0);
  }
  return true;
}
```