const char *reb_string_for_particle_error(int err) {
  if (err == 1)
    return "Cannot set e exactly to 1.";
  if (err == 2)
    return "Eccentricity must be greater than or equal to zero.";
  if (err == 3)
    return "Bound orbit (a > 0) must have e < 1.";
  if (err == 4)
    return "Unbound orbit (a < 0) must have e > 1.";
  if (err == 5)
    return "Unbound orbit can't have f beyond the range allowed by the "
           "asymptotes set by the hyperbola.";
  if (err == 6)
    return "Primary has no mass.";
  if (err == 7)
    return "Cannot mix Pal coordinates (h,k,ix,iy) with certain orbital "
           "elements (e, inc, Omega, omega, pomega, f, M, E, theta, T). Use "
           "longitude l to indicate the phase.";
  if (err == 8)
    return "Cannot pass cartesian coordinates and orbital elements (incl "
           "primary) at the same time.";
  if (err == 9)
    return "Need to pass reb_simulation object when initializing particle with "
           "orbital elements.";
  if (err == 10)
    return "Need to pass either semi-major axis or orbital period to "
           "initialize particle using orbital elements.";
  if (err == 11)
    return "Need to pass either semi-major axis or orbital period, but not "
           "both.";
  if (err == 12)
    return "(ix, iy) coordinates are not valid. Squared sum exceeds 4.";
  if (err == 13)
    return "Cannot pass both (omega, pomega) together.";
  if (err == 14)
    return "Can only pass one longitude/anomaly in the set (f, M, E, l, theta, "
           "T).";
  return "An unknown error occured during reb_add_fmt().";
}


x86 assembly (clang, -O0):
<reb_string_for_particle_error>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1121 <reb_string_for_particle_error+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x2,-0xc(%rbp)
jne    113b <reb_string_for_particle_error+0x3b>
lea    0xee9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x3,-0xc(%rbp)
jne    1155 <reb_string_for_particle_error+0x55>
lea    0xf03(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x4,-0xc(%rbp)
jne    116f <reb_string_for_particle_error+0x6f>
lea    0xf0e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x5,-0xc(%rbp)
jne    1189 <reb_string_for_particle_error+0x89>
lea    0xf1b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x6,-0xc(%rbp)
jne    11a3 <reb_string_for_particle_error+0xa3>
lea    0xf5d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x7,-0xc(%rbp)
jne    11bd <reb_string_for_particle_error+0xbd>
lea    0xf58(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x8,-0xc(%rbp)
jne    11d7 <reb_string_for_particle_error+0xd7>
lea    0xfdd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0x9,-0xc(%rbp)
jne    11f1 <reb_string_for_particle_error+0xf1>
lea    0x101b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0xa,-0xc(%rbp)
jne    120b <reb_string_for_particle_error+0x10b>
lea    0x1056(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0xb,-0xc(%rbp)
jne    1225 <reb_string_for_particle_error+0x125>
lea    0x10a1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0xc,-0xc(%rbp)
jne    123f <reb_string_for_particle_error+0x13f>
lea    0x10cc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0xd,-0xc(%rbp)
jne    1259 <reb_string_for_particle_error+0x159>
lea    0x10ed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
cmpl   $0xe,-0xc(%rbp)
jne    1273 <reb_string_for_particle_error+0x173>
lea    0x10fe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    127e <reb_string_for_particle_error+0x17e>
lea    0x1135(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reb_string_for_particle_error>:
add    $0xffffffff,%edi
cmp    $0xd,%edi
ja     111a <reb_string_for_particle_error+0x1a>
movslq %edi,%rax
lea    0x12ce(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0x128e(%rip),%rax
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Cannot set e exactly to 1.\00"
@.str.1 = [52 x i8] c"Eccentricity must be greater than or equal to zero.\00"
@.str.2 = [37 x i8] c"Bound orbit (a > 0) must have e < 1.\00"
@.str.3 = [39 x i8] c"Unbound orbit (a < 0) must have e > 1.\00"
@.str.4 = [92 x i8] c"Unbound orbit can't have f beyond the range allowed by the asymptotes set by the hyperbola.\00"
@.str.5 = [21 x i8] c"Primary has no mass.\00"
@.str.6 = [159 x i8] c"Cannot mix Pal coordinates (h,k,ix,iy) with certain orbital elements (e, inc, Omega, omega, pomega, f, M, E, theta, T). Use longitude l to indicate the phase.\00"
@.str.7 = [88 x i8] c"Cannot pass cartesian coordinates and orbital elements (incl primary) at the same time.\00"
@.str.8 = [85 x i8] c"Need to pass reb_simulation object when initializing particle with orbital elements.\00"
@.str.9 = [101 x i8] c"Need to pass either semi-major axis or orbital period to initialize particle using orbital elements.\00"
@.str.10 = [69 x i8] c"Need to pass either semi-major axis or orbital period, but not both.\00"
@.str.11 = [59 x i8] c"(ix, iy) coordinates are not valid. Squared sum exceeds 4.\00"
@.str.12 = [43 x i8] c"Cannot pass both (omega, pomega) together.\00"
@.str.13 = [71 x i8] c"Can only pass one longitude/anomaly in the set (f, M, E, l, theta, T).\00"
@.str.14 = [47 x i8] c"An unknown error occured during reb_add_fmt().\00"
define i8* @reb_string_for_particle_error(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8** %2
br label %60
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %60
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 3
br i1 %13, label %14, label %15
14: ; preds = %11
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %60
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 4
br i1 %17, label %18, label %19
18: ; preds = %15
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %60
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 5
br i1 %21, label %22, label %23
22: ; preds = %19
store i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %60
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 6
br i1 %25, label %26, label %27
26: ; preds = %23
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %60
27: ; preds = %23
%28 = load i32, i32* %3
%29 = icmp eq i32 %28, 7
br i1 %29, label %30, label %31
30: ; preds = %27
store i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %60
31: ; preds = %27
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 8
br i1 %33, label %34, label %35
34: ; preds = %31
store i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %60
35: ; preds = %31
%36 = load i32, i32* %3
%37 = icmp eq i32 %36, 9
br i1 %37, label %38, label %39
38: ; preds = %35
store i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %60
39: ; preds = %35
%40 = load i32, i32* %3
%41 = icmp eq i32 %40, 10
br i1 %41, label %42, label %43
42: ; preds = %39
store i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %60
43: ; preds = %39
%44 = load i32, i32* %3
%45 = icmp eq i32 %44, 11
br i1 %45, label %46, label %47
46: ; preds = %43
store i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %60
47: ; preds = %43
%48 = load i32, i32* %3
%49 = icmp eq i32 %48, 12
br i1 %49, label %50, label %51
50: ; preds = %47
store i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %60
51: ; preds = %47
%52 = load i32, i32* %3
%53 = icmp eq i32 %52, 13
br i1 %53, label %54, label %55
54: ; preds = %51
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %60
55: ; preds = %51
%56 = load i32, i32* %3
%57 = icmp eq i32 %56, 14
br i1 %57, label %58, label %59
58: ; preds = %55
store i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %60
59: ; preds = %55
store i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %60
60: ; preds = %59, %58, %54, %50, %46, %42, %38, %34, %30, %26, %22, %18, %14, %10, %6
%61 = load i8*, i8** %2
ret i8* %61
}

LLVM IR (-O2):
@.str = [27 x i8] c"Cannot set e exactly to 1.\00"
@.str.1 = [52 x i8] c"Eccentricity must be greater than or equal to zero.\00"
@.str.2 = [37 x i8] c"Bound orbit (a > 0) must have e < 1.\00"
@.str.3 = [39 x i8] c"Unbound orbit (a < 0) must have e > 1.\00"
@.str.4 = [92 x i8] c"Unbound orbit can't have f beyond the range allowed by the asymptotes set by the hyperbola.\00"
@.str.5 = [21 x i8] c"Primary has no mass.\00"
@.str.6 = [159 x i8] c"Cannot mix Pal coordinates (h,k,ix,iy) with certain orbital elements (e, inc, Omega, omega, pomega, f, M, E, theta, T). Use longitude l to indicate the phase.\00"
@.str.7 = [88 x i8] c"Cannot pass cartesian coordinates and orbital elements (incl primary) at the same time.\00"
@.str.8 = [85 x i8] c"Need to pass reb_simulation object when initializing particle with orbital elements.\00"
@.str.9 = [101 x i8] c"Need to pass either semi-major axis or orbital period to initialize particle using orbital elements.\00"
@.str.10 = [69 x i8] c"Need to pass either semi-major axis or orbital period, but not both.\00"
@.str.11 = [59 x i8] c"(ix, iy) coordinates are not valid. Squared sum exceeds 4.\00"
@.str.12 = [43 x i8] c"Cannot pass both (omega, pomega) together.\00"
@.str.13 = [71 x i8] c"Can only pass one longitude/anomaly in the set (f, M, E, l, theta, T).\00"
@.str.14 = [47 x i8] c"An unknown error occured during reb_add_fmt().\00"
@reltable.reb_string_for_particle_error = [14 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([52 x i8]* @.str.1 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([37 x i8]* @.str.2 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.3 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([92 x i8]* @.str.4 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.5 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([159 x i8]* @.str.6 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([88 x i8]* @.str.7 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([85 x i8]* @.str.8 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([101 x i8]* @.str.9 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([69 x i8]* @.str.10 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([59 x i8]* @.str.11 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([43 x i8]* @.str.12 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([71 x i8]* @.str.13 to i64), i64 ptrtoint ([14 x i32]* @reltable.reb_string_for_particle_error to i64)) to i32)]
define i8* @reb_string_for_particle_error(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 14
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([14 x i32]* @reltable.reb_string_for_particle_error to i8*), i64 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), %1 ]
ret i8* %9
}