user: 这段汇编代码用C语言表示是什么样的？

```asm
<res_search>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8d,-0x5c(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    D50(%rip),%rax
  mov    (%rax),%edx
  mov    D174(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  jne    L411
  mov    $0x0,%eax
  call   <res_init@plt>
  cmp    $0xffffffff,%eax
  jne    L411
  mov    D208(%rip),%rax
  mov    (%rax),%edx
  mov    D169(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L178
L411:
  mov    D103(%rip),%rax
  movq   $0x0,(%rax)
  mov    D169(%rip),%rax
  movl   $0x82,(%rax)
  movq   $0x0,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L103
L246:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,-0x10(%rbp)
  addq   $0x1,-0x20(%rbp)
L103:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L246
  movl   $0x0,-0x3c(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jbe    L303
  subq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L303
  addl   $0x1,-0x3c(%rbp)
L303:
  cmpq   $0x0,-0x10(%rbp)
  jne    L264
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <hostalias@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L264
  mov    -0x5c(%rbp),%edi
  mov    -0x58(%rbp),%rcx
  mov    -0x50(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x20(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <res_query@plt>
  jmp    L178
L264:
  movl   $0xffffffff,-0x38(%rbp)
  mov    D50(%rip),%rax
  mov    0x8(%rax),%rax
  cmp    %rax,-0x10(%rbp)
  jl     L164
  mov    -0x5c(%rbp),%edi
  mov    -0x58(%rbp),%rsi
  mov    -0x50(%rbp),%ecx
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edi,%r9d
  mov    %rsi,%r8
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <res_querydomain@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L228
  mov    -0x24(%rbp),%eax
  jmp    L178
L228:
  mov    D169(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x38(%rbp)
  addl   $0x1,-0x2c(%rbp)
L164:
  cmpq   $0x0,-0x10(%rbp)
  jne    L183
  mov    D50(%rip),%rax
  mov    (%rax),%edx
  mov    D180(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  jne    L205
L183:
  cmpq   $0x0,-0x10(%rbp)
  je     L148
  cmpl   $0x0,-0x3c(%rbp)
  jne    L148
  mov    D50(%rip),%rax
  mov    (%rax),%edx
  mov    D146(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  je     L148
L205:
  movl   $0x0,-0x28(%rbp)
  mov    D50(%rip),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L333
L410:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rsi
  mov    -0x5c(%rbp),%r8d
  mov    -0x58(%rbp),%rdi
  mov    -0x50(%rbp),%ecx
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %r8d,%r9d
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <res_querydomain@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L321
  mov    -0x24(%rbp),%eax
  jmp    L178
L321:
  mov    D103(%rip),%rax
  mov    (%rax),%rdx
  mov    D24(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jne    L79
  mov    D169(%rip),%rax
  movl   $0x80,(%rax)
  mov    $0xffffffff,%eax
  jmp    L178
L79:
  mov    D169(%rip),%rax
  mov    (%rax),%eax
  cmp    $0x82,%eax
  je     L112
  cmp    $0x82,%eax
  jg     L188
  cmp    $0x80,%eax
  je     L19
  cmp    $0x81,%eax
  jne    L188
  addl   $0x1,-0x34(%rbp)
  jmp    L112
L19:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    D108(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L188
  addl   $0x1,-0x30(%rbp)
  jmp    L21
L188:
  addl   $0x1,-0x28(%rbp)
  jmp    L21
L112:
  nop
L21:
  mov    D50(%rip),%rax
  mov    (%rax),%edx
  mov    D146(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  jne    L235
  addl   $0x1,-0x28(%rbp)
L235:
  addq   $0x8,-0x18(%rbp)
L333:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L148
  cmpl   $0x0,-0x28(%rbp)
  je     L410
L148:
  cmpl   $0x0,-0x2c(%rbp)
  jne    L211
  cmpq   $0x0,-0x10(%rbp)
  jne    L226
  mov    D50(%rip),%rax
  mov    (%rax),%edx
  mov    D167(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  jne    L211
L226:
  mov    -0x5c(%rbp),%edi
  mov    -0x58(%rbp),%rsi
  mov    -0x50(%rbp),%ecx
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edi,%r9d
  mov    %rsi,%r8
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <res_querydomain@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L211
  mov    -0x24(%rbp),%eax
  jmp    L178
L211:
  cmpl   $0xffffffff,-0x38(%rbp)
  je     L423
  mov    D169(%rip),%rax
  mov    -0x38(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L176
L423:
  cmpl   $0x0,-0x34(%rbp)
  je     L134
  mov    D169(%rip),%rax
  movl   $0x81,(%rax)
  jmp    L176
L134:
  cmpl   $0x0,-0x30(%rbp)
  je     L176
  mov    D169(%rip),%rax
  movl   $0x80,(%rax)
L176:
  mov    $0xffffffff,%eax
L178:
  leave
  ret
```

assistant: ```c
int res_search(const char *name, int class, int type, u_char *answer, int anslen) {
  const char *cp, *const *domain;
  HEADER *hp = (HEADER *)answer;
  u_int dots;
  int trailing_dot, ret, saved_herrno;
  int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
  if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
    h_errno = NETDB_INTERNAL;
    return (-1);
  }
  errno = 0;
  h_errno = HOST_NOT_FOUND;
  dots = 0;
  for (cp = name; *cp; cp++)
    dots += (*cp == '.');
  trailing_dot = 0;
  if (cp > name && *--cp == '.')
    trailing_dot++;
  if (!dots && (cp = hostalias(name)) != NULL)
    return (res_query(cp, class, type, answer, anslen));
  saved_herrno = -1;
  if (dots >= _res.ndots) {
    ret = res_querydomain(name, NULL, class, type, answer, anslen);
    if (ret > 0)
      return (ret);
    saved_herrno = h_errno;
    tried_as_is++;
  }
  if ((!dots && (_res.options & RES_DEFNAMES)) || (dots && !trailing_dot && (_res.options & RES_DNSRCH))) {
    int done = 0;
    for (domain = (const char *const *)_res.dnsrch; *domain && !done; domain++) {
      ret = res_querydomain(name, *domain, class, type, answer, anslen);
      if (ret > 0)
        return (ret);
      if (errno == ECONNREFUSED) {
        h_errno = TRY_AGAIN;
        return (-1);
      }
      switch (h_errno) {
      case NO_DATA:
        got_nodata++;
      case HOST_NOT_FOUND:
        break;
      case TRY_AGAIN:
        if (hp->rcode == SERVFAIL) {
          got_servfail++;
          break;
        }
      default:
        done++;
      }
      if (!(_res.options & RES_DNSRCH))
        done++;
    }
  }
  if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) {
    ret = res_querydomain(name, NULL, class, type, answer, anslen);
    if (ret > 0)
      return (ret);
  }
  if (saved_herrno != -1)
    h_errno = saved_herrno;
  else if (got_nodata)
    h_errno = NO_DATA;
  else if (got_servfail)
    h_errno = TRY_AGAIN;
  return (-1);
}
```