ServerBinaryPacket(pkt) unsigned char *pkt;
{
  switch (pkt[0]) {
  case (0x80):
    BinaryPositionShort(&pkt[1]);
    break;
  case (0x81):
    BinaryPositionLong(&pkt[1]);
    break;
  case (0x84):
    ServerBinaryPlanet(&pkt[1]);
    break;
  case (0x85):
    ServerBinaryVacant(&pkt[1]);
    break;
  case (0x86):
    ServerBinaryPing(&pkt[1]);
    break;
  default:
    Log("ServerBinaryPacket: Unrecognized packet type: 0x%x", pkt[0]);
    break;
  }
}


x86 assembly (clang, -O0):
<ServerBinaryPacket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x6,%eax
ja     11fd <ServerBinaryPacket+0x9d>
mov    -0x18(%rbp),%rax
lea    0xe70(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1040 <BinaryPositionShort@plt>
jmp    1212 <ServerBinaryPacket+0xb2>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1070 <BinaryPositionLong@plt>
jmp    1212 <ServerBinaryPacket+0xb2>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1030 <ServerBinaryPlanet@plt>
jmp    1212 <ServerBinaryPacket+0xb2>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1050 <ServerBinaryVacant@plt>
jmp    1212 <ServerBinaryPacket+0xb2>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1080 <ServerBinaryPing@plt>
jmp    1212 <ServerBinaryPacket+0xb2>
mov    -0x10(%rbp),%rax
movzbl (%rax),%esi
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1060 <Log@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ServerBinaryPacket>:
push   %rax
movzbl (%rdi),%esi
lea    -0x80(%rsi),%eax
cmp    $0x6,%al
ja     1198 <ServerBinaryPacket+0x38>
movzbl %al,%eax
lea    0xe8b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0x1,%rdi
xor    %eax,%eax
call   1040 <BinaryPositionShort@plt>
pop    %rcx
ret
add    $0x1,%rdi
xor    %eax,%eax
call   1070 <BinaryPositionLong@plt>
pop    %rcx
ret
lea    0xe7d(%rip),%rdi
xor    %eax,%eax
call   1060 <Log@plt>
pop    %rcx
ret
add    $0x1,%rdi
xor    %eax,%eax
call   1030 <ServerBinaryPlanet@plt>
pop    %rcx
ret
add    $0x1,%rdi
xor    %eax,%eax
call   1050 <ServerBinaryVacant@plt>
pop    %rcx
ret
add    $0x1,%rdi
xor    %eax,%eax
call   1080 <ServerBinaryPing@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"ServerBinaryPacket: Unrecognized packet type: 0x%x\00"
define i32 @ServerBinaryPacket(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
switch i32 %7, label %28 [
i32 128, label %8
i32 129, label %12
i32 132, label %16
i32 133, label %20
i32 134, label %24
]
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @BinaryPositionShort to i32 (i8*, ...)*)(i8* %10)
br label %34
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @BinaryPositionLong to i32 (i8*, ...)*)(i8* %14)
br label %34
16: ; preds = %1
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @ServerBinaryPlanet to i32 (i8*, ...)*)(i8* %18)
br label %34
20: ; preds = %1
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @ServerBinaryVacant to i32 (i8*, ...)*)(i8* %22)
br label %34
24: ; preds = %1
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = call i32 (i8*, ...) bitcast (i32 (...)* @ServerBinaryPing to i32 (i8*, ...)*)(i8* %26)
br label %34
28: ; preds = %1
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i64 0
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @Log to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %28, %24, %20, %16, %12, %8
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
@.str = [51 x i8] c"ServerBinaryPacket: Unrecognized packet type: 0x%x\00"
define i32 @ServerBinaryPacket(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %18 [
i8 -128, label %3
i8 -127, label %6
i8 -124, label %9
i8 -123, label %12
i8 -122, label %15
]
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @BinaryPositionShort to i32 (i8*, ...)*)(i8* %4)
br label %21
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @BinaryPositionLong to i32 (i8*, ...)*)(i8* %7)
br label %21
9: ; preds = %1
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ServerBinaryPlanet to i32 (i8*, ...)*)(i8* %10)
br label %21
12: ; preds = %1
%13 = getelementptr inbounds i8, i8* %0, i64 1
%14 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ServerBinaryVacant to i32 (i8*, ...)*)(i8* %13)
br label %21
15: ; preds = %1
%16 = getelementptr inbounds i8, i8* %0, i64 1
%17 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ServerBinaryPing to i32 (i8*, ...)*)(i8* %16)
br label %21
18: ; preds = %1
%19 = zext i8 %2 to i32
%20 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @Log to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %18, %15, %12, %9, %6, %3
ret i32 undef
}