#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 */
int /*<<< orphan*/ coco_error(char *, int const);
const char *suite_bbob_get_instances_by_year(const int year) {
  if (year == 2009) {
    return "1-5,1-5,1-5";
  } else if (year == 2010) {
    return "1-15";
  } else if (year == 2012) {
    return "1-5,21-30";
  } else if (year == 2013) {
    return "1-5,31-40";
  } else if (year == 2015) {
    return "1-5,41-50";
  } else if (year == 2016) {
    return "1-5,51-60";
  } else {
    coco_error("suite_bbob_get_instances_by_year(): year %d not defined for "
               "suite_bbob",
               year);
    return 0;
  }
}


x86 assembly (clang, -O0):
<suite_bbob_get_instances_by_year>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x7d9,-0xc(%rbp)
jne    1138 <suite_bbob_get_instances_by_year+0x28>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e0 <suite_bbob_get_instances_by_year+0xd0>
cmpl   $0x7da,-0xc(%rbp)
jne    1155 <suite_bbob_get_instances_by_year+0x45>
lea    0xec0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e0 <suite_bbob_get_instances_by_year+0xd0>
cmpl   $0x7dc,-0xc(%rbp)
jne    1172 <suite_bbob_get_instances_by_year+0x62>
lea    0xea8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e0 <suite_bbob_get_instances_by_year+0xd0>
cmpl   $0x7dd,-0xc(%rbp)
jne    118f <suite_bbob_get_instances_by_year+0x7f>
lea    0xe95(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e0 <suite_bbob_get_instances_by_year+0xd0>
cmpl   $0x7df,-0xc(%rbp)
jne    11ac <suite_bbob_get_instances_by_year+0x9c>
lea    0xe82(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e0 <suite_bbob_get_instances_by_year+0xd0>
cmpl   $0x7e0,-0xc(%rbp)
jne    11c9 <suite_bbob_get_instances_by_year+0xb9>
lea    0xe6f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e0 <suite_bbob_get_instances_by_year+0xd0>
mov    -0xc(%rbp),%esi
lea    0xe66(%rip),%rdi
call   1030 <coco_error@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suite_bbob_get_instances_by_year>:
push   %rax
mov    %edi,%esi
lea    -0x7d9(%rsi),%eax
cmp    $0x8,%eax
jae    1128 <suite_bbob_get_instances_by_year+0x18>
mov    $0xdb,%ecx
bt     %eax,%ecx
jb     1138 <suite_bbob_get_instances_by_year+0x28>
lea    0xf0a(%rip),%rdi
call   1030 <coco_error@plt>
xor    %eax,%eax
pop    %rcx
ret
cltq
lea    0xf3f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"1-5,1-5,1-5\00"
@.str.1 = [5 x i8] c"1-15\00"
@.str.2 = [10 x i8] c"1-5,21-30\00"
@.str.3 = [10 x i8] c"1-5,31-40\00"
@.str.4 = [10 x i8] c"1-5,41-50\00"
@.str.5 = [10 x i8] c"1-5,51-60\00"
@.str.6 = [71 x i8] c"suite_bbob_get_instances_by_year(): year %d not defined for suite_bbob\00"
define i8* @suite_bbob_get_instances_by_year(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 2009
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
br label %30
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 2010
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %30
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 2012
br i1 %13, label %14, label %15
14: ; preds = %11
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %30
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 2013
br i1 %17, label %18, label %19
18: ; preds = %15
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %30
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 2015
br i1 %21, label %22, label %23
22: ; preds = %19
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %30
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 2016
br i1 %25, label %26, label %27
26: ; preds = %23
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %30
27: ; preds = %23
%28 = load i32, i32* %3
%29 = call i32 @coco_error(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0), i32 %28)
store i8* null, i8** %2
br label %30
30: ; preds = %27, %26, %22, %18, %14, %10, %6
%31 = load i8*, i8** %2
ret i8* %31
}

LLVM IR (-O2):
@.str = [12 x i8] c"1-5,1-5,1-5\00"
@.str.1 = [5 x i8] c"1-15\00"
@.str.2 = [10 x i8] c"1-5,21-30\00"
@.str.3 = [10 x i8] c"1-5,31-40\00"
@.str.4 = [10 x i8] c"1-5,41-50\00"
@.str.5 = [10 x i8] c"1-5,51-60\00"
@.str.6 = [71 x i8] c"suite_bbob_get_instances_by_year(): year %d not defined for suite_bbob\00"
@reltable.suite_bbob_get_instances_by_year = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.1 to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.3 to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.4 to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i64)) to i32)]
define i8* @suite_bbob_get_instances_by_year(i32 %0) {
%2 = add i32 %0, -2009
%3 = icmp ult i32 %2, 8
br i1 %3, label %6, label %4
4: ; preds = %6, %1
%5 = tail call i32 @coco_error(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0), i32 %0)
br label %15
6: ; preds = %1
%7 = trunc i32 %2 to i8
%8 = lshr i8 -37, %7
%9 = and i8 %8, 1
%10 = icmp eq i8 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %6
%12 = sext i32 %2 to i64
%13 = shl i64 %12, 2
%14 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.suite_bbob_get_instances_by_year to i8*), i64 %13)
br label %15
15: ; preds = %11, %4
%16 = phi i8* [ null, %4 ], [ %14, %11 ]
ret i8* %16
}