int give_point_difference(char rowOrColumn, char direction) {
  switch (rowOrColumn) {
  case 'r':
    switch (direction) {
    case 'N':
      return -1;
      break;
    case 'S':
      return 1;
    default:
      if (direction == 'E' || direction == 'W') {
        return 0;
      }
    }
    break;
  case 'c':
    switch (direction) {
    case 'W':
      return -1;
      break;
    case 'E':
      return 1;
    default:
      if (direction == 'N' || direction == 'S') {
        return 0;
      }
    }
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<give_point_difference>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x63,%eax
je     11a4 <give_point_difference+0xa4>
jmp    1125 <give_point_difference+0x25>
mov    -0xc(%rbp),%eax
sub    $0x72,%eax
jne    1212 <give_point_difference+0x112>
jmp    1136 <give_point_difference+0x36>
movsbl -0x6(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x4e,%eax
je     115c <give_point_difference+0x5c>
jmp    114b <give_point_difference+0x4b>
mov    -0x10(%rbp),%eax
sub    $0x53,%eax
je     1168 <give_point_difference+0x68>
jmp    1174 <give_point_difference+0x74>
movl   $0xffffffff,-0x4(%rbp)
jmp    1219 <give_point_difference+0x119>
movl   $0x1,-0x4(%rbp)
jmp    1219 <give_point_difference+0x119>
movsbl -0x6(%rbp),%eax
cmp    $0x45,%eax
je     118e <give_point_difference+0x8e>
movsbl -0x6(%rbp),%eax
cmp    $0x57,%eax
jne    119a <give_point_difference+0x9a>
movl   $0x0,-0x4(%rbp)
jmp    1219 <give_point_difference+0x119>
jmp    119f <give_point_difference+0x9f>
jmp    1212 <give_point_difference+0x112>
movsbl -0x6(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x45,%eax
je     11d6 <give_point_difference+0xd6>
jmp    11b9 <give_point_difference+0xb9>
mov    -0x14(%rbp),%eax
sub    $0x57,%eax
jne    11e2 <give_point_difference+0xe2>
jmp    11ca <give_point_difference+0xca>
movl   $0xffffffff,-0x4(%rbp)
jmp    1219 <give_point_difference+0x119>
movl   $0x1,-0x4(%rbp)
jmp    1219 <give_point_difference+0x119>
movsbl -0x6(%rbp),%eax
cmp    $0x4e,%eax
je     11fc <give_point_difference+0xfc>
movsbl -0x6(%rbp),%eax
cmp    $0x53,%eax
jne    1208 <give_point_difference+0x108>
movl   $0x0,-0x4(%rbp)
jmp    1219 <give_point_difference+0x119>
jmp    120d <give_point_difference+0x10d>
jmp    1212 <give_point_difference+0x112>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<give_point_difference>:
cmp    $0x63,%edi
je     111b <give_point_difference+0x1b>
xor    %eax,%eax
cmp    $0x72,%edi
jne    1130 <give_point_difference+0x30>
xor    %ecx,%ecx
cmp    $0x53,%sil
sete   %cl
cmp    $0x4e,%sil
jmp    1128 <give_point_difference+0x28>
xor    %ecx,%ecx
cmp    $0x45,%sil
sete   %cl
cmp    $0x57,%sil
mov    $0xffffffff,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @give_point_difference(i8 signext %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
switch i32 %7, label %40 [
i32 114, label %8
i32 99, label %24
]
8: ; preds = %2
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
switch i32 %10, label %13 [
i32 78, label %11
i32 83, label %12
]
11: ; preds = %8
store i32 -1, i32* %3
br label %41
12: ; preds = %8
store i32 1, i32* %3
br label %41
13: ; preds = %8
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 69
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i8, i8* %5
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 87
br i1 %20, label %21, label %22
21: ; preds = %17, %13
store i32 0, i32* %3
br label %41
22: ; preds = %17
br label %23
23: ; preds = %22
br label %40
24: ; preds = %2
%25 = load i8, i8* %5
%26 = sext i8 %25 to i32
switch i32 %26, label %29 [
i32 87, label %27
i32 69, label %28
]
27: ; preds = %24
store i32 -1, i32* %3
br label %41
28: ; preds = %24
store i32 1, i32* %3
br label %41
29: ; preds = %24
%30 = load i8, i8* %5
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 78
br i1 %32, label %37, label %33
33: ; preds = %29
%34 = load i8, i8* %5
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 83
br i1 %36, label %37, label %38
37: ; preds = %33, %29
store i32 0, i32* %3
br label %41
38: ; preds = %33
br label %39
39: ; preds = %38
br label %40
40: ; preds = %2, %39, %23
store i32 0, i32* %3
br label %41
41: ; preds = %40, %37, %28, %27, %21, %12, %11
%42 = load i32, i32* %3
ret i32 %42
}

LLVM IR (-O2):
define i32 @give_point_difference(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
switch i32 %3, label %14 [
i32 114, label %4
i32 99, label %9
]
4: ; preds = %2
%5 = icmp eq i8 %1, 83
%6 = zext i1 %5 to i32
%7 = icmp eq i8 %1, 78
%8 = select i1 %7, i32 -1, i32 %6
br label %14
9: ; preds = %2
%10 = icmp eq i8 %1, 69
%11 = zext i1 %10 to i32
%12 = icmp eq i8 %1, 87
%13 = select i1 %12, i32 -1, i32 %11
br label %14
14: ; preds = %9, %4, %2
%15 = phi i32 [ 0, %2 ], [ %8, %4 ], [ %13, %9 ]
ret i32 %15
}