user: Translate the below assembly code into C programming language:

```asm
<send_arping>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x10,%rsp
  mov    %rdi,-0x1008(%rbp)
  mov    %rsi,-0x1010(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0xff8(%rbp)
  movl   $0x0,-0xfe4(%rbp)
  mov    D54(%rip),%rax
  mov    (%rax),%edx
  mov    D54(%rip),%rax
  mov    (%rax),%ecx
  mov    D24(%rip),%rax
  mov    (%rax),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <socket@plt>
  mov    $0x0,%eax
  call   <getuid@plt>
  mov    %eax,%edi
  call   <setuid@plt>
  test   %rax,%rax
  je     L34
  mov    $0xf,%eax
  jmp    L48
L34:
  movabs $0xffffffffffff,%rax
  mov    %rax,-0xfd8(%rbp)
  lea    -0xfd8(%rbp),%rcx
  lea    -0xfb0(%rbp),%rax
  mov    $0x6,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  addl   $0x6,-0xfe4(%rbp)
  mov    -0xfb8(%rbp),%eax
  mov    -0x1010(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <strcpy@plt>
  mov    D34(%rip),%rax
  mov    (%rax),%ecx
  lea    -0xfc0(%rbp),%rdx
  mov    -0xfe0(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <ioctl@plt>
  test   %rax,%rax
  jns    L86
  mov    $0x10,%eax
  jmp    L48
L86:
  mov    -0xfc0(%rbp),%rax
  mov    -0xfe4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  lea    -0xfb0(%rbp),%rdx
  add    %rdx,%rcx
  mov    $0x6,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  addl   $0x6,-0xfe4(%rbp)
  movl   $0x806,-0xff4(%rbp)
  mov    -0xfe4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    -0xfb0(%rbp),%rax
  lea    (%rax,%rdx,1),%rcx
  lea    -0xff4(%rbp),%rax
  mov    $0x2,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  addl   $0x2,-0xfe4(%rbp)
  movl   $0x1,-0xff0(%rbp)
  movl   $0x800,-0xfec(%rbp)
  movl   $0x1,-0xfe8(%rbp)
  mov    -0xfe4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    -0xfb0(%rbp),%rax
  lea    (%rax,%rdx,1),%rcx
  lea    -0xff0(%rbp),%rax
  mov    $0x2,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  addl   $0x2,-0xfe4(%rbp)
  mov    -0xfe4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    -0xfb0(%rbp),%rax
  lea    (%rax,%rdx,1),%rcx
  lea    -0xfec(%rbp),%rax
  mov    $0x2,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  addl   $0x2,-0xfe4(%rbp)
  mov    -0xfe4(%rbp),%eax
  cltq
  movl   $0x6,-0xfb0(%rbp,%rax,4)
  mov    -0xfe4(%rbp),%eax
  add    $0x1,%eax
  cltq
  movl   $0x4,-0xfb0(%rbp,%rax,4)
  addl   $0x2,-0xfe4(%rbp)
  mov    -0xfe4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    -0xfb0(%rbp),%rax
  lea    (%rax,%rdx,1),%rcx
  lea    -0xfe8(%rbp),%rax
  mov    $0x2,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  addl   $0x2,-0xfe4(%rbp)
  mov    -0xfc0(%rbp),%rax
  mov    -0xfe4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  lea    -0xfb0(%rbp),%rdx
  add    %rdx,%rcx
  mov    $0x6,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  mov    D37(%rip),%rax
  mov    (%rax),%edx
  mov    D36(%rip),%rax
  mov    (%rax),%esi
  lea    -0xff8(%rbp),%rcx
  mov    -0xfe0(%rbp),%eax
  mov    $0x4,%r8d
  mov    %eax,%edi
  call   <setsockopt@plt>
  test   %rax,%rax
  jns    L81
  mov    $0x11,%eax
  jmp    L48
L81:
  addl   $0x6,-0xfe4(%rbp)
  movq   $0x0,-0xfc8(%rbp)
  mov    -0xfd0(%rbp),%eax
  mov    -0x1010(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <strcpy@plt>
  lea    -0xfd0(%rbp),%rcx
  mov    -0xfe4(%rbp),%edx
  lea    -0xfb0(%rbp),%rsi
  mov    -0xfe0(%rbp),%eax
  mov    $0x10,%r9d
  mov    %rcx,%r8
  mov    $0x0,%ecx
  mov    %eax,%edi
  call   <sendto@plt>
  mov    %eax,-0xfdc(%rbp)
  cmpl   $0x0,-0xfdc(%rbp)
  jns    L69
  mov    $0x12,%eax
  jmp    L48
L69:
  mov    -0xfe0(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    $0x0,%eax
L48:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L12
  call   <__stack_chk_fail@plt>
L12:
  leave
  ret
```

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