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

```asm
<_docmd>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    (%rsi),%rdi
  test   %rdi,%rdi
  je     L243
  mov    %rsi,%rbx
  lea    D101(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L79
  call   <_shell_help@plt>
L243:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L79:
  mov    (%rbx),%rdi
  lea    D125(%rip),%rsi
  mov    $0x1,%r12d
  call   <strcmp@plt>
  test   %rax,%rax
  je     L243
  mov    (%rbx),%rdi
  lea    D1(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L0
  mov    0x8(%rbx),%rsi
  test   %rsi,%rsi
  je     L99
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <_close_targets@plt>
  jmp    L243
  nopl   0x0(%rax)
L99:
  lea    D116(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L243
  nopl   0x0(%rax)
L0:
  mov    (%rbx),%rdi
  lea    D4(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L285
  mov    0x8(%rbx),%rsi
  test   %rsi,%rsi
  je     L197
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <_open_targets@plt>
  jmp    L243
L285:
  mov    (%rbx),%rdi
  lea    D87(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L53
  mov    0x8(%rbx),%rsi
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <_query_targets@plt>
  jmp    L243
L197:
  lea    D91(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L243
L53:
  mov    (%rbx),%rdi
  lea    D76(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L226
  call   <_show_config@plt>
  xor    %r12d,%r12d
  jmp    L243
L226:
  mov    (%rbx),%rdi
  lea    D156(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L137
  cmpq   $0x0,0x8(%rbx)
  je     L239
  lea    D118(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L243
L137:
  mov    (%rbx),%rdi
  lea    D23(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L291
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <_get_idn@plt>
  jmp    L243
L239:
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <_list_targets@plt>
  jmp    L243
L291:
  mov    (%rbx),%rdi
  lea    D8(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L210
  mov    0x8(%rbx),%rdi
  test   %rdi,%rdi
  je     L260
  cmpq   $0x0,0x10(%rbx)
  je     L31
L260:
  lea    D52(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L243
L210:
  lea    D22(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L243
L31:
  lea    D66(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L73
  mov    $0x1,%esi
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <inst_set_verbose@plt>
  jmp    L243
L73:
  mov    0x8(%rbx),%rdi
  lea    D9(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L260
  xor    %esi,%esi
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <inst_set_verbose@plt>
  jmp    L243
```

tool_calls: name: read_data
arguments: label: D101
type_guessed: string
name: read_data
arguments: label: D125
type_guessed: string
name: read_data
arguments: label: D1
type_guessed: string
name: read_data
arguments: label: D116
type_guessed: string
name: read_data
arguments: label: D4
type_guessed: string
name: read_data
arguments: label: D87
type_guessed: string
name: read_data
arguments: label: D91
type_guessed: string
name: read_data
arguments: label: D76
type_guessed: string
name: read_data
arguments: label: D156
type_guessed: string
name: read_data
arguments: label: D118
type_guessed: string
name: read_data
arguments: label: D23
type_guessed: string
name: read_data
arguments: label: D8
type_guessed: string
name: read_data
arguments: label: D52
type_guessed: string
name: read_data
arguments: label: D22
type_guessed: string
name: read_data
arguments: label: D66
type_guessed: string
name: read_data
arguments: label: D9
type_guessed: string

tool: D101: help

tool: D125: quit

tool: D1: on

tool: D116: Usage: on [targets]


tool: D4: off

tool: D87: query

tool: D91: Usage: off [targets]


tool: D76: show

tool: D156: list

tool: D118: Usage: list


tool: D23: id

tool: D8: verbose

tool: D52: Usage: verbose 1|0


tool: D22: type "help" for a list of commands


tool: D66: 1

tool: D9: 0

assistant: ```c
int _docmd(struct instrument *gd, char **av) {
  int rc = 0;
  if (av[0]) {
    if (strcmp(av[0], "help") == 0) {
      _shell_help();
    } else if (strcmp(av[0], "quit") == 0) {
      rc = 1;
    } else if (strcmp(av[0], "on") == 0) {
      if (av[1] == NULL)
        printf("Usage: on [targets]\n");
      else
        _close_targets(gd, av[1]);
    } else if (strcmp(av[0], "off") == 0) {
      if (av[1] == NULL)
        printf("Usage: off [targets]\n");
      else
        _open_targets(gd, av[1]);
    } else if (strcmp(av[0], "query") == 0) {
      _query_targets(gd, av[1]);
    } else if (strcmp(av[0], "show") == 0) {
      _show_config();
    } else if (strcmp(av[0], "list") == 0) {
      if (av[1] != NULL)
        printf("Usage: list\n");
      else
        _list_targets();
    } else if (strcmp(av[0], "id") == 0) {
      _get_idn(gd);
    } else if (strcmp(av[0], "verbose") == 0) {
      if (av[1] == NULL || av[2] != NULL)
        printf("Usage: verbose 1|0\n");
      else {
        if (!strcmp(av[1], "1"))
          inst_set_verbose(gd, 1);
        else if (!strcmp(av[1], "0"))
          inst_set_verbose(gd, 0);
        else
          printf("Usage: verbose 1|0\n");
      }
    } else
      printf("type \"help\" for a list of commands\n");
  }
  return rc;
}
```