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

```asm
<check_ip_range>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movzbl (%rdi),%eax
  test   %al,%al
  je     L60
  lea    0x20(%rsp),%r15
  add    $0x1,%rdi
  xor    %ecx,%ecx
  xor    %esi,%esi
  mov    %r15,%rdx
  jmp    L90
  nop
L179:
  test   %esi,%esi
  je     L157
  movslq %ecx,%r8
  add    $0x1,%ecx
  mov    %al,0x1c(%rsp,%r8,1)
L40:
  movzbl (%rdi),%eax
  add    $0x1,%rdx
  add    $0x1,%rdi
  test   %al,%al
  je     L178
L90:
  cmp    $0x2f,%al
  jne    L179
  movzbl (%rdi),%eax
  movb   $0x0,(%rdx)
  mov    $0x1,%esi
  add    $0x1,%rdi
  add    $0x1,%rdx
  test   %al,%al
  jne    L90
L178:
  movslq %ecx,%rcx
  lea    0x1c(%rsp),%rdi
  movb   $0x0,0x1c(%rsp,%rcx,1)
  call   <atoi@plt>
  pxor   %xmm1,%xmm1
  movsd  D11(%rip),%xmm0
  mov    %eax,%r12d
  mov    $0x20,%eax
  sub    %r12d,%eax
  cvtsi2sd %eax,%xmm1
  call   <pow@plt>
  mov    %r15,%rdi
  mov    %eax,0xc(%rsp)
  mov    %rax,%rbp
  call   <strlen@plt>
  movslq %eax,%r13
  mov    %r13,%rdx
  test   %eax,%eax
  jns    L94
  jmp    L6
  nopl   (%rax)
L112:
  sub    $0x1,%rdx
  test   %edx,%edx
  js     L34
L94:
  cmpb   $0x2e,(%r15,%rdx,1)
  mov    %edx,%ecx
  jne    L112
  add    $0x1,%ecx
L34:
  lea    0x30(%rsp),%r14
  movslq %ecx,%rbx
  test   %eax,%eax
  je     L73
  lea    (%r15,%rbx,1),%rsi
  mov    %r13,%rdx
  mov    %r14,%rdi
  call   <memcpy@plt>
L73:
  mov    %r14,%rdi
  movb   $0x0,0x20(%rsp,%rbx,1)
  movb   $0x0,0x30(%rsp,%r13,1)
  call   <atoi@plt>
  mov    %eax,%ebx
  cmp    $0x17,%r12d
  jle    L203
  add    %eax,%ebp
  cmp    %ebp,%eax
  jge    L140
  lea    D1(%rip),%r12
  cmp    $0xff,%eax
  jle    L97
  jmp    L140
L162:
  cmp    $0xff,%ebx
  jg     L140
L97:
  mov    %ebx,%ecx
  mov    %r15,%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  add    $0x1,%ebx
  mov    %r14,%rdi
  call   <check_ip@plt>
  cmp    %ebp,%ebx
  jl     L162
L140:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L59
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L157:
  mov    %al,(%rdx)
  jmp    L40
  nopw   0x0(%rax,%rax,1)
L203:
  mov    0xc(%rsp),%esi
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D32(%rip),%rdi
  call   <puts@plt>
  jmp    L140
L60:
  xor    %ecx,%ecx
  lea    0x20(%rsp),%r15
  jmp    L178
L6:
  lea    0x1(%rax),%ecx
  xor    %r13d,%r13d
  lea    0x30(%rsp),%r14
  movslq %ecx,%rbx
  jmp    L73
L59:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D11
datatype: byte[8]
name: parse_data
arguments: label: D1
datatype: string
name: parse_data
arguments: label: D16
datatype: string
name: parse_data
arguments: label: D32
datatype: string

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

tool: D1: %s%d

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

tool: D32: 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);
    }
  }
}
```