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

```asm
<ipv4_net_to_type>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <ntohl@plt>
  sar    $0x18,%eax
  and    $0xff,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <ntohl@plt>
  sar    $0x10,%eax
  and    $0xff,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <ntohl@plt>
  sar    $0x8,%eax
  and    $0xff,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <ntohl@plt>
  and    $0xff,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jne    L55
  lea    D148(%rip),%rax
  jmp    L170
L55:
  cmpl   $0xa,-0x10(%rbp)
  jne    L156
  lea    D80(%rip),%rax
  jmp    L170
L156:
  cmpl   $0x64,-0x10(%rbp)
  jne    L21
  mov    -0xc(%rbp),%eax
  and    $0xc0,%eax
  cmp    $0x40,%eax
  jne    L21
  lea    D140(%rip),%rax
  jmp    L170
L21:
  cmpl   $0x7f,-0x10(%rbp)
  jne    L80
  lea    D91(%rip),%rax
  jmp    L170
L80:
  cmpl   $0xa9,-0x10(%rbp)
  jne    L102
  cmpl   $0xfe,-0xc(%rbp)
  jne    L102
  lea    D84(%rip),%rax
  jmp    L170
L102:
  cmpl   $0xac,-0x10(%rbp)
  jne    L384
  mov    -0xc(%rbp),%eax
  and    $0xf0,%eax
  cmp    $0x10,%eax
  jne    L384
  lea    D80(%rip),%rax
  jmp    L170
L384:
  cmpl   $0xc0,-0x10(%rbp)
  jne    L549
  cmpl   $0x0,-0xc(%rbp)
  jne    L549
  cmpl   $0x0,-0x8(%rbp)
  jne    L549
  lea    D14(%rip),%rax
  jmp    L170
L549:
  cmpl   $0xc0,-0x10(%rbp)
  jne    L227
  cmpl   $0x2,-0xc(%rbp)
  jne    L227
  cmpl   $0x0,-0x8(%rbp)
  jne    L227
  lea    D141(%rip),%rax
  jmp    L170
L227:
  cmpl   $0xc0,-0x10(%rbp)
  jne    L140
  cmpl   $0x33,-0xc(%rbp)
  jne    L140
  cmpl   $0x64,-0x8(%rbp)
  jne    L140
  lea    D124(%rip),%rax
  jmp    L170
L140:
  cmpl   $0xcb,-0x10(%rbp)
  jne    L67
  cmpl   $0x0,-0xc(%rbp)
  jne    L67
  cmpl   $0x71,-0x8(%rbp)
  jne    L67
  lea    D112(%rip),%rax
  jmp    L170
L67:
  cmpl   $0xc0,-0x10(%rbp)
  jne    L275
  cmpl   $0x58,-0xc(%rbp)
  jne    L275
  cmpl   $0x63,-0x8(%rbp)
  jne    L275
  lea    D105(%rip),%rax
  jmp    L170
L275:
  cmpl   $0xc0,-0x10(%rbp)
  jne    L160
  cmpl   $0x34,-0xc(%rbp)
  jne    L160
  cmpl   $0xc1,-0x8(%rbp)
  jne    L160
  lea    D37(%rip),%rax
  jmp    L170
L160:
  cmpl   $0xc0,-0x10(%rbp)
  jne    L115
  cmpl   $0xa8,-0xc(%rbp)
  jne    L115
  lea    D80(%rip),%rax
  jmp    L170
L115:
  cmpl   $0xff,-0x10(%rbp)
  jne    L326
  cmpl   $0xff,-0xc(%rbp)
  jne    L326
  cmpl   $0xff,-0x8(%rbp)
  jne    L326
  cmpl   $0xff,-0x4(%rbp)
  jne    L326
  lea    D120(%rip),%rax
  jmp    L170
L326:
  cmpl   $0xc6,-0x10(%rbp)
  jne    L454
  mov    -0xc(%rbp),%eax
  and    $0xfe,%eax
  cmp    $0x12,%eax
  jne    L454
  lea    D115(%rip),%rax
  jmp    L170
L454:
  cmpl   $0xdf,-0x10(%rbp)
  jbe    L271
  cmpl   $0xef,-0x10(%rbp)
  ja     L271
  lea    D44(%rip),%rax
  jmp    L170
L271:
  mov    -0x10(%rbp),%eax
  and    $0xf0,%eax
  cmp    $0xf0,%eax
  jne    L118
  lea    D46(%rip),%rax
  jmp    L170
L118:
  lea    D39(%rip),%rax
L170:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D148
type_infered: string
name: retrieve_data
arguments: data_label: D80
type_infered: string
name: retrieve_data
arguments: data_label: D140
type_infered: string
name: retrieve_data
arguments: data_label: D91
type_infered: string
name: retrieve_data
arguments: data_label: D84
type_infered: string
name: retrieve_data
arguments: data_label: D14
type_infered: string
name: retrieve_data
arguments: data_label: D141
type_infered: string
name: retrieve_data
arguments: data_label: D124
type_infered: string
name: retrieve_data
arguments: data_label: D112
type_infered: string
name: retrieve_data
arguments: data_label: D105
type_infered: string
name: retrieve_data
arguments: data_label: D37
type_infered: string
name: retrieve_data
arguments: data_label: D120
type_infered: string
name: retrieve_data
arguments: data_label: D115
type_infered: string
name: retrieve_data
arguments: data_label: D44
type_infered: string
name: retrieve_data
arguments: data_label: D46
type_infered: string
name: retrieve_data
arguments: data_label: D39
type_infered: string

tool: D148: This host on this network

tool: D80: Private Use

tool: D140: Shared Address Space

tool: D91: Loopback

tool: D84: Link Local

tool: D14: IETF Protocol Assignments

tool: D141: Documentation (TEST-NET-1)

tool: D124: Documentation (TEST-NET-2)

tool: D112: Documentation (TEST-NET-3)

tool: D105: 6 to 4 Relay Anycast (Deprecated)

tool: D37: AMT

tool: D120: Limited Broadcast

tool: D115: Benchmarking

tool: D44: Multicast

tool: D46: Reserved

tool: D39: Internet

assistant: ```c
const char *ipv4_net_to_type(struct in_addr net) {
  unsigned byte1 = (ntohl(net.s_addr) >> 24) & 0xff;
  unsigned byte2 = (ntohl(net.s_addr) >> 16) & 0xff;
  unsigned byte3 = (ntohl(net.s_addr) >> 8) & 0xff;
  unsigned byte4 = (ntohl(net.s_addr)) & 0xff;
  if (byte1 == 0) {
    return "This host on this network";
  }
  if (byte1 == 10) {
    return "Private Use";
  }
  if (byte1 == 100 && (byte2 & 0xc0) == 64) {
    return "Shared Address Space";
  }
  if (byte1 == 127) {
    return "Loopback";
  }
  if (byte1 == 169 && byte2 == 254) {
    return "Link Local";
  }
  if (byte1 == 172 && (byte2 & 0xf0) == 16) {
    return "Private Use";
  }
  if (byte1 == 192 && byte2 == 0 && byte3 == 0) {
    return "IETF Protocol Assignments";
  }
  if (byte1 == 192 && byte2 == 2 && byte3 == 0) {
    return "Documentation (TEST-NET-1)";
  }
  if (byte1 == 192 && byte2 == 51 && byte3 == 100) {
    return "Documentation (TEST-NET-2)";
  }
  if (byte1 == 203 && byte2 == 0 && byte3 == 113) {
    return "Documentation (TEST-NET-3)";
  }
  if (byte1 == 192 && byte2 == 88 && byte3 == 99) {
    return "6 to 4 Relay Anycast (Deprecated)";
  }
  if (byte1 == 192 && byte2 == 52 && byte3 == 193) {
    return "AMT";
  }
  if (byte1 == 192 && byte2 == 168) {
    return "Private Use";
  }
  if (byte1 == 255 && byte2 == 255 && byte3 == 255 && byte4 == 255) {
    return "Limited Broadcast";
  }
  if (byte1 == 198 && (byte2 & 0xfe) == 18) {
    return "Benchmarking";
  }
  if (byte1 >= 224 && byte1 <= 239) {
    return "Multicast";
  }
  if ((byte1 & 0xf0) == 240) {
    return "Reserved";
  }
  return "Internet";
}
```