#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ is_numeric(char *);
scalar_t__ is_string(char *);
scalar_t__ strcmp(char *, char *);
char *strdup(char const *);
char *strtok(char *, char *);
int is_module(const char *module, const int length) {
  int rc = -1;
  char *tmp = strdup(module);
  char *slot = strtok(tmp, ":");
  char *model = strtok(NULL, ":");
  char *final = strtok(NULL, ":");
  if (is_numeric(slot) != 0 || is_string(model) != 0 || is_string(final) == 0 ||
      module[length - 1] == ':') {
    rc = -1;
  } else if (strcmp(model, "C1700-MB-1ETH") == 0 ||
             strcmp(model, "C1710-MB-1FE-1E") == 0 ||
             strcmp(model, "CISCO2600-MB-1E") == 0 ||
             strcmp(model, "CISCO2600-MB-2E") == 0 ||
             strcmp(model, "CISCO2600-MB-1FE") == 0 ||
             strcmp(model, "CISCO2600-MB-2FE") == 0 ||
             strcmp(model, "NPE-G2") == 0 ||
             strcmp(model, "C7200-IO-FE") == 0 ||
             strcmp(model, "PA-FE-TX") == 0 || strcmp(model, "PA-4E") == 0 ||
             strcmp(model, "PA-8E") == 0 || strcmp(model, "PA-4T+") == 0 ||
             strcmp(model, "PA-8T") == 0 || strcmp(model, "PA-A1") == 0 ||
             strcmp(model, "PA-POS-OC3") == 0 ||
             strcmp(model, "C7200-JC-PA") == 0 || strcmp(model, "NM-1E") == 0 ||
             strcmp(model, "NM-4E") == 0 || strcmp(model, "NM-1FE-TX") == 0 ||
             strcmp(model, "NM-16ESW") == 0 ||
             strcmp(model, "GT96100-FE") == 0 || strcmp(model, "NM-4T") == 0 ||
             strcmp(model, "Leopard-2FE") == 0 ||
             strcmp(model, "NM-16ESW") == 0 || strcmp(model, "WIC-1T") == 0 ||
             strcmp(model, "WIC-2T") == 0) {
    rc = 0;
  }
  free(tmp);
  return rc;
}


x86 assembly (clang, -O0):
<is_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1080 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe5e(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe4a(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <is_numeric@plt>
cmp    $0x0,%rax
jne    1212 <is_module+0xb2>
mov    -0x28(%rbp),%rdi
call   1050 <is_string@plt>
cmp    $0x0,%rax
jne    1212 <is_module+0xb2>
mov    -0x30(%rbp),%rdi
call   1050 <is_string@plt>
cmp    $0x0,%rax
je     1212 <is_module+0xb2>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
jne    121e <is_module+0xbe>
movl   $0xffffffff,-0x10(%rbp)
jmp    14ce <is_module+0x36e>
mov    -0x28(%rbp),%rdi
lea    0xdd9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xdcd(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xdc3(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xdb9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xdaf(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xda6(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd9d(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd8a(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd7c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd6b(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd57(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd43(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd30(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd1c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xd08(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xcf9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xceb(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xcd7(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xcc3(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xcb3(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xca2(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xc93(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xc7f(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xc4b(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xc57(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14c2 <is_module+0x362>
mov    -0x28(%rbp),%rdi
lea    0xc44(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    14c9 <is_module+0x369>
movl   $0x0,-0x10(%rbp)
jmp    14ce <is_module+0x36e>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_module>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%r13d
mov    %rdi,%r14
call   1080 <strdup@plt>
mov    %rax,%r12
lea    0xe80(%rip),%rbx
mov    %rax,%rdi
mov    %rbx,%rsi
call   1070 <strtok@plt>
mov    %rax,%rbp
xor    %edi,%edi
mov    %rbx,%rsi
call   1070 <strtok@plt>
mov    %rax,%r15
xor    %edi,%edi
mov    %rbx,%rsi
call   1070 <strtok@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1040 <is_numeric@plt>
mov    $0xffffffff,%ebp
test   %rax,%rax
jne    11c7 <is_module+0x67>
mov    %r15,%rdi
call   1050 <is_string@plt>
test   %rax,%rax
je     11e0 <is_module+0x80>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
call   1050 <is_string@plt>
test   %rax,%rax
je     11c7 <is_module+0x67>
movslq %r13d,%rax
cmpb   $0x3a,-0x1(%rax,%r14,1)
je     11c7 <is_module+0x67>
lea    0xe03(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xdf9(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xdf1(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xde9(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xde1(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xdda(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xdd3(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xdc2(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xdb6(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xda7(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd95(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd83(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd72(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd60(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd4e(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd41(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd35(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd23(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd11(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xd03(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xcf8(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xcef(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xce1(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xcb3(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xcc5(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1450 <is_module+0x2f0>
lea    0xcb8(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    11c7 <is_module+0x67>
xor    %ebp,%ebp
jmp    11c7 <is_module+0x67>

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
@.str.1 = [14 x i8] c"C1700-MB-1ETH\00"
@.str.2 = [16 x i8] c"C1710-MB-1FE-1E\00"
@.str.3 = [16 x i8] c"CISCO2600-MB-1E\00"
@.str.4 = [16 x i8] c"CISCO2600-MB-2E\00"
@.str.5 = [17 x i8] c"CISCO2600-MB-1FE\00"
@.str.6 = [17 x i8] c"CISCO2600-MB-2FE\00"
@.str.7 = [7 x i8] c"NPE-G2\00"
@.str.8 = [12 x i8] c"C7200-IO-FE\00"
@.str.9 = [9 x i8] c"PA-FE-TX\00"
@.str.10 = [6 x i8] c"PA-4E\00"
@.str.11 = [6 x i8] c"PA-8E\00"
@.str.12 = [7 x i8] c"PA-4T+\00"
@.str.13 = [6 x i8] c"PA-8T\00"
@.str.14 = [6 x i8] c"PA-A1\00"
@.str.15 = [11 x i8] c"PA-POS-OC3\00"
@.str.16 = [12 x i8] c"C7200-JC-PA\00"
@.str.17 = [6 x i8] c"NM-1E\00"
@.str.18 = [6 x i8] c"NM-4E\00"
@.str.19 = [10 x i8] c"NM-1FE-TX\00"
@.str.20 = [9 x i8] c"NM-16ESW\00"
@.str.21 = [11 x i8] c"GT96100-FE\00"
@.str.22 = [6 x i8] c"NM-4T\00"
@.str.23 = [12 x i8] c"Leopard-2FE\00"
@.str.24 = [7 x i8] c"WIC-1T\00"
@.str.25 = [7 x i8] c"WIC-2T\00"
define i32 @is_module(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 -1, i32* %5
%10 = load i8*, i8** %3
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = call i8* @strtok(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %13, i8** %7
%14 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %14, i8** %8
%15 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %15, i8** %9
%16 = load i8*, i8** %7
%17 = call i64 @is_numeric(i8* %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %36, label %19
19: ; preds = %2
%20 = load i8*, i8** %8
%21 = call i64 @is_string(i8* %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %36, label %23
23: ; preds = %19
%24 = load i8*, i8** %9
%25 = call i64 @is_string(i8* %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %36, label %27
27: ; preds = %23
%28 = load i8*, i8** %3
%29 = load i32, i32* %4
%30 = sub nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %28, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 58
br i1 %35, label %36, label %37
36: ; preds = %27, %23, %19, %2
store i32 -1, i32* %5
br label %143
37: ; preds = %27
%38 = load i8*, i8** %8
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %141, label %41
41: ; preds = %37
%42 = load i8*, i8** %8
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %141, label %45
45: ; preds = %41
%46 = load i8*, i8** %8
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %141, label %49
49: ; preds = %45
%50 = load i8*, i8** %8
%51 = call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %141, label %53
53: ; preds = %49
%54 = load i8*, i8** %8
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %141, label %57
57: ; preds = %53
%58 = load i8*, i8** %8
%59 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %141, label %61
61: ; preds = %57
%62 = load i8*, i8** %8
%63 = call i64 @strcmp(i8* %62, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %141, label %65
65: ; preds = %61
%66 = load i8*, i8** %8
%67 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %141, label %69
69: ; preds = %65
%70 = load i8*, i8** %8
%71 = call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %141, label %73
73: ; preds = %69
%74 = load i8*, i8** %8
%75 = call i64 @strcmp(i8* %74, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%76 = icmp eq i64 %75, 0
br i1 %76, label %141, label %77
77: ; preds = %73
%78 = load i8*, i8** %8
%79 = call i64 @strcmp(i8* %78, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %141, label %81
81: ; preds = %77
%82 = load i8*, i8** %8
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %141, label %85
85: ; preds = %81
%86 = load i8*, i8** %8
%87 = call i64 @strcmp(i8* %86, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%88 = icmp eq i64 %87, 0
br i1 %88, label %141, label %89
89: ; preds = %85
%90 = load i8*, i8** %8
%91 = call i64 @strcmp(i8* %90, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%92 = icmp eq i64 %91, 0
br i1 %92, label %141, label %93
93: ; preds = %89
%94 = load i8*, i8** %8
%95 = call i64 @strcmp(i8* %94, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%96 = icmp eq i64 %95, 0
br i1 %96, label %141, label %97
97: ; preds = %93
%98 = load i8*, i8** %8
%99 = call i64 @strcmp(i8* %98, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%100 = icmp eq i64 %99, 0
br i1 %100, label %141, label %101
101: ; preds = %97
%102 = load i8*, i8** %8
%103 = call i64 @strcmp(i8* %102, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%104 = icmp eq i64 %103, 0
br i1 %104, label %141, label %105
105: ; preds = %101
%106 = load i8*, i8** %8
%107 = call i64 @strcmp(i8* %106, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0))
%108 = icmp eq i64 %107, 0
br i1 %108, label %141, label %109
109: ; preds = %105
%110 = load i8*, i8** %8
%111 = call i64 @strcmp(i8* %110, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%112 = icmp eq i64 %111, 0
br i1 %112, label %141, label %113
113: ; preds = %109
%114 = load i8*, i8** %8
%115 = call i64 @strcmp(i8* %114, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%116 = icmp eq i64 %115, 0
br i1 %116, label %141, label %117
117: ; preds = %113
%118 = load i8*, i8** %8
%119 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0))
%120 = icmp eq i64 %119, 0
br i1 %120, label %141, label %121
121: ; preds = %117
%122 = load i8*, i8** %8
%123 = call i64 @strcmp(i8* %122, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0))
%124 = icmp eq i64 %123, 0
br i1 %124, label %141, label %125
125: ; preds = %121
%126 = load i8*, i8** %8
%127 = call i64 @strcmp(i8* %126, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0))
%128 = icmp eq i64 %127, 0
br i1 %128, label %141, label %129
129: ; preds = %125
%130 = load i8*, i8** %8
%131 = call i64 @strcmp(i8* %130, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%132 = icmp eq i64 %131, 0
br i1 %132, label %141, label %133
133: ; preds = %129
%134 = load i8*, i8** %8
%135 = call i64 @strcmp(i8* %134, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0))
%136 = icmp eq i64 %135, 0
br i1 %136, label %141, label %137
137: ; preds = %133
%138 = load i8*, i8** %8
%139 = call i64 @strcmp(i8* %138, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i64 0, i64 0))
%140 = icmp eq i64 %139, 0
br i1 %140, label %141, label %142
141: ; preds = %137, %133, %129, %125, %121, %117, %113, %109, %105, %101, %97, %93, %89, %85, %81, %77, %73, %69, %65, %61, %57, %53, %49, %45, %41, %37
store i32 0, i32* %5
br label %142
142: ; preds = %141, %137
br label %143
143: ; preds = %142, %36
%144 = load i8*, i8** %6
%145 = call i32 @free(i8* %144)
%146 = load i32, i32* %5
ret i32 %146
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
@.str.1 = [14 x i8] c"C1700-MB-1ETH\00"
@.str.2 = [16 x i8] c"C1710-MB-1FE-1E\00"
@.str.3 = [16 x i8] c"CISCO2600-MB-1E\00"
@.str.4 = [16 x i8] c"CISCO2600-MB-2E\00"
@.str.5 = [17 x i8] c"CISCO2600-MB-1FE\00"
@.str.6 = [17 x i8] c"CISCO2600-MB-2FE\00"
@.str.7 = [7 x i8] c"NPE-G2\00"
@.str.8 = [12 x i8] c"C7200-IO-FE\00"
@.str.9 = [9 x i8] c"PA-FE-TX\00"
@.str.10 = [6 x i8] c"PA-4E\00"
@.str.11 = [6 x i8] c"PA-8E\00"
@.str.12 = [7 x i8] c"PA-4T+\00"
@.str.13 = [6 x i8] c"PA-8T\00"
@.str.14 = [6 x i8] c"PA-A1\00"
@.str.15 = [11 x i8] c"PA-POS-OC3\00"
@.str.16 = [12 x i8] c"C7200-JC-PA\00"
@.str.17 = [6 x i8] c"NM-1E\00"
@.str.18 = [6 x i8] c"NM-4E\00"
@.str.19 = [10 x i8] c"NM-1FE-TX\00"
@.str.20 = [9 x i8] c"NM-16ESW\00"
@.str.21 = [11 x i8] c"GT96100-FE\00"
@.str.22 = [6 x i8] c"NM-4T\00"
@.str.23 = [12 x i8] c"Leopard-2FE\00"
@.str.24 = [7 x i8] c"WIC-1T\00"
@.str.25 = [7 x i8] c"WIC-2T\00"
define i32 @is_module(i8* nocapture %0, i32 %1) {
%3 = tail call i8* @strdup(i8* %0)
%4 = tail call i8* @strtok(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = tail call i64 @is_numeric(i8* %4)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %100
9: ; preds = %2
%10 = tail call i64 @is_string(i8* %5)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %100
12: ; preds = %9
%13 = tail call i64 @is_string(i8* %6)
%14 = icmp eq i64 %13, 0
br i1 %14, label %100, label %15
15: ; preds = %12
%16 = add nsw i32 %1, -1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %0, i64 %17
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 58
br i1 %20, label %100, label %21
21: ; preds = %15
%22 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %99, label %24
24: ; preds = %21
%25 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %99, label %27
27: ; preds = %24
%28 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %99, label %30
30: ; preds = %27
%31 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %99, label %33
33: ; preds = %30
%34 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %99, label %36
36: ; preds = %33
%37 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %99, label %39
39: ; preds = %36
%40 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %99, label %42
42: ; preds = %39
%43 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %99, label %45
45: ; preds = %42
%46 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %99, label %48
48: ; preds = %45
%49 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %99, label %51
51: ; preds = %48
%52 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %99, label %54
54: ; preds = %51
%55 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %99, label %57
57: ; preds = %54
%58 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %99, label %60
60: ; preds = %57
%61 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %99, label %63
63: ; preds = %60
%64 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %99, label %66
66: ; preds = %63
%67 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %99, label %69
69: ; preds = %66
%70 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
br i1 %71, label %99, label %72
72: ; preds = %69
%73 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %99, label %75
75: ; preds = %72
%76 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%77 = icmp eq i64 %76, 0
br i1 %77, label %99, label %78
78: ; preds = %75
%79 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %99, label %81
81: ; preds = %78
%82 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0))
%83 = icmp eq i64 %82, 0
br i1 %83, label %99, label %84
84: ; preds = %81
%85 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %99, label %87
87: ; preds = %84
%88 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %99, label %90
90: ; preds = %87
%91 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%92 = icmp eq i64 %91, 0
br i1 %92, label %99, label %93
93: ; preds = %90
%94 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0))
%95 = icmp eq i64 %94, 0
br i1 %95, label %99, label %96
96: ; preds = %93
%97 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i64 0, i64 0))
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %100
99: ; preds = %96, %93, %90, %87, %84, %81, %78, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21
br label %100
100: ; preds = %2, %9, %12, %15, %96, %99
%101 = phi i32 [ 0, %99 ], [ -1, %96 ], [ -1, %15 ], [ -1, %12 ], [ -1, %9 ], [ -1, %2 ]
%102 = tail call i32 @free(i8* %3)
ret i32 %101
}