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    L155
  movsbl 0x0(%rbp),%ecx
  mov    $0x1,%r8d
  cmp    $0x5c,%cl
  jne    L152
  movsbl 0x1(%rbp),%ecx
  mov    $0x2,%r8d
  cmp    $0x5b,%cl
  je     L144
L152:
  lea    D7(%rip),%rdx
  mov    $0x3ff,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    $0x1,%eax
L183:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L144:
  movsbl 0x2(%rbp),%edi
  mov    %rax,%r13
  mov    %eax,%r15d
  call   <tolower@plt>
  cmp    $0x78,%al
  jne    L38
  lea    0x3(%rbp),%r12
  mov    $0x3,%ebx
  jmp    L86
  nopw   0x0(%rax,%rax,1)
L79:
  add    $0x1,%ebx
  cmp    $0x24,%ebx
  je     L47
  add    $0x1,%r12
  cmp    %ebx,%r15d
  jb     L208
L86:
  movsbl (%r12),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  jne    L79
  cmp    %r13d,%ebx
  jae    L208
  mov    %ebx,%eax
  movzbl 0x0(%rbp,%rax,1),%eax
  cmp    $0x5d,%al
  je     L17
  lea    0x1(%rbx),%r12d
  movsbl %al,%ecx
  mov    %r12d,%r8d
  cmp    $0x2f,%al
  jne    L152
  cmp    %r12d,%r13d
  jbe    L35
  lea    0x5(%rbx),%eax
  mov    %eax,0xc(%rsp)
L172:
  mov    %r12d,%ebx
  movsbl 0x0(%rbp,%rbx,1),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L236
  add    $0x1,%r12d
  cmp    %r12d,0xc(%rsp)
  je     L102
  cmp    %r12d,%r15d
  jae    L172
L33:
  lea    D58(%rip),%rdx
L155:
  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)
L38:
  movsbl 0x2(%rbp),%ecx
  mov    $0x3,%r8d
  jmp    L152
  nop
L47:
  mov    $0x24,%ecx
  lea    D54(%rip),%rdx
L156:
  mov    $0x3ff,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    $0x1,%eax
  jmp    L183
L35:
  lea    D10(%rip),%rdx
  jmp    L155
  xchg   %ax,%ax
L102:
  mov    0xc(%rsp),%ecx
  lea    D68(%rip),%rdx
  jmp    L156
  nopl   (%rax)
L208:
  lea    D63(%rip),%rdx
  jmp    L155
  nopl   0x0(%rax)
L17:
  xor    %eax,%eax
  jmp    L183
L236:
  cmp    %r13d,%r12d
  jae    L33
  movzbl 0x0(%rbp,%rbx,1),%eax
  cmp    $0x5d,%al
  je     L17
  movsbl %al,%ecx
  lea    0x1(%r12),%r8d
  jmp    L152
```

tool_calls: name: parse_data
arguments: data_label: D62
type_guessed: string
name: parse_data
arguments: data_label: D7
type_guessed: string
name: parse_data
arguments: data_label: D58
type_guessed: string
name: parse_data
arguments: data_label: D54
type_guessed: string
name: parse_data
arguments: data_label: D10
type_guessed: string
name: parse_data
arguments: data_label: D68
type_guessed: string
name: parse_data
arguments: data_label: D63
type_guessed: string

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

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

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

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

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

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

tool: D63: 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);
}
```