int pointsystem_rik(int players, int alive) {
  int points[] = {6, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 0, 0, 0,
                  6, 3, 1, 0, 0, 0, 0, 0, 6, 4, 2, 1, 0, 0, 0, 0};
  int map[] = {-1, 0, 0, 1, 2, 2, 2, 3, 3};
  return points[map[players] * 8 + alive - 1] -
         points[map[players] * 8 + alive];
}


x86 assembly (clang, -O0):
<pointsystem_rik>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xed1(%rip),%rsi
mov    $0x80,%edx
call   1030 <memcpy@plt>
lea    -0xc0(%rbp),%rdi
lea    0xf39(%rip),%rsi
mov    $0x24,%edx
call   1030 <memcpy@plt>
movslq -0x4(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
shl    $0x3,%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x90(%rbp,%rax,4),%eax
movslq -0x4(%rbp),%rcx
mov    -0xc0(%rbp,%rcx,4),%ecx
shl    $0x3,%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
sub    -0x90(%rbp,%rcx,4),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointsystem_rik>:
movslq %edi,%rax
lea    0xf76(%rip),%rcx
movslq (%rcx,%rax,4),%rax
movslq %esi,%rcx
lea    (%rcx,%rax,8),%rcx
lea    0xee4(%rip),%rdx
mov    -0x4(%rdx,%rcx,4),%eax
movslq %ecx,%rcx
sub    (%rdx,%rcx,4),%eax
ret

LLVM IR (-O0):
@__const.pointsystem_rik.points = [32 x i32] [i32 6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 3, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 4, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0]
@__const.pointsystem_rik.map = [9 x i32] [i32 -1, i32 0, i32 0, i32 1, i32 2, i32 2, i32 2, i32 3, i32 3]
define i32 @pointsystem_rik(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [32 x i32]
%6 = alloca [9 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = bitcast [32 x i32]* %5 to i8*
%8 = bitcast [9 x i32]* %6 to i8*
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 %10
%12 = load i32, i32* %11
%13 = mul nsw i32 %12, 8
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [32 x i32], [32 x i32]* %5, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = mul nsw i32 %23, 8
%25 = load i32, i32* %4
%26 = add nsw i32 %24, %25
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [32 x i32], [32 x i32]* %5, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = sub nsw i32 %19, %29
ret i32 %30
}

LLVM IR (-O2):
@__const.pointsystem_rik.points = [32 x i32] [i32 6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 3, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 4, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0]
@__const.pointsystem_rik.map = [9 x i32] [i32 -1, i32 0, i32 0, i32 1, i32 2, i32 2, i32 2, i32 3, i32 3]
define i32 @pointsystem_rik(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds [9 x i32], [9 x i32]* @__const.pointsystem_rik.map, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = shl nsw i32 %5, 3
%7 = add nsw i32 %6, %1
%8 = add nsw i32 %7, -1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [32 x i32], [32 x i32]* @__const.pointsystem_rik.points, i64 0, i64 %9
%11 = load i32, i32* %10
%12 = sext i32 %7 to i64
%13 = getelementptr inbounds [32 x i32], [32 x i32]* @__const.pointsystem_rik.points, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = sub nsw i32 %11, %14
ret i32 %15
}