user: 请从给定的汇编指令推导出C源代码：

```asm
<ifconfig6>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x640,%rsp
  mov    %rdi,-0x628(%rbp)
  mov    %esi,-0x62c(%rbp)
  mov    %rdx,-0x638(%rbp)
  mov    %ecx,-0x630(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x410(%rbp),%rax
  mov    $0x400,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x610(%rbp),%rax
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x510(%rbp),%rax
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x614(%rbp),%rax
  mov    $0x4,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x62c(%rbp),%ecx
  mov    -0x628(%rbp),%rdx
  lea    -0x610(%rbp),%rax
  mov    $0x100,%esi
  mov    %rax,%rdi
  call   <ifconfigCheckCopyInput@plt>
  test   %eax,%eax
  jne    L29
  mov    $0x0,%eax
  jmp    L13
L29:
  mov    -0x630(%rbp),%esi
  mov    -0x638(%rbp),%rcx
  lea    -0x614(%rbp),%rdx
  lea    -0x510(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x2f
  mov    %esi,%r9d
  mov    %rcx,%r8
  mov    $0x4,%ecx
  mov    $0x100,%esi
  mov    %rax,%rdi
  call   <ifconfigSplit@plt>
  add    $0x10,%rsp
  test   %eax,%eax
  jne    L72
  mov    $0x0,%eax
  jmp    L13
L72:
  lea    -0x614(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L95
  lea    -0x614(%rbp),%rax
  mov    $0x2,%edx
  lea    D34(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L95:
  lea    -0x610(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <ifconfigExec@plt>
  mov    %eax,-0x618(%rbp)
  cmpl   $0x0,-0x618(%rbp)
  jne    L33
  lea    -0x610(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  lea    D1(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <ifconfigExec@plt>
  mov    %eax,-0x618(%rbp)
  cmpl   $0x0,-0x618(%rbp)
  je     L100
  mov    $0x0,%eax
  jmp    L13
L100:
  lea    -0x614(%rbp),%rsi
  lea    -0x510(%rbp),%rcx
  lea    -0x610(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rsi,%r8
  lea    D11(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <ifconfigExec@plt>
  mov    %eax,-0x618(%rbp)
  cmpl   $0x0,-0x618(%rbp)
  je     L21
  mov    $0x0,%eax
  jmp    L13
L21:
  mov    $0x1,%eax
  jmp    L13
L33:
  mov    $0x0,%eax
L13:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D34
type_infered: string
name: retrieve_data
arguments: label: D14
type_infered: string
name: retrieve_data
arguments: label: D1
type_infered: string
name: retrieve_data
arguments: label: D11
type_infered: string

tool: D34: 128

tool: D14: ip link set dev "%s" up

tool: D1: ip -6 addr flush dev "%s" scope global

tool: D11: ip -6 addr add dev "%s" "%s/%s" scope global

assistant: ```c
int ifconfig6(const char *ifname, const int ifname_len, const char *addr, const int addr_len) {
  char cmd[1024];
  memset(cmd, 0, 1024);
  char ifname_s[256];
  memset(ifname_s, 0, 256);
  char ip_s[256];
  memset(ip_s, 0, 256);
  char prefixlen_s[4];
  memset(prefixlen_s, 0, 4);
  int ret;
  if (!ifconfigCheckCopyInput(ifname_s, 256, ifname, ifname_len))
    return 0;
  if (!ifconfigSplit(ip_s, 256, prefixlen_s, 4, addr, addr_len, '/'))
    return 0;
  if (strlen(prefixlen_s) == 0)
    memcpy(prefixlen_s, "128", 2);
  sprintf(cmd, "ip link set dev \"%s\" up", ifname_s);
  ret = ifconfigExec(cmd);
  if (ret == 0) {
    sprintf(cmd, "ip -6 addr flush dev \"%s\" scope global", ifname_s);
    ret = ifconfigExec(cmd);
    if (ret != 0) {
      return 0;
    }
    sprintf(cmd, "ip -6 addr add dev \"%s\" \"%s/%s\" scope global", ifname_s, ip_s, prefixlen_s);
    ret = ifconfigExec(cmd);
    if (ret != 0) {
      return 0;
    }
    return 1;
  }
  return 0;
}
```