user: 请将以下的汇编代码转换成C语言代码:

```asm
<librfc2874_formatcheck>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  movb   $0x0,(%rsi)
  call   <strlen@plt>
  lea    D62(%rip),%rdx
  cmp    $0x4,%eax
  jbe    L21
  movsbl 0x0(%rbp),%ecx
  mov    $0x1,%r8d
  cmp    $0x5c,%cl
  jne    L132
  movsbl 0x1(%rbp),%ecx
  mov    $0x2,%r8d
  cmp    $0x5b,%cl
  je     L109
L132:
  lea    D69(%rip),%rdx
  mov    $0x3ff,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    $0x1,%eax
L47:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L109:
  movsbl 0x2(%rbp),%edi
  mov    %rax,%r13
  mov    %eax,%r15d
  call   <tolower@plt>
  cmp    $0x78,%al
  jne    L107
  lea    0x3(%rbp),%r12
  mov    $0x3,%ebx
  jmp    L177
  nopw   0x0(%rax,%rax,1)
L88:
  add    $0x1,%ebx
  cmp    $0x24,%ebx
  je     L173
  add    $0x1,%r12
  cmp    %ebx,%r15d
  jb     L92
L177:
  movsbl (%r12),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  jne    L88
  cmp    %r13d,%ebx
  jae    L92
  mov    %ebx,%eax
  movzbl 0x0(%rbp,%rax,1),%eax
  cmp    $0x5d,%al
  je     L114
  lea    0x1(%rbx),%r12d
  movsbl %al,%ecx
  mov    %r12d,%r8d
  cmp    $0x2f,%al
  jne    L132
  cmp    %r12d,%r13d
  jbe    L23
  lea    0x5(%rbx),%eax
  mov    %eax,0xc(%rsp)
L95:
  mov    %r12d,%ebx
  movsbl 0x0(%rbp,%rbx,1),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L225
  add    $0x1,%r12d
  cmp    %r12d,0xc(%rsp)
  je     L154
  cmp    %r12d,%r15d
  jae    L95
L192:
  lea    D23(%rip),%rdx
L21:
  mov    %r14,%rdi
  mov    $0x3ff,%esi
  xor    %eax,%eax
  call   <snprintf@plt>
  add    $0x18,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L107:
  movsbl 0x2(%rbp),%ecx
  mov    $0x3,%r8d
  jmp    L132
  nop
L173:
  mov    $0x24,%ecx
  lea    D58(%rip),%rdx
L28:
  mov    $0x3ff,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    $0x1,%eax
  jmp    L47
L23:
  lea    D11(%rip),%rdx
  jmp    L21
  xchg   %ax,%ax
L154:
  mov    0xc(%rsp),%ecx
  lea    D57(%rip),%rdx
  jmp    L28
  nopl   (%rax)
L92:
  lea    D0(%rip),%rdx
  jmp    L21
  nopl   0x0(%rax)
L114:
  xor    %eax,%eax
  jmp    L47
L225:
  cmp    %r13d,%r12d
  jae    L192
  movzbl 0x0(%rbp,%rbx,1),%eax
  cmp    $0x5d,%al
  je     L114
  movsbl %al,%ecx
  lea    0x1(%r12),%r8d
  jmp    L132
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D62
type: string
name: extract_symbolic_data
arguments: data_label: D69
type: string
name: extract_symbolic_data
arguments: data_label: D23
type: string
name: extract_symbolic_data
arguments: data_label: D58
type: string
name: extract_symbolic_data
arguments: data_label: D11
type: string
name: extract_symbolic_data
arguments: data_label: D57
type: string
name: extract_symbolic_data
arguments: data_label: D0
type: string

tool: D62: Error in given bitstring label, has less than 5 chars!

tool: D69: Char '%c' not expected on position %u

tool: D23: Unexpected end of string (missing ']')

tool: D58: More than 32 nibbles on position %u

tool: D11: Unexpected end of string (missing prefix length)

tool: D57: More than 3 digits on position %u

tool: D0: Unexpected end of string (missing '/' or ']')

assistant: ```c
int librfc2874_formatcheck(const char *string, char *infostring) {
  unsigned int length, index = 0;
  unsigned int nibblecounter = 0, digitcounter = 0;
  infostring[0] = '\0';
  length = (unsigned int)strlen(string);
  if (length < 5) {
    snprintf(infostring, 1024 - 1, "Error in given bitstring label, has less than 5 chars!");
    return (1);
  };
  if (string[index] != '\\') {
    snprintf(infostring, 1024 - 1, "Char '%c' not expected on position %u", string[index], index + 1);
    return (1);
  };
  index++;
  if (string[index] != '[') {
    snprintf(infostring, 1024 - 1, "Char '%c' not expected on position %u", string[index], index + 1);
    return (1);
  };
  index++;
  if ((char)tolower(string[index]) != 'x') {
    snprintf(infostring, 1024 - 1, "Char '%c' not expected on position %u", string[index], index + 1);
    return (1);
  };
  index++;
  while (isxdigit((int)string[index])) {
    nibblecounter++;
    if (nibblecounter > 32) {
      snprintf(infostring, 1024 - 1, "More than 32 nibbles on position %u", index + 1);
      return (1);
    };
    index++;
    if (index > length) {
      break;
    };
  };
  if (index >= length) {
    snprintf(infostring, 1024 - 1, "Unexpected end of string (missing '/' or ']')");
    return (1);
  };
  if (string[index] == ']') {
    return (0);
  };
  if (string[index] != '/') {
    snprintf(infostring, 1024 - 1, "Char '%c' not expected on position %u", string[index], index + 1);
    return (1);
  };
  index++;
  if (index >= length) {
    snprintf(infostring, 1024 - 1, "Unexpected end of string (missing prefix length)");
    return (1);
  };
  while (isdigit((int)string[index])) {
    digitcounter++;
    if (digitcounter > 3) {
      snprintf(infostring, 1024 - 1, "More than 3 digits on position %u", index + 1);
      return (1);
    };
    index++;
    if (index > length) {
      break;
    };
  };
  if (index >= length) {
    snprintf(infostring, 1024 - 1, "Unexpected end of string (missing ']')");
    return (1);
  };
  if (string[index] == ']') {
    return (0);
  };
  snprintf(infostring, 1024 - 1, "Char '%c' not expected on position %u", string[index], index + 1);
  return (1);
}
```