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
  cmpb   $0x3c,(%rax)
  je     L195
L254:
  movzbl (%rbx),%edx
  mov    $0x0,%ecx
  cmp    $0x2e,%dl
  je     L272
  test   %dl,%dl
  je     L15
  mov    %rbx,%rax
  lea    D5(%rip),%rbp
  jmp    L47
L195:
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  cmpb   $0x3e,-0x1(%rbx,%rax,1)
  jne    L254
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  movb   $0x0,-0x1(%rbx,%rax,1)
  add    $0x1,%rbx
  jmp    L254
L258:
  cmp    %rax,%rbx
  je     L67
  movzbl -0x1(%rax),%edx
  cmp    $0x22,%dl
  je     L67
  mov    %rax,%r12
  cmp    $0x2e,%dl
  je     L67
L268:
  movzbl (%r12),%esi
  lea    -0x21(%rsi),%eax
  cmp    $0x5d,%al
  ja     L301
  movsbl %sil,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L23
L419:
  lea    0x1(%r12),%rax
  movzbl 0x1(%r12),%edx
  test   %dl,%dl
  je     L205
L47:
  cmp    $0x22,%dl
  je     L258
  cmp    $0x40,%dl
  je     L205
  mov    %rax,%r12
  cmp    $0x2e,%dl
  jne    L268
  lea    0x1(%rax),%r12
  cmpb   $0x2e,0x1(%rax)
  jne    L268
  mov    $0x0,%ecx
  jmp    L272
L67:
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%edx
  cmp    $0x22,%dl
  je     L239
  test   %dl,%dl
  jne    L61
L239:
  lea    0x2(%rax),%r12
  test   %dl,%dl
  je     L226
  movzbl 0x2(%rax),%eax
  cmp    $0x40,%al
  je     L345
  cmp    $0x2e,%al
  je     L419
  mov    $0x0,%ecx
L272:
  mov    %ecx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L424:
  lea    0x2(%rax),%rdx
  cmpb   $0x20,0x2(%rax)
  je     L435
  mov    %rdx,%rax
L460:
  movzbl (%rax),%ecx
  lea    -0x20(%rcx),%edx
  cmp    $0x5e,%dl
  ja     L207
L76:
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%edx
  cmp    $0x22,%dl
  je     L239
  test   %dl,%dl
  je     L239
L61:
  cmp    $0x5c,%dl
  je     L424
  mov    %rcx,%rax
  jmp    L460
L435:
  mov    %rdx,%rax
  jmp    L76
L345:
  mov    %r12,%rax
L205:
  cmp    %rbx,%rax
  je     L497
  mov    $0x0,%ecx
  cmpb   $0x2e,-0x1(%rax)
  je     L272
  cmpb   $0x0,0x1(%rax)
  je     L272
  lea    0x1(%rax),%rbx
  mov    %rbx,%rax
  mov    $0x0,%ebp
  lea    D5(%rip),%r12
  jmp    L337
L308:
  cmp    %rbx,%rax
  je     L101
  cmpb   $0x2e,-0x1(%rax)
  je     L468
  add    $0x1,%ebp
  lea    0x1(%rax),%r13
  cmpb   $0x2e,0x1(%rax)
  je     L57
L426:
  movsbl 0x0(%r13),%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L378
  lea    0x1(%r13),%rax
  cmpb   $0x0,0x1(%r13)
  je     L479
L337:
  movzbl (%rax),%edx
  cmp    $0x2e,%dl
  je     L308
  sub    $0x21,%edx
  cmp    $0x5d,%dl
  ja     L63
  mov    %rax,%r13
  jmp    L426
L479:
  test   %ebp,%ebp
  setg   %cl
  movzbl %cl,%ecx
  jmp    L272
L15:
  mov    $0x0,%ecx
  jmp    L272
L207:
  mov    $0x0,%ecx
  jmp    L272
L226:
  mov    $0x0,%ecx
  jmp    L272
L301:
  mov    $0x0,%ecx
  jmp    L272
L23:
  mov    $0x0,%ecx
  jmp    L272
L497:
  mov    $0x0,%ecx
  jmp    L272
L101:
  mov    $0x0,%ecx
  jmp    L272
L468:
  mov    $0x0,%ecx
  jmp    L272
L57:
  mov    $0x0,%ecx
  jmp    L272
L378:
  mov    $0x0,%ecx
  jmp    L272
L63:
  mov    $0x0,%ecx
  jmp    L272
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
type_infered: string

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

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