#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*/ param_set_huber_delta(struct XCSF *, double const);
int /*<<< orphan*/ param_set_loss_func_string(struct XCSF *, char const *);
int /*<<< orphan*/ param_set_max_trials(struct XCSF *, int const);
int /*<<< orphan*/ param_set_omp_num_threads(struct XCSF *, int const);
int /*<<< orphan*/ param_set_perf_trials(struct XCSF *, int const);
int /*<<< orphan*/ param_set_pop_init(struct XCSF *, int const);
int /*<<< orphan*/ param_set_pop_size(struct XCSF *, int const);
scalar_t__ strncmp(char const *, char *, int);
void config_general(struct XCSF *xcsf, const char *n, const char *v,
                    const int i, const double f) {
  if (strncmp(n, "OMP_NUM_THREADS\0", 16) == 0) {
    param_set_omp_num_threads(xcsf, i);
  } else if (strncmp(n, "POP_SIZE\0", 9) == 0) {
    param_set_pop_size(xcsf, i);
  } else if (strncmp(n, "MAX_TRIALS\0", 10) == 0) {
    param_set_max_trials(xcsf, i);
  } else if (strncmp(n, "POP_INIT\0", 9) == 0) {
    param_set_pop_init(xcsf, i);
  } else if (strncmp(n, "PERF_TRIALS\0", 12) == 0) {
    param_set_perf_trials(xcsf, i);
  } else if (strncmp(n, "LOSS_FUNC\0", 10) == 0) {
    param_set_loss_func_string(xcsf, v);
  } else if (strncmp(n, "HUBER_DELTA\0", 12) == 0) {
    param_set_huber_delta(xcsf, f);
  }
}


x86 assembly (clang, -O0):
<config_general>:
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    0xe59(%rip),%rsi
mov    $0x10,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    11cc <config_general+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1070 <param_set_omp_num_threads@plt>
jmp    1308 <config_general+0x188>
mov    -0x10(%rbp),%rdi
lea    0xe3a(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    11fc <config_general+0x7c>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <param_set_pop_size@plt>
jmp    1303 <config_general+0x183>
mov    -0x10(%rbp),%rdi
lea    0xe14(%rip),%rsi
mov    $0xa,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    122c <config_general+0xac>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1060 <param_set_max_trials@plt>
jmp    12fe <config_general+0x17e>
mov    -0x10(%rbp),%rdi
lea    0xdf0(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    125c <config_general+0xdc>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1080 <param_set_pop_init@plt>
jmp    12f9 <config_general+0x179>
mov    -0x10(%rbp),%rdi
lea    0xdca(%rip),%rsi
mov    $0xc,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    128c <config_general+0x10c>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1050 <param_set_perf_trials@plt>
jmp    12f4 <config_general+0x174>
mov    -0x10(%rbp),%rdi
lea    0xda7(%rip),%rsi
mov    $0xa,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    12bd <config_general+0x13d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10a0 <param_set_loss_func_string@plt>
jmp    12ef <config_general+0x16f>
mov    -0x10(%rbp),%rdi
lea    0xd81(%rip),%rsi
mov    $0xc,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    12ea <config_general+0x16a>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1090 <param_set_huber_delta@plt>
jmp    12ef <config_general+0x16f>
jmp    12f4 <config_general+0x174>
jmp    12f9 <config_general+0x179>
jmp    12fe <config_general+0x17e>
jmp    1303 <config_general+0x183>
jmp    1308 <config_general+0x188>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_general>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %ecx,%ebp
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xe62(%rip),%rsi
mov    %rbx,%rdi
mov    $0x10,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     126d <config_general+0xed>
lea    0xe56(%rip),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1281 <config_general+0x101>
lea    0xe43(%rip),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1295 <config_general+0x115>
lea    0xe32(%rip),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12a9 <config_general+0x129>
lea    0xe1f(%rip),%rsi
mov    %rbx,%rdi
mov    $0xc,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12bd <config_general+0x13d>
lea    0xe0f(%rip),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12d1 <config_general+0x151>
lea    0xdfd(%rip),%rsi
mov    %rbx,%rdi
mov    $0xc,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     12e6 <config_general+0x166>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <param_set_omp_num_threads@plt>
mov    %r14,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <param_set_pop_size@plt>
mov    %r14,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <param_set_max_trials@plt>
mov    %r14,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <param_set_pop_init@plt>
mov    %r14,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <param_set_perf_trials@plt>
mov    %r14,%rdi
mov    %r15,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <param_set_loss_func_string@plt>
mov    %r14,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <param_set_huber_delta@plt>

LLVM IR (-O0):
%struct.XCSF = type { i32 }
@.str = [17 x i8] c"OMP_NUM_THREADS\00\00"
@.str.1 = [10 x i8] c"POP_SIZE\00\00"
@.str.2 = [12 x i8] c"MAX_TRIALS\00\00"
@.str.3 = [10 x i8] c"POP_INIT\00\00"
@.str.4 = [13 x i8] c"PERF_TRIALS\00\00"
@.str.5 = [11 x i8] c"LOSS_FUNC\00\00"
@.str.6 = [13 x i8] c"HUBER_DELTA\00\00"
define void @config_general(%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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%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 i32, i32* %9
%17 = call i32 @param_set_omp_num_threads(%struct.XCSF* %15, i32 %16)
br label %72
18: ; preds = %5
%19 = load i8*, i8** %7
%20 = call i64 @strncmp(i8* %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%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 i32, i32* %9
%25 = call i32 @param_set_pop_size(%struct.XCSF* %23, i32 %24)
br label %71
26: ; preds = %18
%27 = load i8*, i8** %7
%28 = call i64 @strncmp(i8* %27, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 10)
%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 i32, i32* %9
%33 = call i32 @param_set_max_trials(%struct.XCSF* %31, i32 %32)
br label %70
34: ; preds = %26
%35 = load i8*, i8** %7
%36 = call i64 @strncmp(i8* %35, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
%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 @param_set_pop_init(%struct.XCSF* %39, i32 %40)
br label %69
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 i32, i32* %9
%49 = call i32 @param_set_perf_trials(%struct.XCSF* %47, i32 %48)
br label %68
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 i8*, i8** %8
%57 = call i32 @param_set_loss_func_string(%struct.XCSF* %55, i8* %56)
br label %67
58: ; preds = %50
%59 = load i8*, i8** %7
%60 = call i64 @strncmp(i8* %59, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 12)
%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 @param_set_huber_delta(%struct.XCSF* %63, double %64)
br label %66
66: ; preds = %62, %58
br label %67
67: ; preds = %66, %54
br label %68
68: ; preds = %67, %46
br label %69
69: ; preds = %68, %38
br label %70
70: ; preds = %69, %30
br label %71
71: ; preds = %70, %22
br label %72
72: ; preds = %71, %14
ret void
}

LLVM IR (-O2):
%struct.XCSF = type { i32 }
@.str = [17 x i8] c"OMP_NUM_THREADS\00\00"
@.str.1 = [10 x i8] c"POP_SIZE\00\00"
@.str.2 = [12 x i8] c"MAX_TRIALS\00\00"
@.str.3 = [10 x i8] c"POP_INIT\00\00"
@.str.4 = [13 x i8] c"PERF_TRIALS\00\00"
@.str.5 = [11 x i8] c"LOSS_FUNC\00\00"
@.str.6 = [13 x i8] c"HUBER_DELTA\00\00"
define void @config_general(%struct.XCSF* %0, i8* %1, i8* %2, i32 %3, double %4) {
%6 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @param_set_omp_num_threads(%struct.XCSF* %0, i32 %3)
br label %40
10: ; preds = %5
%11 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @param_set_pop_size(%struct.XCSF* %0, i32 %3)
br label %40
15: ; preds = %10
%16 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 10)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = tail call i32 @param_set_max_trials(%struct.XCSF* %0, i32 %3)
br label %40
20: ; preds = %15
%21 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = tail call i32 @param_set_pop_init(%struct.XCSF* %0, i32 %3)
br label %40
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 @param_set_perf_trials(%struct.XCSF* %0, i32 %3)
br label %40
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 @param_set_loss_func_string(%struct.XCSF* %0, i8* %2)
br label %40
35: ; preds = %30
%36 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 12)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = tail call i32 @param_set_huber_delta(%struct.XCSF* %0, double %4)
br label %40
40: ; preds = %13, %23, %33, %38, %35, %28, %18, %8
ret void
}