// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/n2kd/main.c
// Function: storeMessage
static bool storeMessage(char *line, size_t len)
{
  const char *s, *e = 0, *e2;
  Message    *m;
  int         i, idx, k;
  int         src = 0, dst = 255, prn = 0;
  Pgn        *pgn;
  int64_t     now  = getNow();
  char       *key2 = 0;
  int         valid;
  char        value[16];

  if (isLogLevelEnabled(LOG_DEBUG))
  {
    if (len > 80)
    {
      logDebug("storeMessage(\"%1.20s...%1.20s\",%u)\n", line, line + len - 20, len);
    }
    else
    {
      logDebug("storeMessage(\"%s\",%u)\n", line, len);
    }
  }

  if (!strstr(line, "\"fields\":") || memcmp(line, "{\"timestamp", 11) != 0)
  {
    if (getJSONValue(line, "version", value, sizeof(value)))
    {
      logInfo("Found datastream from analyzer version %s\n", value);
      if (getJSONValue(line, "units", value, sizeof(value)))
      {
        if (strcmp(value, "si") == 0)
        {
          logInfo("Datastream uses SI units\n");
          unitSI = true;
        }
      }
      return true;
    }
    logDebug("Ignore: no fields and timestamp\n");
    return false;
  }
  if (memcmp(line, "{\"timestamp", 11) != 0)
  {
    logDebug("Ignore: no timestamp: '%s'\n", line);
    return false;
  }
  if (memcmp(line + len - 2, "}}", 2) != 0)
  {
    logDebug("Ignore: no line end: '%s'\n", line);
    return false;
  }

  if (getJSONValue(line, "src", value, sizeof(value)))
  {
    sscanf(value, "%d", &src);
  }

  if (getJSONValue(line, "dst", value, sizeof(value)))
  {
    sscanf(value, "%d", &dst);
  }

  if (getJSONValue(line, "pgn", value, sizeof(value)))
  {
    sscanf(value, "%d", &prn);
  }

  idx = PrnToIdx(prn);
  logDebug("src=%d dst=%d prn=%d idx=%d\n", src, dst, prn, idx);
  if (idx < 0)
  {
    logError("Ignore: prn %d: '%s'\n", prn, line);
    return false;
  }

  valid = SENSOR_TIMEOUT;
  if (prn != PRN_CLAIM)
  {
    /* Look for a secondary key */
    for (k = 0; k < ARRAYSIZE(secondaryKeyList); k++)
    {
      s = strstr(line, secondaryKeyList[k]);
      if (s)
      {
        logDebug("Found 2nd key %d = %s\n", k, secondaryKeyList[k]);
        s += strlen(secondaryKeyList[k]);
        if (*s == '{')
        {
          const char *s2 = strstr(s, "name\":");
          const char *s3 = strchr(s, '}');
          if (s2 == NULL || s2 > s3)
          {
            s2 = strstr(s, "value\":");
            if (s2 == NULL || s2 > s3)
            {
              continue;
            }
            s2 += STRSIZE("value\":");
          }
          else
          {
            s2 += STRSIZE("name\":");
          }
          s = s2;
        }
        while (strchr(SKIP_CHARACTERS, *s))
        {
          s++;
        }

        e  = strchr(s, ' ');
        e2 = strchr(s, '"');
        if (!e || e2 < e)
        {
          e = e2;
        }
        if (!e)
        {
          e = s + strlen(s);
        }
        if (e > s && e[-1] == ',')
        {
          e--;
        }
        key2 = malloc(e - s + 1);
        if (!key2)
        {
          logAbort("Out of memory allocating %u bytes\n", e - s);
        }
        memcpy(key2, s, e - s);
        key2[e - s] = 0;
        valid       = secondaryKeyTimeout[k];
        break;
      }
    }
  }

  pgn = pgnIdx[idx];
  if (!pgn)
  {
    if (maxPgnList == ARRAYSIZE(pgnList))
    {
      logAbort("Too many PGNs\n");
    }

    pgn = calloc(1, sizeof(Pgn) + sizeof(Message));
    if (!pgn)
    {
      logAbort("Out of memory allocating %u bytes\n", sizeof(Pgn) + sizeof(Message));
    }
    pgnIdx[idx]           = pgn;
    pgnList[maxPgnList++] = &pgnIdx[idx];
    logDebug("Storing new PGN %d in index %u\n", prn, idx);
  }

  if (!pgn->p_description)
  {
    pgn->p_prn = prn;
    s          = strstr(line, "\"description\":");
    if (s)
    {
      s  = s + sizeof("\"description\":");
      e  = strchr(s, ':');
      e2 = strchr(s, '"');
      if (!e || e2 < e)
      {
        e = e2;
      }
      if (!e)
      {
        logDebug("Cannot find end of description in %s\n", s);
        return false;
      }
      logDebug("New PGN '%.*s'\n", e - s, s);
      pgn->p_description = malloc(e - s + 1);
      if (!pgn->p_description)
      {
        logAbort("Out of memory allocating %u bytes\n", e - s);
      }
      memcpy(pgn->p_description, s, e - s);
      pgn->p_description[e - s] = 0;
    }
  }

  /* Find existing key */
  for (i = 0; i < pgn->p_maxSrc; i++)
  {
    if (pgn->p_message[i].m_src == src)
    {
      if (pgn->p_message[i].m_key2)
      {
        if (key2 && strcmp(pgn->p_message[i].m_key2, key2) == 0)
        {
          break;
        }
      }
      else
      {
        break;
      }
    }
  }

  /* Reuse expired key ? */
  if (i == pgn->p_maxSrc)
  {
    for (i = 0; i < pgn->p_maxSrc; i++)
    {
      if (pgn->p_message[i].m_valid < now)
      {
        pgn->p_message[i].m_src = (uint8_t) src;
        if (pgn->p_message[i].m_key2)
        {
          free(pgn->p_message[i].m_key2);
        }
        pgn->p_message[i].m_key2 = key2;
        key2                     = 0;
        break;
      }
    }
  }

  /* Create new key */
  if (i == pgn->p_maxSrc)
  {
    size_t newSize;

    pgn->p_maxSrc++;
    newSize = sizeof(Pgn) + pgn->p_maxSrc * sizeof(Message);
    pgn     = realloc(pgnIdx[idx], newSize);
    if (!pgn)
    {
      logAbort("Out of memory allocating %u bytes\n", newSize);
    }
    pgnIdx[idx]                  = pgn;
    pgn->p_message[i].m_src      = (uint8_t) src;
    pgn->p_message[i].m_key2     = key2;
    key2                         = 0;
    pgn->p_message[i].m_text     = 0;
    pgn->p_message[i].m_interval = 0;
    pgn->p_message[i].m_last     = 0;
    pgn->p_message[i].m_count    = 0;
  }

  m = &pgn->p_message[i];
  if (m->m_text)
  {
    m->m_text = realloc(m->m_text, len + 2);
  }
  else
  {
    m->m_text = malloc(len + 2);
  }
  if (!m->m_text)
  {
    logAbort("Out of memory allocating %u bytes\n", len + 1);
  }
  memcpy(m->m_text, line, len);
  m->m_text[len]     = '\n';
  m->m_text[len + 1] = 0;

  // Overrule timeout of valid pgn for some specific PGNs
  if (prn == PRN_CLAIM || prn == PRN_PROD_INFO || prn == PRN_CONFIG_INFO)
  {
    valid = CLAIM_TIMEOUT;
  }
  else if (prn == 130816)
  {
    valid = SONICHUB_TIMEOUT;
  }

  logDebug("stored prn %d timeout=%d\n", prn, valid);
  if (key2)
  {
    free(key2);
  }
  m->m_valid = now + valid * INT64_C(1000);
  if (m->m_last > 0)
  {
    m->m_interval = (uint32_t) (now - m->m_last);
  }
  m->m_last = now;
  m->m_count++;

  requestAddressClaimAndProductInfo(now);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x48(%rbp)
movl $0xff, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
callq 0x9820
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movl $0x7, %edi
callq 0x9df0
testb $0x1, %al
jne 0x3dc1
jmp 0x3e04
cmpq $0x50, -0x18(%rbp)
jbe 0x3dec
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x18(%rbp), %rdx
addq $-0x14, %rdx
movq -0x18(%rbp), %rcx
leaq 0x8b7b(%rip), %rdi      # 0xc95e
movb $0x0, %al
callq 0x9ae0
jmp 0x3e02
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x8b87(%rip), %rdi      # 0xc982
movb $0x0, %al
callq 0x9ae0
jmp 0x3e04
movq -0x10(%rbp), %rdi
leaq 0x8b8a(%rip), %rsi      # 0xc999
callq 0x2380
cmpq $0x0, %rax
je 0x3e38
movq -0x10(%rbp), %rdi
leaq 0x8b7e(%rip), %rsi      # 0xc9a3
movl $0xb, %edx
callq 0x21d0
cmpl $0x0, %eax
je 0x3ed4
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq 0x8336(%rip), %rsi      # 0xc17d
movl $0x10, %ecx
callq 0xa660
testb $0x1, %al
jne 0x3e57
jmp 0x3ebd
leaq -0x80(%rbp), %rsi
leaq 0x8b4d(%rip), %rdi      # 0xc9af
movb $0x0, %al
callq 0x9990
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq 0x8b62(%rip), %rsi      # 0xc9da
movl $0x10, %ecx
callq 0xa660
testb $0x1, %al
jne 0x3e88
jmp 0x3eb4
leaq -0x80(%rbp), %rdi
leaq 0x8b4d(%rip), %rsi      # 0xc9e0
callq 0x21f0
cmpl $0x0, %eax
jne 0x3eb2
leaq 0x8b3f(%rip), %rdi      # 0xc9e3
movb $0x0, %al
callq 0x9990
movb $0x1, 0xd536(%rip)      # 0x113e8
jmp 0x3eb4
movb $0x1, -0x1(%rbp)
jmp 0x48ea
leaq 0x8b39(%rip), %rdi      # 0xc9fd
movb $0x0, %al
callq 0x9ae0
movb $0x0, -0x1(%rbp)
jmp 0x48ea
movq -0x10(%rbp), %rdi
leaq 0x8ac4(%rip), %rsi      # 0xc9a3
movl $0xb, %edx
callq 0x21d0
cmpl $0x0, %eax
je 0x3f09
movq -0x10(%rbp), %rsi
leaq 0x8b25(%rip), %rdi      # 0xca1e
movb $0x0, %al
callq 0x9ae0
movb $0x0, -0x1(%rbp)
jmp 0x48ea
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
addq $-0x2, %rax
movw (%rax), %ax
subw $0x7d7d, %ax            # imm = 0x7D7D
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3f42
movq -0x10(%rbp), %rsi
leaq 0x8b0b(%rip), %rdi      # 0xca3d
movb $0x0, %al
callq 0x9ae0
movb $0x0, -0x1(%rbp)
jmp 0x48ea
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq 0x8b07(%rip), %rsi      # 0xca58
movl $0x10, %ecx
callq 0xa660
testb $0x1, %al
jne 0x3f61
jmp 0x3f77
leaq -0x80(%rbp), %rdi
leaq 0x968e(%rip), %rsi      # 0xd5fa
leaq -0x48(%rbp), %rdx
movb $0x0, %al
callq 0x2260
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq 0x8ad6(%rip), %rsi      # 0xca5c
movl $0x10, %ecx
callq 0xa660
testb $0x1, %al
jne 0x3f96
jmp 0x3fac
leaq -0x80(%rbp), %rdi
leaq 0x9659(%rip), %rsi      # 0xd5fa
leaq -0x4c(%rbp), %rdx
movb $0x0, %al
callq 0x2260
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq 0x8aa5(%rip), %rsi      # 0xca60
movl $0x10, %ecx
callq 0xa660
testb $0x1, %al
jne 0x3fcb
jmp 0x3fe1
leaq -0x80(%rbp), %rdi
leaq 0x9624(%rip), %rsi      # 0xd5fa
leaq -0x50(%rbp), %rdx
movb $0x0, %al
callq 0x2260
cmpl $0x1ffb8, -0x50(%rbp)   # imm = 0x1FFB8
jg 0x3ffa
movl -0x50(%rbp), %eax
subl $0xe7ff, %eax           # imm = 0xE7FF
movl %eax, -0x9c(%rbp)
jmp 0x403a
cmpl $0x40200, -0x50(%rbp)   # imm = 0x40200
jg 0x4021
cmpl $0x40000, -0x50(%rbp)   # imm = 0x40000
jl 0x4021
movl -0x50(%rbp), %eax
addl $0x117ba, %eax          # imm = 0x117BA
subl $0x40000, %eax          # imm = 0x40000
movl %eax, -0xa0(%rbp)
jmp 0x402e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xa0(%rbp)
jmp 0x402e
movl -0xa0(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x48(%rbp), %esi
movl -0x4c(%rbp), %edx
movl -0x50(%rbp), %ecx
movl -0x40(%rbp), %r8d
leaq 0x8a0d(%rip), %rdi      # 0xca64
movb $0x0, %al
callq 0x9ae0
cmpl $0x0, -0x40(%rbp)
jge 0x4082
movl -0x50(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x8a0f(%rip), %rdi      # 0xca81
movb $0x0, %al
callq 0x9b90
movb $0x0, -0x1(%rbp)
jmp 0x48ea
movl $0x78, -0x6c(%rbp)
cmpl $0xee00, -0x50(%rbp)    # imm = 0xEE00
je 0x4308
movl $0x0, -0x44(%rbp)
movslq -0x44(%rbp), %rax
cmpq $0x5, %rax
jae 0x4306
movq -0x10(%rbp), %rdi
movslq -0x44(%rbp), %rcx
leaq 0xd296(%rip), %rax      # 0x11350
movq (%rax,%rcx,8), %rsi
callq 0x2380
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x42f6
movl -0x44(%rbp), %esi
movslq -0x44(%rbp), %rcx
leaq 0xd270(%rip), %rax      # 0x11350
movq (%rax,%rcx,8), %rdx
leaq 0x89ac(%rip), %rdi      # 0xca97
movb $0x0, %al
callq 0x9ae0
movslq -0x44(%rbp), %rcx
leaq 0xd253(%rip), %rax      # 0x11350
movq (%rax,%rcx,8), %rdi
callq 0x20f0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0x41cb
movq -0x20(%rbp), %rdi
leaq 0x8985(%rip), %rsi      # 0xcaae
callq 0x2380
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
movl $0x7d, %esi
callq 0x2110
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x4164
movq -0x88(%rbp), %rax
cmpq -0x90(%rbp), %rax
jbe 0x41ae
movq -0x20(%rbp), %rdi
leaq 0x8946(%rip), %rsi      # 0xcab5
callq 0x2380
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x4195
movq -0x88(%rbp), %rax
cmpq -0x90(%rbp), %rax
jbe 0x419a
jmp 0x42f8
movq -0x88(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x88(%rbp)
jmp 0x41c0
movq -0x88(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x41cd
movq -0x20(%rbp), %rax
movsbl (%rax), %esi
leaq 0x88e2(%rip), %rdi      # 0xcabd
callq 0x2110
cmpq $0x0, %rax
je 0x41f4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x41cd
movq -0x20(%rbp), %rdi
movl $0x20, %esi
callq 0x2110
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movl $0x22, %esi
callq 0x2110
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4229
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x4231
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x425d
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20f0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x4280
movq -0x28(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2c, %eax
jne 0x4280
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
subq %rax, %rdi
addq $0x1, %rdi
callq 0x2240
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x42b8
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
leaq 0x8810(%rip), %rdi      # 0xcac1
movb $0x0, %al
callq 0x9c40
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
callq 0x2220
movq -0x68(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
movslq -0x44(%rbp), %rcx
leaq 0xd092(%rip), %rax      # 0x11380
movl (%rax,%rcx,4), %eax
movl %eax, -0x6c(%rbp)
jmp 0x4306
jmp 0x42f8
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x409d
jmp 0x4308
movslq -0x40(%rbp), %rcx
leaq 0x201b2ed(%rip), %rax   # 0x201f600
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x43c7
cmpq $0x200, 0x20a909f(%rip) # imm = 0x200
jne 0x4341
leaq 0x87aa(%rip), %rdi      # 0xcae4
movb $0x0, %al
callq 0x9c40
movl $0x1, %edi
movl $0x40, %esi
callq 0x21e0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x436e
leaq 0x875f(%rip), %rdi      # 0xcac1
movl $0x40, %esi
movb $0x0, %al
callq 0x9c40
movq -0x58(%rbp), %rdx
movslq -0x40(%rbp), %rcx
leaq 0x201b283(%rip), %rax   # 0x201f600
movq %rdx, (%rax,%rcx,8)
movslq -0x40(%rbp), %rax
leaq 0x201b274(%rip), %rdx   # 0x201f600
shlq $0x3, %rax
addq %rax, %rdx
movq 0x20a9036(%rip), %rcx   # 0x20ad3d0
movq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x20a9028(%rip)   # 0x20ad3d0
leaq 0x20a8021(%rip), %rax   # 0x20ac3d0
movq %rdx, (%rax,%rcx,8)
movl -0x50(%rbp), %esi
movl -0x40(%rbp), %edx
leaq 0x8733(%rip), %rdi      # 0xcaf3
movb $0x0, %al
callq 0x9ae0
movq -0x58(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x44fe
movl -0x50(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x8729(%rip), %rsi      # 0xcb13
callq 0x2380
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x44fc
movq -0x20(%rbp), %rax
addq $0xf, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x2110
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movl $0x22, %esi
callq 0x2110
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x443f
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x4447
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4469
movq -0x20(%rbp), %rsi
leaq 0x86c9(%rip), %rdi      # 0xcb22
movb $0x0, %al
callq 0x9ae0
movb $0x0, -0x1(%rbp)
jmp 0x48ea
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
movq -0x20(%rbp), %rdx
leaq 0x86c9(%rip), %rdi      # 0xcb48
movb $0x0, %al
callq 0x9ae0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
subq %rax, %rdi
addq $0x1, %rdi
callq 0x2240
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x44c9
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
leaq 0x85ff(%rip), %rdi      # 0xcac1
movb $0x0, %al
callq 0x9c40
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
callq 0x2220
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x44fe
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x458a
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
cmpl -0x48(%rbp), %eax
jne 0x457a
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
je 0x4576
cmpq $0x0, -0x68(%rbp)
je 0x4574
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
movq -0x68(%rbp), %rsi
callq 0x21f0
cmpl $0x0, %eax
jne 0x4574
jmp 0x458a
jmp 0x4578
jmp 0x458a
jmp 0x457a
jmp 0x457c
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x4505
movl -0x3c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x4655
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x4653
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x60(%rbp), %rax
jae 0x4643
movl -0x48(%rbp), %eax
movb %al, %cl
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movb %cl, (%rax)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
je 0x461e
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0x2030
movq -0x68(%rbp), %rcx
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movq $0x0, -0x68(%rbp)
jmp 0x4653
jmp 0x4645
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x45a1
jmp 0x4655
movl -0x3c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x477d
movq -0x58(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
imulq $0x30, %rax, %rax
addq $0x10, %rax
movq %rax, -0x98(%rbp)
movslq -0x40(%rbp), %rcx
leaq 0x201af6d(%rip), %rax   # 0x201f600
movq (%rax,%rcx,8), %rdi
movq -0x98(%rbp), %rsi
callq 0x2280
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x46c3
movq -0x98(%rbp), %rsi
leaq 0x8405(%rip), %rdi      # 0xcac1
movb $0x0, %al
callq 0x9c40
movq -0x58(%rbp), %rdx
movslq -0x40(%rbp), %rcx
leaq 0x201af2e(%rip), %rax   # 0x201f600
movq %rdx, (%rax,%rcx,8)
movl -0x48(%rbp), %eax
movb %al, %cl
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movb %cl, (%rax)
movq -0x68(%rbp), %rcx
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movq $0x0, -0x68(%rbp)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x28(%rax)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x18(%rax)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x47c1
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x2280
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x47d9
movq -0x18(%rbp), %rdi
addq $0x2, %rdi
callq 0x2240
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x47fa
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
leaq 0x82ce(%rip), %rdi      # 0xcac1
movb $0x0, %al
callq 0x9c40
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2220
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movb $0xa, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movb $0x0, 0x1(%rax,%rcx)
cmpl $0xee00, -0x50(%rbp)    # imm = 0xEE00
je 0x484b
cmpl $0x1f014, -0x50(%rbp)   # imm = 0x1F014
je 0x484b
cmpl $0x1f016, -0x50(%rbp)   # imm = 0x1F016
jne 0x4854
movl $0x78, -0x6c(%rbp)
jmp 0x4866
cmpl $0x1ff00, -0x50(%rbp)   # imm = 0x1FF00
jne 0x4864
movl $0x83d600, -0x6c(%rbp)  # imm = 0x83D600
jmp 0x4866
movl -0x50(%rbp), %esi
movl -0x6c(%rbp), %edx
leaq 0x82e5(%rip), %rdi      # 0xcb58
movb $0x0, %al
callq 0x9ae0
cmpq $0x0, -0x68(%rbp)
je 0x488a
movq -0x68(%rbp), %rdi
callq 0x2030
movq -0x60(%rbp), %rcx
movslq -0x6c(%rbp), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
addq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x48c4
movq -0x60(%rbp), %rax
movq -0x38(%rbp), %rcx
subq 0x10(%rcx), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x60(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x60(%rbp), %rdi
callq 0x4900
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)