ClientBinaryPacket(c, pkt) int c;
unsigned char *pkt;
{
  switch (pkt[0]) {
  case (0x83):
    ClientBinaryPosition(c, &pkt[1], 0);
    break;
  case (0x82):
    ClientBinaryPosition(c, &pkt[1], 1);
    break;
  case (0x86):
    ClientBinaryPing(c, &pkt[1]);
    break;
  default:
    Log("ClientBinaryPacket: Unrecognized packet type: 0x%x", pkt[0]);
    break;
  }
}


x86 assembly (clang, -O0):
<ClientBinaryPacket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x82,%eax
je     1198 <ClientBinaryPacket+0x68>
jmp    1159 <ClientBinaryPacket+0x29>
mov    -0x14(%rbp),%eax
sub    $0x83,%eax
je     117f <ClientBinaryPacket+0x4f>
jmp    116c <ClientBinaryPacket+0x3c>
mov    -0x14(%rbp),%eax
sub    $0x86,%eax
je     11b4 <ClientBinaryPacket+0x84>
jmp    11cb <ClientBinaryPacket+0x9b>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <ClientBinaryPosition@plt>
jmp    11e0 <ClientBinaryPacket+0xb0>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <ClientBinaryPosition@plt>
jmp    11e0 <ClientBinaryPacket+0xb0>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
mov    $0x0,%al
call   1050 <ClientBinaryPing@plt>
jmp    11e0 <ClientBinaryPacket+0xb0>
mov    -0x10(%rbp),%rax
movzbl (%rax),%esi
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <Log@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClientBinaryPacket>:
push   %rax
movzbl (%rsi),%eax
cmp    $0x82,%eax
je     114b <ClientBinaryPacket+0x1b>
cmp    $0x86,%al
je     115d <ClientBinaryPacket+0x2d>
cmp    $0x83,%al
jne    116a <ClientBinaryPacket+0x3a>
add    $0x1,%rsi
xor    %edx,%edx
jmp    1154 <ClientBinaryPacket+0x24>
add    $0x1,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <ClientBinaryPosition@plt>
pop    %rcx
ret
add    $0x1,%rsi
xor    %eax,%eax
call   1050 <ClientBinaryPing@plt>
pop    %rcx
ret
lea    0xe8f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <Log@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"ClientBinaryPacket: Unrecognized packet type: 0x%x\00"
define i32 @ClientBinaryPacket(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
switch i32 %9, label %25 [
i32 131, label %10
i32 130, label %15
i32 134, label %20
]
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @ClientBinaryPosition to i32 (i32, i8*, i32, ...)*)(i32 %11, i8* %13, i32 0)
br label %31
15: ; preds = %2
%16 = load i32, i32* %4
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @ClientBinaryPosition to i32 (i32, i8*, i32, ...)*)(i32 %16, i8* %18, i32 1)
br label %31
20: ; preds = %2
%21 = load i32, i32* %4
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 1
%24 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @ClientBinaryPing to i32 (i32, i8*, ...)*)(i32 %21, i8* %23)
br label %31
25: ; preds = %2
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = 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 %29)
br label %31
31: ; preds = %25, %20, %15, %10
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@.str = [51 x i8] c"ClientBinaryPacket: Unrecognized packet type: 0x%x\00"
define i32 @ClientBinaryPacket(i32 %0, i8* %1) {
%3 = load i8, i8* %1
switch i8 %3, label %13 [
i8 -125, label %4
i8 -126, label %7
i8 -122, label %10
]
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 1
%6 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @ClientBinaryPosition to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %5, i32 0)
br label %16
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %1, i64 1
%9 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @ClientBinaryPosition to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %8, i32 1)
br label %16
10: ; preds = %2
%11 = getelementptr inbounds i8, i8* %1, i64 1
%12 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @ClientBinaryPing to i32 (i32, i8*, ...)*)(i32 %0, i8* %11)
br label %16
13: ; preds = %2
%14 = zext i8 %3 to i32
%15 = 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 %14)
br label %16
16: ; preds = %13, %10, %7, %4
ret i32 undef
}