#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 */
struct XCSF {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ea_param_set_err_reduc(struct XCSF *, double const);
int /*<<< orphan*/ ea_param_set_fit_reduc(struct XCSF *, double const);
int /*<<< orphan*/ ea_param_set_lambda(struct XCSF *, int const);
int /*<<< orphan*/ ea_param_set_p_crossover(struct XCSF *, double const);
int /*<<< orphan*/ ea_param_set_pred_reset(struct XCSF *, int const);
int /*<<< orphan*/ ea_param_set_select_size(struct XCSF *, double const);
int /*<<< orphan*/ ea_param_set_theta(struct XCSF *, double const);
int /*<<< orphan*/ ea_param_set_type_string(struct XCSF *, char const *);
scalar_t__ strncmp(char const *, char *, int);
void config_ea(struct XCSF *xcsf, const char *n, const char *v, const int i,
               const double f) {
  if (strncmp(n, "EA_SELECT_TYPE\0", 15) == 0) {
    ea_param_set_type_string(xcsf, v);
  } else if (strncmp(n, "EA_SELECT_SIZE\0", 15) == 0) {
    ea_param_set_select_size(xcsf, f);
  } else if (strncmp(n, "THETA_EA\0", 9) == 0) {
    ea_param_set_theta(xcsf, f);
  } else if (strncmp(n, "LAMBDA\0", 7) == 0) {
    ea_param_set_lambda(xcsf, i);
  } else if (strncmp(n, "P_CROSSOVER\0", 12) == 0) {
    ea_param_set_p_crossover(xcsf, f);
  } else if (strncmp(n, "ERR_REDUC\0", 10) == 0) {
    ea_param_set_err_reduc(xcsf, f);
  } else if (strncmp(n, "FIT_REDUC\0", 10) == 0) {
    ea_param_set_fit_reduc(xcsf, f);
  } else if (strncmp(n, "EA_PRED_RESET\0", 14) == 0) {
    ea_param_set_pred_reset(xcsf, i);
  }
}


x86 assembly (clang, -O0):
<config_ea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe49(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11dd <config_ea+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <ea_param_set_type_string@plt>
jmp    1355 <config_ea+0x1c5>
mov    -0x10(%rbp),%rdi
lea    0xe28(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    120f <config_ea+0x7f>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   10a0 <ea_param_set_select_size@plt>
jmp    1350 <config_ea+0x1c0>
mov    -0x10(%rbp),%rdi
lea    0xe06(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1241 <config_ea+0xb1>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1060 <ea_param_set_theta@plt>
jmp    134b <config_ea+0x1bb>
mov    -0x10(%rbp),%rdi
lea    0xe10(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1271 <config_ea+0xe1>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1090 <ea_param_set_lambda@plt>
jmp    1346 <config_ea+0x1b6>
mov    -0x10(%rbp),%rdi
lea    0xdae(%rip),%rsi
mov    $0xc,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12a3 <config_ea+0x113>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1080 <ea_param_set_p_crossover@plt>
jmp    1341 <config_ea+0x1b1>
mov    -0x10(%rbp),%rdi
lea    0xd89(%rip),%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12d5 <config_ea+0x145>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   10b0 <ea_param_set_err_reduc@plt>
jmp    133c <config_ea+0x1ac>
mov    -0x10(%rbp),%rdi
lea    0xd62(%rip),%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1307 <config_ea+0x177>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1040 <ea_param_set_fit_reduc@plt>
jmp    1337 <config_ea+0x1a7>
mov    -0x10(%rbp),%rdi
lea    0xd3b(%rip),%rsi
mov    $0xe,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1332 <config_ea+0x1a2>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1070 <ea_param_set_pred_reset@plt>
jmp    1337 <config_ea+0x1a7>
jmp    133c <config_ea+0x1ac>
jmp    1341 <config_ea+0x1b1>
jmp    1346 <config_ea+0x1b6>
jmp    134b <config_ea+0x1bb>
jmp    1350 <config_ea+0x1c0>
jmp    1355 <config_ea+0x1c5>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_ea>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r15
lea    0xe51(%rip),%rsi
mov    %rbp,%rdi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     129b <config_ea+0x10b>
lea    0xe44(%rip),%rsi
mov    %rbp,%rdi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12b0 <config_ea+0x120>
lea    0xe37(%rip),%rsi
mov    %rbp,%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12c7 <config_ea+0x137>
lea    0xe56(%rip),%rsi
mov    %rbp,%rdi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12de <config_ea+0x14e>
lea    0xe07(%rip),%rsi
mov    %rbp,%rdi
mov    $0xc,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12f3 <config_ea+0x163>
lea    0xdf7(%rip),%rsi
mov    %rbp,%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     130a <config_ea+0x17a>
lea    0xde5(%rip),%rsi
mov    %rbp,%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1321 <config_ea+0x191>
lea    0xdd3(%rip),%rsi
mov    %rbp,%rdi
mov    $0xe,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1338 <config_ea+0x1a8>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <ea_param_set_type_string@plt>
mov    %r15,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <ea_param_set_select_size@plt>
mov    %r15,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <ea_param_set_theta@plt>
mov    %r15,%rdi
mov    %r14d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <ea_param_set_lambda@plt>
mov    %r15,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <ea_param_set_p_crossover@plt>
mov    %r15,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <ea_param_set_err_reduc@plt>
mov    %r15,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <ea_param_set_fit_reduc@plt>
mov    %r15,%rdi
mov    %r14d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <ea_param_set_pred_reset@plt>

LLVM IR (-O0):
%struct.XCSF = type { i32 }
@.str = [16 x i8] c"EA_SELECT_TYPE\00\00"
@.str.1 = [16 x i8] c"EA_SELECT_SIZE\00\00"
@.str.2 = [10 x i8] c"THETA_EA\00\00"
@.str.3 = [8 x i8] c"LAMBDA\00\00"
@.str.4 = [13 x i8] c"P_CROSSOVER\00\00"
@.str.5 = [11 x i8] c"ERR_REDUC\00\00"
@.str.6 = [11 x i8] c"FIT_REDUC\00\00"
@.str.7 = [15 x i8] c"EA_PRED_RESET\00\00"
define void @config_ea(%struct.XCSF* %0, i8* %1, i8* %2, i32 %3, double %4) {
%6 = alloca %struct.XCSF*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca double
store %struct.XCSF* %0, %struct.XCSF** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store double %4, double* %10
%11 = load i8*, i8** %7
%12 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %5
%15 = load %struct.XCSF*, %struct.XCSF** %6
%16 = load i8*, i8** %8
%17 = call i32 @ea_param_set_type_string(%struct.XCSF* %15, i8* %16)
br label %81
18: ; preds = %5
%19 = load i8*, i8** %7
%20 = call i64 @strncmp(i8* %19, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 15)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load %struct.XCSF*, %struct.XCSF** %6
%24 = load double, double* %10
%25 = call i32 @ea_param_set_select_size(%struct.XCSF* %23, double %24)
br label %80
26: ; preds = %18
%27 = load i8*, i8** %7
%28 = call i64 @strncmp(i8* %27, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = load %struct.XCSF*, %struct.XCSF** %6
%32 = load double, double* %10
%33 = call i32 @ea_param_set_theta(%struct.XCSF* %31, double %32)
br label %79
34: ; preds = %26
%35 = load i8*, i8** %7
%36 = call i64 @strncmp(i8* %35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %42
38: ; preds = %34
%39 = load %struct.XCSF*, %struct.XCSF** %6
%40 = load i32, i32* %9
%41 = call i32 @ea_param_set_lambda(%struct.XCSF* %39, i32 %40)
br label %78
42: ; preds = %34
%43 = load i8*, i8** %7
%44 = call i64 @strncmp(i8* %43, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 12)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %50
46: ; preds = %42
%47 = load %struct.XCSF*, %struct.XCSF** %6
%48 = load double, double* %10
%49 = call i32 @ea_param_set_p_crossover(%struct.XCSF* %47, double %48)
br label %77
50: ; preds = %42
%51 = load i8*, i8** %7
%52 = call i64 @strncmp(i8* %51, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 10)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %58
54: ; preds = %50
%55 = load %struct.XCSF*, %struct.XCSF** %6
%56 = load double, double* %10
%57 = call i32 @ea_param_set_err_reduc(%struct.XCSF* %55, double %56)
br label %76
58: ; preds = %50
%59 = load i8*, i8** %7
%60 = call i64 @strncmp(i8* %59, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 10)
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %66
62: ; preds = %58
%63 = load %struct.XCSF*, %struct.XCSF** %6
%64 = load double, double* %10
%65 = call i32 @ea_param_set_fit_reduc(%struct.XCSF* %63, double %64)
br label %75
66: ; preds = %58
%67 = load i8*, i8** %7
%68 = call i64 @strncmp(i8* %67, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 14)
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %74
70: ; preds = %66
%71 = load %struct.XCSF*, %struct.XCSF** %6
%72 = load i32, i32* %9
%73 = call i32 @ea_param_set_pred_reset(%struct.XCSF* %71, i32 %72)
br label %74
74: ; preds = %70, %66
br label %75
75: ; preds = %74, %62
br label %76
76: ; preds = %75, %54
br label %77
77: ; preds = %76, %46
br label %78
78: ; preds = %77, %38
br label %79
79: ; preds = %78, %30
br label %80
80: ; preds = %79, %22
br label %81
81: ; preds = %80, %14
ret void
}

LLVM IR (-O2):
%struct.XCSF = type { i32 }
@.str = [16 x i8] c"EA_SELECT_TYPE\00\00"
@.str.1 = [16 x i8] c"EA_SELECT_SIZE\00\00"
@.str.2 = [10 x i8] c"THETA_EA\00\00"
@.str.3 = [8 x i8] c"LAMBDA\00\00"
@.str.4 = [13 x i8] c"P_CROSSOVER\00\00"
@.str.5 = [11 x i8] c"ERR_REDUC\00\00"
@.str.6 = [11 x i8] c"FIT_REDUC\00\00"
@.str.7 = [15 x i8] c"EA_PRED_RESET\00\00"
define void @config_ea(%struct.XCSF* %0, i8* %1, i8* %2, i32 %3, double %4) {
%6 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @ea_param_set_type_string(%struct.XCSF* %0, i8* %2)
br label %45
10: ; preds = %5
%11 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 15)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @ea_param_set_select_size(%struct.XCSF* %0, double %4)
br label %45
15: ; preds = %10
%16 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = tail call i32 @ea_param_set_theta(%struct.XCSF* %0, double %4)
br label %45
20: ; preds = %15
%21 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = tail call i32 @ea_param_set_lambda(%struct.XCSF* %0, i32 %3)
br label %45
25: ; preds = %20
%26 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 12)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = tail call i32 @ea_param_set_p_crossover(%struct.XCSF* %0, double %4)
br label %45
30: ; preds = %25
%31 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 10)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = tail call i32 @ea_param_set_err_reduc(%struct.XCSF* %0, double %4)
br label %45
35: ; preds = %30
%36 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 10)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = tail call i32 @ea_param_set_fit_reduc(%struct.XCSF* %0, double %4)
br label %45
40: ; preds = %35
%41 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 14)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = tail call i32 @ea_param_set_pred_reset(%struct.XCSF* %0, i32 %3)
br label %45
45: ; preds = %13, %23, %33, %40, %43, %38, %28, %18, %8
ret void
}