user: Please show me the C implementation that matches the assembly code listed below:

```asm
<check_host>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x8,%rsp
  cmpb   $0x40,(%rdi)
  je     L72
  xor    %eax,%eax
  mov    $0x2f,%esi
  mov    %rdi,%rbp
  call   <split_at@plt>
  test   %eax,%eax
  jne    L66
  lea    D81(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L16
  lea    D9(%rip),%rdi
  call   <tcpd_warn@plt>
  lea    D84(%rip),%rdi
  xor    %eax,%eax
  call   <tcpd_warn@plt>
L4:
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L66:
  movslq %eax,%r12
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <dot_quad_addr@plt>
  cmp    $0xffffffff,%eax
  je     L20
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <dot_quad_addr@plt>
  cmp    $0xffffffff,%eax
  jne    L4
L20:
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D51(%rip),%rdi
  xor    %eax,%eax
  call   <tcpd_warn@plt>
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L72:
  lea    D88(%rip),%rdi
  xor    %eax,%eax
  call   <tcpd_warn@plt>
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L16:
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <reserved_name@plt>
  test   %eax,%eax
  jne    L4
  lea    D59(%rip),%rsi
  mov    %rbp,%rdi
  call   <strspn@plt>
  cmpb   $0x0,0x0(%rbp,%rax,1)
  je     L78
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmpb   $0x2e,-0x1(%rbp,%rax,1)
  je     L45
  cmpb   $0x2e,0x0(%rbp)
  je     L4
  add    $0x8,%rsp
  mov    %rbp,%rdi
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  jmp    10d0 <check_dns@plt>
  nopw   0x0(%rax,%rax,1)
L78:
  lea    D15(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L4
  lea    D95(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L4
  cmpb   $0x2e,0x0(%rbp)
  je     L95
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmpb   $0x2e,-0x1(%rbp,%rax,1)
  je     L4
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <check_dns@plt>
  jmp    L4
  xchg   %ax,%ax
L45:
  mov    %rbp,%rsi
  lea    D53(%rip),%rdi
  xor    %eax,%eax
  call   <tcpd_warn@plt>
  jmp    L4
L95:
  mov    %rbp,%rsi
  lea    D10(%rip),%rdi
  xor    %eax,%eax
  call   <tcpd_warn@plt>
  jmp    L4
```

tool_calls: name: unpack_data
arguments: data_label: D81
data_type: string
name: unpack_data
arguments: data_label: D9
data_type: string
name: unpack_data
arguments: data_label: D84
data_type: string
name: unpack_data
arguments: data_label: D51
data_type: string
name: unpack_data
arguments: data_label: D88
data_type: string
name: unpack_data
arguments: data_label: D59
data_type: string
name: unpack_data
arguments: data_label: D15
data_type: string
name: unpack_data
arguments: data_label: D95
data_type: string
name: unpack_data
arguments: data_label: D53
data_type: string
name: unpack_data
arguments: data_label: D10
data_type: string

tool: D81: FAIL

tool: D9: FAIL is no longer recognized

tool: D84: (use EXCEPT or DENY instead)

tool: D51: %s/%s: bad net/mask pattern

tool: D88: netgroup support disabled

tool: D59: 01234567890./

tool: D15: 0.0.0.0

tool: D95: 255.255.255.255

tool: D53: %s: domain or host name ends in dot

tool: D10: %s: network number begins with dot

assistant: ```c
int check_host(pat)
char *pat;
{
  char *mask;
  int addr_count = 1;
  if (pat[0] == '@') {
    tcpd_warn("netgroup support disabled");
  } else if (mask = split_at(pat, '/')) {
    if (dot_quad_addr(pat) == (-1) || dot_quad_addr(mask) == (-1))
      tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
  } else if ((strcasecmp((pat), ("FAIL")) == 0)) {
    tcpd_warn("FAIL is no longer recognized");
    tcpd_warn("(use EXCEPT or DENY instead)");
  } else if (reserved_name(pat)) {
    ;
  } else if ((pat[strspn(pat, "01234567890./")] != 0)) {
    if (pat[strlen(pat) - 1] == '.') {
      tcpd_warn("%s: domain or host name ends in dot", pat);
    } else if (pat[0] != '.') {
      addr_count = check_dns(pat);
    }
  } else {
    if ((strcasecmp((pat), ("0.0.0.0")) == 0) || (strcasecmp((pat), ("255.255.255.255")) == 0)) {
      ;
    } else if (pat[0] == '.') {
      tcpd_warn("%s: network number begins with dot", pat);
    } else if (pat[strlen(pat) - 1] != '.') {
      check_dns(pat);
    }
  }
  return (addr_count);
}
```