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

```asm
<config_send>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x48,%rsp
  mov    0x2080(%rsp),%r14
  mov    %rcx,0x8(%rsp)
  lea    0x30(%rsp),%r15
  mov    %edi,%ebp
  mov    %r8,%r12
  mov    %rsi,0x18(%rsp)
  lea    0x28(%rsp),%r13
  xor    %esi,%esi
  mov    %r15,%rdi
  mov    %rdx,0x10(%rsp)
  mov    $0x400,%edx
  mov    %r9,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x2038(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  lea    0x58(%rsp),%rdi
  mov    %r13,%rsi
  xor    %eax,%eax
  movq   $0x17,0x30(%rsp)
  mov    $0x1,%edx
  movq   $0x1,0x38(%rsp)
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  movq   $0xff,0x28(%rsp)
  call   <memcpy@plt>
  mov    0x18(%rsp),%rsi
  lea    0x60(%rsp),%rdi
  xor    %eax,%eax
  mov    $0x4,%edx
  call   <memcpy@plt>
  mov    $0x1,%edx
  mov    %r13,%rsi
  xor    %eax,%eax
  lea    0x80(%rsp),%rdi
  movq   $0xfe,0x28(%rsp)
  call   <memcpy@plt>
  mov    0x10(%rsp),%rsi
  mov    $0x4,%edx
  xor    %eax,%eax
  lea    0x88(%rsp),%rdi
  call   <memcpy@plt>
  mov    $0x1,%edx
  mov    %r13,%rsi
  xor    %eax,%eax
  lea    0xa8(%rsp),%rdi
  movq   $0xfd,0x28(%rsp)
  call   <memcpy@plt>
  mov    0x8(%rsp),%rsi
  mov    $0x4,%edx
  xor    %eax,%eax
  lea    0xb0(%rsp),%rdi
  call   <memcpy@plt>
  mov    $0x1,%edx
  mov    %r13,%rsi
  xor    %eax,%eax
  lea    0xd0(%rsp),%rdi
  movq   $0xfc,0x28(%rsp)
  call   <memcpy@plt>
  mov    %r12,%rsi
  mov    $0x4,%edx
  xor    %eax,%eax
  lea    0xd8(%rsp),%rdi
  mov    $0x19,%r12d
  call   <memcpy@plt>
  test   %rbx,%rbx
  je     L22
  mov    $0x1,%edx
  mov    %r13,%rsi
  lea    0xf8(%rsp),%rdi
  xor    %eax,%eax
  movq   $0xfb,0x28(%rsp)
  call   <memcpy@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x100(%rsp),%rdi
  mov    %rbx,%rsi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <memcpy@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1b(%rax),%r12d
L22:
  mov    %r14,%rax
  lea    0x80(%r14),%rdx
  nopl   0x0(%rax,%rax,1)
L26:
  cmpq   $0x0,(%rax)
  jne    L41
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L26
L6:
  lea    -0x5(%r12),%eax
  mov    %r15,%rsi
  mov    %ebp,%edi
  movzbl %al,%edx
  cltq
  shr    $0x8,%rax
  mov    %rdx,0x48(%rsp)
  mov    %r12d,%edx
  mov    %rax,0x50(%rsp)
  call   <write@plt>
  mov    0x2038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L38
  add    $0x2048,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L41:
  movslq %r12d,%rbx
  mov    $0x1,%edx
  mov    %r13,%rsi
  xor    %eax,%eax
  shl    $0x3,%rbx
  add    $0x11,%r12d
  movq   $0xfa,0x28(%rsp)
  lea    (%r15,%rbx,1),%rdi
  call   <memcpy@plt>
  lea    0x8(%r15,%rbx,1),%rdi
  mov    %r14,%rsi
  xor    %eax,%eax
  mov    $0x10,%edx
  call   <memcpy@plt>
  jmp    L6
L38:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int config_send(const int sockfd, const uint8_t ip_address[4], const uint8_t netmask[4], const uint8_t gateway[4], const uint8_t nameserver[4], const char *label, const uint8_t aes_key[16]) {
  ssize_t n = 0;
  uint8_t config_function_code;
  uint8_t buffer[1024];
  int i;
  memset(buffer, 0, 1024);
  buffer[n++] = 0x17;
  buffer[n++] = 1;
  buffer[n++] = 0;
  buffer[n++] = 0x00;
  buffer[n++] = 0x00;
  config_function_code = 255;
  memcpy(buffer + n, &config_function_code, 1);
  n++;
  memcpy(buffer + n, ip_address, 4);
  n += 4;
  config_function_code = 254;
  memcpy(buffer + n, &config_function_code, 1);
  n++;
  memcpy(buffer + n, netmask, 4);
  n += 4;
  config_function_code = 253;
  memcpy(buffer + n, &config_function_code, 1);
  n++;
  memcpy(buffer + n, gateway, 4);
  n += 4;
  config_function_code = 252;
  memcpy(buffer + n, &config_function_code, 1);
  n++;
  memcpy(buffer + n, nameserver, 4);
  n += 4;
  if (NULL != label) {
    config_function_code = 251;
    memcpy(buffer + n, &config_function_code, 1);
    n++;
    memcpy(buffer + n, label, strlen(label));
    n += strlen(label) + 1;
  }
  for (i = 0; i < 16; i++) {
    if (aes_key[i] != 0) {
      break;
    }
  }
  if (i != 16) {
    config_function_code = 250;
    memcpy(buffer + n, &config_function_code, 1);
    n++;
    memcpy(buffer + n, aes_key, 16);
    n += 16;
  }
  size_t packet_length = n - 5;
  buffer[3] = packet_length & 0xff;
  buffer[4] = packet_length >> 8;
  write(sockfd, buffer, n);
  return n;
}
```