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

```asm
<optionValueGet>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    (%rsi),%ebx
  mov    %rdi,(%rsp)
  mov    %edx,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  cmp    %eax,%ebx
  jge    L87
  movslq 0x0(%rbp),%rsi
  mov    (%rsp),%rcx
  movl   $0xffffffff,0x14(%rsp)
  lea    (%rcx,%rsi,1),%r8
  mov    %rsi,%rax
  movzbl (%r8),%edx
  test   %dl,%dl
  je     L87
  cmp    $0x2c,%dl
  je     L87
  lea    0x1(%rcx,%rsi,1),%r13
  mov    %esi,%r15d
  mov    %r8,%r14
  xor    %r12d,%r12d
  mov    %r13,%rbx
  sub    %r8,%rbx
  jmp    L119
  xchg   %ax,%ax
L63:
  movslq 0x0(%rbp),%rax
  cmp    %r15d,%eax
  jl     L87
L8:
  movzbl 0x0(%r13),%edx
  lea    0x1(%r15),%esi
  add    %rbx,%r14
  add    $0x1,%r13
  test   %dl,%dl
  je     L74
  cmp    $0x2c,%dl
  je     L74
  mov    %esi,%r15d
L119:
  cmp    %eax,%r15d
  je     L127
L198:
  test   %r12d,%r12d
  je     L63
  movsbl (%r14),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L87
  movslq 0x0(%rbp),%rax
  jmp    L8
  nopl   0x0(%rax,%rax,1)
L127:
  movsbl %dl,%edi
  call   <tolower@plt>
  cmp    $0x78,%al
  jne    L198
  movsbl 0x0(%r13),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L198
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jne    L87
  movslq 0x0(%rbp),%rax
  mov    $0x1,%r12d
  jmp    L8
  nopl   0x0(%rax,%rax,1)
L74:
  mov    $0xffffffff,%r9d
  sub    %eax,%esi
  je     L30
  cmp    $0x1,%esi
  je     L171
  mov    (%rsp),%rcx
  lea    0x14(%rsp),%rdx
  lea    D7(%rip),%rsi
  lea    0x1(%rcx,%rax,1),%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L87
  mov    0x14(%rsp),%r9d
  cmp    $0x7f,%r9d
  ja     L87
  movzbl (%r14),%edx
  add    $0x2,%r15d
  xor    %eax,%eax
  test   %dl,%dl
  cmove  %eax,%r15d
  mov    %r15d,0x0(%rbp)
  nopl   (%rax)
L30:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
  add    $0x28,%rsp
  mov    %r9d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L87:
  mov    $0xffffffff,%r9d
  jmp    L30
  nopl   0x0(%rax,%rax,1)
L171:
  mov    (%rsp),%rcx
  add    $0x2,%r15d
  movzbl (%rcx,%rax,1),%r9d
  xor    %eax,%eax
  test   %dl,%dl
  cmove  %eax,%r15d
  mov    %r15d,0x0(%rbp)
  jmp    L30
L88:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
type_infered: string

tool: D7: %x

assistant: ```c
char optionValueGet(char *option, int *index, int cOnly) {
  if (*index >= strlen(option))
    return -1;
  int i = *index;
  int hex = 0;
  unsigned int value = (unsigned int)-1;
  for (; option[i] && option[i] != ','; i++) {
    if (i == *index && tolower(option[i]) == 'x' && isxdigit(option[i + 1])) {
      if (cOnly)
        return -1;
      hex = 1;
      continue;
    }
    if (hex && !isxdigit(option[i]))
      return -1;
    if (!hex && i > *index)
      return -1;
  }
  switch ((i - *index)) {
  case 1:
    value = option[*index];
    break;
  case 0:
    return -1;
  default:
    if (sscanf(&option[*index + 1], "%x", &value) != 1)
      return -1;
    if (value > 0x7f)
      return -1;
    break;
  }
  if (option[i])
    *index = i + 1;
  else
    *index = 0;
  return (char)value;
}
```