user: Translate the below assembly code into C programming language:

```asm
<process_cmd>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %rdi,%rsi
  lea    D129(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L91
  movb   $0x0,(%rax)
  cmpb   $0xd,-0x1(%rax)
  je     L230
L107:
  mov    $0x20,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L102
  lea    0x1(%rax),%r12
  movb   $0x0,(%rax)
L102:
  lea    D77(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L94
  lea    D123(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L242
  test   %r12,%r12
  je     L77
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <get_dependencies@plt>
  mov    $0x1,%eax
L43:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L91:
  lea    D18(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L43
L230:
  movb   $0x0,-0x1(%rax)
  jmp    L107
L94:
  mov    $0x0,%ecx
  mov    $0x1,%edx
  lea    D94(%rip),%rsi
  mov    %ebp,%edi
  call   <send@plt>
  mov    $0x0,%eax
  jmp    L43
L77:
  lea    D56(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L43
L242:
  lea    D130(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L83
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <get_filesystem@plt>
  mov    $0x1,%eax
  jmp    L43
L83:
  lea    D9(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L38
  mov    %ebp,%edi
  call   <get_installed@plt>
  mov    $0x1,%eax
  jmp    L43
L38:
  lea    D27(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L47
  mov    %ebp,%edi
  call   <get_bound_sockets@plt>
  mov    $0x1,%eax
  jmp    L43
L47:
  lea    D67(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L149
  mov    %ebp,%edi
  call   <get_ps@plt>
  mov    $0x1,%eax
  jmp    L43
L149:
  lea    D66(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L182
  test   %r12,%r12
  je     L245
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <get_active_processes@plt>
  mov    $0x1,%eax
  jmp    L43
L245:
  lea    D62(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L43
L182:
  lea    D7(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L197
  mov    %ebp,%edi
  call   <get_pid@plt>
  mov    $0x1,%eax
  jmp    L43
L197:
  lea    D1(%rip),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edx
  mov    $0x0,%ecx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <send@plt>
  mov    $0x1,%eax
  jmp    L43
```

tool_calls: name: extract_symbolic_data
arguments: label: D129
data_type: string
name: extract_symbolic_data
arguments: label: D77
data_type: string
name: extract_symbolic_data
arguments: label: D123
data_type: string
name: extract_symbolic_data
arguments: label: D18
data_type: string
name: extract_symbolic_data
arguments: label: D94
data_type: string
name: extract_symbolic_data
arguments: label: D56
data_type: string
name: extract_symbolic_data
arguments: label: D130
data_type: string
name: extract_symbolic_data
arguments: label: D9
data_type: string
name: extract_symbolic_data
arguments: label: D27
data_type: string
name: extract_symbolic_data
arguments: label: D67
data_type: string
name: extract_symbolic_data
arguments: label: D66
data_type: string
name: extract_symbolic_data
arguments: label: D62
data_type: string
name: extract_symbolic_data
arguments: label: D7
data_type: string
name: extract_symbolic_data
arguments: label: D1
data_type: string

tool: D129: CMD: %s

tool: D77: exit

tool: D123: get_dependencies

tool: D18: expected new line!;

tool: 

tool: D56: expected argument with get dependencies

tool: D130: get_filesystem

tool: D9: get_installed

tool: D27: get_bound_sockets

tool: D67: get_ps

tool: D66: get_active_processes

tool: D62: expected argument with get_active_processes

tool: D7: get_pid

tool: D1: UNKNOWN_CMD

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;
}
```