user: 请从给定的汇编指令推导出C源代码:

```asm
<getCommand>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%r14d
  mov    %rsi,%rbp
  mov    %rdx,%r12
  test   %rcx,%rcx
  je     L157
  mov    %rcx,%r13
  cmp    $0x1,%edi
  jle    L114
  lea    -0x2(%rdi),%eax
  shr    %eax
  mov    %eax,%eax
  lea    0x3(%rax,%rax,1),%r15
  mov    $0x1,%ebx
  jmp    L2
L157:
  cmp    $0x1,%edi
  jle    L119
  lea    0x8(%rsi),%rbx
  lea    -0x2(%rdi),%eax
  lea    0x10(%rsi,%rax,8),%rbp
  jmp    L3
L69:
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  je     L196
L3:
  mov    (%rbx),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L69
  mov    $0x1,%eax
  jmp    L149
L196:
  mov    $0x0,%eax
  jmp    L149
L177:
  lea    D8(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L31
L76:
  add    $0x2,%rbx
  cmp    %rbx,%r15
  je     L114
L2:
  mov    0x0(%rbp,%rbx,8),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L76
  lea    0x8(%rbp,%rbx,8),%rbx
  mov    (%rbx),%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    %rax,0x0(%r13)
  test   %rax,%rax
  je     L177
L31:
  mov    (%rbx),%rsi
  mov    0x0(%r13),%rdi
  call   <strcpy@plt>
  mov    $0x1,%eax
L149:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L114:
  cmp    $0x2,%r14d
  jle    L205
  sub    $0x3,%r14d
  shr    %r14d
  lea    0x2(%r14),%r14d
  add    %r14,%r14
  mov    $0x2,%ebx
  jmp    L224
L83:
  lea    D8(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L225
L103:
  add    $0x2,%rbx
  cmp    %r14,%rbx
  je     L86
L224:
  mov    0x0(%rbp,%rbx,8),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L103
  lea    0x8(%rbp,%rbx,8),%rbx
  mov    (%rbx),%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    %rax,0x0(%r13)
  test   %rax,%rax
  je     L83
L225:
  mov    (%rbx),%rsi
  mov    0x0(%r13),%rdi
  call   <strcpy@plt>
  mov    $0x1,%eax
  jmp    L149
L86:
  mov    $0x0,%eax
  jmp    L149
L119:
  mov    $0x0,%eax
  jmp    L149
L205:
  mov    $0x0,%eax
  jmp    L149
```

tool_calls: name: extract_symbolic_data
arguments: tag: D8
datatype: string

tool: D8: Allocation error.

assistant: ```c
int getCommand(int argc, char *argv[], char *command, char **value) {
  int i;
  int ok = 0;
  if (value == NULL) {
    for (i = 1; (ok == 0) && (i < argc); i += 1) {
      if (strcmp(command, argv[i]) == 0) {
        ok = 1;
      }
    }
  } else {
    for (i = 1; (ok == 0) && (i < argc); i += 2) {
      if (strcmp(command, argv[i]) == 0) {
        *value = (char *)malloc(strlen(argv[i + 1]) + 1);
        if (*value == 0) {
          puts("Allocation error.");
          exit(1);
        }
        strcpy(*value, argv[i + 1]);
        ok = 1;
      }
    }
    if (ok == 0) {
      for (i = 2; (ok == 0) && (i < argc); i += 2) {
        if (strcmp(command, argv[i]) == 0) {
          *value = (char *)malloc(strlen(argv[i + 1]) + 1);
          if (*value == 0) {
            puts("Allocation error.");
            exit(1);
          }
          strcpy(*value, argv[i + 1]);
          ok = 1;
        }
      }
    }
  }
  return (ok);
}
```