#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 */
scalar_t__ strstr(char const *, char const *);
int is_filtered(char const *ifname) {
  char const *filtered_ifs[] = {
      "Wireless", "Microsoft", "Virtual", "lo", "wlan", "vboxnet",
      "ifb",      "gre",       "teql",    "br", "imq",  "ra",
      "wds",      "sit",       "apcli",   NULL,
  };
  for (char const **if_ = filtered_ifs; *if_; if_++) {
    if (strstr(ifname, *if_))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_filtered>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
lea    0x2c63(%rip),%rsi
mov    $0x80,%edx
call   1030 <memcpy@plt>
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
cmpq   $0x0,(%rax)
je     11ab <is_filtered+0x8b>
mov    -0x10(%rbp),%rdi
mov    -0x98(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     118f <is_filtered+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    11b2 <is_filtered+0x92>
jmp    1194 <is_filtered+0x74>
mov    -0x98(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x98(%rbp)
jmp    1155 <is_filtered+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_filtered>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%r14
movaps 0x2cec(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0x2cd0(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0x2cb4(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x2c98(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2c7c(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2c60(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2c44(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c28(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x8(%rsp),%rbx
lea    0xe78(%rip),%rsi
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <strstr@plt>
test   %rax,%rax
jne    11a9 <is_filtered+0x99>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1190 <is_filtered+0x80>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Wireless\00"
@.str.1 = [10 x i8] c"Microsoft\00"
@.str.2 = [8 x i8] c"Virtual\00"
@.str.3 = [3 x i8] c"lo\00"
@.str.4 = [5 x i8] c"wlan\00"
@.str.5 = [8 x i8] c"vboxnet\00"
@.str.6 = [4 x i8] c"ifb\00"
@.str.7 = [4 x i8] c"gre\00"
@.str.8 = [5 x i8] c"teql\00"
@.str.9 = [3 x i8] c"br\00"
@.str.10 = [4 x i8] c"imq\00"
@.str.11 = [3 x i8] c"ra\00"
@.str.12 = [4 x i8] c"wds\00"
@.str.13 = [4 x i8] c"sit\00"
@.str.14 = [6 x i8] c"apcli\00"
@__const.is_filtered.filtered_ifs = [16 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i32 0, i32 0), i8* null]
define i32 @is_filtered(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [16 x i8*]
%5 = alloca i8**
store i8* %0, i8** %3
%6 = bitcast [16 x i8*]* %4 to i8*
%7 = getelementptr inbounds [16 x i8*], [16 x i8*]* %4, i64 0, i64 0
store i8** %7, i8*** %5
br label %8
8: ; preds = %20, %1
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = load i8**, i8*** %5
%15 = load i8*, i8** %14
%16 = call i64 @strstr(i8* %13, i8* %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 1, i32* %2
br label %24
19: ; preds = %12
br label %20
20: ; preds = %19
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i32 1
store i8** %22, i8*** %5
br label %8
23: ; preds = %8
store i32 0, i32* %2
br label %24
24: ; preds = %23, %18
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@.str = [9 x i8] c"Wireless\00"
@.str.1 = [10 x i8] c"Microsoft\00"
@.str.2 = [8 x i8] c"Virtual\00"
@.str.3 = [3 x i8] c"lo\00"
@.str.4 = [5 x i8] c"wlan\00"
@.str.5 = [8 x i8] c"vboxnet\00"
@.str.6 = [4 x i8] c"ifb\00"
@.str.7 = [4 x i8] c"gre\00"
@.str.8 = [5 x i8] c"teql\00"
@.str.9 = [3 x i8] c"br\00"
@.str.10 = [4 x i8] c"imq\00"
@.str.11 = [3 x i8] c"ra\00"
@.str.12 = [4 x i8] c"wds\00"
@.str.13 = [4 x i8] c"sit\00"
@.str.14 = [6 x i8] c"apcli\00"
@__const.is_filtered.filtered_ifs = [16 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i32 0, i32 0), i8* null]
define i32 @is_filtered(i8* %0) {
%2 = alloca [16 x i8*]
%3 = bitcast [16 x i8*]* %2 to i8*
%4 = getelementptr inbounds [16 x i8*], [16 x i8*]* %2, i64 0, i64 0
br label %8
5: ; preds = %8
%6 = load i8*, i8** %13
%7 = icmp eq i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1, %5
%9 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %1 ]
%10 = phi i8** [ %13, %5 ], [ %4, %1 ]
%11 = tail call i64 @strstr(i8* %0, i8* %9)
%12 = icmp eq i64 %11, 0
%13 = getelementptr inbounds i8*, i8** %10, i64 1
br i1 %12, label %5, label %14
14: ; preds = %5, %8
%15 = xor i1 %12, true
%16 = zext i1 %15 to i32
ret i32 %16
}