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

```asm
<load_ip_address>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  xor    %edi,%edi
  test   %rbx,%rbx
  setne  %dil
  call   <assert@plt>
  movzbl (%r15),%eax
  cmp    $0x9,%al
  je     L166
  cmp    $0x20,%al
  jne    L184
  nopw   0x0(%rax,%rax,1)
L166:
  movzbl 0x1(%r15),%eax
  add    $0x1,%r15
  cmp    $0x20,%al
  je     L166
  cmp    $0x9,%al
  je     L166
L184:
  xor    %ebp,%ebp
  lea    0x14(%rsp),%r14
  lea    D23(%rip),%r13
  xor    %ebx,%ebx
L195:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <sscanf@plt>
  mov    %eax,%r12d
  cmp    $0x1,%eax
  jne    L6
  mov    0x14(%rsp),%esi
  cmp    $0xff,%esi
  jg     L187
  test   %esi,%esi
  js     L89
  mov    $0x1,%edi
  call   <assert@plt>
  xor    %edi,%edi
  cmpl   $0xff,0x14(%rsp)
  setle  %dil
  shl    $0x8,%ebp
  call   <assert@plt>
  lea    D22(%rip),%rsi
  mov    %r15,%rdi
  or     0x14(%rsp),%ebp
  call   <strspn@plt>
  cltq
  add    %r15,%rax
  movzbl (%rax),%edx
  test   $0xdf,%dl
  je     L129
  cmp    $0x9,%dl
  je     L129
  cmp    $0x2e,%dl
  jne    L107
  cmp    $0x3,%ebx
  je     L108
  lea    0x1(%rax),%r15
  add    $0x1,%ebx
  jmp    L195
  nopw   0x0(%rax,%rax,1)
L108:
  mov    $0x4,%esi
  lea    D64(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
L128:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L189
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L129:
  cmp    $0x3,%ebx
  je     L55
  lea    D7(%rip),%rdi
  xor    %r12d,%r12d
  call   <puts@plt>
  jmp    L128
L6:
  mov    %r15,%rsi
  lea    D27(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L128
L187:
  lea    D73(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L128
L89:
  lea    D59(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L128
L55:
  mov    %ebp,%edi
  call   <htonl@plt>
  mov    0x8(%rsp),%rcx
  mov    %eax,(%rcx)
  jmp    L128
L107:
  lea    D51(%rip),%rdi
  xor    %r12d,%r12d
  call   <puts@plt>
  jmp    L128
L189:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D23
type: string
name: read_data
arguments: data_label: D22
type: string
name: read_data
arguments: data_label: D64
type: string
name: read_data
arguments: data_label: D7
type: string
name: read_data
arguments: data_label: D27
type: string
name: read_data
arguments: data_label: D73
type: string
name: read_data
arguments: data_label: D59
type: string
name: read_data
arguments: data_label: D51
type: string

tool: D23: %d

tool: D22: 0123456789

tool: D64: load_ip_address: Too many IP bytes, only %u expected


tool: D7: load_ip_address: Separating dot not found

tool: D27: load_ip_address: Unable to parse IP byte from string '%s'


tool: D73: load_ip_address: Invalid IP byte %d higher than 255


tool: D59: load_ip_address: Invalid IP byte %d lower than 0


tool: D51: load_ip_address: IP byte is not a number

assistant: ```c
int load_ip_address(const char *data, struct in_addr *addr) {
  int i, tmp;
  unsigned int ip;
  const char *pos;
  assert(data != NULL);
  assert(addr != NULL);
  pos = data;
  while (*pos == ' ' || *pos == '\t')
    pos++;
  ip = 0;
  for (i = 0;; i++) {
    if (sscanf(pos, "%d", &tmp) != 1) {
      printf("load_ip_address: Unable to parse IP byte "
             "from string '%s'\n",
             pos);
      return 0;
    }
    if (tmp > 255) {
      printf("load_ip_address: Invalid IP byte %d higher "
             "than 255\n",
             tmp);
      return 0;
    }
    if (tmp < 0) {
      printf("load_ip_address: Invalid IP byte %d lower "
             "than 0\n",
             tmp);
      return 0;
    }
    assert(tmp >= 0);
    assert(tmp <= 255);
    ip = (ip << 8) | tmp;
    pos = pos + strspn(pos, "0123456789");
    if (*pos == '\0' || *pos == ' ' || *pos == '\t') {
      if (i == 4 - 1)
        break;
      printf("load_ip_address: Separating dot not found\n");
      return 0;
    }
    if (*pos == '.') {
      if (i == 4 - 1) {
        printf("load_ip_address: Too many IP "
               "bytes, only %u expected\n",
               4);
        return 0;
      }
      pos++;
    } else {
      printf("load_ip_address: IP byte is not a number\n");
      return 0;
    }
  }
  addr->s_addr = htonl(ip);
  return 1;
}
```