user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<send_arping>:
  endbr64
  push   %rbx
  sub    $0xff0,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0xfe8(%rsp)
  xor    %eax,%eax
  movl   $0x1,0x4(%rsp)
  mov    D23(%rip),%rax
  mov    (%rax),%esi
  mov    %esi,%edx
  mov    D1(%rip),%rax
  mov    (%rax),%edi
  call   <socket@plt>
  mov    $0x0,%eax
  call   <getuid@plt>
  mov    %eax,%edi
  call   <setuid@plt>
  mov    %rax,%rdx
  mov    $0xf,%eax
  test   %rdx,%rdx
  jne    L12
  movabs $0xffffffffffff,%rax
  mov    %rax,0x18(%rsp)
  lea    0x18(%rsp),%rsi
  lea    0x40(%rsp),%rdi
  mov    $0x6,%edx
  mov    $0x0,%eax
  call   <memcpy@plt>
  mov    %rbx,%rsi
  mov    0x38(%rsp),%edi
  call   <strcpy@plt>
  lea    0x30(%rsp),%rdx
  mov    D28(%rip),%rax
  mov    (%rax),%esi
  mov    $0x0,%edi
  call   <ioctl@plt>
  mov    %rax,%rdx
  mov    $0x10,%eax
  test   %rdx,%rdx
  js     L12
  lea    0x58(%rsp),%rdi
  mov    $0x6,%edx
  mov    0x30(%rsp),%rsi
  mov    $0x0,%eax
  call   <memcpy@plt>
  movl   $0x806,0x8(%rsp)
  lea    0x8(%rsp),%rsi
  lea    0x70(%rsp),%rdi
  mov    $0x2,%edx
  mov    $0x0,%eax
  call   <memcpy@plt>
  movl   $0x1,0xc(%rsp)
  movl   $0x800,0x10(%rsp)
  movl   $0x1,0x14(%rsp)
  lea    0xc(%rsp),%rsi
  lea    0x78(%rsp),%rdi
  mov    $0x2,%edx
  mov    $0x0,%eax
  call   <memcpy@plt>
  lea    0x10(%rsp),%rsi
  lea    0x80(%rsp),%rdi
  mov    $0x2,%edx
  mov    $0x0,%eax
  call   <memcpy@plt>
  movl   $0x6,0x88(%rsp)
  movl   $0x4,0x8c(%rsp)
  lea    0x14(%rsp),%rsi
  lea    0x90(%rsp),%rdi
  mov    $0x2,%edx
  mov    $0x0,%eax
  call   <memcpy@plt>
  lea    0x98(%rsp),%rdi
  mov    $0x6,%edx
  mov    0x30(%rsp),%rsi
  mov    $0x0,%eax
  call   <memcpy@plt>
  lea    0x4(%rsp),%rcx
  mov    $0x4,%r8d
  mov    D42(%rip),%rax
  mov    (%rax),%edx
  mov    D3(%rip),%rax
  mov    (%rax),%esi
  mov    $0x0,%edi
  call   <setsockopt@plt>
  mov    %rax,%rdx
  mov    $0x11,%eax
  test   %rdx,%rdx
  js     L12
  movq   $0x0,0x28(%rsp)
  mov    %rbx,%rsi
  mov    0x20(%rsp),%edi
  call   <strcpy@plt>
  lea    0x40(%rsp),%rsi
  mov    $0x10,%r9d
  lea    0x20(%rsp),%r8
  mov    $0x0,%ecx
  mov    $0x1c,%edx
  mov    $0x0,%edi
  call   <sendto@plt>
  mov    %eax,%edx
  mov    $0x12,%eax
  test   %edx,%edx
  js     L12
  mov    $0x0,%edi
  call   <close@plt>
  mov    $0x0,%eax
L12:
  mov    0xfe8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L2
  add    $0xff0,%rsp
  pop    %rbx
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int send_arping(const struct cfgData *data, char *ifname) {
  u_char outpack[1000];
  struct sockaddr whereto;
  int sd;
  int one = 1;
  int offset = 0;
  if ((sd == socket(AF_INET, SOCK_PACKET, SOCK_PACKET)) < 0) {
    if (errno == EPERM)
      return 14;
    return 10;
  }
  if (setuid(getuid()) != 0) {
    return 15;
  }
  struct ifreq if_hwaddr;
  unsigned long destaddr = 0xFFFFFFFFFFFF;
  memcpy(outpack, &destaddr, 6);
  offset += 6;
  strcpy(if_hwaddr.ifr_name, ifname);
  if (ioctl(sd, SIOCGIFHWADDR, &if_hwaddr) < 0) {
    return 16;
  }
  memcpy(outpack + offset, if_hwaddr.ifr_hwaddr.sa_data, 6);
  offset += 6;
  unsigned int protocol = 0x0806;
  memcpy(outpack + offset, &protocol, 2);
  offset += 2;
  unsigned int hwtype = 0x0001;
  unsigned int protype = 0x0800;
  unsigned int opcode = 0x0001;
  memcpy(outpack + offset, &hwtype, 2);
  offset += 2;
  memcpy(outpack + offset, &protype, 2);
  offset += 2;
  outpack[offset] = 0x06;
  outpack[offset + 1] = 0x04;
  offset += 2;
  memcpy(outpack + offset, &opcode, 2);
  offset += 2;
  memcpy(outpack + offset, if_hwaddr.ifr_hwaddr.sa_data, 6);
  if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, (char *)&one, sizeof(one)) < 0)
    return 17;
  offset += 6;
  whereto.sa_family = 0;
  strcpy(whereto.sa_data, ifname);
  int i;
  if ((i = sendto(sd, outpack, offset, 0, &whereto, sizeof(whereto))) < 0)
    return 18;
  else
    ;
  close(sd);
  return 0;
}
```