user: Demonstrate the C code that generates the assembly output below:

```asm
<ifconfig4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x648,%rsp
  mov    %ecx,(%rsp)
  lea    0x230(%rsp),%rbp
  lea    0x30(%rsp),%r13
  mov    %esi,0x4(%rsp)
  mov    %rbp,%rdi
  xor    %esi,%esi
  lea    0x130(%rsp),%r14
  mov    %rdx,0x8(%rsp)
  mov    $0x400,%edx
  lea    0x20(%rsp),%r15
  lea    0x1c(%rsp),%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x638(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  xor    %esi,%esi
  mov    $0x100,%edx
  mov    %r13,%rdi
  call   <memset@plt>
  xor    %esi,%esi
  mov    $0x100,%edx
  mov    %r14,%rdi
  call   <memset@plt>
  xor    %esi,%esi
  mov    $0x10,%edx
  mov    %r15,%rdi
  call   <memset@plt>
  xor    %esi,%esi
  mov    $0x4,%edx
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    0x4(%rsp),%ecx
  mov    %r12,%rdx
  mov    %r13,%rdi
  mov    $0x100,%esi
  call   <ifconfigCheckCopyInput@plt>
  mov    (%rsp),%r9d
  test   %eax,%eax
  jne    L19
L14:
  xor    %eax,%eax
L40:
  mov    0x638(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L70
  add    $0x648,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L19:
  sub    $0x8,%rsp
  mov    $0x4,%ecx
  mov    %rbx,%rdx
  mov    %r14,%rdi
  push   $0x2f
  mov    0x18(%rsp),%r8
  mov    $0x100,%esi
  call   <ifconfigSplit@plt>
  pop    %rdx
  pop    %rcx
  test   %eax,%eax
  je     L14
  cmpb   $0x0,0x1c(%rsp)
  je     L4
L87:
  lea    0x18(%rsp),%rdx
  lea    D6(%rip),%rsi
  mov    %rbx,%rdi
  movl   $0x0,0x18(%rsp)
  call   <sscanf@plt>
  mov    0x18(%rsp),%esi
  mov    %r15,%rdi
  call   <ifconfig4Netmask@plt>
  mov    %r13,%rdx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D12(%rip),%rsi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <ifconfigExec@plt>
  mov    %r13,%rdx
  mov    %eax,0x18(%rsp)
  test   %eax,%eax
  je     L25
  lea    D39(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <ifconfigExec@plt>
  mov    %eax,0x18(%rsp)
  test   %eax,%eax
  jne    L14
  mov    %r15,%r8
  mov    %r14,%rcx
  lea    D69(%rip),%rsi
  mov    %r13,%rdx
L32:
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <ifconfigExec@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  jmp    L40
  nopw   0x0(%rax,%rax,1)
L25:
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <ifconfigExec@plt>
  mov    %eax,0x18(%rsp)
  test   %eax,%eax
  jne    L14
  mov    %rbx,%r8
  mov    %r14,%rcx
  lea    D52(%rip),%rsi
  mov    %r13,%rdx
  jmp    L32
  nopl   (%rax)
L4:
  mov    $0x2,%edx
  lea    D50(%rip),%rsi
  mov    %rbx,%rdi
  call   <memcpy@plt>
  jmp    L87
L70:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D6
type_infered: string
name: unpack_data
arguments: data_label: D12
type_infered: string
name: unpack_data
arguments: data_label: D39
type_infered: string
name: unpack_data
arguments: data_label: D69
type_infered: string
name: unpack_data
arguments: data_label: D0
type_infered: string
name: unpack_data
arguments: data_label: D52
type_infered: string
name: unpack_data
arguments: data_label: D50
type_infered: string

tool: D6: %d

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

tool: D39: ifconfig "%s" up

tool: D69: ifconfig "%s" "%s" netmask "%s"

tool: D0: ip -4 addr flush dev "%s" scope global

tool: D52: ip -4 addr add dev "%s" "%s/%s" broadcast + scope global

tool: D50: 32

assistant: ```c
int ifconfig4(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 netmask_s[16];
  memset(netmask_s, 0, 16);
  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, "32", 2);
  ret = 0;
  sscanf(prefixlen_s, "%d", &ret);
  ifconfig4Netmask(netmask_s, ret);
  sprintf(cmd, "ip link set dev \"%s\" up", ifname_s);
  ret = ifconfigExec(cmd);
  if (ret == 0) {
    sprintf(cmd, "ip -4 addr flush dev \"%s\" scope global", ifname_s);
    ret = ifconfigExec(cmd);
    if (ret != 0) {
      return 0;
    }
    sprintf(cmd, "ip -4 addr add dev \"%s\" \"%s/%s\" broadcast + scope global", ifname_s, ip_s, prefixlen_s);
    ret = ifconfigExec(cmd);
    if (ret != 0) {
      return 0;
    }
    return 1;
  }
  sprintf(cmd, "ifconfig \"%s\" up", ifname_s);
  ret = ifconfigExec(cmd);
  if (ret == 0) {
    sprintf(cmd, "ifconfig \"%s\" \"%s\" netmask \"%s\"", ifname_s, ip_s, netmask_s);
    ret = ifconfigExec(cmd);
    if (ret != 0) {
      return 0;
    }
    return 1;
  }
  return 0;
}
```