#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*/ cond_param_set_eta(struct XCSF *, double const);
int /*<<< orphan*/ cond_param_set_max(struct XCSF *, double const);
int /*<<< orphan*/ cond_param_set_min(struct XCSF *, double const);
int /*<<< orphan*/ cond_param_set_spread_min(struct XCSF *, double const);
scalar_t__ strncmp(char const *, char *, int);
void config_cl_cond_csr(struct XCSF *xcsf, const char *n, const char *v,
                        const int i, const double f) {
  (void)i;
  (void)v;
  if (strncmp(n, "COND_MIN\0", 9) == 0) {
    cond_param_set_min(xcsf, f);
  } else if (strncmp(n, "COND_MAX\0", 9) == 0) {
    cond_param_set_max(xcsf, f);
  } else if (strncmp(n, "COND_SPREAD_MIN\0", 16) == 0) {
    cond_param_set_spread_min(xcsf, f);
  } else if (strncmp(n, "COND_ETA\0", 9) == 0) {
    cond_param_set_eta(xcsf, f);
  }
}


x86 assembly (clang, -O0):
<config_cl_cond_csr>:
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    0xe89(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    119e <config_cl_cond_csr+0x4e>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1050 <cond_param_set_min@plt>
jmp    123e <config_cl_cond_csr+0xee>
mov    -0x10(%rbp),%rdi
lea    0xe61(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    11d0 <config_cl_cond_csr+0x80>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1060 <cond_param_set_max@plt>
jmp    1239 <config_cl_cond_csr+0xe9>
mov    -0x10(%rbp),%rdi
lea    0xe39(%rip),%rsi
mov    $0x10,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1202 <config_cl_cond_csr+0xb2>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1030 <cond_param_set_spread_min@plt>
jmp    1234 <config_cl_cond_csr+0xe4>
mov    -0x10(%rbp),%rdi
lea    0xe18(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    122f <config_cl_cond_csr+0xdf>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1070 <cond_param_set_eta@plt>
jmp    1234 <config_cl_cond_csr+0xe4>
jmp    1239 <config_cl_cond_csr+0xe9>
jmp    123e <config_cl_cond_csr+0xee>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_cl_cond_csr>:
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xe9a(%rip),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     11cb <config_cl_cond_csr+0x7b>
lea    0xe8b(%rip),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     11df <config_cl_cond_csr+0x8f>
lea    0xe7c(%rip),%rsi
mov    %rbx,%rdi
mov    $0x10,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     11f3 <config_cl_cond_csr+0xa3>
lea    0xe74(%rip),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1207 <config_cl_cond_csr+0xb7>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <cond_param_set_min@plt>
mov    %r14,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <cond_param_set_max@plt>
mov    %r14,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <cond_param_set_spread_min@plt>
mov    %r14,%rdi
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1070 <cond_param_set_eta@plt>

LLVM IR (-O0):
%struct.XCSF = type { i32 }
@.str = [10 x i8] c"COND_MIN\00\00"
@.str.1 = [10 x i8] c"COND_MAX\00\00"
@.str.2 = [17 x i8] c"COND_SPREAD_MIN\00\00"
@.str.3 = [10 x i8] c"COND_ETA\00\00"
define void @config_cl_cond_csr(%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 i32, i32* %9
%12 = load i8*, i8** %8
%13 = load i8*, i8** %7
%14 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %5
%17 = load %struct.XCSF*, %struct.XCSF** %6
%18 = load double, double* %10
%19 = call i32 @cond_param_set_min(%struct.XCSF* %17, double %18)
br label %47
20: ; preds = %5
%21 = load i8*, i8** %7
%22 = call i64 @strncmp(i8* %21, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load %struct.XCSF*, %struct.XCSF** %6
%26 = load double, double* %10
%27 = call i32 @cond_param_set_max(%struct.XCSF* %25, double %26)
br label %46
28: ; preds = %20
%29 = load i8*, i8** %7
%30 = call i64 @strncmp(i8* %29, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 16)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = load %struct.XCSF*, %struct.XCSF** %6
%34 = load double, double* %10
%35 = call i32 @cond_param_set_spread_min(%struct.XCSF* %33, double %34)
br label %45
36: ; preds = %28
%37 = load i8*, i8** %7
%38 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %44
40: ; preds = %36
%41 = load %struct.XCSF*, %struct.XCSF** %6
%42 = load double, double* %10
%43 = call i32 @cond_param_set_eta(%struct.XCSF* %41, double %42)
br label %44
44: ; preds = %40, %36
br label %45
45: ; preds = %44, %32
br label %46
46: ; preds = %45, %24
br label %47
47: ; preds = %46, %16
ret void
}

LLVM IR (-O2):
%struct.XCSF = type { i32 }
@.str = [10 x i8] c"COND_MIN\00\00"
@.str.1 = [10 x i8] c"COND_MAX\00\00"
@.str.2 = [17 x i8] c"COND_SPREAD_MIN\00\00"
@.str.3 = [10 x i8] c"COND_ETA\00\00"
define void @config_cl_cond_csr(%struct.XCSF* %0, i8* %1, i8* nocapture readnone %2, i32 %3, double %4) {
%6 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @cond_param_set_min(%struct.XCSF* %0, double %4)
br label %25
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 @cond_param_set_max(%struct.XCSF* %0, double %4)
br label %25
15: ; preds = %10
%16 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 16)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = tail call i32 @cond_param_set_spread_min(%struct.XCSF* %0, double %4)
br label %25
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 @cond_param_set_eta(%struct.XCSF* %0, double %4)
br label %25
25: ; preds = %13, %20, %23, %18, %8
ret void
}