user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<check_ip_range>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x50(%rbp)
  movl   $0x0,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L162
L154:
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L115
  mov    -0x4c(%rbp),%eax
  cltq
  movb   $0x0,-0x30(%rbp,%rax,1)
  movl   $0x1,-0x50(%rbp)
  jmp    L112
L115:
  cmpl   $0x0,-0x50(%rbp)
  je     L125
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x48(%rbp),%eax
  cltq
  mov    %dl,-0x34(%rbp,%rax,1)
  addl   $0x1,-0x48(%rbp)
  jmp    L112
L125:
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x4c(%rbp),%eax
  cltq
  mov    %dl,-0x30(%rbp,%rax,1)
L112:
  addl   $0x1,-0x4c(%rbp)
L162:
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L154
  mov    -0x48(%rbp),%eax
  cltq
  movb   $0x0,-0x34(%rbp,%rax,1)
  lea    -0x34(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x44(%rbp)
  mov    $0x20,%eax
  sub    -0x44(%rbp),%eax
  mov    %eax,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x48(%rbp),%xmm0
  mov    D27(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  mov    %eax,-0x40(%rbp)
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L147
L149:
  mov    -0x4c(%rbp),%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%eax
  cmp    $0x2e,%al
  je     L152
  subl   $0x1,-0x4c(%rbp)
L147:
  cmpl   $0x0,-0x4c(%rbp)
  jns    L149
  jmp    L66
L152:
  nop
L66:
  movl   $0x0,-0x48(%rbp)
  jmp    L153
L21:
  mov    -0x4c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%edx
  mov    -0x48(%rbp),%eax
  cltq
  mov    %dl,-0x20(%rbp,%rax,1)
  addl   $0x1,-0x48(%rbp)
L153:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L21
  mov    -0x48(%rbp),%eax
  cltq
  movb   $0x0,-0x20(%rbp,%rax,1)
  mov    -0x4c(%rbp),%eax
  add    $0x1,%eax
  cltq
  movb   $0x0,-0x30(%rbp,%rax,1)
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x38(%rbp)
  cmpl   $0x17,-0x44(%rbp)
  jg     L107
  mov    -0x40(%rbp),%eax
  mov    %eax,%esi
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L55
L107:
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L108
L24:
  cmpl   $0xff,-0x4c(%rbp)
  jg     L140
  mov    -0x4c(%rbp),%ecx
  lea    -0x30(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  lea    D25(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <check_ip@plt>
  addl   $0x1,-0x4c(%rbp)
L108:
  mov    -0x40(%rbp),%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x4c(%rbp)
  jl     L24
  jmp    L55
L140:
  nop
L55:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D27
type_guessed: byte[8]
name: retrieve_data
arguments: tag: D33
type_guessed: string
name: retrieve_data
arguments: tag: D28
type_guessed: string
name: retrieve_data
arguments: tag: D25
type_guessed: string

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

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

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

tool: D25: %s%d

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