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

```asm
<inet_network>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%r15
  jmp    L82
L182:
  add    $0x1,%rbx
  movb   $0x8,0xf(%rsp)
  jmp    L4
L72:
  mov    %r12d,%eax
  mulb   0xf(%rsp)
  mov    %eax,%r12d
  lea    -0x30(%rbp,%r12,1),%r12d
  mov    %r13,%rbx
L106:
  movzbl (%rbx),%ebp
  add    $0x1,%r13
  test   %bpl,%bpl
  jne    L172
  jmp    L121
L213:
  shl    $0x4,%r12d
  mov    %r14d,%edi
  call   <islower@plt>
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0xffffffe0,%eax
  add    $0x61,%eax
  lea    0xa(%r12,%rbp,1),%r12d
  sub    %eax,%r12d
  mov    %r13,%rbx
  jmp    L106
L43:
  movzbl (%rbx),%ebp
  lea    0x1(%rbx),%r13
  mov    $0x0,%r12d
  test   %bpl,%bpl
  je     L171
L172:
  lea    -0x1(%r13),%rbx
  movsbl %bpl,%r14d
  mov    %r14d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L72
  cmpb   $0x10,0xf(%rsp)
  jne    L121
  mov    %r14d,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  jne    L213
L121:
  movzbl (%rbx),%eax
  cmp    $0x2e,%al
  jne    L133
  lea    0x17(%rsp),%rax
  cmp    %rax,%r15
  je     L152
  add    $0x1,%r15
  mov    %r12b,-0x1(%r15)
  add    $0x1,%rbx
L82:
  movb   $0xa,0xf(%rsp)
  cmpb   $0x30,(%rbx)
  je     L182
L4:
  movzbl (%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L43
  add    $0x1,%rbx
  movb   $0x10,0xf(%rsp)
  jmp    L43
L171:
  mov    %ebp,%r12d
  jmp    L121
L152:
  mov    D7(%rip),%rax
  movzbl (%rax),%ecx
L206:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L94
  mov    %ecx,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L133:
  test   %al,%al
  jne    L174
L93:
  mov    %r12b,(%r15)
  lea    0x20(%rsp),%rax
  sub    %rax,%r15
  lea    0xd(%r15),%eax
  mov    $0x0,%edx
  movsbl %al,%eax
  mov    $0x0,%esi
  jmp    L17
L174:
  movsbl %al,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L93
  mov    D7(%rip),%rax
  movzbl (%rax),%ecx
  jmp    L206
L198:
  add    $0x1,%rdx
  cmp    $0x4,%rdx
  je     L206
L17:
  mov    %esi,%ecx
  cmp    %edx,%eax
  jle    L198
  movzbl 0x14(%rsp,%rdx,1),%ecx
  jmp    L198
L94:
  call   <__stack_chk_fail@plt>
```

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