user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<parse_lwm2m_exe_arg_parse_single_argument>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rcx,%r12
  test   %rdi,%rdi
  sete   %al
  cmp    %rsi,%rdi
  setae  %cl
  or     %cl,%al
  jne    L186
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %r8,%r13
  mov    %r9,%r14
  test   %rsi,%rsi
  je     L186
  cmpb   $0x0,(%rdi)
  je     L106
  movb   $0x0,(%r12)
  lea    D8(%rip),%rax
  mov    %rax,(%r8)
  movq   $0x0,(%r9)
  test   %edx,%edx
  jne    L223
  mov    $0x0,%eax
  cmpb   $0x2c,(%rdi)
  jne    L189
  add    $0x1,%rbx
L223:
  cmp    %rbp,%rbx
  ja     L297
L239:
  lea    0x1(%rbx),%rax
  cmp    %rax,%rbp
  jbe    L1
  movzbl 0x1(%rbx),%edx
  test   %dl,%dl
  je     L131
  cmp    $0x2c,%dl
  jne    L210
L131:
  mov    $0x0,%r15d
  movq   $0x0,(%rsp)
  jmp    L291
L297:
  movsbl 0x0,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  jne    L239
  mov    $0x0,%eax
  jmp    L189
L210:
  mov    $0x0,%eax
  cmp    $0x3d,%dl
  jne    L189
  lea    0x2(%rbx),%rax
  cmp    %rax,%rbp
  jb     L96
  mov    $0x0,%eax
  cmpb   $0x27,0x2(%rbx)
  jne    L189
  lea    0x3(%rbx),%r15
  mov    %r15,(%rsp)
  cmp    %r15,%rbp
  jb     L26
  lea    0x1(%rbp),%rax
  mov    %rax,0x8(%rsp)
L71:
  movsbl (%r15),%edi
  call   <isgraph@plt>
  test   %rax,%rax
  je     L19
  movzbl (%r15),%eax
  cmp    $0x5c,%al
  je     L127
  cmp    $0x22,%al
  je     L127
  cmp    $0x27,%al
  je     L231
  add    $0x1,%r15
  cmp    0x8(%rsp),%r15
  jne    L71
L26:
  mov    $0x0,%eax
  jmp    L189
L1:
  mov    $0x0,%r15d
  movq   $0x0,(%rsp)
L291:
  movzbl (%rbx),%edx
  sub    $0x30,%edx
  mov    %dl,(%r12)
  mov    (%rsp),%rsi
  mov    %rsi,0x0(%r13)
  sub    %rsi,%r15
  mov    %r15,(%r14)
L189:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L186:
  mov    $0x0,%eax
  jmp    L189
L106:
  mov    $0x0,%eax
  jmp    L189
L96:
  mov    $0x0,%eax
  jmp    L189
L19:
  mov    $0x0,%eax
  jmp    L189
L127:
  mov    $0x0,%eax
  jmp    L189
L170:
  mov    $0x0,%eax
  jmp    L189
L231:
  cmp    %r15,%rbp
  jb     L170
  lea    0x1(%r15),%rax
  jmp    L291
```

tool_calls: name: disassemble_data
arguments: label: D8
type_infered: string

tool: 

assistant: ```c
const uint8_t *parse_lwm2m_exe_arg_parse_single_argument(const uint8_t *p, const uint8_t *pe, const bool first_arg, uint32_t *key, const uint8_t **value, size_t *valuelen) {
  const uint8_t *k = 0;
  const uint8_t *v = 0;
  const uint8_t *ve = 0;
  if (!p)
    return (NULL);
  if (!pe)
    return (NULL);
  if (p >= pe)
    return (NULL);
  if (*p == '\0')
    return (NULL);
  *key = 0;
  *value = (uint8_t *)"";
  *valuelen = 0;
  if (!first_arg) {
    if (*p != ',')
      return (NULL);
    p++;
  }
  if ((p > pe) && !isdigit(*k))
    return (NULL);
  k = p;
  p++;
  if ((p < pe) && (*p != ',') && (*p != '\0')) {
    if (*p != '=')
      return (NULL);
    p++;
    if ((p > pe) || (*p != '\''))
      return (NULL);
    p++;
    v = p;
    for (; p <= pe; p++) {
      if (!(isgraph(*p) && *p != '"' && *p != '\\')) {
        return (NULL);
      } else if (*p == '\'') {
        break;
      }
    }
    if ((p > pe) || *p != '\'')
      return (NULL);
    ve = p;
    p++;
  }
  *key = *k - '0';
  *value = v;
  *valuelen = (ve - v);
  return p;
}
```