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

```asm
<check_ip_range>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movzbl (%rdi),%eax
  test   %al,%al
  je     L173
  add    $0x1,%rdi
  lea    0x10(%rsp),%rdx
  mov    $0x0,%ecx
  mov    $0x0,%esi
  mov    $0x1,%r9d
  jmp    L196
L131:
  movb   $0x0,(%rdx)
  mov    %r9d,%esi
L12:
  movzbl (%rdi),%eax
  add    $0x1,%rdi
  add    $0x1,%rdx
  test   %al,%al
  je     L23
L196:
  cmp    $0x2f,%al
  je     L131
  test   %esi,%esi
  je     L68
  movslq %ecx,%r8
  mov    %al,0xc(%rsp,%r8,1)
  add    $0x1,%ecx
  jmp    L12
L68:
  mov    %al,(%rdx)
  jmp    L12
L173:
  mov    $0x0,%ecx
L23:
  movslq %ecx,%rcx
  movb   $0x0,0xc(%rsp,%rcx,1)
  lea    0xc(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%r12d
  mov    $0x20,%eax
  sub    %r12d,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D18(%rip),%xmm0
  call   <pow@plt>
  mov    %rax,%rbp
  mov    %eax,%r13d
  lea    0x10(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  js     L109
  movslq %eax,%rdx
  lea    0x10(%rsp,%rdx,1),%rdx
  mov    %eax,%ecx
L111:
  cmpb   $0x2e,(%rdx)
  je     L73
  sub    $0x1,%ecx
  sub    $0x1,%rdx
  cmp    $0xffffffff,%ecx
  jne    L111
L73:
  lea    0x1(%rax),%edi
  mov    $0x1,%edx
  test   %eax,%eax
  jle    L200
  lea    0x1f(%rsp),%r9
  movslq %ecx,%rsi
  lea    0x10(%rsp,%rsi,1),%r8
L194:
  movzbl (%r8,%rdx,1),%esi
  mov    %sil,(%r9,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L194
L183:
  cltq
  movb   $0x0,0x20(%rsp,%rax,1)
  add    $0x1,%ecx
  movslq %ecx,%rcx
  movb   $0x0,0x10(%rsp,%rcx,1)
  lea    0x20(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  cmp    $0x17,%r12d
  jle    L10
  add    %eax,%ebp
  cmp    $0xff,%eax
  jg     L80
  lea    D0(%rip),%r13
  cmp    %ebp,%eax
  jge    L80
L157:
  lea    0x10(%rsp),%rdx
  lea    0x20(%rsp),%r12
  mov    %ebx,%ecx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <check_ip@plt>
  add    $0x1,%ebx
  cmp    $0xff,%ebx
  jg     L80
  cmp    %ebp,%ebx
  jl     L157
  jmp    L80
L109:
  mov    %eax,%ecx
  jmp    L73
L200:
  mov    $0x0,%eax
  jmp    L183
L10:
  mov    %r13d,%esi
  lea    D10(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D28(%rip),%rdi
  call   <puts@plt>
L80:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L158
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L158:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D18
type_infered: byte[8]
name: read_data
arguments: data_label: D0
type_infered: string
name: read_data
arguments: data_label: D10
type_infered: string
name: read_data
arguments: data_label: D28
type_infered: string

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

tool: D0: %s%d

tool: D10: I'm sorry I will not scan %d hosts, 

tool: D28: do it with a script.. :/

assistant: ```c
void check_ip_range(const char *iprange) {
  char ip[16];
  char buf_mask[4];
  char buff[16];
  int slash_found, x, y, length, mask, hosts, start;
  slash_found = false;
  x = y = 0;
  while (iprange[x] != '\0') {
    if (iprange[x] == '/') {
      ip[x] = '\0';
      slash_found = true;
    } else {
      if (slash_found) {
        buf_mask[y] = iprange[x];
        y++;
      } else
        ip[x] = iprange[x];
    }
    x++;
  }
  buf_mask[y] = '\0';
  mask = atoi(buf_mask);
  y = 32 - mask;
  hosts = (int)pow((double)2, (double)y);
  length = strlen(ip);
  for (x = length; x >= 0; x--)
    if (ip[x] == '.')
      break;
  for (y = 0; y < length; y++)
    buff[y] = ip[y + (x + 1)];
  buff[y] = '\0';
  ip[x + 1] = '\0';
  start = atoi(buff);
  if (mask < 24) {
    printf("I'm sorry I will not scan %d hosts, ", hosts);
    printf("do it with a script.. :/\n");
  } else {
    for (x = start; x < hosts + start; x++) {
      if (x > 255)
        break;
      sprintf(buff, "%s%d", ip, x);
      check_ip(buff);
    }
  }
}
```