#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_gamma(struct XCSF *, double const);
int /*<<< orphan*/ param_set_p_explore(struct XCSF *, double const);
int /*<<< orphan*/ param_set_teletransportation(struct XCSF *, int const);
scalar_t__ strncmp(char const *, char *, int);
void config_multi(struct XCSF *xcsf, const char *n, const char *v, const int i,
                  const double f) {
  (void)v;
  if (strncmp(n, "TELETRANSPORTATION\0", 19) == 0) {
    param_set_teletransportation(xcsf, i);
  } else if (strncmp(n, "GAMMA\0", 6) == 0) {
    param_set_gamma(xcsf, f);
  } else if (strncmp(n, "P_EXPLORE\0", 10) == 0) {
    param_set_p_explore(xcsf, f);
  }
}


x86 assembly (clang, -O0):
<config_multi>:
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    0xe99(%rip),%rsi
mov    $0x13,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    118c <config_multi+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <param_set_teletransportation@plt>
jmp    11f5 <config_multi+0xb5>
mov    -0x10(%rbp),%rdi
lea    0xe7d(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11be <config_multi+0x7e>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1060 <param_set_gamma@plt>
jmp    11f0 <config_multi+0xb0>
mov    -0x10(%rbp),%rdi
lea    0xe52(%rip),%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11eb <config_multi+0xab>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
call   1050 <param_set_p_explore@plt>
jmp    11f0 <config_multi+0xb0>
jmp    11f5 <config_multi+0xb5>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_multi>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %ecx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
mov    $0x13,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11aa <config_multi+0x6a>
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11bc <config_multi+0x7c>
lea    0xe8c(%rip),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11d2 <config_multi+0x92>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %r14,%rdi
mov    %ebp,%esi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <param_set_teletransportation@plt>
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <param_set_gamma@plt>
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <param_set_p_explore@plt>

LLVM IR (-O0):
%struct.XCSF = type { i32 }
@.str = [20 x i8] c"TELETRANSPORTATION\00\00"
@.str.1 = [7 x i8] c"GAMMA\00\00"
@.str.2 = [11 x i8] c"P_EXPLORE\00\00"
define void @config_multi(%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** %8
%12 = load i8*, i8** %7
%13 = call i64 @strncmp(i8* %12, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 19)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %5
%16 = load %struct.XCSF*, %struct.XCSF** %6
%17 = load i32, i32* %9
%18 = call i32 @param_set_teletransportation(%struct.XCSF* %16, i32 %17)
br label %37
19: ; preds = %5
%20 = load i8*, i8** %7
%21 = call i64 @strncmp(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load %struct.XCSF*, %struct.XCSF** %6
%25 = load double, double* %10
%26 = call i32 @param_set_gamma(%struct.XCSF* %24, double %25)
br label %36
27: ; preds = %19
%28 = load i8*, i8** %7
%29 = call i64 @strncmp(i8* %28, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 10)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = load %struct.XCSF*, %struct.XCSF** %6
%33 = load double, double* %10
%34 = call i32 @param_set_p_explore(%struct.XCSF* %32, double %33)
br label %35
35: ; preds = %31, %27
br label %36
36: ; preds = %35, %23
br label %37
37: ; preds = %36, %15
ret void
}

LLVM IR (-O2):
%struct.XCSF = type { i32 }
@.str = [20 x i8] c"TELETRANSPORTATION\00\00"
@.str.1 = [7 x i8] c"GAMMA\00\00"
@.str.2 = [11 x i8] c"P_EXPLORE\00\00"
define void @config_multi(%struct.XCSF* %0, i8* %1, i8* nocapture readnone %2, i32 %3, double %4) {
%6 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 19)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @param_set_teletransportation(%struct.XCSF* %0, i32 %3)
br label %20
10: ; preds = %5
%11 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @param_set_gamma(%struct.XCSF* %0, double %4)
br label %20
15: ; preds = %10
%16 = tail call i64 @strncmp(i8* %1, i8* getelementptr inbounds ([11 x i8], [11 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_p_explore(%struct.XCSF* %0, double %4)
br label %20
20: ; preds = %13, %18, %15, %8
ret void
}