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

```asm
<preip_set_apply_save>:
  endbr64
  push   %r13
  pxor   %xmm0,%xmm0
  lea    D20(%rip),%rdi
  push   %r12
  push   %rbp
  sub    $0xb0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
  movaps %xmm0,0x80(%rsp)
  movaps %xmm0,0x90(%rsp)
  movaps %xmm0,(%rsp)
  movaps %xmm0,0x10(%rsp)
  call   <printf@plt>
  xor    %eax,%eax
  call   <write_to_nvram@plt>
  xor    %eax,%eax
  call   <nvram_commit@plt>
  xor    %edi,%edi
  call   <set_config_sta@plt>
  test   %rax,%rax
  jne    L2
L4:
  lea    D70(%rip),%rdi
  lea    0x20(%rsp),%rbp
  mov    %rsp,%r12
  call   <nvram_safe_get@plt>
  lea    D66(%rip),%rsi
  mov    %rbp,%rdi
  lea    D9(%rip),%r13
  mov    %rax,%rdx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  xor    %r9d,%r9d
  mov    $0x20,%r8d
  xor    %esi,%esi
  mov    %r12,%rcx
  lea    D82(%rip),%rdx
  mov    %r13,%rdi
  call   <ezplib_get_attr_val@plt>
  xor    %esi,%esi
  mov    $0x80,%edx
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %r12,%rdi
  call   <atoi@plt>
  lea    D84(%rip),%rsi
  mov    %rbp,%rdi
  lea    0x5f(%rax),%edx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  xor    %esi,%esi
  mov    $0x20,%edx
  mov    %r12,%rdi
  call   <memset@plt>
  xor    %r9d,%r9d
  mov    $0x20,%r8d
  xor    %esi,%esi
  mov    %r12,%rcx
  lea    D97(%rip),%rdx
  mov    %r13,%rdi
  call   <ezplib_get_attr_val@plt>
  xor    %esi,%esi
  mov    $0x80,%edx
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %r12,%rdi
  call   <atoi@plt>
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  lea    0x5f(%rax),%edx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  lea    D48(%rip),%rdi
  call   <system@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0xb0,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L2:
  lea    D86(%rip),%rdi
  call   <printf@plt>
  jmp    L4
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D20
datatype: string
name: unpack_data
arguments: data_tag: D70
datatype: string
name: unpack_data
arguments: data_tag: D66
datatype: string
name: unpack_data
arguments: data_tag: D9
datatype: string
name: unpack_data
arguments: data_tag: D82
datatype: string
name: unpack_data
arguments: data_tag: D84
datatype: string
name: unpack_data
arguments: data_tag: D97
datatype: string
name: unpack_data
arguments: data_tag: D12
datatype: string
name: unpack_data
arguments: data_tag: D48
datatype: string
name: unpack_data
arguments: data_tag: D86
datatype: string

tool: D20: preip_set_apply_save


tool: D70: hostname

tool: D66: echo %s > /proc/sys/kernel/hostname

tool: D9: wl0_apcli_rule

tool: D82: connrssi

tool: D84: iwpriv sta0 connrssi %d

tool: D97: disconnrssi

tool: D12: iwpriv sta0 disconnrssi %d

tool: D48: /etc/init.d/network-lan restart 2>/dev/null 1>/dev/null &

tool: D86: set_config_sta error!


assistant: ```c
void preip_set_apply_save(void) {
  char cmd[128] = {0};
  char *sys_name = NULL;
  char *connrssi = NULL;
  char *disconnrssi = NULL;
  char buf[32] = {0};
  char br_name[32] = {0}, *br_get = NULL;
  char buf_proto[32] = {0};
  printf("preip_set_apply_save\n");
  write_to_nvram();
  nvram_commit();
  if (set_config_sta(0)) {
    printf("set_config_sta error!\n");
  }
  sys_name = nvram_safe_get("hostname");
  sprintf(cmd, "echo %s > /proc/sys/kernel/hostname", sys_name);
  system(cmd);
  ezplib_get_attr_val("wl0_apcli_rule", 0, "connrssi", buf, 32, 0);
  memset(cmd, 0, sizeof(cmd));
  sprintf(cmd, "iwpriv sta0 connrssi %d", (atoi(buf) + 95));
  system(cmd);
  memset(buf, 0, sizeof(buf));
  ezplib_get_attr_val("wl0_apcli_rule", 0, "disconnrssi", buf, 32, 0);
  memset(cmd, 0, sizeof(cmd));
  sprintf(cmd, "iwpriv sta0 disconnrssi %d", (atoi(buf) + 95));
  system(cmd);
  system("/etc/init.d/network-lan restart 2>/dev/null 1>/dev/null &");
  return 0;
}
```