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

```asm
<del_ip>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x58,%rsp
  mov    %edi,%ebx
  mov    %rsi,%rbp
  mov    %edx,%r14d
  mov    %rcx,%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x1048(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%r12
  mov    $0x1000,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    $0x20,%edi
  call   <NLMSG_LENGTH@plt>
  mov    %eax,0x40(%rsp)
  mov    D32(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x48(%rsp)
  mov    D39(%rip),%rax
  mov    (%rax),%eax
  mov    D28(%rip),%rdx
  or     (%rdx),%eax
  mov    %eax,0x44(%rsp)
  mov    %r12,%rdi
  call   <NLMSG_DATA@plt>
  mov    %rax,%rdi
  mov    %r14d,(%rax)
  movl   $0x10,0x4(%rax)
  mov    D46(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x18(%rdi)
  movq   $0x0,0x10(%rdi)
  movl   $0x2,0x8(%rdi)
  call   <IFA_RTA@plt>
  mov    %rax,%r13
  mov    D45(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x4(%r13)
  mov    %r13,%rdi
  call   <RTA_DATA@plt>
  mov    %eax,%esi
  mov    %r15,%rdx
  mov    %r14d,%edi
  call   <pton@plt>
  mov    %eax,%edi
  call   <RTA_LENGTH@plt>
  mov    %eax,0x0(%r13)
  mov    0x40(%rsp),%edi
  call   <NLMSG_ALIGN@plt>
  add    0x0(%r13),%eax
  mov    %eax,0x40(%rsp)
  mov    $0x1000,%esi
  sub    %eax,%esi
  mov    %r13,%rdi
  call   <RTA_NEXT@plt>
  mov    %rax,%r13
  mov    D9(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x4(%r13)
  mov    %r13,%rdi
  call   <RTA_DATA@plt>
  mov    %eax,%esi
  mov    %r15,%rdx
  mov    %r14d,%edi
  call   <pton@plt>
  mov    %eax,%edi
  call   <RTA_LENGTH@plt>
  mov    %eax,0x0(%r13)
  add    0x40(%rsp),%eax
  mov    %eax,0x40(%rsp)
  mov    %r12d,(%rsp)
  cltq
  mov    %rax,0x8(%rsp)
  mov    %ebp,0x10(%rsp)
  movl   $0x4,0x14(%rsp)
  mov    %rsp,%rax
  mov    %eax,0x18(%rsp)
  movl   $0x1,0x1c(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x30(%rsp)
  lea    0x10(%rsp),%rsi
  mov    $0x0,%edx
  mov    %ebx,%edi
  call   <sendmsg@plt>
  sar    $0x1f,%eax
  mov    0x1048(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x1058,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int del_ip(int fd, struct sockaddr_nl *sa, int domain, const char *ip) {
  char buf[4096];
  int ip_len = 0;
  memset(buf, 0, 4096);
  struct nlmsghdr *nl;
  nl = (struct nlmsghdr *)buf;
  nl->nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
  nl->nlmsg_type = RTM_DELADDR;
  nl->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
  struct ifaddrmsg *ifa;
  ifa = (struct ifaddrmsg *)NLMSG_DATA(nl);
  ifa->ifa_family = domain;
  ifa->ifa_prefixlen = 16;
  ifa->ifa_flags = IFA_F_PERMANENT;
  ifa->ifa_scope = 0;
  ifa->ifa_index = 2;
  struct rtattr *rta = (struct rtattr *)IFA_RTA(ifa);
  rta->rta_type = IFA_LOCAL;
  ip_len = pton(domain, RTA_DATA(rta), ip);
  rta->rta_len = RTA_LENGTH(ip_len);
  nl->nlmsg_len = NLMSG_ALIGN(nl->nlmsg_len) + rta->rta_len;
  int l = 4096 - nl->nlmsg_len;
  rta = (struct rtattr *)RTA_NEXT(rta, l);
  rta->rta_type = IFA_ADDRESS;
  ip_len = pton(domain, RTA_DATA(rta), ip);
  rta->rta_len = RTA_LENGTH(ip_len);
  nl->nlmsg_len += rta->rta_len;
  struct iovec iov = {nl, nl->nlmsg_len};
  struct msghdr msg = {sa, sizeof(*sa), &iov, 1, NULL, 0, 0};
  int r = sendmsg(fd, &msg, 0);
  return (r < 0) ? -1 : 0;
}
```