user: 请将以下的汇编代码转换成C语言代码：

```asm
<inet_network>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    $0xa,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movzbl (%rbx),%eax
  lea    0x10(%rsp),%r12
  mov    %r12,0x8(%rsp)
  cmp    $0x30,%al
  jne    L102
L49:
  movzbl 0x1(%rbx),%eax
  mov    $0x8,%r13d
  add    $0x1,%rbx
L102:
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x58,%dl
  jne    L157
  movzbl 0x1(%rbx),%eax
  mov    $0x10,%r13d
  add    $0x1,%rbx
L157:
  test   %al,%al
  je     L128
  add    $0x1,%rbx
  xor    %ebp,%ebp
L163:
  movsbl %al,%r15d
  lea    -0x1(%rbx),%r14
  mov    %r15d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L131
  cmp    $0x10,%r13d
  jne    L115
  mov    %r15d,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  jne    L198
L115:
  movzbl (%r14),%eax
  cmp    $0x2e,%al
  jne    L161
  lea    0x20(%rsp),%rax
  cmp    %rax,%r12
  je     L97
  movzbl 0x1(%r14),%eax
  add    $0x4,%r12
  lea    0x1(%r14),%rbx
  mov    $0xa,%r13d
  mov    %ebp,-0x4(%r12)
  cmp    $0x30,%al
  jne    L102
  jmp    L49
  nopl   0x0(%rax,%rax,1)
L131:
  imul   %r13d,%ebp
  lea    -0x30(%r15,%rbp,1),%ebp
L21:
  movzbl (%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  jne    L163
L85:
  mov    %ebp,(%r12)
  add    $0x4,%r12
  sub    0x8(%rsp),%r12
  sar    $0x2,%r12
  cmp    $0x4,%r12d
  jg     L97
  test   %r12d,%r12d
  jle    L4
  lea    -0x1(%r12),%eax
  mov    0x8(%rsp),%r15
  lea    0x14(%rsp,%rax,4),%rcx
  xor    %eax,%eax
L135:
  movzbl (%r15),%edx
  shl    $0x8,%eax
  add    $0x4,%r15
  or     %edx,%eax
  cmp    %rcx,%r15
  jne    L135
  jmp    L90
  nopl   (%rax)
L198:
  mov    %r15d,%edi
  shl    $0x4,%ebp
  lea    0xa(%r15),%r14d
  call   <islower@plt>
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0xffffffe0,%eax
  add    $0x61,%eax
  sub    %eax,%r14d
  add    %r14d,%ebp
  jmp    L21
L161:
  test   %al,%al
  je     L85
  movsbl %al,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L85
  nopl   0x0(%rax,%rax,1)
L97:
  mov    $0xffffffff,%eax
L90:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L29
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L128:
  xor    %ebp,%ebp
  jmp    L85
L4:
  xor    %eax,%eax
  jmp    L90
L29:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
u_long inet_network(register char *cp) {
  register u_long val, base, n;
  register char c;
  u_long parts[4], *pp = parts;
  register int i;
again:
  val = 0;
  base = 10;
  if (*cp == '0')
    base = 8, cp++;
  if (*cp == 'x' || *cp == 'X')
    base = 16, cp++;
  while ((c = *cp) != '\0') {
    if (isdigit(c)) {
      val = (val * base) + ((u_long)c - '0');
      cp++;
      continue;
    }
    if (base == 16 && isxdigit(c)) {
      val = (val << 4) + ((u_long)c + 10 - (islower(c) ? 'a' : 'A'));
      cp++;
      continue;
    }
    break;
  }
  if (*cp == '.') {
    if (pp >= parts + 4)
      return (-1);
    *pp++ = val, cp++;
    goto again;
  }
  if (*cp && !isspace(*cp))
    return (-1);
  *pp++ = val;
  n = pp - parts;
  if (n > 4)
    return (-1);
  for (val = 0, i = 0; i < n; i++) {
    val <<= 8;
    val |= parts[i] & 0xff;
  }
  return (val);
}
```