#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 */

/* Variables and functions */
int /*<<< orphan*/ trace(int, char *, int, ...);
int decode_trackstat(unsigned int stat, int *sys, int *code, int *track,
                     int *plock, int *clock, int *parity, int *halfc) {
  int satsys, sigtype, freq = 0;
  *track = stat & 0x1F;
  *plock = (stat >> 10) & 1;
  *parity = (stat >> 11) & 1;
  *clock = (stat >> 12) & 1;
  satsys = (stat >> 16) & 7;
  *halfc = (stat >> 28) & 1;
  sigtype = (stat >> 21) & 0x1F;
  switch (satsys) {
  case 0:
    *sys = 0x01;
    break;
  case 1:
    *sys = 0x04;
    break;
  case 2:
    *sys = 0x02;
    break;
  case 3:
    *sys = 0x08;
    break;
  case 4:
    *sys = 0x20;
    break;
  case 5:
    *sys = 0x10;
    break;
  default:
    trace(2, "oem4 unknown system: sys=%d\n", satsys);
    return -1;
  }
  if (*sys == 0x01 || *sys == 0x10) {
    switch (sigtype) {
    case 0:
      freq = 0;
      *code = 1;
      break;
    case 5:
      freq = 0;
      *code = 2;
      break;
    case 9:
      freq = 1;
      *code = 15;
      break;
    case 14:
      freq = 2;
      *code = 25;
      break;
    case 17:
      freq = 1;
      *code = 18;
      break;
    default:
      freq = -1;
      break;
    }
  } else if (*sys == 0x04) {
    switch (sigtype) {
    case 0:
      freq = 0;
      *code = 1;
      break;
    case 1:
      freq = 1;
      *code = 14;
      break;
    case 5:
      freq = 1;
      *code = 19;
      break;
    default:
      freq = -1;
      break;
    }
  } else if (*sys == 0x08) {
    switch (sigtype) {
    case 1:
      freq = 0;
      *code = 11;
      break;
    case 2:
      freq = 0;
      *code = 1;
      break;
    case 12:
      freq = 2;
      *code = 25;
      break;
    case 17:
      freq = 4;
      *code = 28;
      break;
    case 20:
      freq = 5;
      *code = 38;
      break;
    default:
      freq = -1;
      break;
    }
  } else if (*sys == 0x20) {
    switch (sigtype) {
    case 0:
      freq = 0;
      *code = 47;
      break;
    case 1:
      freq = 1;
      *code = 27;
      break;
    case 4:
      freq = 0;
      *code = 47;
      break;
    case 5:
      freq = 1;
      *code = 27;
      break;
    default:
      freq = -1;
      break;
    }
  } else if (*sys == 0x02) {
    switch (sigtype) {
    case 0:
      freq = 0;
      *code = 1;
      break;
    case 6:
      freq = 2;
      *code = 24;
      break;
    default:
      freq = -1;
      break;
    }
  }
  if (freq < 0) {
    trace(2, "oem4 signal type error: sys=%d sigtype=%d\n", *sys, sigtype);
    return -1;
  }
  return freq;
}


x86 assembly (clang, -O0):
<decode_trackstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x18(%rbp),%rax
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)
movl   $0x0,-0x3c(%rbp)
mov    -0x8(%rbp),%ecx
and    $0x1f,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
shr    $0xa,%ecx
and    $0x1,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
shr    $0xb,%ecx
and    $0x1,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
shr    $0xc,%ecx
and    $0x1,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
movzwl -0x6(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%ecx
shr    $0x1c,%ecx
and    $0x1,%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
shr    $0x15,%eax
and    $0x1f,%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
mov    %rax,-0x48(%rbp)
sub    $0x5,%rax
ja     121b <decode_trackstat+0x10b>
mov    -0x48(%rbp),%rax
lea    0xe48(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    123d <decode_trackstat+0x12d>
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
jmp    123d <decode_trackstat+0x12d>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
jmp    123d <decode_trackstat+0x12d>
mov    -0x10(%rbp),%rax
movl   $0x8,(%rax)
jmp    123d <decode_trackstat+0x12d>
mov    -0x10(%rbp),%rax
movl   $0x20,(%rax)
jmp    123d <decode_trackstat+0x12d>
mov    -0x10(%rbp),%rax
movl   $0x10,(%rax)
jmp    123d <decode_trackstat+0x12d>
mov    -0x34(%rbp),%edx
mov    $0x2,%edi
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1030 <trace@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1581 <decode_trackstat+0x471>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
je     1257 <decode_trackstat+0x147>
mov    -0x10(%rbp),%rax
cmpl   $0x10,(%rax)
jne    12f6 <decode_trackstat+0x1e6>
mov    -0x38(%rbp),%eax
mov    %rax,-0x50(%rbp)
sub    $0x11,%rax
ja     12ea <decode_trackstat+0x1da>
mov    -0x50(%rbp),%rax
lea    0xe0d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    12f1 <decode_trackstat+0x1e1>
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
jmp    12f1 <decode_trackstat+0x1e1>
movl   $0x1,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0xf,(%rax)
jmp    12f1 <decode_trackstat+0x1e1>
movl   $0x2,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x19,(%rax)
jmp    12f1 <decode_trackstat+0x1e1>
movl   $0x1,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x12,(%rax)
jmp    12f1 <decode_trackstat+0x1e1>
movl   $0xffffffff,-0x3c(%rbp)
jmp    1549 <decode_trackstat+0x439>
mov    -0x10(%rbp),%rax
cmpl   $0x4,(%rax)
jne    1386 <decode_trackstat+0x276>
mov    -0x38(%rbp),%eax
mov    %eax,-0x54(%rbp)
test   %eax,%eax
je     1338 <decode_trackstat+0x228>
jmp    1316 <decode_trackstat+0x206>
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
je     134e <decode_trackstat+0x23e>
jmp    1327 <decode_trackstat+0x217>
mov    -0x54(%rbp),%eax
sub    $0x5,%eax
je     1364 <decode_trackstat+0x254>
jmp    137a <decode_trackstat+0x26a>
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    1381 <decode_trackstat+0x271>
movl   $0x1,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0xe,(%rax)
jmp    1381 <decode_trackstat+0x271>
movl   $0x1,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x13,(%rax)
jmp    1381 <decode_trackstat+0x271>
movl   $0xffffffff,-0x3c(%rbp)
jmp    1544 <decode_trackstat+0x434>
mov    -0x10(%rbp),%rax
cmpl   $0x8,(%rax)
jne    1436 <decode_trackstat+0x326>
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x60(%rbp)
sub    $0x13,%eax
ja     142a <decode_trackstat+0x31a>
mov    -0x60(%rbp),%rax
lea    0xc7d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0xb,(%rax)
jmp    1431 <decode_trackstat+0x321>
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    1431 <decode_trackstat+0x321>
movl   $0x2,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x19,(%rax)
jmp    1431 <decode_trackstat+0x321>
movl   $0x4,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1c,(%rax)
jmp    1431 <decode_trackstat+0x321>
movl   $0x5,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x26,(%rax)
jmp    1431 <decode_trackstat+0x321>
movl   $0xffffffff,-0x3c(%rbp)
jmp    153f <decode_trackstat+0x42f>
mov    -0x10(%rbp),%rax
cmpl   $0x20,(%rax)
jne    14cc <decode_trackstat+0x3bc>
mov    -0x38(%rbp),%eax
mov    %rax,-0x68(%rbp)
sub    $0x5,%rax
ja     14c0 <decode_trackstat+0x3b0>
mov    -0x68(%rbp),%rax
lea    0xbb9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2f,(%rax)
jmp    14c7 <decode_trackstat+0x3b7>
movl   $0x1,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1b,(%rax)
jmp    14c7 <decode_trackstat+0x3b7>
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2f,(%rax)
jmp    14c7 <decode_trackstat+0x3b7>
movl   $0x1,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1b,(%rax)
jmp    14c7 <decode_trackstat+0x3b7>
movl   $0xffffffff,-0x3c(%rbp)
jmp    153a <decode_trackstat+0x42a>
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
jne    1535 <decode_trackstat+0x425>
mov    -0x38(%rbp),%eax
mov    %eax,-0x6c(%rbp)
test   %eax,%eax
je     14fd <decode_trackstat+0x3ed>
jmp    14ec <decode_trackstat+0x3dc>
mov    -0x6c(%rbp),%eax
sub    $0x6,%eax
je     1513 <decode_trackstat+0x403>
jmp    1529 <decode_trackstat+0x419>
movl   $0x0,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    1530 <decode_trackstat+0x420>
movl   $0x2,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x18,(%rax)
jmp    1530 <decode_trackstat+0x420>
movl   $0xffffffff,-0x3c(%rbp)
jmp    1535 <decode_trackstat+0x425>
jmp    153a <decode_trackstat+0x42a>
jmp    153f <decode_trackstat+0x42f>
jmp    1544 <decode_trackstat+0x434>
jmp    1549 <decode_trackstat+0x439>
cmpl   $0x0,-0x3c(%rbp)
jge    157b <decode_trackstat+0x46b>
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x38(%rbp),%ecx
mov    $0x2,%edi
lea    0xb7d(%rip),%rsi
mov    $0x0,%al
call   1030 <trace@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1581 <decode_trackstat+0x471>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_trackstat>:
push   %rax
mov    %edi,%eax
mov    0x18(%rsp),%r10
mov    0x10(%rsp),%r11
and    $0x1f,%edi
mov    %edi,(%rcx)
mov    %eax,%ecx
shr    $0xa,%ecx
and    $0x1,%ecx
mov    %ecx,(%r8)
mov    %eax,%ecx
shr    $0xb,%ecx
and    $0x1,%ecx
mov    %ecx,(%r11)
mov    %eax,%ecx
shr    $0xc,%ecx
and    $0x1,%ecx
mov    %ecx,(%r9)
mov    %eax,%ecx
shr    $0x10,%ecx
and    $0x7,%ecx
mov    %eax,%edi
shr    $0x1c,%edi
and    $0x1,%edi
mov    %edi,(%r10)
cmp    $0x5,%ecx
ja     11a2 <decode_trackstat+0x92>
shr    $0x15,%eax
and    $0x1f,%eax
mov    $0x1,%r8d
lea    0xe92(%rip),%rdi
movslq (%rdi,%rcx,4),%rcx
add    %rdi,%rcx
jmp    *%rcx
movl   $0x4,(%rsi)
cmp    $0x5,%eax
je     12b3 <decode_trackstat+0x1a3>
cmp    $0x1,%eax
je     12bb <decode_trackstat+0x1ab>
mov    $0x4,%r8d
test   %eax,%eax
je     1255 <decode_trackstat+0x145>
jmp    125d <decode_trackstat+0x14d>
lea    0xf1f(%rip),%rsi
mov    $0x2,%edi
mov    %ecx,%edx
xor    %eax,%eax
call   1030 <trace@plt>
jmp    1275 <decode_trackstat+0x165>
movl   $0x2,(%rsi)
cmp    $0x6,%eax
je     128c <decode_trackstat+0x17c>
mov    $0x2,%r8d
test   %eax,%eax
jne    125d <decode_trackstat+0x14d>
jmp    1255 <decode_trackstat+0x145>
movl   $0x8,(%rsi)
mov    $0x8,%r8d
lea    -0x1(%rax),%ecx
cmp    $0x13,%ecx
ja     125d <decode_trackstat+0x14d>
lea    0xe3a(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
movl   $0xb,(%rdx)
jmp    129f <decode_trackstat+0x18f>
movl   $0x20,(%rsi)
mov    $0x20,%r8d
cmp    $0x5,%eax
ja     125d <decode_trackstat+0x14d>
mov    %eax,%ecx
lea    0xdf4(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
movl   $0x2f,(%rdx)
jmp    129f <decode_trackstat+0x18f>
mov    $0x10,%r8d
mov    %r8d,(%rsi)
cmp    $0x11,%eax
ja     125d <decode_trackstat+0x14d>
mov    %eax,%ecx
lea    0xe34(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
movl   $0x1,(%rdx)
jmp    129f <decode_trackstat+0x18f>
lea    0xe81(%rip),%rsi
mov    $0x2,%edi
mov    %r8d,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1030 <trace@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
movl   $0x19,(%rdx)
jmp    1292 <decode_trackstat+0x182>
movl   $0x1b,(%rdx)
jmp    12c1 <decode_trackstat+0x1b1>
movl   $0x18,(%rdx)
mov    $0x2,%eax
pop    %rcx
ret
movl   $0x2,(%rdx)
xor    %eax,%eax
pop    %rcx
ret
movl   $0xf,(%rdx)
jmp    12c1 <decode_trackstat+0x1b1>
movl   $0x12,(%rdx)
jmp    12c1 <decode_trackstat+0x1b1>
movl   $0x13,(%rdx)
jmp    12c1 <decode_trackstat+0x1b1>
movl   $0xe,(%rdx)
mov    $0x1,%eax
pop    %rcx
ret
movl   $0x1c,(%rdx)
mov    $0x4,%eax
pop    %rcx
ret
movl   $0x26,(%rdx)
mov    $0x5,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"oem4 unknown system: sys=%d\0A\00"
@.str.1 = [43 x i8] c"oem4 signal type error: sys=%d sigtype=%d\0A\00"
define i32 @decode_trackstat(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i32* %5, i32** %15
store i32* %6, i32** %16
store i32* %7, i32** %17
store i32 0, i32* %20
%21 = load i32, i32* %10
%22 = and i32 %21, 31
%23 = load i32*, i32** %13
store i32 %22, i32* %23
%24 = load i32, i32* %10
%25 = lshr i32 %24, 10
%26 = and i32 %25, 1
%27 = load i32*, i32** %14
store i32 %26, i32* %27
%28 = load i32, i32* %10
%29 = lshr i32 %28, 11
%30 = and i32 %29, 1
%31 = load i32*, i32** %16
store i32 %30, i32* %31
%32 = load i32, i32* %10
%33 = lshr i32 %32, 12
%34 = and i32 %33, 1
%35 = load i32*, i32** %15
store i32 %34, i32* %35
%36 = load i32, i32* %10
%37 = lshr i32 %36, 16
%38 = and i32 %37, 7
store i32 %38, i32* %18
%39 = load i32, i32* %10
%40 = lshr i32 %39, 28
%41 = and i32 %40, 1
%42 = load i32*, i32** %17
store i32 %41, i32* %42
%43 = load i32, i32* %10
%44 = lshr i32 %43, 21
%45 = and i32 %44, 31
store i32 %45, i32* %19
%46 = load i32, i32* %18
switch i32 %46, label %59 [
i32 0, label %47
i32 1, label %49
i32 2, label %51
i32 3, label %53
i32 4, label %55
i32 5, label %57
]
47: ; preds = %8
%48 = load i32*, i32** %11
store i32 1, i32* %48
br label %62
49: ; preds = %8
%50 = load i32*, i32** %11
store i32 4, i32* %50
br label %62
51: ; preds = %8
%52 = load i32*, i32** %11
store i32 2, i32* %52
br label %62
53: ; preds = %8
%54 = load i32*, i32** %11
store i32 8, i32* %54
br label %62
55: ; preds = %8
%56 = load i32*, i32** %11
store i32 32, i32* %56
br label %62
57: ; preds = %8
%58 = load i32*, i32** %11
store i32 16, i32* %58
br label %62
59: ; preds = %8
%60 = load i32, i32* %18
%61 = call i32 (i32, i8*, i32, ...) @trace(i32 2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %60)
store i32 -1, i32* %9
br label %158
62: ; preds = %57, %55, %53, %51, %49, %47
%63 = load i32*, i32** %11
%64 = load i32, i32* %63
%65 = icmp eq i32 %64, 1
br i1 %65, label %70, label %66
66: ; preds = %62
%67 = load i32*, i32** %11
%68 = load i32, i32* %67
%69 = icmp eq i32 %68, 16
br i1 %69, label %70, label %84
70: ; preds = %66, %62
%71 = load i32, i32* %19
switch i32 %71, label %82 [
i32 0, label %72
i32 5, label %74
i32 9, label %76
i32 14, label %78
i32 17, label %80
]
72: ; preds = %70
store i32 0, i32* %20
%73 = load i32*, i32** %12
store i32 1, i32* %73
br label %83
74: ; preds = %70
store i32 0, i32* %20
%75 = load i32*, i32** %12
store i32 2, i32* %75
br label %83
76: ; preds = %70
store i32 1, i32* %20
%77 = load i32*, i32** %12
store i32 15, i32* %77
br label %83
78: ; preds = %70
store i32 2, i32* %20
%79 = load i32*, i32** %12
store i32 25, i32* %79
br label %83
80: ; preds = %70
store i32 1, i32* %20
%81 = load i32*, i32** %12
store i32 18, i32* %81
br label %83
82: ; preds = %70
store i32 -1, i32* %20
br label %83
83: ; preds = %82, %80, %78, %76, %74, %72
br label %148
84: ; preds = %66
%85 = load i32*, i32** %11
%86 = load i32, i32* %85
%87 = icmp eq i32 %86, 4
br i1 %87, label %88, label %98
88: ; preds = %84
%89 = load i32, i32* %19
switch i32 %89, label %96 [
i32 0, label %90
i32 1, label %92
i32 5, label %94
]
90: ; preds = %88
store i32 0, i32* %20
%91 = load i32*, i32** %12
store i32 1, i32* %91
br label %97
92: ; preds = %88
store i32 1, i32* %20
%93 = load i32*, i32** %12
store i32 14, i32* %93
br label %97
94: ; preds = %88
store i32 1, i32* %20
%95 = load i32*, i32** %12
store i32 19, i32* %95
br label %97
96: ; preds = %88
store i32 -1, i32* %20
br label %97
97: ; preds = %96, %94, %92, %90
br label %147
98: ; preds = %84
%99 = load i32*, i32** %11
%100 = load i32, i32* %99
%101 = icmp eq i32 %100, 8
br i1 %101, label %102, label %116
102: ; preds = %98
%103 = load i32, i32* %19
switch i32 %103, label %114 [
i32 1, label %104
i32 2, label %106
i32 12, label %108
i32 17, label %110
i32 20, label %112
]
104: ; preds = %102
store i32 0, i32* %20
%105 = load i32*, i32** %12
store i32 11, i32* %105
br label %115
106: ; preds = %102
store i32 0, i32* %20
%107 = load i32*, i32** %12
store i32 1, i32* %107
br label %115
108: ; preds = %102
store i32 2, i32* %20
%109 = load i32*, i32** %12
store i32 25, i32* %109
br label %115
110: ; preds = %102
store i32 4, i32* %20
%111 = load i32*, i32** %12
store i32 28, i32* %111
br label %115
112: ; preds = %102
store i32 5, i32* %20
%113 = load i32*, i32** %12
store i32 38, i32* %113
br label %115
114: ; preds = %102
store i32 -1, i32* %20
br label %115
115: ; preds = %114, %112, %110, %108, %106, %104
br label %146
116: ; preds = %98
%117 = load i32*, i32** %11
%118 = load i32, i32* %117
%119 = icmp eq i32 %118, 32
br i1 %119, label %120, label %132
120: ; preds = %116
%121 = load i32, i32* %19
switch i32 %121, label %130 [
i32 0, label %122
i32 1, label %124
i32 4, label %126
i32 5, label %128
]
122: ; preds = %120
store i32 0, i32* %20
%123 = load i32*, i32** %12
store i32 47, i32* %123
br label %131
124: ; preds = %120
store i32 1, i32* %20
%125 = load i32*, i32** %12
store i32 27, i32* %125
br label %131
126: ; preds = %120
store i32 0, i32* %20
%127 = load i32*, i32** %12
store i32 47, i32* %127
br label %131
128: ; preds = %120
store i32 1, i32* %20
%129 = load i32*, i32** %12
store i32 27, i32* %129
br label %131
130: ; preds = %120
store i32 -1, i32* %20
br label %131
131: ; preds = %130, %128, %126, %124, %122
br label %145
132: ; preds = %116
%133 = load i32*, i32** %11
%134 = load i32, i32* %133
%135 = icmp eq i32 %134, 2
br i1 %135, label %136, label %144
136: ; preds = %132
%137 = load i32, i32* %19
switch i32 %137, label %142 [
i32 0, label %138
i32 6, label %140
]
138: ; preds = %136
store i32 0, i32* %20
%139 = load i32*, i32** %12
store i32 1, i32* %139
br label %143
140: ; preds = %136
store i32 2, i32* %20
%141 = load i32*, i32** %12
store i32 24, i32* %141
br label %143
142: ; preds = %136
store i32 -1, i32* %20
br label %143
143: ; preds = %142, %140, %138
br label %144
144: ; preds = %143, %132
br label %145
145: ; preds = %144, %131
br label %146
146: ; preds = %145, %115
br label %147
147: ; preds = %146, %97
br label %148
148: ; preds = %147, %83
%149 = load i32, i32* %20
%150 = icmp slt i32 %149, 0
br i1 %150, label %151, label %156
151: ; preds = %148
%152 = load i32*, i32** %11
%153 = load i32, i32* %152
%154 = load i32, i32* %19
%155 = call i32 (i32, i8*, i32, ...) @trace(i32 2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %153, i32 %154)
store i32 -1, i32* %9
br label %158
156: ; preds = %148
%157 = load i32, i32* %20
store i32 %157, i32* %9
br label %158
158: ; preds = %156, %151, %59
%159 = load i32, i32* %9
ret i32 %159
}

LLVM IR (-O2):
@.str = [29 x i8] c"oem4 unknown system: sys=%d\0A\00"
@.str.1 = [43 x i8] c"oem4 signal type error: sys=%d sigtype=%d\0A\00"
define i32 @decode_trackstat(i32 %0, i32* nocapture %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4, i32* nocapture writeonly %5, i32* nocapture writeonly %6, i32* nocapture writeonly %7) {
%9 = and i32 %0, 31
store i32 %9, i32* %3
%10 = lshr i32 %0, 10
%11 = and i32 %10, 1
store i32 %11, i32* %4
%12 = lshr i32 %0, 11
%13 = and i32 %12, 1
store i32 %13, i32* %6
%14 = lshr i32 %0, 12
%15 = and i32 %14, 1
store i32 %15, i32* %5
%16 = lshr i32 %0, 16
%17 = and i32 %16, 7
%18 = lshr i32 %0, 28
%19 = and i32 %18, 1
store i32 %19, i32* %7
%20 = lshr i32 %0, 21
%21 = and i32 %20, 31
switch i32 %17, label %23 [
i32 0, label %25
i32 1, label %32
i32 2, label %47
i32 3, label %36
i32 4, label %42
i32 5, label %22
]
22: ; preds = %8
br label %25
23: ; preds = %8
%24 = tail call i32 (i32, i8*, i32, ...) @trace(i32 2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %53
25: ; preds = %8, %22
%26 = phi i32 [ 16, %22 ], [ 1, %8 ]
store i32 %26, i32* %1
switch i32 %21, label %50 [
i32 0, label %27
i32 5, label %28
i32 9, label %29
i32 14, label %30
i32 17, label %31
]
27: ; preds = %25
store i32 1, i32* %2
br label %53
28: ; preds = %25
store i32 2, i32* %2
br label %53
29: ; preds = %25
store i32 15, i32* %2
br label %53
30: ; preds = %25
store i32 25, i32* %2
br label %53
31: ; preds = %25
store i32 18, i32* %2
br label %53
32: ; preds = %8
store i32 4, i32* %1
switch i32 %21, label %50 [
i32 0, label %33
i32 1, label %34
i32 5, label %35
]
33: ; preds = %32
store i32 1, i32* %2
br label %53
34: ; preds = %32
store i32 14, i32* %2
br label %53
35: ; preds = %32
store i32 19, i32* %2
br label %53
36: ; preds = %8
store i32 8, i32* %1
switch i32 %21, label %50 [
i32 1, label %37
i32 2, label %38
i32 12, label %39
i32 17, label %40
i32 20, label %41
]
37: ; preds = %36
store i32 11, i32* %2
br label %53
38: ; preds = %36
store i32 1, i32* %2
br label %53
39: ; preds = %36
store i32 25, i32* %2
br label %53
40: ; preds = %36
store i32 28, i32* %2
br label %53
41: ; preds = %36
store i32 38, i32* %2
br label %53
42: ; preds = %8
store i32 32, i32* %1
switch i32 %21, label %50 [
i32 0, label %43
i32 1, label %44
i32 4, label %45
i32 5, label %46
]
43: ; preds = %42
store i32 47, i32* %2
br label %53
44: ; preds = %42
store i32 27, i32* %2
br label %53
45: ; preds = %42
store i32 47, i32* %2
br label %53
46: ; preds = %42
store i32 27, i32* %2
br label %53
47: ; preds = %8
store i32 2, i32* %1
switch i32 %21, label %50 [
i32 0, label %48
i32 6, label %49
]
48: ; preds = %47
store i32 1, i32* %2
br label %53
49: ; preds = %47
store i32 24, i32* %2
br label %53
50: ; preds = %25, %32, %36, %42, %47
%51 = phi i32 [ %26, %25 ], [ 4, %32 ], [ 8, %36 ], [ 32, %42 ], [ 2, %47 ]
%52 = tail call i32 (i32, i8*, i32, ...) @trace(i32 2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %51, i32 %21)
br label %53
53: ; preds = %31, %30, %29, %28, %27, %41, %40, %39, %38, %37, %49, %48, %43, %44, %45, %46, %33, %34, %35, %50, %23
%54 = phi i32 [ -1, %23 ], [ -1, %50 ], [ 1, %31 ], [ 2, %30 ], [ 1, %29 ], [ 0, %28 ], [ 0, %27 ], [ 5, %41 ], [ 4, %40 ], [ 2, %39 ], [ 0, %38 ], [ 0, %37 ], [ 2, %49 ], [ 0, %48 ], [ 0, %43 ], [ 1, %44 ], [ 0, %45 ], [ 1, %46 ], [ 0, %33 ], [ 1, %34 ], [ 1, %35 ]
ret i32 %54
}