#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__ config_match(char *, char *);
int wds_on(void) {
  return (config_match("wds_endis_fun", "1") &&
          config_match("wds_repeater_basic", "0") &&
          config_match("endis_wl_radio", "1")) ||
         (config_match("wla_wds_endis_fun", "1") &&
          config_match("wds_repeater_basic_a", "0") &&
          config_match("endis_wla_radio", "1"));
}


x86 assembly (clang, -O0):
<wds_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xf0b(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1030 <config_match@plt>
cmp    $0x0,%rax
je     1177 <wds_on+0x67>
lea    0xec6(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <config_match@plt>
cmp    $0x0,%rax
je     1177 <wds_on+0x67>
lea    0xebe(%rip),%rdi
lea    0xea0(%rip),%rsi
call   1030 <config_match@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    11e4 <wds_on+0xd4>
lea    0xea8(%rip),%rdi
lea    0xe7b(%rip),%rsi
call   1030 <config_match@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     11de <wds_on+0xce>
lea    0xe95(%rip),%rdi
lea    0xe6b(%rip),%rsi
call   1030 <config_match@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     11de <wds_on+0xce>
lea    0xe85(%rip),%rdi
lea    0xe31(%rip),%rsi
call   1030 <config_match@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wds_on>:
push   %rbx
lea    0xf12(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <config_match@plt>
test   %rax,%rax
je     115e <wds_on+0x4e>
lea    0xed2(%rip),%rdi
lea    0xede(%rip),%rsi
call   1030 <config_match@plt>
test   %rax,%rax
je     115e <wds_on+0x4e>
lea    0xecf(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1030 <config_match@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11ab <wds_on+0x9b>
lea    0xec1(%rip),%rdi
lea    0xe94(%rip),%rsi
call   1030 <config_match@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     11ab <wds_on+0x9b>
lea    0xeb9(%rip),%rdi
lea    0xe8f(%rip),%rsi
call   1030 <config_match@plt>
test   %rax,%rax
je     11ab <wds_on+0x9b>
lea    0xeb6(%rip),%rdi
lea    0xe62(%rip),%rsi
call   1030 <config_match@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"wds_endis_fun\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [19 x i8] c"wds_repeater_basic\00"
@.str.3 = [2 x i8] c"0\00"
@.str.4 = [15 x i8] c"endis_wl_radio\00"
@.str.5 = [18 x i8] c"wla_wds_endis_fun\00"
@.str.6 = [21 x i8] c"wds_repeater_basic_a\00"
@.str.7 = [16 x i8] c"endis_wla_radio\00"
define i32 @wds_on() {
%1 = call i64 @config_match(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = call i64 @config_match(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = call i64 @config_match(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %20, label %9
9: ; preds = %6, %3, %0
%10 = call i64 @config_match(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = call i64 @config_match(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = call i64 @config_match(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %15, %12, %9
%19 = phi i1 [ false, %12 ], [ false, %9 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
@.str = [14 x i8] c"wds_endis_fun\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [19 x i8] c"wds_repeater_basic\00"
@.str.3 = [2 x i8] c"0\00"
@.str.4 = [15 x i8] c"endis_wl_radio\00"
@.str.5 = [18 x i8] c"wla_wds_endis_fun\00"
@.str.6 = [21 x i8] c"wds_repeater_basic_a\00"
@.str.7 = [16 x i8] c"endis_wla_radio\00"
define i32 @wds_on() {
%1 = tail call i64 @config_match(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i64 @config_match(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i64 @config_match(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %6, %3, %0
%10 = tail call i64 @config_match(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %19, label %12
12: ; preds = %9
%13 = tail call i64 @config_match(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %12
%16 = tail call i64 @config_match(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %9, %12, %15, %6
%20 = phi i32 [ 1, %6 ], [ 0, %12 ], [ 0, %9 ], [ %18, %15 ]
ret i32 %20
}