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

```asm
<cmd_zero>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdi,%r13
  mov    %rdx,%rdi
  push   %r12
  mov    %rsi,%r12
  lea    D74(%rip),%rsi
  push   %rbp
  mov    %rdx,%rbp
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L119
  lea    D59(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L93
  lea    D69(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L110
  lea    D44(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L184
  lea    D93(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L98
  mov    %rsp,%r14
  mov    $0x81,%edx
  mov    %r13,%rdi
  mov    %r14,%rsi
  call   <atrf_buf_read@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  js     L8
  mov    %eax,%edx
  lea    D13(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <netio_printf@plt>
  mov    %eax,%r8d
  mov    $0xffffffff,%eax
  test   %r8d,%r8d
  js     L153
  movslq %ebp,%rax
  lea    0x1(%rbp),%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  movb   $0xa,(%rsp,%rax,1)
  call   <netio_write@plt>
L153:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L88
  add    $0x98,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L119:
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <atrf_driver_spec@plt>
  mov    %rax,%rdx
  test   %rax,%rax
  je     L29
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
  add    $0x98,%rsp
  mov    %r12,%rdi
  lea    D73(%rip),%rsi
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1140 <netio_printf@plt>
  nop
L98:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
  lea    D79(%rip),%rsi
L113:
  add    $0x98,%rsp
  mov    %r12,%rdi
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1140 <netio_printf@plt>
  nopw   0x0(%rax,%rax,1)
L110:
  mov    %r13,%rdi
  call   <atrf_reset_rf@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
L18:
  lea    D41(%rip),%rsi
  jmp    L113
  nopl   0x0(%rax)
L93:
  mov    %r13,%rdi
  call   <atrf_reset@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  je     L18
L88:
  call   <__stack_chk_fail@plt>
L29:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
  lea    D35(%rip),%rsi
  jmp    L113
  nop
L184:
  mov    %r13,%rdi
  call   <atrf_test_mode@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  je     L18
  jmp    L88
  nopl   (%rax)
L8:
  lea    D58(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <netio_printf@plt>
  jmp    L153
```

tool_calls: name: retrieve_data
arguments: label: D74
data_type: string
name: retrieve_data
arguments: label: D59
data_type: string
name: retrieve_data
arguments: label: D69
data_type: string
name: retrieve_data
arguments: label: D44
data_type: string
name: retrieve_data
arguments: label: D93
data_type: string
name: retrieve_data
arguments: label: D13
data_type: string
name: retrieve_data
arguments: label: D73
data_type: string
name: retrieve_data
arguments: label: D79
data_type: string
name: retrieve_data
arguments: label: D41
data_type: string
name: retrieve_data
arguments: label: D35
data_type: string
name: retrieve_data
arguments: label: D58
data_type: string

tool: D74: spec

tool: D59: reset

tool: D69: reset_rf

tool: D44: test

tool: D93: read

tool: D13: +%d 

tool: D73: +%s


tool: D79: -unrecognized command


tool: D41: +


tool: D35: -can't obtain specification


tool: D58: -I/O error


assistant: ```c
int cmd_zero(struct atrf_dsc *dsc, struct netio *netio, const char *cmd) {
  if (!strcasecmp(cmd, "spec")) {
    const char *spec = atrf_driver_spec(dsc, 1);
    if (spec)
      return netio_printf(netio, "+%s\n", spec);
    else
      return netio_printf(netio, "-can't obtain specification\n");
  }
  if (!strcasecmp(cmd, "reset")) {
    atrf_reset(dsc);
    return netio_printf(netio, "+\n");
  }
  if (!strcasecmp(cmd, "reset_rf")) {
    atrf_reset_rf(dsc);
    return netio_printf(netio, "+\n");
  }
  if (!strcasecmp(cmd, "test")) {
    atrf_test_mode(dsc);
    return netio_printf(netio, "+\n");
  }
  if (!strcasecmp(cmd, "read")) {
    uint8_t buf[128 + 1];
    int got;
    got = atrf_buf_read(dsc, buf, sizeof(buf));
    if (got < 0)
      return netio_printf(netio, "-I/O error\n");
    if (netio_printf(netio, "+%d ", got) < 0)
      return -1;
    buf[got] = '\n';
    return netio_write(netio, buf, got + 1);
  }
  return netio_printf(netio, "-unrecognized command\n");
}
```