LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/adelciotto[P]scg/examples/../scg.h
// Function: scg_tween_elastic_ease_in_out
float32_t scg_tween_elastic_ease_in_out(float32_t t) {
    if (t == 0.0f) {
        return 0.0f;
    }

    if (t == 1.0f) {
        return 1.0f;
    }

    t *= 2.0f;

    if (t < 1.0f) {
        return -0.5f * powf(2.0f, 10.0f * (t - 1.0f)) *
               sinf((t - 1.1f) * 5.0f * SCG_PI);
    }

    return 0.5f * powf(2.0f, -10.0f * (t - 1.0f)) *
               sinf((t - 1.1f) * 5.0f * SCG_PI) +
           1.0f;
}

// Assembly:
pushq %rax
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x529f
jnp 0x534b
movss 0xd61(%rip), %xmm0      # 0x6008
ucomiss %xmm0, %xmm1
jne 0x52b2
jnp 0x534b
addss %xmm1, %xmm1
movss 0xd4a(%rip), %xmm0      # 0x6008
ucomiss %xmm1, %xmm0
movss 0xd47(%rip), %xmm0      # 0x6010
addss %xmm1, %xmm0
addss 0xd53(%rip), %xmm1      # 0x6028
mulss 0xd4f(%rip), %xmm1      # 0x602c
mulss 0xd4b(%rip), %xmm1      # 0x6030
movss %xmm1, 0x4(%rsp)
jbe 0x5319
mulss 0xd1f(%rip), %xmm0      # 0x6014
callq 0x23e0
mulss 0xd1e(%rip), %xmm0      # 0x6020
movss %xmm0, (%rsp)
movss 0x4(%rsp), %xmm0
callq 0x21d0
mulss (%rsp), %xmm0
jmp 0x534b
mulss 0xcf7(%rip), %xmm0      # 0x6018
callq 0x23e0
mulss 0xcd6(%rip), %xmm0      # 0x6004
movss %xmm0, (%rsp)
movss 0x4(%rsp), %xmm0
callq 0x21d0
mulss (%rsp), %xmm0
addss 0xcbd(%rip), %xmm0      # 0x6008
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/adelciotto[P]scg/examples/../scg.h
// Function: scg_tween_update
void scg_tween_update(scg_tween_t *tween, float32_t *out,
                      float32_t current_time) {
    if (!tween->playing) {
        return;
    }

    scg_tween_definition_t definition = tween->definition;
    float32_t time;
    if (tween->paused) {
        time = (tween->pause_time - tween->start_time) / definition.duration;
    } else {
        time = (current_time - tween->start_time) / definition.duration;
    }

    if (definition.duration == 0.0f || time > 1.0f) {
        time = 1.0f;
    }

    for (int i = 0; i < definition.num_values; i++) {
        float32_t start = definition.start_end_values[i].x;
        float32_t end = definition.start_end_values[i].y;

        out[i] = start + definition.func(time) * (end - start);
    }

    if (time == 1.0f) {
        if (definition.yoyo) {
            for (int i = 0; i < definition.num_values; i++) {
                float32_t start = definition.start_end_values[i].x;
                float32_t end = definition.start_end_values[i].y;
                tween->definition.start_end_values[i] =
                    scg_vec2f_new(end, start);
            }

            tween->yoyo_in_progress = !tween->yoyo_in_progress;
        }

        if (definition.loop || tween->yoyo_in_progress) {
            tween->start_time = current_time;
        } else {
            tween->playing = false;
        }
    }
}

// Assembly:
cmpb $0x1, 0x2c(%rdi)
jne 0x54bf
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movss 0x10(%rdi), %xmm1
movl 0x14(%rdi), %r15d
cmpb $0x1, 0x2d(%rdi)
movss %xmm0, 0x4(%rsp)
jne 0x53c3
movss 0x30(%rbx), %xmm0
subss 0x28(%rbx), %xmm0
divss %xmm1, %xmm0
xorps %xmm2, %xmm2
cmpeqps %xmm1, %xmm2
movss 0xc2d(%rip), %xmm3      # 0x6008
movaps %xmm3, %xmm1
cmpltps %xmm0, %xmm1
orps %xmm2, %xmm1
movd %xmm1, %eax
testb $0x1, %al
jne 0x53f0
movaps %xmm0, %xmm3
movq 0x8(%rbx), %r12
movb 0x18(%rbx), %al
movb %al, 0x3(%rsp)
movb 0x19(%rbx), %al
movb %al, 0x2(%rsp)
testl %r15d, %r15d
jle 0x545c
movq 0x20(%rbx), %rbp
xorl %r13d, %r13d
movaps %xmm3, 0x10(%rsp)
movss (%r12,%r13,8), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0x4(%r12,%r13,8), %xmm0
movss %xmm0, 0x8(%rsp)
movaps %xmm3, %xmm0
callq *%rbp
movaps 0x10(%rsp), %xmm3
movss 0xc(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
subss %xmm1, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
movss %xmm2, (%r14,%r13,4)
incq %r13
cmpq %r13, %r15
jne 0x5413
ucomiss 0xba5(%rip), %xmm3      # 0x6008
movss 0x4(%rsp), %xmm1
jne 0x54b1
jp 0x54b1
testb $0x1, 0x2(%rsp)
je 0x5499
testl %r15d, %r15d
jle 0x5495
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
movsd (%r12,%rcx,8), %xmm0
shufps $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movlps %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x547f
xorb $0x1, 0x2e(%rbx)
testb $0x1, 0x3(%rsp)
jne 0x54a6
cmpb $0x1, 0x2e(%rbx)
jne 0x54ad
movss %xmm1, 0x28(%rbx)
jmp 0x54b1
movb $0x0, 0x2c(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/adelciotto[P]scg/examples/../scg.h
// Function: scg_tween_resume
void scg_tween_resume(scg_tween_t *tween, float32_t current_time) {
    if (!tween->playing || !tween->paused) {
        return;
    }

    tween->paused = false;
    tween->start_time += current_time - tween->pause_time;
    tween->pause_time = 0.0f;
}

// Assembly:
cmpb $0x1, 0x2c(%rdi)
jne 0x552b
cmpb $0x1, 0x2d(%rdi)
jne 0x552b
movb $0x0, 0x2d(%rdi)
subss 0x30(%rdi), %xmm0
addss 0x28(%rdi), %xmm0
movss %xmm0, 0x28(%rdi)
movl $0x0, 0x30(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/pgn.c
// Function: searchForPgn
const Pgn *searchForPgn(int pgn)
{
  size_t start = 0;
  size_t end   = pgnListSize;
  size_t mid;

  while (start <= end)
  {
    mid = (start + end) / 2;
    if (pgn == pgnList[mid].pgn)
    {
      // Return the first one, unless it is the catch-all
      while (mid > 0 && pgn == pgnList[mid - 1].pgn)
      {
        mid--;
      }
      if (pgnList[mid].fallback)
      {
        mid++;
        if (pgn != pgnList[mid].pgn)
        {
          return NULL;
        }
      }
      return &pgnList[mid];
    }
    if (pgn < pgnList[mid].pgn)
    {
      if (mid == 0)
      {
        return NULL;
      }
      end = mid - 1;
    }
    else
    {
      start = mid + 1;
    }
  }
  return NULL;
}

// Assembly:
leaq 0x12f35(%rip), %rax     # 0x203c8
movq (%rax), %rsi
xorl %eax, %eax
leaq 0x2be61(%rip), %rcx     # 0x39300
xorl %r8d, %r8d
leaq (%rsi,%r8), %r9
movq %r9, %rdx
shrq %rdx
imulq $0x15f8, %rdx, %r10     # imm = 0x15F8
cmpl %edi, 0x8(%rcx,%r10)
je 0xd4d6
jbe 0xd4ca
cmpq $0x2, %r9
jb 0xd4d5
decq %rdx
movq %rdx, %rsi
jmp 0xd4d0
incq %rdx
movq %rdx, %r8
cmpq %rsi, %r8
jbe 0xd4a2
retq
shrq %r9
imulq $0x15f8, %r9, %rax      # imm = 0x15F8
leaq (%rcx,%rax), %rsi
addq $0x1600, %rsi           # imm = 0x1600
movq %rdx, %rax
movq %rsi, %rcx
subq $0x1, %rdx
jb 0xd506
leaq -0x15f8(%rcx), %rsi
cmpl %edi, -0x2bf0(%rcx)
je 0xd4eb
cmpb $0x1, -0x30(%rcx)
jne 0xd513
cmpl %edi, (%rcx)
jne 0xd522
incq %rax
imulq $0x15f8, %rax, %rax     # imm = 0x15F8
addq 0x2baaf(%rip), %rax     # 0x38fd0
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/pgn.c
// Function: searchForUnknownPgn
const Pgn *searchForUnknownPgn(int pgnId)
{
  Pgn *fallback = pgnList;
  Pgn *pgn;

  for (pgn = pgnList; pgn < pgnList + pgnListSize; pgn++)
  {
    if (pgn->fallback)
    {
      fallback = pgn;
    }
    if (pgn->pgn >= pgnId)
    {
      break;
    }
  }
  if (fallback == NULL)
  {
    logAbort("Cannot find catch-all PGN definition for PGN %d; internal definition error\n", pgnId);
  }
  logDebug("Found catch-all PGN %u for PGN %d\n", fallback->pgn, pgnId);
  return fallback;
}

// Assembly:
pushq %rbx
movl %edi, %edx
leaq 0x12e99(%rip), %rax     # 0x203c8
movq (%rax), %rcx
leaq 0x2bdc7(%rip), %rax     # 0x39300
testq %rcx, %rcx
jle 0xd583
imulq $0x15f8, %rcx, %rcx     # imm = 0x15F8
addq %rcx, %rax
leaq 0x2bdb1(%rip), %rcx     # 0x39300
movq %rcx, %rbx
cmpb $0x0, 0x15d0(%rcx)
cmovneq %rcx, %rbx
cmpl %edx, 0x8(%rcx)
jae 0xd56e
addq $0x15f8, %rcx           # imm = 0x15F8
cmpq %rax, %rcx
jb 0xd552
testq %rbx, %rbx
jne 0xd586
leaq 0x12a8a(%rip), %rdi     # 0x20004
movl %edx, %esi
xorl %eax, %eax
callq 0x1ce7b
movq %rax, %rbx
movl 0x8(%rbx), %esi
leaq 0x12ac0(%rip), %rdi     # 0x20050
xorl %eax, %eax
callq 0x1cd55
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/pgn.c
// Function: getField
const Field *getField(uint32_t pgnId, uint32_t field)
{
  const Pgn *pgn = searchForPgn(pgnId);

  if (!pgn)
  {
    logDebug("PGN %u is unknown\n", pgnId);
    return 0;
  }
  if (field < pgn->fieldCount)
  {
    return pgn->fieldList + field;
  }
  logDebug("PGN %u does not have field %u\n", pgnId, field);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
callq 0xd48c
testq %rax, %rax
je 0xd8e9
cmpl %ebp, 0x15c0(%rax)
jbe 0xd8fe
movl %ebp, %ecx
imulq $0xa8, %rcx, %rcx
leaq (%rax,%rcx), %r14
addq $0x18, %r14
jmp 0xd913
leaq 0x12a61(%rip), %rdi     # 0x20351
xorl %r14d, %r14d
movl %ebx, %esi
xorl %eax, %eax
callq 0x1cd55
jmp 0xd913
leaq 0x12a5f(%rip), %rdi     # 0x20364
xorl %r14d, %r14d
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1cd55
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/pgn.c
// Function: camelCase
void camelCase(bool upperCamelCase)
{
  int  i, j;
  bool haveEarlierSpareOrReserved;

  for (i = 0; i < pgnListSize; i++)
  {
    pgnList[i].camelDescription = camelize(pgnList[i].description, upperCamelCase, 0);
    haveEarlierSpareOrReserved  = false;
    for (j = 0; j < ARRAY_SIZE(pgnList[i].fieldList) && pgnList[i].fieldList[j].name; j++)
    {
      const char *name = pgnList[i].fieldList[j].name;

      if (pgnList[i].fieldList[j].camelName == NULL)
      {
        pgnList[i].fieldList[j].camelName = camelize(name, upperCamelCase, haveEarlierSpareOrReserved ? j + 1 : 0);
      }
      else if (upperCamelCase)
      {
        pgnList[i].fieldList[j].camelName
            = camelize(pgnList[i].fieldList[j].camelName, upperCamelCase, haveEarlierSpareOrReserved ? j + 1 : 0);
      }

      if (strcmp(name, "Reserved") == 0 || strcmp(name, "Spare") == 0)
      {
        haveEarlierSpareOrReserved = true;
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x12a98(%rip), %rax     # 0x203c8
cmpq $0x0, (%rax)
je 0xda2b
movl %edi, %ebx
leaq 0x2b9bd(%rip), %r15     # 0x39300
xorl %ecx, %ecx
movzbl %bl, %eax
movl %eax, 0xc(%rsp)
movq %rcx, 0x10(%rsp)
imulq $0x15f8, %rcx, %r14     # imm = 0x15F8
leaq 0x2b9a1(%rip), %r12     # 0x39300
movq (%r12,%r14), %rdi
xorl %ebp, %ebp
movl 0xc(%rsp), %esi
xorl %edx, %edx
callq 0xda3a
movq %rax, 0x15c8(%r12,%r14)
movl $0x70, %r13d
movl $0x1, %r14d
movq -0x58(%r15,%r13), %r12
testq %r12, %r12
je 0xda0c
movq (%r15,%r13), %rdi
testq %rdi, %rdi
je 0xd9af
testb %bl, %bl
je 0xd9cc
testb $0x1, %bpl
movl $0x0, %edx
cmovnel %r14d, %edx
movl $0x1, %esi
jmp 0xd9c3
testb $0x1, %bpl
movl $0x0, %edx
cmovnel %r14d, %edx
movq %r12, %rdi
movl 0xc(%rsp), %esi
callq 0xda3a
movq %rax, (%r15,%r13)
movq %r12, %rdi
leaq 0x129ad(%rip), %rsi     # 0x20383
callq 0xd1a0
testl %eax, %eax
je 0xd9f2
movq %r12, %rdi
leaq 0x129a3(%rip), %rsi     # 0x2038c
callq 0xd1a0
testl %eax, %eax
jne 0xd9f5
movb $0x1, %bpl
incl %r14d
addq $0xa8, %r13
cmpq $0x1618, %r13           # imm = 0x1618
jne 0xd984
movq 0x10(%rsp), %rcx
incq %rcx
addq $0x15f8, %r15           # imm = 0x15F8
leaq 0x129a6(%rip), %rax     # 0x203c8
cmpq %rcx, (%rax)
ja 0xd94c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/pgn.c
// Function: camelize
static char *camelize(const char *str, bool upperCamelCase, int order)
{
  size_t      len         = strlen(str);
  char       *ptr         = malloc(len + 4);
  char       *p           = ptr;
  const char *s           = str;
  bool        lastIsAlpha = !upperCamelCase;

  if (p == NULL)
  {
    return NULL;
  }

  for (; *s; s++)
  {
    if (isalpha((unsigned char) *s) || isdigit((unsigned char) *s))
    {
      if (lastIsAlpha)
      {
        *p = tolower(*s);
      }
      else
      {
        *p          = toupper(*s);
        lastIsAlpha = true;
      }
      p++;
    }
    else
    {
      lastIsAlpha = false;
    }
  }

  if (order > 0 && (strcmp(str, "Reserved") == 0 || strcmp(str, "Spare") == 0))
  {
    sprintf(p, "%u", order);
  }
  else
  {
    *p = 0;
  }
  return ptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0xd0f0
leaq 0x4(%rax), %rdi
callq 0xd200
testq %rax, %rax
je 0xdb2d
movl %ebx, 0xc(%rsp)
movq %r14, 0x10(%rsp)
movb (%r14), %bl
movq %rax, (%rsp)
movq %rax, %r12
testb %bl, %bl
je 0xdadc
xorb $0x1, %bpl
callq 0xd350
movq %rax, %r13
movq 0x10(%rsp), %rax
leaq 0x1(%rax), %r15
movq (%rsp), %r12
movq (%r13), %rax
movzbl %bl, %ecx
movzwl (%rax,%rcx,2), %eax
testl $0xc00, %eax            # imm = 0xC00
setne %r14b
je 0xdacf
testb $0x1, %bpl
je 0xdab9
callq 0xd340
jmp 0xdabe
callq 0xd030
movsbq %bl, %rcx
movq (%rax), %rax
movb (%rax,%rcx,4), %al
movb %al, (%r12)
incq %r12
movb (%r15), %bl
incq %r15
movl %r14d, %ebp
testb %bl, %bl
jne 0xda96
movl 0xc(%rsp), %ebx
testl %ebx, %ebx
movq 0x10(%rsp), %r14
jle 0xdb0f
leaq 0x12893(%rip), %rsi     # 0x20383
movq %r14, %rdi
callq 0xd1a0
testl %eax, %eax
je 0xdb16
leaq 0x12889(%rip), %rsi     # 0x2038c
movq %r14, %rdi
callq 0xd1a0
testl %eax, %eax
je 0xdb16
movb $0x0, (%r12)
jmp 0xdb29
leaq 0x24ff6(%rip), %rsi     # 0x32b13
movq %r12, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0xd2c0
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: usage
static void usage(char **argv, char **av)
{
  if (av != NULL)
  {
    printf("Unknown or invalid argument %s\n", av[0]);
  }
  printf("Usage: %s -explain | -explain-xml | -explain-ngt-xml | -explain-ik-xml"
         " | [-camel] | [-upper-camel]"
         " | [-version]\n",
         argv[0]);
  printf("     -explain          Export the PGN database in text format\n");
  printf("     -explain-xml      Export the PGN database in XML format\n");
  printf("     -explain-ngt-xml  Export the Actisense PGN database in XML format\n");
  printf("     -explain-ik-xml   Export the iKonvert PGN database in XML format\n");
  printf("     -v1               v1 format: Explain lookups everywhere they are used\n");
  printf("     -camel            Show fieldnames in normalCamelCase\n");
  printf("     -upper-camel      Show fieldnames in UpperCamelCase\n");
  printf("     -version          Print the version of the program and quit\n");
  printf("     -d                Print logging from level ERROR, INFO and DEBUG\n");
  printf("\n");
  exit(1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0xdd6a
movq (%rsi), %rsi
leaq 0x1548a(%rip), %rdi     # 0x231ed
xorl %eax, %eax
callq 0xd110
movq (%rbx), %rsi
leaq 0x15499(%rip), %rdi     # 0x2320d
xorl %eax, %eax
callq 0xd110
leaq 0x163b4(%rip), %rdi     # 0x24136
callq 0xd0c0
leaq 0x163e6(%rip), %rdi     # 0x24174
callq 0xd0c0
leaq 0x16417(%rip), %rdi     # 0x241b1
callq 0xd0c0
leaq 0x16452(%rip), %rdi     # 0x241f8
callq 0xd0c0
leaq 0x1648c(%rip), %rdi     # 0x2423e
callq 0xd0c0
leaq 0x164cb(%rip), %rdi     # 0x24289
callq 0xd0c0
leaq 0x164f9(%rip), %rdi     # 0x242c3
callq 0xd0c0
leaq 0x16526(%rip), %rdi     # 0x242fc
callq 0xd0c0
leaq 0x1655b(%rip), %rdi     # 0x2433d
callq 0xd0c0
movl $0xa, %edi
callq 0xd050
movl $0x1, %edi
callq 0xd2d0
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: explain
static void explain(void)
{
  int i;

  printf(COPYRIGHT "\n\nThis program can understand a number of N2K messages. What follows is an explanation of the messages\n"
                   "that it understands. First is a list of completely understood messages, as far as I can tell.\n"
                   "What follows is a list of messages that contain fields that have unknown content or size, or even\n"
                   "completely unknown fields. If you happen to know more, please tell me!\n\n");
  printf("_______ Complete PGNs _________\n\n");
  for (i = 1; i < ARRAY_SIZE(pgnList); i++)
  {
    if (pgnList[i].complete == PACKET_COMPLETE && pgnList[i].pgn < ACTISENSE_BEM)
    {
      explainPGN(pgnList[i]);
    }
  }
  printf("_______ Incomplete PGNs _________\n\n");
  for (i = 1; i < ARRAY_SIZE(pgnList); i++)
  {
    if (pgnList[i].complete != PACKET_COMPLETE && pgnList[i].pgn < ACTISENSE_BEM)
    {
      explainPGN(pgnList[i]);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x15f8, %rsp           # imm = 0x15F8
leaq 0x16577(%rip), %rdi     # 0x24383
callq 0xd0c0
leaq 0x16995(%rip), %rdi     # 0x247ad
callq 0xd0c0
leaq 0x2cad4(%rip), %rbx     # 0x3a8f8
movl $0x37, %r14d
cmpw $0x0, 0xc(%rbx)
jne 0xde4d
cmpl $0x3ffff, 0x8(%rbx)     # imm = 0x3FFFF
ja 0xde4d
movl $0x2bf, %ecx            # imm = 0x2BF
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0xeef8
addq $0x15f8, %rbx           # imm = 0x15F8
decq %r14
jne 0xde2a
leaq 0x1696e(%rip), %rdi     # 0x247ce
callq 0xd0c0
leaq 0x2ca8c(%rip), %rbx     # 0x3a8f8
movl $0x37, %r14d
cmpw $0x0, 0xc(%rbx)
je 0xde95
cmpl $0x3ffff, 0x8(%rbx)     # imm = 0x3FFFF
ja 0xde95
movl $0x2bf, %ecx            # imm = 0x2BF
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0xeef8
addq $0x15f8, %rbx           # imm = 0x15F8
decq %r14
jne 0xde72
addq $0x15f8, %rsp           # imm = 0x15F8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: getMinimalPgnLength
static unsigned int getMinimalPgnLength(Pgn *pgn, bool *isVariable)
{
  // Count all fields until the first repeating field
  uint32_t     fieldCount = pgn->fieldCount;
  unsigned int length     = 0;

  *isVariable = false;
  if (pgn->repeatingCount1 > 0)
  {
    fieldCount -= pgn->repeatingCount1 + pgn->repeatingCount2;
    *isVariable = true;
  }

  logDebug("PGN %u fieldCount=%u (was %u)\n", pgn->pgn, fieldCount, pgn->fieldCount);

  for (uint32_t i = 0; i < fieldCount; i++)
  {
    Field *f = &pgn->fieldList[i];

    if (f->size == LEN_VARIABLE)
    {
      *isVariable = true;
    }
    else
    {
      length += f->size;
    }
  }

  if (length % 8 != 0)
  {
    logAbort("PGN %u '%s' has a length of %u bits that does not fill bytes exactly\n", pgn->pgn, pgn->description, length);
  }

  length /= 8; // Bits to bytes

  if (pgn->type == PACKET_SINGLE && length != 8 && pgn->pgn != 59904)
  {
    logAbort("PGN %u '%s' has a length %u bytes but a single-frame PGN should be 8 bytes\n", pgn->pgn, pgn->description, length);
  }

  logDebug("PGN %u len=%u\n", pgn->pgn, length);
  return length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x15c0(%rdi), %ecx
movb $0x0, (%rsi)
movzbl 0x15eb(%rdi), %eax
movl %ecx, %r15d
testl %eax, %eax
je 0xf406
movzbl 0x15ec(%rbx), %edx
addl %edx, %eax
movl %ecx, %r15d
subl %eax, %r15d
movb $0x1, (%r14)
movl 0x8(%rbx), %esi
leaq 0x1418c(%rip), %rdi     # 0x2359c
xorl %ebp, %ebp
movl %r15d, %edx
xorl %eax, %eax
callq 0x1cd55
testl %r15d, %r15d
je 0xf467
movl %r15d, %eax
imulq $0xa8, %rax, %rax
xorl %ecx, %ecx
xorl %ebp, %ebp
movl 0x28(%rbx,%rcx), %edx
testl %edx, %edx
je 0xf43b
addl %edx, %ebp
jmp 0xf43f
movb $0x1, (%r14)
addq $0xa8, %rcx
cmpq %rcx, %rax
jne 0xf42f
testb $0x7, %bpl
je 0xf467
movl 0x8(%rbx), %esi
movq (%rbx), %rdx
leaq 0x1415d(%rip), %rdi     # 0x235bb
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1ce7b
shrl $0x3, %ebp
cmpl $0x0, 0x10(%rbx)
movl 0x8(%rbx), %esi
jne 0xf49d
cmpl $0x8, %ebp
je 0xf49d
movl $0xea00, %eax           # imm = 0xEA00
cmpl $0xea00, %esi           # imm = 0xEA00
je 0xf49f
movq (%rbx), %rdx
leaq 0x14172(%rip), %rdi     # 0x23601
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1ce7b
movl 0x8(%rbx), %eax
jmp 0xf49f
movl %esi, %eax
leaq 0x141a7(%rip), %rdi     # 0x2364d
movl %eax, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1cd55
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: explainFieldtypeXMLv2
static void explainFieldtypeXMLv2(size_t n, const char *s, const char *fts, const LookupInfo *lookup)
{
  FieldType *ft = getFieldType(fts);

  printf("      <EnumFieldType Value='%zu' Name='", n);
  printXML(0, 0, s);
  printf("'");

  if (ft != NULL)
  {
    printf(" FieldType='%s'", getV2Type(ft));
    if (ft->hasSign != Null)
    {
      printf(" Signed='%s'\n", ft->hasSign == True ? "true" : "false");
    }
    if (ft->resolution != 0.0)
    {
      printf(" Resolution='%g'", ft->resolution);
    }
    if (ft->unit != NULL)
    {
      printf(" Unit='%s'", ft->unit);
    }
    if (lookup != NULL && lookup->size != 0)
    {
      printf(" Bits='%zu'", lookup->size);
    }
    else if (ft->size != 0)
    {
      printf(" Bits='%u'", ft->size);
    }
  }
  if (lookup != NULL)
  {
    printf(">\n");
    explainLookupFunction(lookup);
    printf("      </EnumFieldType>\n");
  }
  else
  {
    printf("/>\n");
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x1beb8
movq %rax, %r14
leaq 0x147d2(%rip), %rdi     # 0x23daf
movq %r12, %rsi
xorl %eax, %eax
callq 0xd110
xorl %edi, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0xf6f8
movl $0x27, %edi
callq 0xd050
testq %r14, %r14
je 0xf6bf
movq %r14, %rcx
movq %rcx, %rax
movq 0x88(%rcx), %rcx
testq %rcx, %rcx
jne 0xf609
movq (%rax), %rsi
leaq 0x14659(%rip), %rdi     # 0x23c7b
xorl %eax, %eax
callq 0xd110
movl 0x60(%r14), %eax
testl %eax, %eax
je 0xf654
cmpl $0x2, %eax
leaq 0x15d2b(%rip), %rax     # 0x25366
leaq 0x13e5e(%rip), %rsi     # 0x234a0
cmoveq %rax, %rsi
leaq 0x1463e(%rip), %rdi     # 0x23c8b
xorl %eax, %eax
callq 0xd110
movsd 0x58(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf666
jnp 0xf674
leaq 0x1462c(%rip), %rdi     # 0x23c99
movb $0x1, %al
callq 0xd110
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0xf68b
leaq 0x14626(%rip), %rdi     # 0x23caa
xorl %eax, %eax
callq 0xd110
testq %rbx, %rbx
je 0xf6a9
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xf6a9
leaq 0x14615(%rip), %rdi     # 0x23cb5
xorl %eax, %eax
callq 0xd110
jmp 0xf6c4
movl 0x28(%r14), %esi
testl %esi, %esi
je 0xf6bf
leaq 0x14609(%rip), %rdi     # 0x23cc1
xorl %eax, %eax
callq 0xd110
testq %rbx, %rbx
je 0xf6e1
leaq 0x15617(%rip), %rdi     # 0x24ce2
callq 0xd0c0
movq %rbx, %rdi
callq 0xf7ec
leaq 0x15d5c(%rip), %rdi     # 0x2543b
jmp 0xf6e8
leaq 0x15eb6(%rip), %rdi     # 0x2559e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd0c0
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: printXML
static void printXML(int indent, const char *element, const char *p)
{
  int i;

  if (p)
  {
    if (element)
    {
      for (i = 0; i < indent; i++)
      {
        fputs(" ", stdout);
      }
      printf("<%s>", element);
    }
    for (; *p; p++)
    {
      switch (*p)
      {
        case '&':
          fputs("&amp;", stdout);
          break;

        case '<':
          fputs("&lt;", stdout);
          break;

        case '>':
          fputs("&gt;", stdout);
          break;

        case '"':
          fputs("&quot;", stdout);
          break;

        default:
          putchar(*p);
      }
    }
    if (element)
    {
      printf("</%s>\n", element);
    }
  }
}

// Assembly:
testq %rdx, %rdx
je 0xf7eb
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
testq %rsi, %rsi
je 0xf74b
movl %edi, %ebp
testl %edi, %edi
jle 0xf73a
movq 0x298a4(%rip), %rbx     # 0x38fc8
leaq 0x13cde(%rip), %r15     # 0x23409
movq (%rbx), %rsi
movq %r15, %rdi
callq 0xd170
decl %ebp
jne 0xf72b
leaq 0x144ca(%rip), %rdi     # 0x23c0b
movq %r12, %rsi
xorl %eax, %eax
callq 0xd110
movq %r12, (%rsp)
movq 0x29872(%rip), %rbx     # 0x38fc8
leaq 0x144c3(%rip), %r15     # 0x23c20
leaq 0x144ac(%rip), %r12     # 0x23c10
leaq 0x144ab(%rip), %r13     # 0x23c16
leaq 0x144a9(%rip), %rbp     # 0x23c1b
movzbl (%r14), %eax
cmpl $0x3b, %eax
jg 0xf78d
cmpl $0x22, %eax
je 0xf79f
cmpl $0x26, %eax
jne 0xf7b7
movq (%rbx), %rsi
movq %r12, %rdi
jmp 0xf7ad
cmpl $0x3c, %eax
je 0xf7a7
cmpl $0x3e, %eax
jne 0xf7bb
movq (%rbx), %rsi
movq %rbp, %rdi
jmp 0xf7ad
movq (%rbx), %rsi
movq %r15, %rdi
jmp 0xf7ad
movq (%rbx), %rsi
movq %r13, %rdi
callq 0xd170
incq %r14
jmp 0xf772
testl %eax, %eax
je 0xf7c5
movsbl %al, %edi
callq 0xd050
jmp 0xf7b2
movq (%rsp), %rsi
testq %rsi, %rsi
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
je 0xf7eb
leaq 0x145be(%rip), %rdi     # 0x23da2
xorl %eax, %eax
jmp 0xd110
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: explainLookupFunction
static void explainLookupFunction(const LookupInfo *lookup)
{
  switch (lookup->type)
  {
    case LOOKUP_TYPE_BIT: {
      if (doV1)
      {
        printf("          <EnumBitValues>\n");
        (lookup->function.bitEnumerator)(explainBitXMLv1);
        printf("          </EnumBitValues>\n");
      }
      else
      {
        printXML(10, "LookupBitEnumeration", lookup->name);
      }
      break;
    }

    case LOOKUP_TYPE_PAIR: {
      if (doV1)
      {
        printf("          <EnumValues>\n");
        (lookup->function.pairEnumerator)(explainPairXMLv1);
        printf("          </EnumValues>\n");
      }
      else
      {
        printXML(10, "LookupEnumeration", lookup->name);
      }
      break;
    }

    case LOOKUP_TYPE_TRIPLET: {
      if (!doV1)
      {
        printXML(10, "LookupIndirectEnumeration", lookup->name);
        printXMLUnsigned(10, "LookupIndirectEnumerationFieldOrder", lookup->val1Order);
      }
      break;
    }

    case LOOKUP_TYPE_FIELDTYPE: {
      if (doV1)
      {
        printf("          <EnumFieldTypeValues>\n");
        (lookup->function.fieldtypeEnumerator)(explainFieldtypeXMLv1);
        printf("          </EnumFieldTypeValues>\n");
      }
      else
      {
        printXML(10, "LookupFieldTypeEnumeration", lookup->name);
      }
      break;
    }

    default:
      break;
  }
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0xf897
movq %rdi, %rbx
leaq 0x10bb3(%rip), %rcx     # 0x203b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1, 0x7eee7(%rip)     # 0x8e6fc
jne 0xf8b1
leaq 0x15d16(%rip), %rdi     # 0x25538
callq 0xd0c0
leaq 0xed(%rip), %rdi        # 0xf91b
callq *0x10(%rbx)
leaq 0x15d17(%rip), %rdi     # 0x2554f
jmp 0xf888
cmpb $0x1, 0x7eebb(%rip)     # 0x8e6fc
jne 0xf899
leaq 0x15d1d(%rip), %rdi     # 0x25567
callq 0xd0c0
leaq 0x97(%rip), %rdi        # 0xf8ed
callq *0x10(%rbx)
leaq 0x15d21(%rip), %rdi     # 0x25581
jmp 0xf888
cmpb $0x1, 0x7ee93(%rip)     # 0x8e6fc
jne 0xf8a5
leaq 0x15c85(%rip), %rdi     # 0x254f7
callq 0xd0c0
leaq 0x11c(%rip), %rdi       # 0xf99a
callq *0x10(%rbx)
leaq 0x15c8f(%rip), %rdi     # 0x25517
popq %rbx
jmp 0xd0c0
cmpb $0x0, 0x7ee67(%rip)     # 0x8e6fc
je 0xf8c6
popq %rbx
retq
movq (%rbx), %rdx
leaq 0x14429(%rip), %rsi     # 0x23ccc
jmp 0xf8bb
movq (%rbx), %rdx
leaq 0x14482(%rip), %rsi     # 0x23d31
jmp 0xf8bb
movq (%rbx), %rdx
leaq 0x14426(%rip), %rsi     # 0x23ce1
movl $0xa, %edi
popq %rbx
jmp 0xf6f8
movq (%rbx), %rdx
leaq 0x14423(%rip), %rsi     # 0x23cf3
movl $0xa, %edi
callq 0xf6f8
movzbl 0x18(%rbx), %edx
leaq 0x14428(%rip), %rsi     # 0x23d0d
movl $0xa, %edi
popq %rbx
jmp 0xf949
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: printXMLUnsigned
static void printXMLUnsigned(int indent, const char *element, const unsigned int p)
{
  int i;

  for (i = 0; i < indent; i++)
  {
    fputs(" ", stdout);
  }
  printf("<%s>%u</%s>\n", element, p, element);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
testl %edi, %edi
jle 0xf97c
movl %edi, %r14d
movq 0x29664(%rip), %r12     # 0x38fc8
leaq 0x13a9e(%rip), %r15     # 0x23409
movq (%r12), %rsi
movq %r15, %rdi
callq 0xd170
decl %r14d
jne 0xf96b
leaq 0x14419(%rip), %rdi     # 0x23d9c
movq %rbx, %rsi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd110
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/analyzer-explain.c
// Function: explainFieldtypeXMLv1
static void explainFieldtypeXMLv1(size_t n, const char *s, const char *fts, const LookupInfo *lookup)
{
  FieldType *ft = getFieldType(fts);

  printf("            <EnumFieldType Value='%zu' Name='", n);
  printXML(0, 0, s);
  printf("'");

  if (ft != NULL)
  {
    printf(" FieldType='%s'", getV1Type(ft, NULL));
    if (ft->hasSign != Null)
    {
      printf(" Signed='%s'\n", ft->hasSign == True ? "true" : "false");
    }
    if (ft->resolution != 0.0)
    {
      printf(" Resolution='%g'", ft->resolution);
    }
    if (ft->unit != NULL)
    {
      printf(" Unit='%s'", ft->unit);
    }
    if (lookup != NULL && lookup->size != 0)
    {
      printf(" Bits='%zu'", lookup->size);
    }
    else if (ft->size != 0)
    {
      printf(" Bits='%u'", ft->size);
    }
  }
  printf("/>\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x1beb8
movq %rax, %r14
leaq 0x143ec(%rip), %rdi     # 0x23da9
movq %r12, %rsi
xorl %eax, %eax
callq 0xd110
xorl %edi, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0xf6f8
movl $0x27, %edi
callq 0xd050
testq %r14, %r14
je 0xfac2
xorl %esi, %esi
movq %r14, %rax
movq 0x38(%rax), %r15
testq %r15, %r15
jne 0xfa02
movq 0x88(%rax), %rax
testq %rax, %rax
jne 0xf9eb
jmp 0xfa1e
leaq 0x143ce(%rip), %rsi     # 0x23dd7
movq %r15, %rdi
callq 0xd1a0
testl %eax, %eax
leaq 0x1cfb2(%rip), %rsi     # 0x2c9cc
cmovneq %r15, %rsi
leaq 0x14256(%rip), %rdi     # 0x23c7b
xorl %eax, %eax
callq 0xd110
movl 0x60(%r14), %eax
testl %eax, %eax
je 0xfa57
cmpl $0x2, %eax
leaq 0x15928(%rip), %rax     # 0x25366
leaq 0x13a5b(%rip), %rsi     # 0x234a0
cmoveq %rax, %rsi
leaq 0x1423b(%rip), %rdi     # 0x23c8b
xorl %eax, %eax
callq 0xd110
movsd 0x58(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xfa69
jnp 0xfa77
leaq 0x14229(%rip), %rdi     # 0x23c99
movb $0x1, %al
callq 0xd110
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0xfa8e
leaq 0x14223(%rip), %rdi     # 0x23caa
xorl %eax, %eax
callq 0xd110
testq %rbx, %rbx
je 0xfaac
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xfaac
leaq 0x14212(%rip), %rdi     # 0x23cb5
xorl %eax, %eax
callq 0xd110
jmp 0xfac2
movl 0x28(%r14), %esi
testl %esi, %esi
je 0xfac2
leaq 0x14206(%rip), %rdi     # 0x23cc1
xorl %eax, %eax
callq 0xd110
leaq 0x15ad5(%rip), %rdi     # 0x2559e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd0c0
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: mprintf
extern void mprintf(const char *format, ...)
{
  va_list ap;
  int     remain;

  va_start(ap, format);
  remain = sizeof(mbuf) - (mp - mbuf) - 1;
  if (remain > 0)
  {
    mp += vsnprintf(mp, remain, format, ap);
  }
  va_end(ap);
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x1a0da
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x6e4ff(%rip), %rdi     # 0x88600
leaq 0x74738(%rip), %rax     # 0x8e840
subl %edi, %eax
addl $0x1fff, %eax           # imm = 0x1FFF
testl %eax, %eax
jle 0x1a129
movl %eax, %esi
movq %rsp, %rcx
movq %r10, %rdx
callq 0xd0d0
cltq
addq %rax, 0x6e4d7(%rip)     # 0x88600
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: minsert
extern void minsert(size_t location, const char *str)
{
  size_t len = strlen(str);

  if (mp + len - mbuf <= sizeof(mbuf))
  {
    memmove(mbuf + location + len, mbuf + location, mp - mbuf - location);
    memmove(mbuf + location, str, len);
    mp += len;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r12
movq %rsi, %rdi
callq 0xd0f0
movq %rax, %r14
movq 0x6e482(%rip), %rdx     # 0x88600
leaq (%rdx,%rax), %r13
leaq 0x746b7(%rip), %r15     # 0x8e840
movq %r13, %rax
subq %r15, %rax
cmpq $0x2000, %rax           # imm = 0x2000
ja 0x1a1c0
addq %r12, %r15
movq %r14, %rdi
addq %r15, %rdi
subq %r15, %rdx
movq %r15, %rsi
callq 0xd270
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xd270
movq %r13, 0x6e440(%rip)     # 0x88600
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: getSep
extern char *getSep(void)
{
  char *s = sep;

  if (showJson)
  {
    sep = ",";
    if (strchr(s, '{'))
    {
      if (strlen(closingBraces) >= sizeof(closingBraces) - 2)
      {
        logError("Too many braces\n");
        exit(2);
      }
      strcat(closingBraces, "}");
    }
  }
  else
  {
    sep = ";";
  }

  return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x6bf22(%rip), %rax     # 0x86148
movq (%rax), %rbx
leaq 0x744c2(%rip), %rcx     # 0x8e6f2
cmpb $0x1, (%rcx)
jne 0x1a277
leaq 0x18a8e(%rip), %rcx     # 0x32cca
movq %rcx, (%rax)
movq %rbx, %rdi
movl $0x7b, %esi
callq 0xd100
testq %rax, %rax
je 0x1a281
leaq 0x744b8(%rip), %r14     # 0x8e710
movq %r14, %rdi
callq 0xd0f0
cmpq $0xe, %rax
jae 0x1a28c
movq %r14, %rdi
callq 0xd0f0
movw $0x7d, (%r14,%rax)
jmp 0x1a281
leaq 0x9996(%rip), %rcx      # 0x23c14
movq %rcx, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1344d(%rip), %rdi     # 0x2d6e0
xorl %eax, %eax
callq 0x1cde8
movl $0x2, %edi
callq 0xd2d0
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: extractNumberByOrder
bool extractNumberByOrder(const Pgn *pgn, size_t order, const uint8_t *data, size_t dataLen, int64_t *value)
{
  const Field *field     = &pgn->fieldList[order - 1];
  size_t       bitOffset = getFieldOffsetByOrder(pgn, order);

  size_t  startBit;
  int64_t maxValue;

  startBit = bitOffset & 7;
  data += bitOffset >> 3;
  dataLen -= bitOffset >> 3;

  return extractNumber(field, data, dataLen, startBit, field->size, value, &maxValue);
}

// Assembly:
movq %r8, %r9
addq $0x18, %rdi
testq %rsi, %rsi
je 0x1a4e7
movb $0x1, %al
xorl %r10d, %r10d
xorl %r8d, %r8d
leaq 0x1(%r10), %r11
cmpq %rsi, %r11
je 0x1a4ea
imulq $0xa8, %r10, %r10
movl 0x10(%rdi,%r10), %r10d
addq %r10, %r8
movzbl %al, %r10d
movl %r10d, %eax
incb %al
cmpq %rsi, %r10
jb 0x1a4c1
xorl %r8d, %r8d
subq $0x18, %rsp
imulq $0xa8, %rsi, %rax
addq %rax, %rdi
addq $-0xa8, %rdi
movl %r8d, %eax
andl $0x7, %eax
shrq $0x3, %r8
addq %r8, %rdx
subq %r8, %rcx
movl 0x10(%rdi), %r8d
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x1a2c7
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: extractNumberNotEmpty
static bool extractNumberNotEmpty(const Field   *field,
                                  const char    *fieldName,
                                  const uint8_t *data,
                                  size_t         dataLen,
                                  size_t         startBit,
                                  size_t         bits,
                                  int64_t       *value,
                                  int64_t       *maxValue)
{
  int64_t reserved;

  if (!extractNumber(field, data, dataLen, startBit, bits, value, maxValue))
  {
    return false;
  }

  if (*maxValue >= 7)
  {
    reserved = 2; /* DATAFIELD_ERROR and DATAFIELD_UNKNOWN */
  }
  else if (*maxValue > 1)
  {
    reserved = 1; /* DATAFIELD_UNKNOWN */
  }
  else
  {
    reserved = 0;
  }

  if (field->pgn != NULL && field->pgn->repeatingField1 == field->order)
  {
    logDebug("The first repeating fieldset repeats %" PRId64 " times\n", *value);
    g_variableFieldRepeat[0] = *value;
  }

  if (field->pgn != NULL && field->pgn->repeatingField2 == field->order)
  {
    logDebug("The second repeating fieldset repeats %" PRId64 " times\n", *value);
    g_variableFieldRepeat[1] = *value;
  }

  g_previousFieldValue = *value;

  if (*value > *maxValue - reserved)
  {
    printEmpty(fieldName, *value - *maxValue);
    return false;
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x38(%rsp), %r15
movq 0x30(%rsp), %rbx
movq %r15, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movq %r9, %r8
movq %rbx, %r9
callq 0x1a2c7
testb %al, %al
je 0x1a6c7
movq (%r15), %rax
xorl %ecx, %ecx
cmpq $0x2, %rax
setge %cl
negq %rcx
cmpq $0x7, %rax
movq $-0x2, %r12
cmovlq %rcx, %r12
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x1a6a8
movb 0x15ef(%rax), %cl
cmpb 0x4b(%r14), %cl
jne 0x1a67f
movq (%rbx), %rsi
leaq 0x136a2(%rip), %rdi     # 0x2dd03
xorl %eax, %eax
callq 0x1cd55
movl (%rbx), %eax
leaq 0x740af(%rip), %rcx     # 0x8e720
movl %eax, (%rcx)
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x1a6a8
movb 0x15f0(%rax), %al
cmpb 0x4b(%r14), %al
jne 0x1a6a8
movq (%rbx), %rsi
leaq 0x1369e(%rip), %rdi     # 0x2dd33
xorl %eax, %eax
callq 0x1cd55
movl (%rbx), %eax
leaq 0x7407b(%rip), %rcx     # 0x8e720
movl %eax, 0x4(%rcx)
movq (%rbx), %rsi
movq %rsi, 0x76196(%rip)     # 0x90848
movq (%r15), %rcx
addq %rcx, %r12
movb $0x1, %al
cmpq %r12, %rsi
jle 0x1a6c9
subq %rcx, %rsi
callq 0x1a52f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintFloat
extern bool fieldPrintFloat(const Field   *field,
                            const char    *fieldName,
                            const uint8_t *data,
                            size_t         dataLen,
                            size_t         startBit,
                            size_t        *bits)
{
  union
  {
    float    a;
    uint32_t w;
    uint8_t  b[4];
  } f;

  if (!adjustDataLenStart(&data, &dataLen, &startBit))
  {
    return false;
  }

  if (*bits != sizeof(f) || startBit != 0)
  {
    logError("field '%s' FLOAT value unhandled bits=%zu startBit=%zu\n", fieldName, *bits, startBit);
    return false;
  }
  if (dataLen < sizeof(f))
  {
    return false;
  }
#ifdef __BIG_ENDIAN__
  f.b[3] = data[0];
  f.b[2] = data[1];
  f.b[1] = data[2];
  f.b[0] = data[3];
#else
  memcpy(&f.w, data, sizeof(f));
#endif

  mprintf("%g", f.a);
  if (!showJson && field->unit != NULL)
  {
    mprintf(" %s", field->unit);
  }

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %r8, %rdi
shrq $0x3, %rdi
subq %rdi, %rcx
jbe 0x1a8f4
andl $0x7, %r8d
movq (%r9), %rax
movq %rax, %r9
xorq $0x4, %r9
orq %r8, %r9
je 0x1a8ee
leaq 0x12f73(%rip), %rdi     # 0x2d850
xorl %ebx, %ebx
movq %rax, %rdx
movq %r8, %rcx
xorl %eax, %eax
callq 0x1cde8
jmp 0x1a8f6
cmpq $0x4, %rcx
jae 0x1a900
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cvtss2sd (%rdx,%rdi), %xmm0
leaq 0x12f7c(%rip), %rdi     # 0x2d888
movb $0x1, %bl
movb $0x1, %al
callq 0x1a07c
leaq 0x73dd6(%rip), %rax     # 0x8e6f2
cmpb $0x0, (%rax)
jne 0x1a8f6
movq 0x18(%r14), %rsi
testq %rsi, %rsi
je 0x1a8f6
leaq 0x1828c(%rip), %rdi     # 0x32bbd
xorl %eax, %eax
callq 0x1a07c
jmp 0x1a8f6
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintDecimal
extern bool fieldPrintDecimal(const Field   *field,
                              const char    *fieldName,
                              const uint8_t *data,
                              size_t         dataLen,
                              size_t         startBit,
                              size_t        *bits)
{
  uint8_t  value = 0;
  uint8_t  bitMask;
  uint64_t bitMagnitude = 1;
  size_t   bit;
  char     buf[128];

  if (!adjustDataLenStart(&data, &dataLen, &startBit))
  {
    return false;
  }

  bitMask = 1 << startBit;

  if (startBit + *bits > dataLen * 8)
  {
    *bits = dataLen * 8 - startBit;
  }

  for (bit = 0; bit < *bits && bit < sizeof(buf) * 8; bit++)
  {
    /* Act on the current bit */
    bool bitIsSet = (*data & bitMask) > 0;
    if (bitIsSet)
    {
      value |= bitMagnitude;
    }

    /* Find the next bit */
    if (bitMask == 128)
    {
      bitMask = 1;
      data++;
    }
    else
    {
      bitMask = bitMask << 1;
    }
    bitMagnitude = bitMagnitude << 1;

    if (bit % 8 == 7)
    {
      if (value < 100)
      {
        mprintf("%02u", value);
      }
      value        = 0;
      bitMagnitude = 1;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, (%rsp)
movq %rdx, %r15
movq %r8, %rax
shrq $0x3, %rax
movq %rcx, 0x10(%rsp)
movq %rcx, %rdx
movq %rax, 0x8(%rsp)
subq %rax, %rdx
jbe 0x1aa3f
andl $0x7, %r8d
movl $0x1, %ebp
movl %r8d, %ecx
shll %cl, %ebp
movq (%rsp), %rax
movq (%rax), %rax
leaq (%rax,%r8), %rcx
shlq $0x3, %rdx
cmpq %rdx, %rcx
jbe 0x1a99b
subq %r8, %rdx
movq (%rsp), %rax
movq %rdx, (%rax)
movq %rdx, %rax
testq %rax, %rax
je 0x1aa3f
addq 0x8(%rsp), %r15
movb $0x1, %dil
xorl %r13d, %r13d
movl $0x1, %r8d
xorl %ebx, %ebx
movl %r13d, %ecx
movzbl (%r15), %edx
movzbl %bpl, %esi
andl %ebp, %edx
movzbl %dil, %r13d
cmovel %edx, %r13d
orb %cl, %r13b
leal (%rsi,%rsi), %ebp
xorl %r14d, %r14d
cmpl $0x80, %esi
cmovel %r8d, %ebp
sete %r12b
movl %ebx, %ecx
notl %ecx
testb $0x7, %cl
jne 0x1aa1c
movb $0x1, %dil
cmpb $0x63, %r13b
ja 0x1aa21
movzbl %r13b, %esi
xorl %r13d, %r13d
leaq 0x13117(%rip), %rdi     # 0x2db1a
xorl %eax, %eax
callq 0x1a07c
movl $0x1, %r8d
movb $0x1, %dil
movq (%rsp), %rax
movq (%rax), %rax
jmp 0x1aa24
addb %dil, %dil
jmp 0x1aa24
xorl %r13d, %r13d
cmpq $0x3fe, %rbx            # imm = 0x3FE
ja 0x1aa3f
movb %r12b, %r14b
addq %r14, %r15
incq %rbx
cmpq %rax, %rbx
jb 0x1a9b7
movq 0x8(%rsp), %rax
cmpq %rax, 0x10(%rsp)
seta %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintPGN
extern bool fieldPrintPGN(const Field   *field,
                          const char    *fieldName,
                          const uint8_t *data,
                          size_t         dataLen,
                          size_t         startBit,
                          size_t        *bits)
{
  const char *s   = NULL;
  const Pgn  *pgn = NULL;

  int64_t value;
  int64_t maxValue;

  if (!extractNumberNotEmpty(field, fieldName, data, dataLen, startBit, *bits, &value, &maxValue))
  {
    return true;
  }

  if (!IS_MANUFACTURER_PGN(value))
  {
    pgn = searchForPgn(value);
    if (pgn != NULL)
    {
      s = pgn->description;
    }
  }

  if (value >= maxValue - 2)
  {
    printEmpty(fieldName, value - maxValue);
  }
  else if (s != NULL)
  {
    if (showJsonValue)
    {
      mprintf("%" PRId64 ",\"name\":\"%s\"}", value, s);
    }
    else if (showJson)
    {
      mprintf("%" PRId64, value);
    }
    else
    {
      mprintf("%" PRId64 " (%s)", value, s);
    }
  }
  else
  {
    if (showJsonValue)
    {
      mprintf("%" PRId64, value);
      if (showJsonEmpty)
      {
        mprintf(",\"name\":null");
      }
      mprintf("}");
    }
    else
    {
      mprintf("%" PRId64, value);
    }
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq (%r9), %r9
leaq 0x8(%rsp), %rax
leaq 0x10(%rsp), %r10
pushq %rax
pushq %r10
callq 0x1a5ec
addq $0x10, %rsp
testb %al, %al
je 0x1af7f
movq 0x10(%rsp), %rbx
movq %rbx, %rax
andq $-0x100, %rax
cmpq $0xff00, %rax           # imm = 0xFF00
sete %al
cmpq $0x1ef00, %rbx          # imm = 0x1EF00
setge %cl
orb %al, %cl
jne 0x1aed5
movl %ebx, %edi
callq 0xd48c
testq %rax, %rax
je 0x1aed5
movq (%rax), %rdx
jmp 0x1aed7
xorl %edx, %edx
movq 0x8(%rsp), %rax
leaq -0x2(%rax), %rcx
cmpq %rcx, %rbx
jge 0x1af02
leaq 0x73808(%rip), %rax     # 0x8e6f4
movb (%rax), %bpl
testq %rdx, %rdx
je 0x1af0f
testb %bpl, %bpl
je 0x1af4f
leaq 0x12aaa(%rip), %rdi     # 0x2d9aa
jmp 0x1af75
subq %rax, %rbx
movq %rbx, %rsi
callq 0x1a52f
jmp 0x1af7f
leaq 0x128ab(%rip), %rdi     # 0x2d7c1
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1a07c
testb %bpl, %bpl
je 0x1af7f
leaq 0x737c7(%rip), %rax     # 0x8e6f3
cmpb $0x1, (%rax)
jne 0x1af3f
leaq 0x129a1(%rip), %rdi     # 0x2d8d9
xorl %eax, %eax
callq 0x1a07c
leaq 0x12a73(%rip), %rdi     # 0x2d9b9
xorl %eax, %eax
callq 0x1a07c
jmp 0x1af7f
leaq 0x7379c(%rip), %rax     # 0x8e6f2
cmpb $0x1, (%rax)
jne 0x1af6e
leaq 0x1285f(%rip), %rdi     # 0x2d7c1
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1a07c
jmp 0x1af7f
leaq 0x129d3(%rip), %rdi     # 0x2d948
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1a07c
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintReserved
extern bool fieldPrintReserved(const Field   *field,
                               const char    *fieldName,
                               const uint8_t *data,
                               size_t         dataLen,
                               size_t         startBit,
                               size_t        *bits)
{
  int64_t value;
  int64_t maxValue;

  if (!extractNumber(field, data, dataLen, startBit, *bits, &value, &maxValue))
  {
    return true;
  }
  if (value == maxValue)
  {
    g_skip = true;
    return true;
  }

  return fieldPrintBinary(field, fieldName, data, dataLen, startBit, bits);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movq (%r9), %r8
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %r9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r14, %rcx
callq 0x1a2c7
testb %al, %al
je 0x1afda
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x1afea
movb $0x1, 0x75866(%rip)     # 0x90840
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1b00b
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintSpare
extern bool fieldPrintSpare(const Field   *field,
                            const char    *fieldName,
                            const uint8_t *data,
                            size_t         dataLen,
                            size_t         startBit,
                            size_t        *bits)
{
  int64_t value;
  int64_t maxValue;

  if (!extractNumber(field, data, dataLen, startBit, *bits, &value, &maxValue))
  {
    return true;
  }
  if (value == 0)
  {
    g_skip = true;
    return true;
  }

  return fieldPrintBinary(field, fieldName, data, dataLen, startBit, bits);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movq (%r9), %r8
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %r9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r14, %rcx
callq 0x1a2c7
testb %al, %al
je 0x1b210
cmpq $0x0, 0x10(%rsp)
je 0x1b209
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1b00b
movb $0x1, 0x75630(%rip)     # 0x90840
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq