#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ recv_alive();
int /*<<< orphan*/ recv_begin(struct ship *);
int /*<<< orphan*/ recv_captain(struct ship *, char const *);
int /*<<< orphan*/ recv_captured(struct ship *, long);
int /*<<< orphan*/ recv_class(struct ship *, long);
int /*<<< orphan*/ recv_col(struct ship *, long);
int /*<<< orphan*/ recv_crew(struct ship *, long, long, long);
int /*<<< orphan*/ recv_dbp(struct ship *, long, long, long, long);
int /*<<< orphan*/ recv_ddead();
int /*<<< orphan*/ recv_dir(struct ship *, long);
int /*<<< orphan*/ recv_drift(struct ship *, long);
int /*<<< orphan*/ recv_end(struct ship *);
int /*<<< orphan*/ recv_explode(struct ship *, long);
int /*<<< orphan*/ recv_foul(struct ship *, long);
int /*<<< orphan*/ recv_fs(struct ship *, long);
int /*<<< orphan*/ recv_grap(struct ship *, long);
int /*<<< orphan*/ recv_gunl(struct ship *, long, long);
int /*<<< orphan*/ recv_gunr(struct ship *, long, long);
int /*<<< orphan*/ recv_hull(struct ship *, long);
int /*<<< orphan*/ recv_move(struct ship *, char const *);
int /*<<< orphan*/ recv_obp(struct ship *, long, long, long, long);
int /*<<< orphan*/ recv_pcrew(struct ship *, long);
int /*<<< orphan*/ recv_points(struct ship *, long);
int /*<<< orphan*/ recv_qual(struct ship *, long);
int /*<<< orphan*/ recv_rig1(struct ship *, long);
int /*<<< orphan*/ recv_rig2(struct ship *, long);
int /*<<< orphan*/ recv_rig3(struct ship *, long);
int /*<<< orphan*/ recv_rig4(struct ship *, long);
int /*<<< orphan*/ recv_rigg(struct ship *, long, long, long, long);
int /*<<< orphan*/ recv_row(struct ship *, long);
int /*<<< orphan*/ recv_signal(struct ship *, char const *);
int /*<<< orphan*/ recv_sink(struct ship *, long);
int /*<<< orphan*/ recv_struck(struct ship *, long);
int /*<<< orphan*/ recv_ta(struct ship *, long);
int /*<<< orphan*/ recv_turn(long);
int /*<<< orphan*/ recv_unfoul(struct ship *, long, long);
int /*<<< orphan*/ recv_ungrap(struct ship *, long, long);
int /*<<< orphan*/ recv_wind(long, long);
int /*<<< orphan*/ stderr;
int sync_update(int type, struct ship *ship, const char *astr, long a, long b,
                long c, long d) {
  switch (type) {
  case 1:
    recv_captain(ship, astr);
    break;
  case 2:
    recv_captured(ship, a);
    break;
  case 3:
    recv_class(ship, a);
    break;
  case 4:
    recv_crew(ship, a, b, c);
    break;
  case 5:
    recv_dbp(ship, a, b, c, d);
    break;
  case 6:
    recv_drift(ship, a);
    break;
  case 7:
    recv_explode(ship, a);
    break;
  case 9:
    recv_foul(ship, a);
    break;
  case 10:
    recv_gunl(ship, a, b);
    break;
  case 11:
    recv_gunr(ship, a, b);
    break;
  case 12:
    recv_hull(ship, a);
    break;
  case 13:
    recv_move(ship, astr);
    break;
  case 14:
    recv_obp(ship, a, b, c, d);
    break;
  case 15:
    recv_pcrew(ship, a);
    break;
  case 16:
    recv_unfoul(ship, a, b);
    break;
  case 17:
    recv_points(ship, a);
    break;
  case 18:
    recv_qual(ship, a);
    break;
  case 19:
    recv_ungrap(ship, a, b);
    break;
  case 20:
    recv_rigg(ship, a, b, c, d);
    break;
  case 21:
    recv_col(ship, a);
    break;
  case 22:
    recv_dir(ship, a);
    break;
  case 23:
    recv_row(ship, a);
    break;
  case 24:
    recv_signal(ship, astr);
    break;
  case 25:
    recv_sink(ship, a);
    break;
  case 26:
    recv_struck(ship, a);
    break;
  case 27:
    recv_ta(ship, a);
    break;
  case 28:
    recv_alive();
    break;
  case 29:
    recv_turn(a);
    break;
  case 30:
    recv_wind(a, b);
    break;
  case 31:
    recv_fs(ship, a);
    break;
  case 32:
    recv_grap(ship, a);
    break;
  case 33:
    recv_rig1(ship, a);
    break;
  case 34:
    recv_rig2(ship, a);
    break;
  case 35:
    recv_rig3(ship, a);
    break;
  case 36:
    recv_rig4(ship, a);
    break;
  case 37:
    recv_begin(ship);
    break;
  case 38:
    recv_end(ship);
    break;
  case 39:
    recv_ddead();
    break;
  default:
    fprintf(stderr, "sync_update: unknown type %d\r\n", type);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sync_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x26,%eax
ja     168c <sync_update+0x31c>
mov    -0x38(%rbp),%rax
lea    0xc4d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1150 <recv_captain@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   11f0 <recv_captured@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1240 <recv_class@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   11d0 <recv_crew@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1190 <recv_dbp@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1100 <recv_drift@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <recv_explode@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   11a0 <recv_foul@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1200 <recv_gunl@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1210 <recv_gunr@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   11c0 <recv_hull@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <recv_move@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1290 <recv_obp@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10c0 <recv_pcrew@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1230 <recv_unfoul@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10a0 <recv_points@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <recv_qual@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   10e0 <recv_ungrap@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1050 <recv_rigg@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1120 <recv_col@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <recv_dir@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1180 <recv_row@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1280 <recv_signal@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1130 <recv_sink@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10b0 <recv_struck@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   11e0 <recv_ta@plt>
jmp    16b0 <sync_update+0x340>
mov    $0x0,%al
call   1070 <recv_alive@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x20(%rbp),%rdi
call   11b0 <recv_turn@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10f0 <recv_wind@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <recv_fs@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1220 <recv_grap@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1250 <recv_rig1@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1160 <recv_rig2@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1260 <recv_rig3@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1140 <recv_rig4@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
call   10d0 <recv_begin@plt>
jmp    16b0 <sync_update+0x340>
mov    -0x10(%rbp),%rdi
call   1110 <recv_end@plt>
jmp    16b0 <sync_update+0x340>
mov    $0x0,%al
call   1270 <recv_ddead@plt>
jmp    16b0 <sync_update+0x340>
mov    0x294d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0x9fd(%rip),%rsi
call   1170 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    16b7 <sync_update+0x347>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_update>:
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
cmp    $0x26,%edi
ja     1421 <sync_update+0xb1>
mov    0x10(%rsp),%r10
lea    0xc75(%rip),%rax
movslq (%rax,%rdi,4),%rdi
add    %rax,%rdi
jmp    *%rdi
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1150 <recv_captain@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   11f0 <recv_captured@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1240 <recv_class@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %r9,%rcx
call   11d0 <recv_crew@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %r9,%rcx
mov    %r10,%r8
call   1190 <recv_dbp@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1100 <recv_drift@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1030 <recv_explode@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    0x2bb8(%rip),%rax
mov    (%rax),%edi
lea    0xc6b(%rip),%rsi
mov    %ebx,%edx
call   1170 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   11a0 <recv_foul@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
call   1200 <recv_gunl@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
call   1210 <recv_gunr@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   11c0 <recv_hull@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <recv_move@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %r9,%rcx
mov    %r10,%r8
call   1290 <recv_obp@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   10c0 <recv_pcrew@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
call   1230 <recv_unfoul@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   10a0 <recv_points@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1060 <recv_qual@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
call   10e0 <recv_ungrap@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %r9,%rcx
mov    %r10,%r8
call   1050 <recv_rigg@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1120 <recv_col@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1080 <recv_dir@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1180 <recv_row@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1280 <recv_signal@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1130 <recv_sink@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   10b0 <recv_struck@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   11e0 <recv_ta@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <recv_alive@plt>
jmp    165d <sync_update+0x2ed>
mov    %rcx,%rdi
call   11b0 <recv_turn@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rcx,%rdi
mov    %r8,%rsi
call   10f0 <recv_wind@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1090 <recv_fs@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1220 <recv_grap@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1250 <recv_rig1@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1160 <recv_rig2@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1260 <recv_rig3@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1140 <recv_rig4@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
call   10d0 <recv_begin@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
mov    %rsi,%rdi
call   1110 <recv_end@plt>
xor    %ebx,%ebx
jmp    165d <sync_update+0x2ed>
xor    %ebx,%ebx
xor    %eax,%eax
call   1270 <recv_ddead@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ship = type { i32 }
@stderr = global i32 0
@.str = [31 x i8] c"sync_update: unknown type %d\0D\0A\00"
define i32 @sync_update(i32 %0, %struct.ship* %1, i8* %2, i64 %3, i64 %4, i64 %5, i64 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.ship*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
store i32 %0, i32* %9
store %struct.ship* %1, %struct.ship** %10
store i8* %2, i8** %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store i64 %5, i64* %14
store i64 %6, i64* %15
%16 = load i32, i32* %9
switch i32 %16, label %177 [
i32 1, label %17
i32 2, label %21
i32 3, label %25
i32 4, label %29
i32 5, label %35
i32 6, label %42
i32 7, label %46
i32 9, label %50
i32 10, label %54
i32 11, label %59
i32 12, label %64
i32 13, label %68
i32 14, label %72
i32 15, label %79
i32 16, label %83
i32 17, label %88
i32 18, label %92
i32 19, label %96
i32 20, label %101
i32 21, label %108
i32 22, label %112
i32 23, label %116
i32 24, label %120
i32 25, label %124
i32 26, label %128
i32 27, label %132
i32 28, label %136
i32 29, label %138
i32 30, label %141
i32 31, label %145
i32 32, label %149
i32 33, label %153
i32 34, label %157
i32 35, label %161
i32 36, label %165
i32 37, label %169
i32 38, label %172
i32 39, label %175
]
17: ; preds = %7
%18 = load %struct.ship*, %struct.ship** %10
%19 = load i8*, i8** %11
%20 = call i32 @recv_captain(%struct.ship* %18, i8* %19)
br label %181
21: ; preds = %7
%22 = load %struct.ship*, %struct.ship** %10
%23 = load i64, i64* %12
%24 = call i32 @recv_captured(%struct.ship* %22, i64 %23)
br label %181
25: ; preds = %7
%26 = load %struct.ship*, %struct.ship** %10
%27 = load i64, i64* %12
%28 = call i32 @recv_class(%struct.ship* %26, i64 %27)
br label %181
29: ; preds = %7
%30 = load %struct.ship*, %struct.ship** %10
%31 = load i64, i64* %12
%32 = load i64, i64* %13
%33 = load i64, i64* %14
%34 = call i32 @recv_crew(%struct.ship* %30, i64 %31, i64 %32, i64 %33)
br label %181
35: ; preds = %7
%36 = load %struct.ship*, %struct.ship** %10
%37 = load i64, i64* %12
%38 = load i64, i64* %13
%39 = load i64, i64* %14
%40 = load i64, i64* %15
%41 = call i32 @recv_dbp(%struct.ship* %36, i64 %37, i64 %38, i64 %39, i64 %40)
br label %181
42: ; preds = %7
%43 = load %struct.ship*, %struct.ship** %10
%44 = load i64, i64* %12
%45 = call i32 @recv_drift(%struct.ship* %43, i64 %44)
br label %181
46: ; preds = %7
%47 = load %struct.ship*, %struct.ship** %10
%48 = load i64, i64* %12
%49 = call i32 @recv_explode(%struct.ship* %47, i64 %48)
br label %181
50: ; preds = %7
%51 = load %struct.ship*, %struct.ship** %10
%52 = load i64, i64* %12
%53 = call i32 @recv_foul(%struct.ship* %51, i64 %52)
br label %181
54: ; preds = %7
%55 = load %struct.ship*, %struct.ship** %10
%56 = load i64, i64* %12
%57 = load i64, i64* %13
%58 = call i32 @recv_gunl(%struct.ship* %55, i64 %56, i64 %57)
br label %181
59: ; preds = %7
%60 = load %struct.ship*, %struct.ship** %10
%61 = load i64, i64* %12
%62 = load i64, i64* %13
%63 = call i32 @recv_gunr(%struct.ship* %60, i64 %61, i64 %62)
br label %181
64: ; preds = %7
%65 = load %struct.ship*, %struct.ship** %10
%66 = load i64, i64* %12
%67 = call i32 @recv_hull(%struct.ship* %65, i64 %66)
br label %181
68: ; preds = %7
%69 = load %struct.ship*, %struct.ship** %10
%70 = load i8*, i8** %11
%71 = call i32 @recv_move(%struct.ship* %69, i8* %70)
br label %181
72: ; preds = %7
%73 = load %struct.ship*, %struct.ship** %10
%74 = load i64, i64* %12
%75 = load i64, i64* %13
%76 = load i64, i64* %14
%77 = load i64, i64* %15
%78 = call i32 @recv_obp(%struct.ship* %73, i64 %74, i64 %75, i64 %76, i64 %77)
br label %181
79: ; preds = %7
%80 = load %struct.ship*, %struct.ship** %10
%81 = load i64, i64* %12
%82 = call i32 @recv_pcrew(%struct.ship* %80, i64 %81)
br label %181
83: ; preds = %7
%84 = load %struct.ship*, %struct.ship** %10
%85 = load i64, i64* %12
%86 = load i64, i64* %13
%87 = call i32 @recv_unfoul(%struct.ship* %84, i64 %85, i64 %86)
br label %181
88: ; preds = %7
%89 = load %struct.ship*, %struct.ship** %10
%90 = load i64, i64* %12
%91 = call i32 @recv_points(%struct.ship* %89, i64 %90)
br label %181
92: ; preds = %7
%93 = load %struct.ship*, %struct.ship** %10
%94 = load i64, i64* %12
%95 = call i32 @recv_qual(%struct.ship* %93, i64 %94)
br label %181
96: ; preds = %7
%97 = load %struct.ship*, %struct.ship** %10
%98 = load i64, i64* %12
%99 = load i64, i64* %13
%100 = call i32 @recv_ungrap(%struct.ship* %97, i64 %98, i64 %99)
br label %181
101: ; preds = %7
%102 = load %struct.ship*, %struct.ship** %10
%103 = load i64, i64* %12
%104 = load i64, i64* %13
%105 = load i64, i64* %14
%106 = load i64, i64* %15
%107 = call i32 @recv_rigg(%struct.ship* %102, i64 %103, i64 %104, i64 %105, i64 %106)
br label %181
108: ; preds = %7
%109 = load %struct.ship*, %struct.ship** %10
%110 = load i64, i64* %12
%111 = call i32 @recv_col(%struct.ship* %109, i64 %110)
br label %181
112: ; preds = %7
%113 = load %struct.ship*, %struct.ship** %10
%114 = load i64, i64* %12
%115 = call i32 @recv_dir(%struct.ship* %113, i64 %114)
br label %181
116: ; preds = %7
%117 = load %struct.ship*, %struct.ship** %10
%118 = load i64, i64* %12
%119 = call i32 @recv_row(%struct.ship* %117, i64 %118)
br label %181
120: ; preds = %7
%121 = load %struct.ship*, %struct.ship** %10
%122 = load i8*, i8** %11
%123 = call i32 @recv_signal(%struct.ship* %121, i8* %122)
br label %181
124: ; preds = %7
%125 = load %struct.ship*, %struct.ship** %10
%126 = load i64, i64* %12
%127 = call i32 @recv_sink(%struct.ship* %125, i64 %126)
br label %181
128: ; preds = %7
%129 = load %struct.ship*, %struct.ship** %10
%130 = load i64, i64* %12
%131 = call i32 @recv_struck(%struct.ship* %129, i64 %130)
br label %181
132: ; preds = %7
%133 = load %struct.ship*, %struct.ship** %10
%134 = load i64, i64* %12
%135 = call i32 @recv_ta(%struct.ship* %133, i64 %134)
br label %181
136: ; preds = %7
%137 = call i32 (...) @recv_alive()
br label %181
138: ; preds = %7
%139 = load i64, i64* %12
%140 = call i32 @recv_turn(i64 %139)
br label %181
141: ; preds = %7
%142 = load i64, i64* %12
%143 = load i64, i64* %13
%144 = call i32 @recv_wind(i64 %142, i64 %143)
br label %181
145: ; preds = %7
%146 = load %struct.ship*, %struct.ship** %10
%147 = load i64, i64* %12
%148 = call i32 @recv_fs(%struct.ship* %146, i64 %147)
br label %181
149: ; preds = %7
%150 = load %struct.ship*, %struct.ship** %10
%151 = load i64, i64* %12
%152 = call i32 @recv_grap(%struct.ship* %150, i64 %151)
br label %181
153: ; preds = %7
%154 = load %struct.ship*, %struct.ship** %10
%155 = load i64, i64* %12
%156 = call i32 @recv_rig1(%struct.ship* %154, i64 %155)
br label %181
157: ; preds = %7
%158 = load %struct.ship*, %struct.ship** %10
%159 = load i64, i64* %12
%160 = call i32 @recv_rig2(%struct.ship* %158, i64 %159)
br label %181
161: ; preds = %7
%162 = load %struct.ship*, %struct.ship** %10
%163 = load i64, i64* %12
%164 = call i32 @recv_rig3(%struct.ship* %162, i64 %163)
br label %181
165: ; preds = %7
%166 = load %struct.ship*, %struct.ship** %10
%167 = load i64, i64* %12
%168 = call i32 @recv_rig4(%struct.ship* %166, i64 %167)
br label %181
169: ; preds = %7
%170 = load %struct.ship*, %struct.ship** %10
%171 = call i32 @recv_begin(%struct.ship* %170)
br label %181
172: ; preds = %7
%173 = load %struct.ship*, %struct.ship** %10
%174 = call i32 @recv_end(%struct.ship* %173)
br label %181
175: ; preds = %7
%176 = call i32 (...) @recv_ddead()
br label %181
177: ; preds = %7
%178 = load i32, i32* @stderr
%179 = load i32, i32* %9
%180 = call i32 @fprintf(i32 %178, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %179)
store i32 -1, i32* %8
br label %182
181: ; preds = %175, %172, %169, %165, %161, %157, %153, %149, %145, %141, %138, %136, %132, %128, %124, %120, %116, %112, %108, %101, %96, %92, %88, %83, %79, %72, %68, %64, %59, %54, %50, %46, %42, %35, %29, %25, %21, %17
store i32 0, i32* %8
br label %182
182: ; preds = %181, %177
%183 = load i32, i32* %8
ret i32 %183
}

LLVM IR (-O2):
%struct.ship = type { i32 }
@stderr = global i32 0
@.str = [31 x i8] c"sync_update: unknown type %d\0D\0A\00"
define i32 @sync_update(i32 %0, %struct.ship* %1, i8* %2, i64 %3, i64 %4, i64 %5, i64 %6) {
switch i32 %0, label %84 [
i32 1, label %8
i32 2, label %10
i32 3, label %12
i32 4, label %14
i32 5, label %16
i32 6, label %18
i32 7, label %20
i32 9, label %22
i32 10, label %24
i32 11, label %26
i32 12, label %28
i32 13, label %30
i32 14, label %32
i32 15, label %34
i32 16, label %36
i32 17, label %38
i32 18, label %40
i32 19, label %42
i32 20, label %44
i32 21, label %46
i32 22, label %48
i32 23, label %50
i32 24, label %52
i32 25, label %54
i32 26, label %56
i32 27, label %58
i32 28, label %60
i32 29, label %62
i32 30, label %64
i32 31, label %66
i32 32, label %68
i32 33, label %70
i32 34, label %72
i32 35, label %74
i32 36, label %76
i32 37, label %78
i32 38, label %80
i32 39, label %82
]
8: ; preds = %7
%9 = tail call i32 @recv_captain(%struct.ship* %1, i8* %2)
br label %87
10: ; preds = %7
%11 = tail call i32 @recv_captured(%struct.ship* %1, i64 %3)
br label %87
12: ; preds = %7
%13 = tail call i32 @recv_class(%struct.ship* %1, i64 %3)
br label %87
14: ; preds = %7
%15 = tail call i32 @recv_crew(%struct.ship* %1, i64 %3, i64 %4, i64 %5)
br label %87
16: ; preds = %7
%17 = tail call i32 @recv_dbp(%struct.ship* %1, i64 %3, i64 %4, i64 %5, i64 %6)
br label %87
18: ; preds = %7
%19 = tail call i32 @recv_drift(%struct.ship* %1, i64 %3)
br label %87
20: ; preds = %7
%21 = tail call i32 @recv_explode(%struct.ship* %1, i64 %3)
br label %87
22: ; preds = %7
%23 = tail call i32 @recv_foul(%struct.ship* %1, i64 %3)
br label %87
24: ; preds = %7
%25 = tail call i32 @recv_gunl(%struct.ship* %1, i64 %3, i64 %4)
br label %87
26: ; preds = %7
%27 = tail call i32 @recv_gunr(%struct.ship* %1, i64 %3, i64 %4)
br label %87
28: ; preds = %7
%29 = tail call i32 @recv_hull(%struct.ship* %1, i64 %3)
br label %87
30: ; preds = %7
%31 = tail call i32 @recv_move(%struct.ship* %1, i8* %2)
br label %87
32: ; preds = %7
%33 = tail call i32 @recv_obp(%struct.ship* %1, i64 %3, i64 %4, i64 %5, i64 %6)
br label %87
34: ; preds = %7
%35 = tail call i32 @recv_pcrew(%struct.ship* %1, i64 %3)
br label %87
36: ; preds = %7
%37 = tail call i32 @recv_unfoul(%struct.ship* %1, i64 %3, i64 %4)
br label %87
38: ; preds = %7
%39 = tail call i32 @recv_points(%struct.ship* %1, i64 %3)
br label %87
40: ; preds = %7
%41 = tail call i32 @recv_qual(%struct.ship* %1, i64 %3)
br label %87
42: ; preds = %7
%43 = tail call i32 @recv_ungrap(%struct.ship* %1, i64 %3, i64 %4)
br label %87
44: ; preds = %7
%45 = tail call i32 @recv_rigg(%struct.ship* %1, i64 %3, i64 %4, i64 %5, i64 %6)
br label %87
46: ; preds = %7
%47 = tail call i32 @recv_col(%struct.ship* %1, i64 %3)
br label %87
48: ; preds = %7
%49 = tail call i32 @recv_dir(%struct.ship* %1, i64 %3)
br label %87
50: ; preds = %7
%51 = tail call i32 @recv_row(%struct.ship* %1, i64 %3)
br label %87
52: ; preds = %7
%53 = tail call i32 @recv_signal(%struct.ship* %1, i8* %2)
br label %87
54: ; preds = %7
%55 = tail call i32 @recv_sink(%struct.ship* %1, i64 %3)
br label %87
56: ; preds = %7
%57 = tail call i32 @recv_struck(%struct.ship* %1, i64 %3)
br label %87
58: ; preds = %7
%59 = tail call i32 @recv_ta(%struct.ship* %1, i64 %3)
br label %87
60: ; preds = %7
%61 = tail call i32 (...) @recv_alive()
br label %87
62: ; preds = %7
%63 = tail call i32 @recv_turn(i64 %3)
br label %87
64: ; preds = %7
%65 = tail call i32 @recv_wind(i64 %3, i64 %4)
br label %87
66: ; preds = %7
%67 = tail call i32 @recv_fs(%struct.ship* %1, i64 %3)
br label %87
68: ; preds = %7
%69 = tail call i32 @recv_grap(%struct.ship* %1, i64 %3)
br label %87
70: ; preds = %7
%71 = tail call i32 @recv_rig1(%struct.ship* %1, i64 %3)
br label %87
72: ; preds = %7
%73 = tail call i32 @recv_rig2(%struct.ship* %1, i64 %3)
br label %87
74: ; preds = %7
%75 = tail call i32 @recv_rig3(%struct.ship* %1, i64 %3)
br label %87
76: ; preds = %7
%77 = tail call i32 @recv_rig4(%struct.ship* %1, i64 %3)
br label %87
78: ; preds = %7
%79 = tail call i32 @recv_begin(%struct.ship* %1)
br label %87
80: ; preds = %7
%81 = tail call i32 @recv_end(%struct.ship* %1)
br label %87
82: ; preds = %7
%83 = tail call i32 (...) @recv_ddead()
br label %87
84: ; preds = %7
%85 = load i32, i32* @stderr
%86 = tail call i32 @fprintf(i32 %85, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %87
87: ; preds = %8, %10, %12, %14, %16, %18, %20, %22, %24, %26, %28, %30, %32, %34, %36, %38, %40, %42, %44, %46, %48, %50, %52, %54, %56, %58, %60, %62, %64, %66, %68, %70, %72, %74, %76, %78, %80, %82, %84
%88 = phi i32 [ -1, %84 ], [ 0, %82 ], [ 0, %80 ], [ 0, %78 ], [ 0, %76 ], [ 0, %74 ], [ 0, %72 ], [ 0, %70 ], [ 0, %68 ], [ 0, %66 ], [ 0, %64 ], [ 0, %62 ], [ 0, %60 ], [ 0, %58 ], [ 0, %56 ], [ 0, %54 ], [ 0, %52 ], [ 0, %50 ], [ 0, %48 ], [ 0, %46 ], [ 0, %44 ], [ 0, %42 ], [ 0, %40 ], [ 0, %38 ], [ 0, %36 ], [ 0, %34 ], [ 0, %32 ], [ 0, %30 ], [ 0, %28 ], [ 0, %26 ], [ 0, %24 ], [ 0, %22 ], [ 0, %20 ], [ 0, %18 ], [ 0, %16 ], [ 0, %14 ], [ 0, %12 ], [ 0, %10 ], [ 0, %8 ]
ret i32 %88
}