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

```asm
<_ds_validate_address>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strdup@plt>
  mov    %eax,%edi
  call   <rtrim@plt>
  mov    %eax,%edi
  call   <ltrim@plt>
  mov    %rax,%rbx
  movzbl (%rax),%eax
  cmp    $0x3c,%al
  je     L335
L276:
  cmp    $0x2e,%al
  je     L119
  test   %al,%al
  je     L119
  mov    %rbx,%rdx
  lea    D6(%rip),%rbp
  jmp    L150
  nopl   0x0(%rax,%rax,1)
L161:
  cmp    $0x40,%al
  je     L141
  cmp    $0x2e,%al
  je     L110
L189:
  movsbl (%rdx),%esi
  mov    %rdx,%r12
L216:
  lea    -0x21(%rsi),%eax
  cmp    $0x5d,%al
  ja     L119
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L119
L311:
  movzbl 0x1(%r12),%eax
  lea    0x1(%r12),%rdx
  test   %al,%al
  je     L141
L150:
  cmp    $0x22,%al
  jne    L161
  cmp    %rbx,%rdx
  je     L251
  movzbl -0x1(%rdx),%eax
  cmp    $0x22,%al
  je     L251
  cmp    $0x2e,%al
  jne    L189
  movzbl 0x1(%rdx),%eax
  lea    0x1(%rdx),%rcx
  test   %al,%al
  jne    L24
  cs nopw 0x0(%rax,%rax,1)
L119:
  xor    %eax,%eax
L158:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L274:
  mov    %rcx,%rdx
L380:
  sub    $0x20,%eax
  cmp    $0x5e,%al
  ja     L119
L251:
  movzbl 0x1(%rdx),%eax
  lea    0x1(%rdx),%rcx
  test   %al,%al
  je     L119
L24:
  cmp    $0x22,%al
  je     L224
  cmp    $0x5c,%al
  jne    L274
  movzbl 0x2(%rdx),%eax
  lea    0x2(%rdx),%rcx
  mov    %rcx,%rdx
  cmp    $0x20,%al
  jne    L380
  jmp    L251
  nop
L110:
  movsbl 0x1(%rdx),%esi
  lea    0x1(%rdx),%r12
  cmp    $0x2e,%sil
  jne    L216
  jmp    L119
  nopl   0x0(%rax)
L224:
  movzbl 0x2(%rdx),%eax
  lea    0x2(%rdx),%r12
  cmp    $0x40,%al
  je     L91
  cmp    $0x2e,%al
  jne    L119
  jmp    L311
  nopl   (%rax)
L335:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  cmpb   $0x3e,-0x1(%rbx,%rax,1)
  je     L115
  movzbl (%rbx),%eax
  jmp    L276
L91:
  mov    %r12,%rdx
L141:
  cmp    %rbx,%rdx
  je     L119
  cmpb   $0x2e,-0x1(%rdx)
  je     L119
  movsbl 0x1(%rdx),%esi
  test   %sil,%sil
  je     L119
  lea    0x1(%rdx),%rbx
  xor    %ebp,%ebp
  lea    D6(%rip),%r12
  mov    %rbx,%rax
  jmp    L239
  nopw   0x0(%rax,%rax,1)
L309:
  lea    -0x21(%rsi),%edx
  cmp    $0x5d,%dl
  ja     L119
  mov    %rax,%r13
L68:
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L119
  movsbl 0x1(%r13),%esi
  lea    0x1(%r13),%rax
  test   %sil,%sil
  je     L84
L239:
  cmp    $0x2e,%sil
  jne    L309
  cmp    %rbx,%rax
  je     L119
  cmpb   $0x2e,-0x1(%rax)
  je     L119
  movsbl 0x1(%rax),%esi
  add    $0x1,%ebp
  lea    0x1(%rax),%r13
  cmp    $0x2e,%sil
  jne    L68
  jmp    L119
L115:
  mov    %rbx,%rdi
  add    $0x1,%rbx
  call   <strlen@plt>
  cltq
  movb   $0x0,-0x2(%rbx,%rax,1)
  movzbl (%rbx),%eax
  jmp    L276
L84:
  xor    %eax,%eax
  test   %ebp,%ebp
  setg   %al
  jmp    L158
```

tool_calls: name: parse_data
arguments: label: D6
data_type: string

tool: D6: ()<>@,;:\"[]

assistant: ```c
int _ds_validate_address(const char *address) {
  int count = 0;
  const char *p;
  char *email;
  const char *domain;
  static char *rfc822_specials = "()<>@,;:\\\"[]";
  email = ltrim(rtrim(strdup(address)));
  if (*email == '<' && *(email + strlen(email) - 1) == '>') {
    *(email + strlen(email) - 1) = 0;
    email++;
  }
  if (*email == '.')
    return 0;
  for (p = email; *p; p++) {
    if (*p == '\"' && (p == email || *(p - 1) == '.' || *(p - 1) == '\"')) {
      while (*++p) {
        if (*p == '\"')
          break;
        if (*p == '\\' && (*++p == ' '))
          continue;
        if (*p < ' ' || *p >= 127)
          return 0;
      }
      if (!*p++)
        return 0;
      if (*p == '@')
        break;
      if (*p != '.')
        return 0;
      continue;
    }
    if (*p == '@')
      break;
    if (*p == '.' && (*++p == '.'))
      return 0;
    if (*p <= ' ' || *p >= 127)
      return 0;
    if (strchr(rfc822_specials, *p))
      return 0;
  }
  if (p == email || *(p - 1) == '.')
    return 0;
  if (!*(domain = ++p))
    return 0;
  do {
    if (*p == '.') {
      if (p == domain || *(p - 1) == '.')
        return 0;
      count++;
    }
    if (*p <= ' ' || *p >= 127)
      return 0;
    if (*p == '.' && (*++p == '.'))
      return 0;
    if (strchr(rfc822_specials, *p))
      return 0;
  } while (*++p);
  return (count >= 1);
}
```