// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/analyzer/analyzer.c
// Function: main
int main(int argc, char **argv)
{
  int    r;
  char   msg[2000];
  FILE  *file = stdin;
  int    ac   = argc;
  char **av   = argv;

  setProgName(argv[0]);

  for (; ac > 1; ac--, av++)
  {
    if (strcasecmp(av[1], "-version") == 0)
    {
      printf("%s\n", VERSION);
      exit(0);
    }
    else if (strcasecmp(av[1], "-schema-version") == 0)
    {
      printf("%s\n", SCHEMA_VERSION);
      exit(0);
    }
    else if (strcasecmp(av[1], "-camel") == 0)
    {
      showCamel = true;
      camelCase(false);
    }
    else if (strcasecmp(av[1], "-upper-camel") == 0)
    {
      camelCase(true);
    }
    else if (strcasecmp(av[1], "-raw") == 0)
    {
      showRaw = true;
    }
    else if (strcasecmp(av[1], "-debug") == 0)
    {
      showJsonEmpty = true;
      showBytes     = true;
    }
    else if (strcasecmp(av[1], "-debugdata") == 0)
    {
      showJsonEmpty = true;
      showAllBytes  = true;
    }
    else if (strcasecmp(av[1], "-d") == 0)
    {
      setLogLevel(LOGLEVEL_DEBUG);
    }
    else if (strcasecmp(av[1], "-q") == 0)
    {
      setLogLevel(LOGLEVEL_ERROR);
    }
    else if (ac > 2 && strcasecmp(av[1], "-geo") == 0)
    {
      if (strcasecmp(av[2], "dd") == 0)
      {
        showGeo = GEO_DD;
      }
      else if (strcasecmp(av[2], "dm") == 0)
      {
        showGeo = GEO_DM;
      }
      else if (strcasecmp(av[2], "dms") == 0)
      {
        showGeo = GEO_DMS;
      }
      else
      {
        usage(argv, av + 1);
      }
      ac--;
      av++;
    }
    else if (strcasecmp(av[1], "-si") == 0)
    {
      showSI = true;
    }
    else if (strcasecmp(av[1], "-nosi") == 0)
    {
      showSI = false;
    }
    else if (strcasecmp(av[1], "-json") == 0)
    {
      showJson = true;
    }
    else if (strcasecmp(av[1], "-empty") == 0)
    {
      showJsonEmpty = true;
      showJson      = true;
    }
    else if (strcasecmp(av[1], "-nv") == 0)
    {
      showJsonValue = true;
      showJson      = true;
    }
    else if (strcasecmp(av[1], "-data") == 0)
    {
      showData = true;
    }
    else if (ac > 2 && strcasecmp(av[1], "-fixtime") == 0)
    {
      setFixedTimestamp(av[2]);
      if (strstr(av[2], "n2kd") == NULL)
      {
        showVersion = false;
      }
      ac--;
      av++;
    }
    else if (ac > 2 && strcasecmp(av[1], "-src") == 0)
    {
      onlySrc = strtol(av[2], 0, 10);
      ac--;
      av++;
    }
    else if (ac > 2 && strcasecmp(av[1], "-dst") == 0)
    {
      onlyDst = strtol(av[2], 0, 10);
      ac--;
      av++;
    }
#ifndef SKIP_SETSYSTEMCLOCK
    else if (ac > 2 && strcasecmp(av[1], "-clocksrc") == 0)
    {
      clockSrc = strtol(av[2], 0, 10);
      ac--;
      av++;
    }
#endif
    else if (ac > 2 && strcasecmp(av[1], "-file") == 0)
    {
      file = fopen(av[2], "r");
      if (!file)
      {
        logAbort("Cannot open file %s\n", av[2]);
      }
      ac--;
      av++;
    }
    else if (ac > 2 && strcasecmp(av[1], "-format") == 0)
    {
      for (size_t i = 1; i < ARRAY_SIZE(RAW_FORMAT_STR); i++)
      {
        if (strcasecmp(av[2], RAW_FORMAT_STR[i]) == 0)
        {
          format = (enum RawFormats) i;
          if (format != RAWFORMAT_PLAIN && format != RAWFORMAT_PLAIN_OR_FAST && format != RAWFORMAT_PLAIN_MIX_FAST
              && format != RAWFORMAT_YDWG02)
          {
            multiPackets = MULTIPACKETS_COALESCED;
          }
          break;
        }
      }
      if (format == RAWFORMAT_UNKNOWN)
      {
        logAbort("Unknown message format '%s'\n", av[2]);
      }
      ac--;
      av++;
    }

    else
    {
      onlyPgn = strtol(av[1], 0, 10);
      if (onlyPgn > 0)
      {
        logInfo("Only logging PGN %d\n", onlyPgn);
      }
      else
      {
        usage(argv, av + 1);
      }
    }
  }

  if (!showJson)
  {
    logInfo("N2K packet analyzer\n" COPYRIGHT);
  }
  else if (showVersion)
  {
    printf("{\"version\":\"%s\",\"units\":\"%s\",\"showLookupValues\":%s",
           VERSION,
           showSI ? "si" : "std",
           showJsonValue ? "true" : "false");
    if (showCamel)
    {
      printf(",\"showUniqueId\":true");
    }
    printf("}\n");
  }

  fillLookups();
  fillFieldType(true);
  checkPgnList();

  while (fgets(msg, sizeof(msg) - 1, file))
  {
    RawMessage m;

    if (*msg == 0 || *msg == '\r' || *msg == '\n' || *msg == '#')
    {
      if (*msg == '#')
      {
        if (strncmp(msg + 1, "SHOWBUFFERS", STRSIZE("SHOWBUFFERS")) == 0)
        {
          showBuffers();
        }
      }

      continue;
    }

    if (format == RAWFORMAT_UNKNOWN)
    {
      format = detectFormat(msg);
      if (format == RAWFORMAT_GARMIN_CSV1 || format == RAWFORMAT_GARMIN_CSV2)
      {
        // Skip first line containing header line
        continue;
      }
    }

    switch (format)
    {
      case RAWFORMAT_PLAIN_OR_FAST:
        if (getMessageByteCount(msg) <= 8)
        {
          r = parseRawFormatPlain(msg, &m, showJson);
          logDebug("plain_or_fast: plain r=%d\n", r);
        }
        else
        {
          r = parseRawFormatFast(msg, &m, showJson);
          if (r >= 0)
          {
            format       = RAWFORMAT_FAST;
            multiPackets = MULTIPACKETS_COALESCED;
            logDebug("plain_or_fast: fast r=%d\n", r);
          }
        }
        break;

      case RAWFORMAT_PLAIN_MIX_FAST:
        if (getMessageByteCount(msg) <= 8)
        {
          r = parseRawFormatPlain(msg, &m, showJson);
          logDebug("plain_or_fast: plain r=%d\n", r);
        }
        else
        {
          r = parseRawFormatFast(msg, &m, showJson);
          logDebug("plain_or_fast: fast r=%d\n", r);
        }
        break;

      case RAWFORMAT_PLAIN:
        r = parseRawFormatPlain(msg, &m, showJson);
        break;

      case RAWFORMAT_FAST:
        r = parseRawFormatFast(msg, &m, showJson);
        break;

      case RAWFORMAT_AIRMAR:
        r = parseRawFormatAirmar(msg, &m, showJson);
        break;

      case RAWFORMAT_CHETCO:
        r = parseRawFormatChetco(msg, &m, showJson);
        break;

      case RAWFORMAT_GARMIN_CSV1:
      case RAWFORMAT_GARMIN_CSV2:
        r = parseRawFormatGarminCSV(msg, &m, showJson, format == RAWFORMAT_GARMIN_CSV2);
        break;

      case RAWFORMAT_YDWG02:
        r = parseRawFormatYDWG02(msg, &m, showJson);
        break;

      case RAWFORMAT_ACTISENSE_N2K_ASCII:
        r = parseRawFormatActisenseN2KAscii(msg, &m, showJson);
        break;

      default:
        logError("Unknown message format\n");
        exit(1);
    }

    if (r == 0)
    {
      printCanFormat(&m);
      printCanRaw(&m);
    }
    else
    {
      logError("Unknown message error %d: '%s'\n", r, msg);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x948, %rsp            # imm = 0x948
movq %rsi, %r15
movl %edi, %ebp
movq 0x2747b(%rip), %rax     # 0x34fd0
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq (%rsi), %rdi
callq 0x19285
leaq 0x10747(%rip), %r12     # 0x1e2b3
leaq 0x1075c(%rip), %r13     # 0x1e2cf
movq %r15, 0x10(%rsp)
cmpl $0x2, %ebp
jl 0xdfde
movq 0x8(%r15), %rbx
movq %rbx, %rdi
leaq 0x1072b(%rip), %rsi     # 0x1e2ba
callq 0xd060
testl %eax, %eax
je 0xe8c2
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd060
testl %eax, %eax
je 0xe8cb
movq %rbx, %rdi
movq %r13, %rsi
callq 0xd060
testl %eax, %eax
je 0xdd2c
movq %rbx, %rdi
leaq 0x106fd(%rip), %rsi     # 0x1e2c9
callq 0xd060
testl %eax, %eax
je 0xdd37
movq %rbx, %rdi
leaq 0x106f3(%rip), %rsi     # 0x1e2d6
callq 0xd060
testl %eax, %eax
je 0xdd50
movq %rbx, %rdi
leaq 0x106e1(%rip), %rsi     # 0x1e2db
callq 0xd060
testl %eax, %eax
je 0xdd59
movq %rbx, %rdi
leaq 0x106d1(%rip), %rsi     # 0x1e2e2
callq 0xd060
testl %eax, %eax
je 0xdd69
movq %rbx, %rdi
leaq 0x106c5(%rip), %rsi     # 0x1e2ed
callq 0xd060
testl %eax, %eax
je 0xdd79
movq %rbx, %rdi
leaq 0x106b1(%rip), %rsi     # 0x1e2f0
callq 0xd060
testl %eax, %eax
je 0xdd7d
leaq 0x8(%r15), %r14
cmpl $0x2, %ebp
je 0xdc6c
movq %rbx, %rdi
leaq 0x10694(%rip), %rsi     # 0x1e2f3
callq 0xd060
testl %eax, %eax
je 0xdd99
movq %rbx, %rdi
leaq 0x1068c(%rip), %rsi     # 0x1e302
callq 0xd060
testl %eax, %eax
je 0xdd87
movq %rbx, %rdi
leaq 0x10679(%rip), %rsi     # 0x1e306
callq 0xd060
testl %eax, %eax
je 0xdd90
movq %rbx, %rdi
leaq 0x10668(%rip), %rsi     # 0x1e30c
callq 0xd060
testl %eax, %eax
je 0xdde1
movq %rbx, %rdi
leaq 0x10657(%rip), %rsi     # 0x1e312
callq 0xd060
testl %eax, %eax
je 0xdded
movq %rbx, %rdi
leaq 0x10647(%rip), %rsi     # 0x1e319
callq 0xd060
testl %eax, %eax
je 0xde06
movq %rbx, %rdi
leaq 0x10634(%rip), %rsi     # 0x1e31d
callq 0xd060
testl %eax, %eax
je 0xde19
cmpl $0x2, %ebp
jne 0xde25
movq %rbx, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0xd1f0
movl %eax, 0x7a5c2(%rip)     # 0x882d4
testl %eax, %eax
jle 0xe8f4
leaq 0x10664(%rip), %rdi     # 0x1e385
movl %eax, %esi
xorl %eax, %eax
callq 0x18f43
jmp 0xdd3f
movb $0x1, 0x7a599(%rip)     # 0x882cc
xorl %edi, %edi
jmp 0xdd3a
pushq $0x1
popq %rdi
callq 0xd93d
movq %r15, %r14
decl %ebp
addq $0x8, %r14
movq %r14, %r15
jmp 0xdb78
movb $0x1, 0x7a56d(%rip)     # 0x882c4
jmp 0xdd3f
movb $0x1, %al
movb %al, 0x7a568(%rip)      # 0x882c9
movb %al, 0x7a55f(%rip)      # 0x882c6
jmp 0xdd3f
movb $0x1, %al
movb %al, 0x7a558(%rip)      # 0x882c9
movb %al, 0x7a550(%rip)      # 0x882c7
jmp 0xdd3f
pushq $0x3
jmp 0xdd7f
pushq $0x1
popq %rdi
callq 0x1925e
jmp 0xdd3f
movb $0x1, 0x7a53d(%rip)     # 0x882cb
jmp 0xdd3f
movb $0x0, 0x7a534(%rip)     # 0x882cb
jmp 0xdd3f
movq 0x10(%r15), %rbx
movq %rbx, %rdi
leaq 0x10551(%rip), %rsi     # 0x1e2f8
callq 0xd060
testl %eax, %eax
je 0xddf7
movq %rbx, %rdi
leaq 0x10541(%rip), %rsi     # 0x1e2fb
callq 0xd060
pushq $0x1
popq %rcx
testl %eax, %eax
je 0xddf9
movq %rbx, %rdi
leaq 0x1052e(%rip), %rsi     # 0x1e2fe
callq 0xd060
pushq $0x2
popq %rcx
testl %eax, %eax
je 0xddf9
jmp 0xe8f4
movb $0x1, 0x7a4e0(%rip)     # 0x882c8
jmp 0xdd3f
movb $0x1, %al
movb %al, 0x7a4d4(%rip)      # 0x882c9
jmp 0xde0e
xorl %ecx, %ecx
movl %ecx, 0x7a4d1(%rip)     # 0x882d0
decl %ebp
jmp 0xdd42
movb $0x1, %al
movb %al, 0x7a4bc(%rip)      # 0x882ca
movb %al, 0x7a4b4(%rip)      # 0x882c8
jmp 0xdd3f
movb $0x1, 0x7a4a5(%rip)     # 0x882c5
jmp 0xdd3f
movq %rbx, %rdi
leaq 0x104f4(%rip), %rsi     # 0x1e323
callq 0xd060
testl %eax, %eax
je 0xdee1
movq %rbx, %rdi
leaq 0x104eb(%rip), %rsi     # 0x1e331
callq 0xd060
testl %eax, %eax
je 0xdf0f
movq %rbx, %rdi
leaq 0x104d9(%rip), %rsi     # 0x1e336
callq 0xd060
testl %eax, %eax
je 0xdf28
movq %rbx, %rdi
leaq 0x104c7(%rip), %rsi     # 0x1e33b
callq 0xd060
testl %eax, %eax
je 0xdf41
movq %rbx, %rdi
leaq 0x104ba(%rip), %rsi     # 0x1e345
callq 0xd060
testl %eax, %eax
je 0xdf5a
movq %rbx, %rdi
leaq 0x104be(%rip), %rsi     # 0x1e360
callq 0xd060
testl %eax, %eax
jne 0xdcff
movq 0x10(%r15), %rbx
pushq $0x1
popq %r15
cmpq $0xb, %r15
je 0xdf85
leaq 0x74298(%rip), %rax     # 0x82160
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0xd060
testl %eax, %eax
je 0xdfa8
incq %r15
jmp 0xdeb7
movq 0x10(%r15), %rdi
callq 0x192b5
movq 0x10(%r15), %rdi
leaq 0x10437(%rip), %rsi     # 0x1e32c
callq 0xd370
testq %rax, %rax
jne 0xddff
movb $0x0, 0x742b2(%rip)     # 0x821bc
jmp 0xddff
movq 0x10(%r15), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0xd1f0
movl %eax, 0x742a5(%rip)     # 0x821c8
jmp 0xddff
movq 0x10(%r15), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0xd1f0
movl %eax, 0x74290(%rip)     # 0x821cc
jmp 0xddff
movq 0x10(%r15), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0xd1f0
movl %eax, 0x7427b(%rip)     # 0x821d0
jmp 0xddff
movq 0x10(%r15), %rdi
leaq 0x1b9f7(%rip), %rsi     # 0x2995c
callq 0xd2b0
movq %rax, 0x30(%rsp)
testq %rax, %rax
jne 0xddff
movq 0x10(%r15), %rsi
leaq 0x103c8(%rip), %rdi     # 0x1e34b
jmp 0xdf9c
cmpl $0x0, 0x7a334(%rip)     # 0x882c0
jne 0xddff
leaq 0x103cf(%rip), %rdi     # 0x1e368
movq %rbx, %rsi
xorl %eax, %eax
callq 0x19172
jmp 0xddff
movl %r15d, 0x7a311(%rip)    # 0x882c0
movl %r15d, %eax
andl $0xd, %eax
cmpl $0x1, %eax
je 0xddff
cmpq $0x4, %r15
je 0xddff
cmpq $0x9, %r15
je 0xddff
andl $0x0, 0x741df(%rip)     # 0x821b8
jmp 0xddff
cmpb $0x0, 0x7a2e3(%rip)     # 0x882c8
je 0xe05c
cmpb $0x1, 0x741ce(%rip)     # 0x821bc
jne 0xe06a
leaq 0x1030c(%rip), %rax     # 0x1e303
leaq 0x1069f(%rip), %rdx     # 0x1e69d
cmpb $0x0, 0x7a2c6(%rip)     # 0x882cb
cmovneq %rax, %rdx
leaq 0x106a7(%rip), %rax     # 0x1e6b7
leaq 0x1068a(%rip), %rcx     # 0x1e6a1
cmpb $0x0, 0x7a2ac(%rip)     # 0x882ca
cmovneq %rax, %rcx
leaq 0x10641(%rip), %rdi     # 0x1e66a
leaq 0x1027d(%rip), %rsi     # 0x1e2ad
xorl %eax, %eax
callq 0xd110
cmpb $0x1, 0x7a28e(%rip)     # 0x882cc
jne 0xe04e
leaq 0x10660(%rip), %rdi     # 0x1e6a7
xorl %eax, %eax
callq 0xd110
leaq 0x1b4e1(%rip), %rdi     # 0x29536
callq 0xd0c0
jmp 0xe06a
leaq 0x10337(%rip), %rdi     # 0x1e39a
xorl %eax, %eax
callq 0x18f43
callq 0x1640f
pushq $0x1
popq %rdi
callq 0x184bb
callq 0xd79e
leaq 0x170(%rsp), %r14
leaq 0x10d9b(%rip), %r15     # 0x1ee26
leaq 0x10dce(%rip), %r12     # 0x1ee60
leaq 0xe2ff(%rip), %rbp      # 0x1c398
movq %r14, %rdi
movl $0x7cf, %esi            # imm = 0x7CF
movq 0x30(%rsp), %rdx
callq 0xd1a0
testq %rax, %rax
je 0xe8ae
movzbl 0x170(%rsp), %ecx
testl %ecx, %ecx
je 0xe099
cmpl $0xa, %ecx
je 0xe099
cmpl $0xd, %ecx
je 0xe099
cmpl $0x23, %ecx
jne 0xe13b
leaq 0x171(%rsp), %rdi
leaq 0x105de(%rip), %rsi     # 0x1e6bc
pushq $0xb
popq %rdx
callq 0xd250
testl %eax, %eax
jne 0xe099
leaq 0x7a307(%rip), %r13     # 0x883f8
xorl %ebx, %ebx
cmpq $0x40, %rbx
je 0xe099
cmpb $0x1, (%r13)
jne 0xe122
movl -0x8(%r13), %edx
movq -0xf8(%r13), %rcx
movl -0x10(%r13), %r8d
movl -0xc(%r13), %r9d
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x190e1
jmp 0xe12f
movq %r12, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x19050
incq %rbx
addq $0x100, %r13            # imm = 0x100
jmp 0xe0f3
movl 0x7a17f(%rip), %eax     # 0x882c0
testl %eax, %eax
jne 0xe330
cmpb $0x24, %cl
jne 0xe168
movq %r14, %rdi
leaq 0x109ad(%rip), %rsi     # 0x1eb05
pushq $0x6
popq %rdx
callq 0xd250
testl %eax, %eax
je 0xe1fb
movq %r14, %rdi
leaq 0x109ce(%rip), %rsi     # 0x1eb40
pushq $0x6b
popq %rdx
callq 0xd250
leaq 0x10a2a(%rip), %rdi     # 0x1ebab
pushq $0x7
popq %rbx
testl %eax, %eax
je 0xe1e2
movl $0x9c, %edx
movq %r14, %rdi
leaq 0x10a4b(%rip), %rsi     # 0x1ebe2
callq 0xd250
leaq 0x10adb(%rip), %rdi     # 0x1ec7e
pushq $0x8
popq %rbx
testl %eax, %eax
je 0xe1e2
movq %r14, %rdi
pushq $0x20
popq %rsi
callq 0xd100
testq %rax, %rax
je 0xe217
cmpb $0x2d, 0x1(%rax)
je 0xe1c6
cmpb $0x2d, 0x2(%rax)
jne 0xe217
leaq 0x10ae8(%rip), %rdi     # 0x1ecb5
xorl %eax, %eax
callq 0x18f43
andl $0x0, 0x73fdd(%rip)     # 0x821b8
pushq $0x5
jmp 0xe329
xorl %eax, %eax
callq 0x18f43
andl $0x0, 0x73fc8(%rip)     # 0x821b8
movl %ebx, 0x7a0ca(%rip)     # 0x882c0
jmp 0xe099
leaq 0x1090a(%rip), %rdi     # 0x1eb0c
xorl %eax, %eax
callq 0x18f43
andl $0x0, 0x73fa8(%rip)     # 0x821b8
pushq $0x6
jmp 0xe329
movq %r14, %rdi
callq 0xea61
testl %eax, %eax
je 0xe248
cmpl $0x9, %eax
jb 0xe2ad
leaq 0x10ab6(%rip), %rdi     # 0x1ece9
xorl %eax, %eax
callq 0x18f43
andl $0x0, 0x73f77(%rip)     # 0x821b8
pushq $0x2
jmp 0xe329
movq %r14, %rdi
leaq 0x10b18(%rip), %rsi     # 0x1ed6a
leaq 0x28(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x2c(%rsp), %r9
xorl %eax, %eax
leaq 0x44(%rsp), %r10
pushq %r10
leaq 0x17(%rsp), %r10
pushq %r10
callq 0xd240
popq %rcx
popq %rdx
cmpl $0x6, %eax
jne 0xe2bf
movzbl 0xf(%rsp), %eax
cmpl $0x54, %eax
je 0xe291
cmpl $0x52, %eax
jne 0xe2bf
leaq 0x10ae7(%rip), %rdi     # 0x1ed7f
xorl %eax, %eax
callq 0x18f43
movl $0x1, 0x73f0f(%rip)     # 0x821b8
pushq $0x9
jmp 0xe329
leaq 0x10a67(%rip), %rdi     # 0x1ed1b
xorl %eax, %eax
callq 0x18f43
pushq $0x3
jmp 0xe329
movq %r14, %rdi
leaq 0x10ae9(%rip), %rsi     # 0x1edb2
leaq 0x28(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x2c(%rsp), %r9
xorl %eax, %eax
callq 0xd240
cmpl $0x4, %eax
je 0xe312
movq %r14, %rdi
leaq 0x10acd(%rip), %rsi     # 0x1edc0
leaq 0x28(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0xd240
cmpl $0x3, %eax
jne 0xe729
leaq 0x10ab2(%rip), %rdi     # 0x1edcb
xorl %eax, %eax
callq 0x18f43
andl $0x0, 0x73e91(%rip)     # 0x821b8
pushq $0xa
popq %rax
movl %eax, 0x79f90(%rip)     # 0x882c0
leal -0x1(%rax), %ecx
cmpl $0x9, %ecx
ja 0xe8de
movslq (%rbp,%rcx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
movzbl 0x79f7b(%rip), %edx     # 0x882c8
xorl %ecx, %ecx
cmpl $0x8, %eax
sete %cl
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a754
jmp 0xe46c
movzbl 0x79f5a(%rip), %edx     # 0x882c8
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a405
jmp 0xe46c
movzbl 0x79f41(%rip), %edx     # 0x882c8
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1ad4b
jmp 0xe46c
movq %r14, %rdi
callq 0xea61
movzbl 0x79f20(%rip), %edx     # 0x882c8
cmpl $0x8, %eax
jbe 0xe3fb
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a227
movl %eax, %ebx
testl %eax, %eax
js 0xe472
movl $0x2, 0x79ef2(%rip)     # 0x882c0
andl $0x0, 0x73de3(%rip)     # 0x821b8
leaq 0x10307(%rip), %rdi     # 0x1e6e3
movl %ebx, %esi
jmp 0xe4f0
movq %r14, %rdi
callq 0xea61
movzbl 0x79ed6(%rip), %edx     # 0x882c8
cmpl $0x8, %eax
ja 0xe4d8
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a080
movl %eax, %ebx
leaq 0x102b7(%rip), %rdi     # 0x1e6c8
jmp 0xe4ee
movzbl 0x79eab(%rip), %edx     # 0x882c8
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a080
jmp 0xe46c
movzbl 0x79e95(%rip), %edx     # 0x882c8
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a227
jmp 0xe46c
movzbl 0x79e7f(%rip), %edx     # 0x882c8
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a5eb
jmp 0xe46c
movzbl 0x79e69(%rip), %edx     # 0x882c8
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1aa3e
movl %eax, %ebx
testl %ebx, %ebx
je 0xe48a
leaq 0x1029c(%rip), %rdi     # 0x1e715
movl %ebx, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x190e1
jmp 0xe099
movl 0x73d38(%rip), %eax     # 0x821c8
testl %eax, %eax
js 0xe4a4
movzbl 0x8d(%rsp), %ecx
cmpl %ecx, %eax
jne 0xe5b0
movl 0x73d22(%rip), %eax     # 0x821cc
testl %eax, %eax
js 0xe4be
movzbl 0x8c(%rsp), %ecx
cmpl %ecx, %eax
jne 0xe5b0
movl 0x79e10(%rip), %edi     # 0x882d4
movl 0x88(%rsp), %eax
testl %edi, %edi
jle 0xe4fc
cmpl %eax, %edi
je 0xe4fe
jmp 0xe5b0
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1a227
movl %eax, %ebx
leaq 0x101f5(%rip), %rdi     # 0x1e6e3
movl %eax, %esi
xorl %eax, %eax
callq 0x19050
jmp 0xe46e
movl %eax, %edi
callq 0xd4cc
movl 0x73caf(%rip), %ecx     # 0x821b8
cmpl $0x1, %ecx
jne 0xe525
testq %rax, %rax
jne 0xe525
movl 0x88(%rsp), %edi
callq 0xd566
movl 0x73c93(%rip), %ecx     # 0x821b8
movzbl 0x8e(%rsp), %edx
testl %ecx, %ecx
je 0xe58f
testq %rax, %rax
je 0xe58f
cmpl $0x1, 0x10(%rax)
jne 0xe58f
cmpb $0x8, %dl
ja 0xe58f
movl 0x88(%rsp), %esi
movzbl 0x8d(%rsp), %edx
leaq 0x79da9(%rip), %r13     # 0x88300
xorl %ebx, %ebx
cmpq $0x40, %rbx
je 0xe6bf
cmpb $0x1, 0xf8(%r13)
jne 0xe583
cmpl %esi, 0xf0(%r13)
jne 0xe583
cmpl %edx, 0xf4(%r13)
je 0xe730
incq %rbx
addq $0x100, %r13            # imm = 0x100
jmp 0xe559
movzbl 0x79d2f(%rip), %ecx     # 0x882c5
movzbl 0x79d2a(%rip), %r8d     # 0x882c8
leaq 0x48(%rsp), %rdi
leaq 0x8f(%rsp), %rsi
callq 0xeac5
movl 0x73c12(%rip), %eax     # 0x821c8
testl %eax, %eax
sets %cl
movzbl 0x8d(%rsp), %r9d
cmpl %r9d, %eax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0xe099
movl 0x73bf2(%rip), %eax     # 0x821cc
testl %eax, %eax
sets %cl
movzbl 0x8c(%rsp), %r10d
cmpl %r10d, %eax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0xe099
movl 0x79cd6(%rip), %eax     # 0x882d4
testl %eax, %eax
setle %cl
movl 0x88(%rsp), %r8d
cmpl %r8d, %eax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0xe099
cmpb $0x0, 0x79ca5(%rip)     # 0x882c8
je 0xe62e
movq 0x269c4(%rip), %rcx     # 0x34ff0
jmp 0xe635
movq 0x2698b(%rip), %rcx     # 0x34fc0
movq (%rcx), %rbx
cmpb $0x1, 0x79c85(%rip)     # 0x882c4
jne 0xe099
cmpl %r8d, %eax
sete %cl
testl %eax, %eax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0xe099
testl %eax, %eax
cmovnel %eax, %r8d
movzbl 0x84(%rsp), %ecx
movzbl 0x8e(%rsp), %r11d
movq %rbx, %rdi
leaq 0x10792(%rip), %rsi     # 0x1ee0e
leaq 0x48(%rsp), %rdx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0xd1e0
addq $0x10, %rsp
xorl %r13d, %r13d
movzbl 0x8e(%rsp), %eax
cmpq %rax, %r13
jae 0xe6e4
movzbl 0x8f(%rsp,%r13), %edx
movq %rbx, %rdi
leaq 0x1076d(%rip), %rsi     # 0x1ee20
xorl %eax, %eax
callq 0xd1e0
incq %r13
jmp 0xe693
leaq 0x79c3a(%rip), %r13     # 0x88300
xorl %ebx, %ebx
cmpq $0x40, %rbx
je 0xe6f4
cmpb $0x1, 0xf8(%r13)
jne 0xe707
incq %rbx
addq $0x100, %r13            # imm = 0x100
jmp 0xe6c8
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0xd1b0
jmp 0xe099
leaq 0x10789(%rip), %rdi     # 0x1ee84
xorl %eax, %eax
callq 0x190e1
jmp 0xe5b0
movb $0x1, 0xf8(%r13)
movl %edx, 0xf4(%r13)
movl %esi, 0xf0(%r13)
andl $0x0, 0xe8(%r13)
xorl %eax, %eax
jmp 0xe737
xorl %eax, %eax
jmp 0xe32a
movl 0xe8(%r13), %eax
movzbl 0x8f(%rsp), %r8d
movl %r8d, 0x1c(%rsp)
andl $0x1f, %r8d
imull $0x7, %r8d, %ecx
decl %ecx
xorl %r9d, %r9d
testl %r8d, %r8d
sete %r10b
cmovel %r8d, %ecx
movq %rcx, 0x10(%rsp)
pushq $0x1
popq %rcx
movl %ecx, %edi
movl %r8d, %ecx
shll %cl, %edi
movq %rdi, 0x38(%rsp)
btl %r8d, %eax
movl %r8d, 0x18(%rsp)
jae 0xe8a0
leaq 0x10729(%rip), %rdi     # 0x1eeb0
xorl %eax, %eax
movb %r10b, 0xe(%rsp)
callq 0x190e1
movb 0xe(%rsp), %r10b
xorl %r9d, %r9d
movl 0x18(%rsp), %r8d
andl $0x0, 0xe8(%r13)
testl %r8d, %r8d
jne 0xe7d1
movzbl 0x90(%rsp), %eax
movq %rax, (%r13)
movzbl %al, %eax
movb $0x7, %cl
divb %cl
pushq $0x2
popq %rdx
movl %eax, %ecx
shlq %cl, %rdx
decl %edx
movl %edx, 0xec(%r13)
andl $-0x20, 0x1c(%rsp)
movb %r10b, %r9b
xorq $0x7, %r9
testl %r8d, %r8d
movq 0x10(%rsp), %rax
leaq 0x8(%r13,%rax), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x91(%rsp), %rax
cmoveq %rax, %rsi
movq %r9, %rdx
callq 0xd200
movq 0x38(%rsp), %r11
orl 0xe8(%r13), %r11d
movl %r11d, 0xe8(%r13)
movl 0x88(%rsp), %edx
movq (%r13), %rcx
movl 0xec(%r13), %r10d
subq $0x8, %rsp
leaq 0x106b1(%rip), %rdi     # 0x1eee7
movq %rbx, %rsi
movl 0x20(%rsp), %r8d
movl 0x24(%rsp), %r9d
xorl %eax, %eax
pushq %r10
pushq %r11
pushq 0x28(%rsp)
callq 0x19050
addq $0x20, %rsp
movl 0xe8(%r13), %eax
cmpl 0xec(%r13), %eax
jne 0xe5b0
leaq 0x8(%r13), %rsi
movl (%r13), %edx
movzbl 0x79a4c(%rip), %ecx     # 0x882c5
movzbl 0x79a47(%rip), %r8d     # 0x882c8
leaq 0x48(%rsp), %rdi
callq 0xeac5
movb $0x0, 0xf8(%r13)
andl $0x0, 0xe8(%r13)
jmp 0xe5b0
orl %r8d, %eax
jne 0xe7d1
jmp 0xe7ad
xorl %eax, %eax
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf9e4(%rip), %rdi      # 0x1e2ad
jmp 0xe8d2
leaq 0xf9f1(%rip), %rdi      # 0x1e2c3
callq 0xd0c0
xorl %edi, %edi
callq 0xd310
leaq 0xfe18(%rip), %rdi      # 0x1e6fd
xorl %eax, %eax
callq 0x190e1
pushq $0x1
popq %rdi
callq 0xd310
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xe901