// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/fieldtype.c
// Function: fillFieldType
extern void fillFieldType(bool doUnitFixup)
{
  // Percolate fields from physical quantity to fieldtype
  for (size_t i = 0; i < fieldTypeCount; i++)
  {
    FieldType *ft = &fieldTypeList[i];

    if (ft->physical != NULL)
    {
      if (!isPhysicalQuantityListed(ft->physical))
      {
        logAbort("FieldType '%s' contains an unlisted physical quantity '%s'\n", ft->name, ft->physical->name);
      }
      if (ft->unit == NULL)
      {
        ft->unit = ft->physical->abbreviation;
        logDebug("Fieldtype '%s' inherits unit '%s' from physical type '%s'\n", ft->name, STRNULL(ft->unit), ft->physical->name);
      }
      if (ft->url == NULL)
      {
        ft->url = ft->physical->url;
      }
    }
  }

  // Percolate fields from base to derived field
  for (size_t i = 0; i < fieldTypeCount; i++)
  {
    FieldType *ft = &fieldTypeList[i];

    logDebug("filling '%s'\n", ft->name);

    if (ft->baseFieldType != NULL)
    {
      FieldType *base = getFieldType(ft->baseFieldType);

      if (base == NULL)
      {
        logAbort("invalid baseFieldType '%s' found in FieldType '%s'\n", ft->baseFieldType, ft->name);
      }
      if (base > ft)
      {
        logAbort("invalid baseFieldType '%s' must be ordered before FieldType '%s'\n", ft->baseFieldType, ft->name);
      }
      ft->baseFieldTypePtr = base;

      // Inherit parent fields
      if (ft->physical == NULL)
      {
        ft->physical = base->physical;
      }
      if (ft->hasSign == Null && base->hasSign != Null)
      {
        ft->hasSign = base->hasSign;
      }
      if (ft->unit == NULL && base->unit != NULL)
      {
        ft->unit = base->unit;
        logDebug("Fieldtype '%s' inherits unit '%s' from base type '%s'\n", ft->name, ft->unit, base->name);
      }
      if (ft->size == 0 && base->size != 0)
      {
        ft->size = base->size;
        logDebug("Fieldtype '%s' inherits size %u from base type '%s'\n", ft->name, ft->size, base->name);
      }
      if (ft->resolution == 0.0 && base->resolution != 0.0)
      {
        ft->resolution = base->resolution;
        logDebug("Fieldtype '%s' inherits resolution %g from base type '%s'\n", ft->name, ft->resolution, base->name);
      }
      else if (ft->resolution != 0.0 && base->resolution != 0.0 && ft->resolution != base->resolution)
      {
        logAbort("Cannot overrule resolution %g in '%s' with %g in '%s'\n", base->resolution, base->name, ft->resolution, ft->name);
      }
      if (ft->pf == NULL)
      {
        ft->pf = base->pf;
      }
    }

    if (ft->pf == NULL)
    {
      logAbort("FieldType '%s' has no print function\n", ft->name);
    }

    // Set the field range
    if (ft->size != 0 && ft->resolution != 0.0 && ft->hasSign != Null && ft->rangeMax == 0.0)
    {
      ft->rangeMin = getMinRange(ft->name, ft->size, ft->resolution, ft->hasSign == True, ft->offset);
      ft->rangeMax = getMaxRange(ft->name, ft->size, ft->resolution, ft->hasSign == True, ft->offset, NULL);
    }
    else
    {
      ft->rangeMin = nan("");
      ft->rangeMax = nan("");
    }
  }

  for (size_t i = 0; i < pgnListSize; i++)
  {
    uint32_t    pgn   = pgnList[i].pgn;
    const char *pname = pgnList[i].description;
    size_t      j;

    for (j = 0; pgnList[i].fieldList[j].name != NULL; j++)
    {
      Field     *f = &pgnList[i].fieldList[j];
      FieldType *ft;

      if (f->fieldType == NULL)
      {
        logAbort("PGN %u '%s' field '%s' contains NULL fieldType\n", pgn, pname, f->name);
      }
      ft = getFieldType(f->fieldType);
      if (ft == NULL)
      {
        logAbort("PGN %u '%s' field '%s' contains invalid fieldType '%s'\n", pgn, pname, f->name, f->fieldType);
      }
      f->ft = ft;

      if ((ft->hasSign == True && f->hasSign == false) || (ft->hasSign == False && f->hasSign == true))
      {
        logAbort(
            "PGN %u '%s' field '%s' contains different sign attribute than fieldType '%s'\n", pgn, pname, f->name, f->fieldType);
      }

      if (f->resolution == 0.0)
      {
        f->resolution = ft->resolution;
      }
      if (ft->resolution != 0.0 && ft->resolution != f->resolution)
      {
        logAbort("Cannot overrule resolution %g in '%s' with %g in PGN %u field '%s'\n",
                 ft->resolution,
                 ft->name,
                 f->resolution,
                 pgnList[i].pgn,
                 f->name);
      }

      if (ft->size != 0 && f->size == 0)
      {
        f->size = ft->size;
      }
      if (ft->size != 0 && ft->size != f->size)
      {
        logAbort(
            "Cannot overrule size %d in '%s' with %d in PGN %u field '%s'\n", ft->size, ft->name, f->size, pgnList[i].pgn, f->name);
      }

      if (ft->offset != 0 && f->offset == 0)
      {
        f->offset = ft->offset;
      }
      if (ft->offset != f->offset)
      {
        logAbort("Cannot overrule offset %d in '%s' with %d in PGN %u field '%s'\n",
                 ft->offset,
                 ft->name,
                 f->offset,
                 pgnList[i].pgn,
                 f->name);
      }

      if (ft->unit != NULL && f->unit == NULL)
      {
        f->unit = ft->unit;
      }
      if (f->unit != NULL && ft->unit != NULL && strcmp(f->unit, ft->unit) != 0
          && !(strcmp(f->unit, "deg") == 0 && strcmp(ft->unit, "rad") == 0))
      {
        logAbort("PGN %u '%s' field '%s' contains different unit attribute ('%s') than fieldType '%s' ('%s')\n",
                 pgn,
                 pname,
                 f->name,
                 f->unit,
                 f->fieldType,
                 ft->unit);
      }

      if (isnan(f->rangeMax) || f->rangeMax == 0.0)
      {
        f->rangeMin = ft->rangeMin;
        f->rangeMax = ft->rangeMax;
      }
      if (doUnitFixup && f->unit != NULL && f->resolution != 0.0)
      {
        fixupUnit(f);
      }
      if (f->unit != NULL && f->unit[0] == '=') // Is a match field
      {
        pgnList[i].hasMatchFields = true;
      }

      logDebug("%s size=%u res=%g sign=%u rangeMax=%g\n", f->name, f->size, f->resolution, ft->hasSign, f->rangeMax);

      if (f->size != 0 && f->resolution != 0.0 && ft->hasSign != Null && isnan(f->rangeMax))
      {
        f->rangeMin = getMinRange(f->name, f->size, f->resolution, f->hasSign, f->offset);
        f->rangeMax = getMaxRange(f->name, f->size, f->resolution, f->hasSign, f->offset, &f->lookup);
      }

      f->pgn   = &pgnList[i];
      f->order = j + 1;
    }
    if (pgnList[i].type == PACKET_FAST && !ALLOW_PGN_FAST_PACKET(pgn))
    {
      logAbort("PGN %u '%s' is outside fast-packet range\n", pgn, pgnList[i].description);
    }
    if (pgnList[i].type != PACKET_FAST && !ALLOW_PGN_SINGLE_FRAME(pgn))
    {
      logError("PGN %u '%s' is outside single-frame range\n", pgn, pgnList[i].description);
    }
    if (pgnList[i].repeatingCount1 != 0 && pgnList[i].repeatingStart1 == 0)
    {
      logAbort("PGN %u '%s' has no way to determine repeating field set 1\n", pgn, pgnList[i].description);
    }
    if (pgnList[i].repeatingCount2 != 0 && pgnList[i].repeatingStart2 == 0)
    {
      logAbort("PGN %u '%s' has no way to determine repeating field set 2\n", pgn, pgnList[i].description);
    }

    if (pgnList[i].interval == 0)
    {
      pgnList[i].complete |= PACKET_INTERVAL_UNKNOWN;
    }

    if (j == 0 && pgnList[i].complete == PACKET_COMPLETE)
    {
      logError("Internal error: PGN %d '%s' does not have fields.\n", pgnList[i].pgn, pgnList[i].description);
      exit(2);
    }
    pgnList[i].fieldCount = j;
    logDebug("PGN %u '%s' has %u fields\n", pgnList[i].pgn, pname, j);
  }

#ifndef EXPLAIN
  for (size_t i = 0; i < ARRAY_SIZE(fieldtypeEnums); i++)
  {
    uint32_t maxValue = (1 << fieldtypeEnums[i].size) - 1;

    for (size_t j = 0; j < maxValue; j++)
    {
      /* DISCARD */ (fieldtypeEnums[i].function.pair)(j); // Initialize all internal fields on init
    }
  }
#endif

  logDebug("Filled all fieldtypes\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edi, 0x14(%rsp)
leaq 0x70d63(%rip), %r13     # 0x95610
leaq 0x20eec(%rip), %r15     # 0x457a0
leaq 0x19e41(%rip), %rbx     # 0x3e6fc
leaq 0x2141e(%rip), %rbp     # 0x45ce0
xorl %r14d, %r14d
leaq (%r14,%r14,8), %r12
shlq $0x4, %r12
movq 0x80(%r12,%r13), %rax
testq %rax, %rax
je 0x24968
addq %r13, %r12
cmpq %r15, %rax
je 0x24917
xorl %edx, %edx
movq %rdx, %rcx
cmpq $0x1c, %rdx
je 0x248fc
leaq 0x1(%rcx), %rdx
cmpq %rax, 0x8(%rbp,%rcx,8)
jne 0x248e8
cmpq $0x1c, %rcx
jb 0x24917
movq (%r12), %rsi
movq (%rax), %rdx
leaq 0x19db0(%rip), %rdi     # 0x3e6c0
xorl %eax, %eax
callq 0x25603
cmpq $0x0, 0x48(%r12)
jne 0x2494f
movq (%r12), %rsi
movq 0x80(%r12), %rax
movq 0x18(%rax), %rdx
movq %rdx, 0x48(%r12)
testq %rdx, %rdx
leaq 0x77c7(%rip), %rcx      # 0x2c105
cmoveq %rcx, %rdx
movq (%rax), %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x254dd
cmpq $0x0, 0x20(%r12)
jne 0x24968
movq 0x80(%r12), %rax
movq 0x28(%rax), %rax
movq %rax, 0x20(%r12)
incq %r14
cmpq $0xac, %r14
jne 0x248c5
leaq 0x19db8(%rip), %r14     # 0x3e737
leaq 0x6a18(%rip), %r12      # 0x2b39e
xorl %ebp, %ebp
movq %r13, %r15
addq %rbp, %r15
movq (%rbp,%r13), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x254dd
movq 0x30(%rbp,%r13), %rdi
testq %rdi, %rdi
je 0x24b06
callq 0x2455c
movq %rax, %rbx
testq %rax, %rax
jne 0x249d0
movq (%rbp,%r13), %rdx
movq 0x30(%rbp,%r13), %rsi
leaq 0x19d7c(%rip), %rdi     # 0x3e745
xorl %eax, %eax
callq 0x25603
cmpq %r15, %rbx
jbe 0x249ed
movq (%rbp,%r13), %rdx
movq 0x30(%rbp,%r13), %rsi
leaq 0x19d93(%rip), %rdi     # 0x3e779
xorl %eax, %eax
callq 0x25603
movq %rbx, 0x88(%rbp,%r13)
cmpq $0x0, 0x80(%rbp,%r13)
jne 0x24a0f
movq 0x80(%rbx), %rax
movq %rax, 0x80(%rbp,%r13)
cmpl $0x0, 0x60(%rbp,%r13)
xorpd %xmm2, %xmm2
jne 0x24a27
movl 0x60(%rbx), %eax
testl %eax, %eax
je 0x24a27
movl %eax, 0x60(%rbp,%r13)
cmpq $0x0, 0x48(%rbp,%r13)
jne 0x24a57
movq 0x48(%rbx), %rdx
testq %rdx, %rdx
je 0x24a57
movq %rdx, 0x48(%rbp,%r13)
movq (%rbp,%r13), %rsi
movq (%rbx), %rcx
leaq 0x19d6f(%rip), %rdi     # 0x3e7bb
xorl %eax, %eax
callq 0x254dd
xorpd %xmm2, %xmm2
cmpl $0x0, 0x28(%rbp,%r13)
jne 0x24a85
movl 0x28(%rbx), %edx
testl %edx, %edx
je 0x24a85
movl %edx, 0x28(%rbp,%r13)
movq (%rbp,%r13), %rsi
movq (%rbx), %rcx
leaq 0x19d78(%rip), %rdi     # 0x3e7f2
xorl %eax, %eax
callq 0x254dd
xorpd %xmm2, %xmm2
movsd 0x58(%rbp,%r13), %xmm1
ucomisd %xmm2, %xmm1
jne 0x24ac0
jp 0x24ac0
movsd 0x58(%rbx), %xmm0
ucomisd %xmm2, %xmm0
jne 0x24aa1
jnp 0x24ac0
movsd %xmm0, 0x58(%rbp,%r13)
movq (%rbp,%r13), %rsi
movq (%rbx), %rdx
leaq 0x19d70(%rip), %rdi     # 0x3e827
movb $0x1, %al
callq 0x254dd
jmp 0x24af5
ucomisd %xmm2, %xmm1
jne 0x24ac8
jnp 0x24af5
movsd 0x58(%rbx), %xmm0
ucomisd 0x38cb(%rip), %xmm0     # 0x283a0
jne 0x24ad9
jnp 0x24af5
ucomisd %xmm0, %xmm1
jne 0x24ae1
jnp 0x24af5
movq (%rbx), %rsi
movq (%r15), %rdx
leaq 0x19d74(%rip), %rdi     # 0x3e862
movb $0x2, %al
callq 0x25603
cmpq $0x0, 0x78(%rbp,%r13)
jne 0x24b06
movq 0x78(%rbx), %rax
movq %rax, 0x78(%rbp,%r13)
cmpq $0x0, 0x78(%rbp,%r13)
jne 0x24b1f
movq (%r15), %rsi
leaq 0x19d81(%rip), %rdi     # 0x3e899
xorl %eax, %eax
callq 0x25603
movl 0x28(%rbp,%r13), %esi
testl %esi, %esi
je 0x24ba0
movsd 0x58(%rbp,%r13), %xmm0
ucomisd 0x3869(%rip), %xmm0     # 0x283a0
jne 0x24b3b
jnp 0x24ba0
movl 0x60(%rbp,%r13), %eax
testl %eax, %eax
je 0x24ba0
movsd 0x70(%rbp,%r13), %xmm1
ucomisd 0x384d(%rip), %xmm1     # 0x283a0
jne 0x24ba0
jp 0x24ba0
movq (%rbp,%r13), %rdi
xorl %edx, %edx
cmpl $0x2, %eax
sete %dl
movl 0x50(%rbp,%r13), %ecx
callq 0x25090
movsd %xmm0, 0x68(%rbp,%r13)
movq (%rbp,%r13), %rdi
movl 0x28(%rbp,%r13), %esi
movsd 0x58(%rbp,%r13), %xmm0
xorl %edx, %edx
cmpl $0x2, 0x60(%rbp,%r13)
sete %dl
movl 0x50(%rbp,%r13), %ecx
xorl %r8d, %r8d
callq 0x250f7
jmp 0x24bb7
movq %r12, %rdi
callq 0xd300
movsd %xmm0, 0x68(%rbp,%r13)
movq %r12, %rdi
callq 0xd300
movsd %xmm0, 0x70(%rbp,%r13)
addq $0x90, %rbp
cmpq $0x60c0, %rbp           # imm = 0x60C0
jne 0x24988
leaq 0x37ef(%rip), %rax      # 0x283c8
cmpq $0x0, (%rax)
je 0x25053
leaq 0x21716(%rip), %rax     # 0x46300
leaq 0x78(%rax), %r14
xorl %ecx, %ecx
movq %rcx, 0x20(%rsp)
imulq $0x15f8, %rcx, %rax     # imm = 0x15F8
leaq 0x216fd(%rip), %rcx     # 0x46300
leaq (%rcx,%rax), %r12
movl 0x8(%rcx,%rax), %ebx
movq (%rcx,%rax), %rdx
movq %rdx, 0x8(%rsp)
movq 0x18(%rcx,%rax), %rcx
testq %rcx, %rcx
movq %r14, 0x28(%rsp)
je 0x24f2e
xorl %r15d, %r15d
movq %rbx, 0x18(%rsp)
movq %r15, 0x30(%rsp)
cmpq $0x0, -0x58(%r14)
jne 0x24c50
leaq 0x19c7d(%rip), %rdi     # 0x3e8bf
movl %ebx, %esi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x25603
movq -0x58(%r14), %rdi
callq 0x2455c
movq %rax, %r15
testq %rax, %rax
jne 0x24c7e
movq -0x60(%r14), %rcx
movq -0x58(%r14), %r8
leaq 0x19c7f(%rip), %rdi     # 0x3e8ef
movl %ebx, %esi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x25603
movq %r15, 0x28(%r14)
movl 0x60(%r15), %eax
cmpl $0x1, %eax
je 0x24c9c
cmpl $0x2, %eax
jne 0x24cc0
cmpb $0x0, -0x17(%r14)
je 0x24ca3
cmpl $0x1, %eax
jne 0x24cc0
cmpb $0x1, -0x17(%r14)
jne 0x24cc0
movq -0x60(%r14), %rcx
movq -0x58(%r14), %r8
leaq 0x19c75(%rip), %rdi     # 0x3e927
movl %ebx, %esi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x25603
movsd -0x30(%r14), %xmm0
ucomisd 0x36d2(%rip), %xmm0     # 0x283a0
jne 0x24cde
jp 0x24cde
movsd 0x58(%r15), %xmm0
movsd %xmm0, -0x30(%r14)
leaq -0x60(%r14), %r13
movsd 0x58(%r15), %xmm0
ucomisd 0x36b0(%rip), %xmm0     # 0x283a0
jne 0x24cf4
jnp 0x24d1c
movsd -0x30(%r14), %xmm1
ucomisd %xmm1, %xmm0
jne 0x24d02
jnp 0x24d1c
movq (%r15), %rsi
movl 0x8(%r12), %edx
movq (%r13), %rcx
leaq 0x19c60(%rip), %rdi     # 0x3e975
movb $0x2, %al
callq 0x25603
movl 0x28(%r15), %esi
testl %esi, %esi
je 0x24d55
cmpl $0x0, -0x50(%r14)
jne 0x24d2f
movl %esi, -0x50(%r14)
testl %esi, %esi
je 0x24d55
movl -0x50(%r14), %ecx
cmpl %ecx, %esi
je 0x24d55
movq (%r15), %rdx
movl 0x8(%r12), %r8d
movq (%r13), %r9
leaq 0x19c6b(%rip), %rdi     # 0x3e9b9
xorl %eax, %eax
callq 0x25603
movl 0x50(%r15), %esi
testl %esi, %esi
je 0x24d68
cmpl $0x0, -0x38(%r14)
jne 0x24d68
movl %esi, -0x38(%r14)
movl -0x38(%r14), %ecx
cmpl %ecx, %esi
je 0x24d8a
movq (%r15), %rdx
movl 0x8(%r12), %r8d
movq (%r13), %r9
leaq 0x19c74(%rip), %rdi     # 0x3e9f7
xorl %eax, %eax
callq 0x25603
movq %r12, %rbx
movq 0x48(%r15), %r12
testq %r12, %r12
je 0x24da1
cmpq $0x0, -0x48(%r14)
jne 0x24da1
movq %r12, -0x48(%r14)
testq %r12, %r12
je 0x24e0b
movq -0x48(%r14), %rbp
testq %rbp, %rbp
je 0x24e0b
movq %rbp, %rdi
movq %r12, %rsi
callq 0xd1a0
testl %eax, %eax
je 0x24e0b
movq %rbp, %rdi
leaq 0x1776a(%rip), %rsi     # 0x3c532
callq 0xd1a0
testl %eax, %eax
jne 0x24de4
movq %r12, %rdi
leaq 0xf44f(%rip), %rsi      # 0x3422a
callq 0xd1a0
testl %eax, %eax
je 0x24e0b
movq -0x60(%r14), %rcx
movq -0x58(%r14), %r9
movq %r12, (%rsp)
leaq 0x19c40(%rip), %rdi     # 0x3ea37
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %r8
xorl %eax, %eax
callq 0x25603
xorpd %xmm0, %xmm0
ucomisd 0x40(%r14), %xmm0
jne 0x24e2f
movsd 0x68(%r15), %xmm0
movsd %xmm0, 0x38(%r14)
movsd 0x70(%r15), %xmm0
movsd %xmm0, 0x40(%r14)
cmpb $0x0, 0x14(%rsp)
movq %rbx, %r12
je 0x24e5a
cmpq $0x0, -0x48(%r14)
je 0x24e5a
movsd -0x30(%r14), %xmm0
ucomisd 0x3552(%rip), %xmm0     # 0x283a0
jne 0x24e52
jnp 0x24e5a
movq %r13, %rdi
callq 0x245eb
movq -0x48(%r14), %rax
testq %rax, %rax
movq 0x18(%rsp), %rbx
je 0x24e76
cmpb $0x3d, (%rax)
jne 0x24e76
movb $0x1, 0x15d1(%r12)
movq -0x60(%r14), %rsi
movl -0x50(%r14), %edx
movsd -0x30(%r14), %xmm0
movl 0x60(%r15), %ecx
movsd 0x40(%r14), %xmm1
leaq 0x19bfe(%rip), %rdi     # 0x3ea93
movb $0x2, %al
callq 0x254dd
movl -0x50(%r14), %esi
testl %esi, %esi
je 0x24ec9
movsd -0x30(%r14), %xmm0
ucomisd 0x34ee(%rip), %xmm0     # 0x283a0
jne 0x24eb6
jnp 0x24ec9
cmpl $0x0, 0x60(%r15)
je 0x24ec9
movsd 0x40(%r14), %xmm1
ucomisd %xmm1, %xmm1
jp 0x24eef
movq %r12, 0x30(%r14)
movq 0x30(%rsp), %r15
incq %r15
movb %r15b, -0x15(%r14)
movq 0x48(%r14), %rcx
addq $0xa8, %r14
testq %rcx, %rcx
jne 0x24c2f
jmp 0x24f31
movq -0x60(%r14), %rdi
movzbl -0x17(%r14), %edx
movl -0x38(%r14), %ecx
callq 0x25090
movsd %xmm0, 0x38(%r14)
movq -0x60(%r14), %rdi
movl -0x50(%r14), %esi
movsd -0x30(%r14), %xmm0
movzbl -0x17(%r14), %edx
movl -0x38(%r14), %ecx
movq %r14, %r8
callq 0x250f7
movsd %xmm0, 0x40(%r14)
jmp 0x24ec9
xorl %r15d, %r15d
cmpl $0x1, 0x10(%r12)
jne 0x24f68
leal -0x10000(%rbx), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
setb %al
cmpl $0x40000, %ebx          # imm = 0x40000
setae %cl
orb %al, %cl
jne 0x24f68
movq (%r12), %rdx
leaq 0x19b5b(%rip), %rdi     # 0x3eaba
movl %ebx, %esi
xorl %eax, %eax
callq 0x25603
cmpl $0x1, 0x10(%r12)
sete %al
leal -0x1f000(%rbx), %ecx
cmpl $0xffff1000, %ecx       # imm = 0xFFFF1000
setb %cl
orb %al, %cl
jne 0x24f98
movq (%r12), %rdx
leaq 0x19b55(%rip), %rdi     # 0x3eae4
movl %ebx, %esi
xorl %eax, %eax
callq 0x25570
cmpb $0x0, 0x15eb(%r12)
je 0x24fc2
cmpb $0x0, 0x15ed(%r12)
jne 0x24fc2
movq (%r12), %rdx
leaq 0x19b56(%rip), %rdi     # 0x3eb0f
movl %ebx, %esi
xorl %eax, %eax
callq 0x25603
cmpb $0x0, 0x15ec(%r12)
je 0x24fec
cmpb $0x0, 0x15ee(%r12)
jne 0x24fec
movq (%r12), %rdx
leaq 0x19b67(%rip), %rdi     # 0x3eb4a
movl %ebx, %esi
xorl %eax, %eax
callq 0x25603
cmpw $0x0, 0x15e8(%r12)
jne 0x24ffe
orb $0x20, 0xc(%r12)
testq %r15, %r15
jne 0x2500c
cmpw $0x0, 0xc(%r12)
je 0x2506f
movl %r15d, 0x15c0(%r12)
movl 0x8(%r12), %esi
leaq 0x19b98(%rip), %rdi     # 0x3ebb8
movq 0x8(%rsp), %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x254dd
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x28(%rsp), %r14
addq $0x15f8, %r14           # imm = 0x15F8
leaq 0x337e(%rip), %rax      # 0x283c8
cmpq (%rax), %rcx
jb 0x24bf0
leaq 0x19b79(%rip), %rdi     # 0x3ebd3
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x254dd
movl 0x8(%r12), %esi
movq (%r12), %rdx
leaq 0x19b06(%rip), %rdi     # 0x3eb85
xorl %eax, %eax
callq 0x25570
movl $0x2, %edi
callq 0xd2d0