user: 请从给定的汇编指令推导出C源代码:

```asm
<topology_parsenet>:
  endbr64
  movzbl (%rdi),%eax
  mov    %rdi,%rcx
  mov    %rsi,%r10
  mov    %rdx,%r8
  mov    $0x4,%r11d
  xor    %r9d,%r9d
  cmp    $0x2a,%al
  je     L293
L284:
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L291
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L44:
  sub    $0x30,%eax
  lea    (%rdx,%rdx,4),%edx
  mov    %rcx,%rsi
  add    $0x1,%rcx
  movsbl %al,%eax
  lea    (%rax,%rdx,2),%edx
  cmp    $0xff,%edx
  jg     L291
  movzbl (%rcx),%eax
  lea    -0x30(%rax),%edi
  cmp    $0x9,%dil
  jbe    L44
  cmp    $0x1,%r11d
  je     L47
  cmp    $0x2e,%al
  jne    L291
  shl    $0x8,%r9d
  movzbl 0x2(%rsi),%eax
  lea    0x2(%rsi),%rcx
  sub    $0x1,%r11d
  add    %edx,%r9d
  jmp    L284
  cs nopw 0x0(%rax,%rax,1)
L293:
  cmpb   $0x0,0x1(%rdi)
  je     L81
L291:
  mov    $0xffffffff,%eax
  ret
L47:
  shl    $0x8,%r9d
  add    %edx,%r9d
  test   %al,%al
  je     L3
  cmp    $0x2f,%al
  je     L59
  cmp    $0x2d,%al
  jne    L291
  mov    %r9d,(%r10)
  add    $0x2,%rsi
  mov    $0x4,%r10d
  xor    %r9d,%r9d
L101:
  movzbl (%rsi),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L291
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L2:
  sub    $0x30,%eax
  lea    (%rdx,%rdx,4),%edx
  mov    %rsi,%rdi
  add    $0x1,%rsi
  movsbl %al,%eax
  lea    (%rax,%rdx,2),%edx
  cmp    $0xff,%edx
  jg     L291
  movzbl (%rsi),%eax
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  jbe    L2
  cmp    $0x1,%r10d
  je     L50
  cmp    $0x2e,%al
  jne    L291
  shl    $0x8,%r9d
  lea    0x2(%rdi),%rsi
  sub    $0x1,%r10d
  add    %edx,%r9d
  jmp    L101
  nopl   (%rax)
L81:
  movl   $0x0,(%rsi)
  xor    %eax,%eax
  movl   $0xffffffff,(%rdx)
  ret
L3:
  mov    %r9d,(%r10)
  xor    %eax,%eax
  mov    %r9d,(%r8)
  ret
L59:
  push   %rbx
  add    $0x2,%rsi
  xor    %ebx,%ebx
  xor    %r11d,%r11d
  mov    %r9d,(%r10)
L202:
  movzbl (%rsi),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L273
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L188:
  sub    $0x30,%eax
  lea    (%rdx,%rdx,4),%edx
  mov    %rsi,%rdi
  add    $0x1,%rsi
  movsbl %al,%eax
  lea    (%rax,%rdx,2),%edx
  cmp    $0xff,%edx
  jg     L273
  movzbl (%rsi),%eax
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  jbe    L188
  cmp    $0x20,%edx
  setle  %sil
  test   %ebx,%ebx
  sete   %cl
  test   %cl,%sil
  je     L117
  test   %al,%al
  je     L42
L117:
  cmp    $0x3,%ebx
  je     L167
  cmp    $0x2e,%al
  jne    L273
  shl    $0x8,%r11d
  lea    0x2(%rdi),%rsi
  add    $0x1,%ebx
  add    %edx,%r11d
  jmp    L202
L273:
  mov    $0xffffffff,%eax
  pop    %rbx
  ret
L50:
  shl    $0x8,%r9d
  add    %r9d,%edx
  test   %al,%al
  jne    L291
  mov    %edx,(%r8)
  xor    %eax,%eax
  ret
L167:
  shl    $0x8,%r11d
  add    %r11d,%edx
  test   %al,%al
  jne    L273
L207:
  and    %edx,%r9d
  not    %edx
  xor    %eax,%eax
  or     %r9d,%edx
  mov    %r9d,(%r10)
  pop    %rbx
  mov    %edx,(%r8)
  ret
L42:
  cmp    $0x20,%edx
  je     L159
  mov    $0x20,%ecx
  sub    %edx,%ecx
  or     $0xffffffff,%edx
  shl    %cl,%edx
  jmp    L207
L159:
  or     $0xffffffff,%edx
  jmp    L207
```

assistant: ```c
int topology_parsenet(char *net, uint32_t *fromip, uint32_t *toip) {
  uint32_t ip, i, octet;
  if (net[0] == '*' && net[1] == 0) {
    *fromip = 0;
    *toip = 0xFFFFFFFFU;
    return 0;
  }
  ip = 0;
  for (i = 0; i < 4; i++) {
    if (*net >= '0' && *net <= '9') {
      octet = 0;
      while (*net >= '0' && *net <= '9') {
        octet *= 10;
        octet += (*net) - '0';
        net++;
        if (octet > 255) {
          return -1;
        }
      }
    } else {
      return -1;
    }
    if (i < 3) {
      if (*net != '.') {
        return -1;
      }
      net++;
    }
    ip *= 256;
    ip += octet;
  }
  if (*net == 0) {
    *fromip = ip;
    *toip = ip;
    return 0;
  }
  if (*net == '/') {
    *fromip = ip;
    ip = 0;
    net++;
    for (i = 0; i < 4; i++) {
      if (*net >= '0' && *net <= '9') {
        octet = 0;
        while (*net >= '0' && *net <= '9') {
          octet *= 10;
          octet += (*net) - '0';
          net++;
          if (octet > 255) {
            return -1;
          }
        }
      } else {
        return -1;
      }
      if (i == 0 && *net == 0 && octet <= 32) {
        ip = 0xFFFFFFFF;
        if (octet < 32) {
          ip <<= 32 - octet;
        }
        break;
      }
      if (i < 3) {
        if (*net != '.') {
          return -1;
        }
        net++;
      }
      ip *= 256;
      ip += octet;
    }
    if (*net != 0) {
      return -1;
    }
    *fromip &= ip;
    *toip = *fromip | (ip ^ 0xFFFFFFFFU);
    return 0;
  }
  if (*net == '-') {
    *fromip = ip;
    ip = 0;
    net++;
    for (i = 0; i < 4; i++) {
      if (*net >= '0' && *net <= '9') {
        octet = 0;
        while (*net >= '0' && *net <= '9') {
          octet *= 10;
          octet += *net - '0';
          net++;
          if (octet > 255) {
            return -1;
          }
        }
      } else {
        return -1;
      }
      if (i < 3) {
        if (*net != '.') {
          return -1;
        }
        net++;
      }
      ip *= 256;
      ip += octet;
    }
    if (*net != 0) {
      return -1;
    }
    *toip = ip;
    return 0;
  }
  return -1;
}
```