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);
}


x86 assembly (clang, -O0):
<check_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jne    11b6 <check_host+0x36>
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1070 <tcpd_warn@plt>
jmp    13b5 <check_host+0x235>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
mov    $0x0,%al
call   1080 <split_at@plt>
cltq
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1219 <check_host+0x99>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   10a0 <dot_quad_addr@plt>
cmp    $0xffffffff,%eax
je     11fe <check_host+0x7e>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10a0 <dot_quad_addr@plt>
cmp    $0xffffffff,%eax
jne    1214 <check_host+0x94>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1070 <tcpd_warn@plt>
jmp    13b0 <check_host+0x230>
mov    -0x8(%rbp),%rdi
lea    0xe12(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1253 <check_host+0xd3>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1070 <tcpd_warn@plt>
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1070 <tcpd_warn@plt>
jmp    13ab <check_host+0x22b>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1090 <reserved_name@plt>
cmp    $0x0,%eax
je     126c <check_host+0xec>
jmp    13a6 <check_host+0x226>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xdf6(%rip),%rsi
call   1060 <strspn@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1300 <check_host+0x180>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
jne    12d8 <check_host+0x158>
mov    -0x8(%rbp),%rsi
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1070 <tcpd_warn@plt>
jmp    12fb <check_host+0x17b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     12f6 <check_host+0x176>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <check_dns@plt>
mov    %eax,-0x14(%rbp)
jmp    12fb <check_host+0x17b>
jmp    13a1 <check_host+0x221>
mov    -0x8(%rbp),%rdi
lea    0xd9c(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
je     1332 <check_host+0x1b2>
mov    -0x8(%rbp),%rdi
lea    0xd8b(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1337 <check_host+0x1b7>
jmp    139c <check_host+0x21c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    135e <check_host+0x1de>
mov    -0x8(%rbp),%rsi
lea    0xd6d(%rip),%rdi
mov    $0x0,%al
call   1070 <tcpd_warn@plt>
jmp    1397 <check_host+0x217>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
je     1392 <check_host+0x212>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <check_dns@plt>
jmp    1397 <check_host+0x217>
jmp    139c <check_host+0x21c>
jmp    13a1 <check_host+0x221>
jmp    13a6 <check_host+0x226>
jmp    13ab <check_host+0x22b>
jmp    13b0 <check_host+0x230>
jmp    13b5 <check_host+0x235>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_host>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x40,(%rdi)
jne    1199 <check_host+0x19>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1070 <tcpd_warn@plt>
jmp    1204 <check_host+0x84>
mov    %rdi,%rbx
mov    $0x2f,%esi
xor    %eax,%eax
call   1080 <split_at@plt>
test   %eax,%eax
je     11e3 <check_host+0x63>
movslq %eax,%r14
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <dot_quad_addr@plt>
cmp    $0xffffffff,%eax
je     11cd <check_host+0x4d>
mov    %r14,%rdi
xor    %eax,%eax
call   10a0 <dot_quad_addr@plt>
cmp    $0xffffffff,%eax
jne    1204 <check_host+0x84>
lea    0xe46(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <tcpd_warn@plt>
jmp    1204 <check_host+0x84>
lea    0xe4c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1211 <check_host+0x91>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <reserved_name@plt>
test   %eax,%eax
je     122b <check_host+0xab>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe23(%rip),%rdi
xor    %eax,%eax
call   1070 <tcpd_warn@plt>
lea    0xe32(%rip),%rdi
jmp    1190 <check_host+0x10>
lea    0xe43(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strspn@plt>
cmpb   $0x0,(%rbx,%rax,1)
je     1262 <check_host+0xe2>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cmpb   $0x2e,-0x1(%rax,%rbx,1)
jne    129a <check_host+0x11a>
lea    0xe2d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <tcpd_warn@plt>
jmp    1204 <check_host+0x84>
lea    0xe3e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1204 <check_host+0x84>
lea    0xe33(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1204 <check_host+0x84>
cmpb   $0x2e,(%rbx)
jne    12b4 <check_host+0x134>
lea    0xe27(%rip),%rdi
jmp    1256 <check_host+0xd6>
cmpb   $0x2e,(%rbx)
je     1204 <check_host+0x84>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <check_dns@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cmpb   $0x2e,-0x1(%rax,%rbx,1)
je     1204 <check_host+0x84>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <check_dns@plt>
jmp    1204 <check_host+0x84>

LLVM IR (-O0):
@.str = [26 x i8] c"netgroup support disabled\00"
@.str.1 = [28 x i8] c"%s/%s: bad net/mask pattern\00"
@.str.2 = [5 x i8] c"FAIL\00"
@.str.3 = [29 x i8] c"FAIL is no longer recognized\00"
@.str.4 = [29 x i8] c"(use EXCEPT or DENY instead)\00"
@.str.5 = [14 x i8] c"01234567890./\00"
@.str.6 = [36 x i8] c"%s: domain or host name ends in dot\00"
@.str.7 = [8 x i8] c"0.0.0.0\00"
@.str.8 = [16 x i8] c"255.255.255.255\00"
@.str.9 = [35 x i8] c"%s: network number begins with dot\00"
define i32 @check_host(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %4
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 64
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %111
12: ; preds = %1
%13 = load i8*, i8** %2
%14 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @split_at to i32 (i8*, i32, ...)*)(i8* %13, i32 47)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %3
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %31
18: ; preds = %12
%19 = load i8*, i8** %2
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @dot_quad_addr to i32 (i8*, ...)*)(i8* %19)
%21 = icmp eq i32 %20, -1
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8*, i8** %3
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @dot_quad_addr to i32 (i8*, ...)*)(i8* %23)
%25 = icmp eq i32 %24, -1
br i1 %25, label %26, label %30
26: ; preds = %22, %18
%27 = load i8*, i8** %2
%28 = load i8*, i8** %3
%29 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %27, i8* %28)
br label %30
30: ; preds = %26, %22
br label %110
31: ; preds = %12
%32 = load i8*, i8** %2
%33 = call i32 @strcasecmp(i8* %32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = call i32 (i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%37 = call i32 (i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %109
38: ; preds = %31
%39 = load i8*, i8** %2
%40 = call i32 (i8*, ...) bitcast (i32 (...)* @reserved_name to i32 (i8*, ...)*)(i8* %39)
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %38
br label %108
43: ; preds = %38
%44 = load i8*, i8** %2
%45 = load i8*, i8** %2
%46 = call i64 @strspn(i8* %45, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%47 = getelementptr inbounds i8, i8* %44, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %74
51: ; preds = %43
%52 = load i8*, i8** %2
%53 = load i8*, i8** %2
%54 = call i64 @strlen(i8* %53)
%55 = sub i64 %54, 1
%56 = getelementptr inbounds i8, i8* %52, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 46
br i1 %59, label %60, label %63
60: ; preds = %51
%61 = load i8*, i8** %2
%62 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %61)
br label %73
63: ; preds = %51
%64 = load i8*, i8** %2
%65 = getelementptr inbounds i8, i8* %64, i64 0
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp ne i32 %67, 46
br i1 %68, label %69, label %72
69: ; preds = %63
%70 = load i8*, i8** %2
%71 = call i32 (i8*, ...) bitcast (i32 (...)* @check_dns to i32 (i8*, ...)*)(i8* %70)
store i32 %71, i32* %4
br label %72
72: ; preds = %69, %63
br label %73
73: ; preds = %72, %60
br label %107
74: ; preds = %43
%75 = load i8*, i8** %2
%76 = call i32 @strcasecmp(i8* %75, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%77 = icmp eq i32 %76, 0
br i1 %77, label %82, label %78
78: ; preds = %74
%79 = load i8*, i8** %2
%80 = call i32 @strcasecmp(i8* %79, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %83
82: ; preds = %78, %74
br label %106
83: ; preds = %78
%84 = load i8*, i8** %2
%85 = getelementptr inbounds i8, i8* %84, i64 0
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 46
br i1 %88, label %89, label %92
89: ; preds = %83
%90 = load i8*, i8** %2
%91 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %90)
br label %105
92: ; preds = %83
%93 = load i8*, i8** %2
%94 = load i8*, i8** %2
%95 = call i64 @strlen(i8* %94)
%96 = sub i64 %95, 1
%97 = getelementptr inbounds i8, i8* %93, i64 %96
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 46
br i1 %100, label %101, label %104
101: ; preds = %92
%102 = load i8*, i8** %2
%103 = call i32 (i8*, ...) bitcast (i32 (...)* @check_dns to i32 (i8*, ...)*)(i8* %102)
br label %104
104: ; preds = %101, %92
br label %105
105: ; preds = %104, %89
br label %106
106: ; preds = %105, %82
br label %107
107: ; preds = %106, %73
br label %108
108: ; preds = %107, %42
br label %109
109: ; preds = %108, %35
br label %110
110: ; preds = %109, %30
br label %111
111: ; preds = %110, %10
%112 = load i32, i32* %4
ret i32 %112
}

LLVM IR (-O2):
@.str = [26 x i8] c"netgroup support disabled\00"
@.str.1 = [28 x i8] c"%s/%s: bad net/mask pattern\00"
@.str.2 = [5 x i8] c"FAIL\00"
@.str.3 = [29 x i8] c"FAIL is no longer recognized\00"
@.str.4 = [29 x i8] c"(use EXCEPT or DENY instead)\00"
@.str.5 = [14 x i8] c"01234567890./\00"
@.str.6 = [36 x i8] c"%s: domain or host name ends in dot\00"
@.str.7 = [8 x i8] c"0.0.0.0\00"
@.str.8 = [16 x i8] c"255.255.255.255\00"
@.str.9 = [35 x i8] c"%s: network number begins with dot\00"
define i32 @check_host(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 64
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %65
6: ; preds = %1
%7 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @split_at to i32 (i8*, i32, ...)*)(i8* %0, i32 47)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = icmp eq i32 %7, 0
br i1 %10, label %19, label %11
11: ; preds = %6
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @dot_quad_addr to i32 (i8*, ...)*)(i8* %0)
%13 = icmp eq i32 %12, -1
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = tail call i32 (i8*, ...) bitcast (i32 (...)* @dot_quad_addr to i32 (i8*, ...)*)(i8* %9)
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %65
17: ; preds = %14, %11
%18 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %9)
br label %65
19: ; preds = %6
%20 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %65
25: ; preds = %19
%26 = tail call i32 (i8*, ...) bitcast (i32 (...)* @reserved_name to i32 (i8*, ...)*)(i8* %0)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %65
28: ; preds = %25
%29 = tail call i64 @strspn(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%30 = getelementptr inbounds i8, i8* %0, i64 %29
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, 0
br i1 %32, label %46, label %33
33: ; preds = %28
%34 = tail call i64 @strlen(i8* %0)
%35 = add i64 %34, -1
%36 = getelementptr inbounds i8, i8* %0, i64 %35
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 46
br i1 %38, label %39, label %41
39: ; preds = %33
%40 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %0)
br label %65
41: ; preds = %33
%42 = load i8, i8* %0
%43 = icmp eq i8 %42, 46
br i1 %43, label %65, label %44
44: ; preds = %41
%45 = tail call i32 (i8*, ...) bitcast (i32 (...)* @check_dns to i32 (i8*, ...)*)(i8* %0)
br label %65
46: ; preds = %28
%47 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %65, label %49
49: ; preds = %46
%50 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%51 = icmp eq i32 %50, 0
br i1 %51, label %65, label %52
52: ; preds = %49
%53 = load i8, i8* %0
%54 = icmp eq i8 %53, 46
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @tcpd_warn to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %0)
br label %65
57: ; preds = %52
%58 = tail call i64 @strlen(i8* %0)
%59 = add i64 %58, -1
%60 = getelementptr inbounds i8, i8* %0, i64 %59
%61 = load i8, i8* %60
%62 = icmp eq i8 %61, 46
br i1 %62, label %65, label %63
63: ; preds = %57
%64 = tail call i32 (i8*, ...) bitcast (i32 (...)* @check_dns to i32 (i8*, ...)*)(i8* %0)
br label %65
65: ; preds = %17, %14, %25, %49, %46, %57, %63, %55, %39, %44, %41, %22, %4
%66 = phi i32 [ 1, %4 ], [ 1, %17 ], [ 1, %14 ], [ 1, %22 ], [ 1, %25 ], [ 1, %39 ], [ %45, %44 ], [ 1, %41 ], [ 1, %46 ], [ 1, %49 ], [ 1, %55 ], [ 1, %63 ], [ 1, %57 ]
ret i32 %66
}