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

```asm
<cgi_check_strlen_x2>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  call   <strlen@plt>
  cmp    $0x41,%eax
  jle    L175
  mov    %rbp,%rsi
  lea    D32(%rip),%rdi
  call   <cgi_error@plt>
  mov    $0x1,%eax
L44:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  xchg   %ax,%ax
L175:
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L155
  xor    %ebx,%ebx
  xor    %edx,%edx
  xor    %r12d,%r12d
  jmp    L120
  nopl   (%rax)
L151:
  test   %edx,%edx
  jne    L152
  add    $0x1,%r12d
  cmp    $0x21,%r12d
  je     L114
L141:
  add    $0x1,%rbx
  movzbl 0x0(%rbp,%rbx,1),%eax
  test   %al,%al
  je     L155
L120:
  cmp    $0x2f,%al
  jne    L151
  test   %edx,%edx
  jne    L60
  test   %r12d,%r12d
  je     L73
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cmp    %ebx,%eax
  je     L23
  cmp    $0x21,%r12d
  je     L114
  mov    $0x2,%edx
  jmp    L141
  nopl   0x0(%rax)
L152:
  add    $0x1,%edx
  cmp    $0x21,%r12d
  je     L114
  cmp    $0x23,%edx
  jne    L141
  mov    %rbp,%rsi
  lea    D10(%rip),%rdi
  call   <cgi_error@plt>
  mov    $0x1,%eax
  jmp    L44
  nop
L155:
  xor    %eax,%eax
  jmp    L44
  nopw   0x0(%rax,%rax,1)
L114:
  mov    %rbp,%rsi
  lea    D55(%rip),%rdi
  call   <cgi_error@plt>
  mov    $0x1,%eax
  jmp    L44
L60:
  mov    %rbp,%rsi
  lea    D51(%rip),%rdi
  call   <cgi_error@plt>
  mov    $0x1,%eax
  jmp    L44
L73:
  mov    %rbp,%rsi
  lea    D37(%rip),%rdi
  call   <cgi_error@plt>
  mov    $0x1,%eax
  jmp    L44
L23:
  mov    %rbp,%rsi
  lea    D25(%rip),%rdi
  call   <cgi_error@plt>
  mov    $0x1,%eax
  jmp    L44
```

tool_calls: name: retrieve_data
arguments: tag: D32
type_infered: string
name: retrieve_data
arguments: tag: D10
type_infered: string
name: retrieve_data
arguments: tag: D55
type_infered: string
name: retrieve_data
arguments: tag: D51
type_infered: string
name: retrieve_data
arguments: tag: D37
type_infered: string
name: retrieve_data
arguments: tag: D25
type_infered: string

tool: D32: Name exceeds 65 characters limit: %s

tool: D10: Zone or Family part of the name exceed 32 chars limit: %s

tool: D55: Base part of the name exceed 32 chars limit: %s

tool: D51: Zone or Family with base scope should have only one / : %s

tool: D37: Base part of the name is empty in %s

tool: D25: Zone or Family part of the name is empty in %s

assistant: ```c
int cgi_check_strlen_x2(char const *string) {
  int n1, n2, p;
  if (strlen(string) > 65) {
    cgi_error("Name exceeds 65 characters limit: %s", string);
    return 1;
  }
  p = 0;
  n1 = 0;
  n2 = 0;
  while (string[p]) {
    if (string[p] == '/') {
      if (n2 != 0) {
        cgi_error("Zone or Family with base scope should have only one / : %s", string);
        return 1;
      }
      if (n1 == 0) {
        cgi_error("Base part of the name is empty in %s", string);
        return 1;
      }
      if (p == strlen(string) - 1) {
        cgi_error("Zone or Family part of the name is empty in %s", string);
        return 1;
      }
      n2++;
    }
    if (!n2)
      n1++;
    else
      n2++;
    if (n1 > 32) {
      cgi_error("Base part of the name exceed 32 chars limit: %s", string);
      return 1;
    }
    if (n2 > 34) {
      cgi_error("Zone or Family part of the name exceed 32 chars limit: %s", string);
      return 1;
    }
    p++;
  }
  return 0;
}
```