LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/adelciotto[P]scg/examples/../scg.h
// Function: scg_app_free
void scg_app_free(scg_app_t *app) {
    if (app->audio != NULL) {
        scg__audio_free(app->audio);
    }

    free(app->mouse);
    free(app->keyboard);
    scg__screen_free(app->screen);
    scg_image_free(app->draw_target);

    SDL_Quit();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %r14
testq %r14, %r14
je 0x5060
movl (%r14), %edi
movl $0x1, %esi
callq 0x22d0
movl (%r14), %edi
callq 0x2330
cmpl $0x0, 0xa0(%r14)
jle 0x5047
xorl %r15d, %r15d
movq 0x20(%r14,%r15,8), %rax
movq 0x30(%rax), %rdi
callq 0x2310
incq %r15
movslq 0xa0(%r14), %rax
cmpq %rax, %r15
jl 0x502a
movq 0x18(%r14), %rdi
callq 0x2290
movl (%r14), %edi
callq 0x20d0
movq %r14, %rdi
callq 0x2290
movq 0x48(%rbx), %rdi
callq 0x2290
movq 0x40(%rbx), %rdi
callq 0x2290
movq 0x60(%rbx), %rdi
callq 0x4810
movq 0x38(%rbx), %rbx
movq 0x10(%rbx), %rdi
callq 0x2290
movq %rbx, %rdi
callq 0x2290
popq %rbx
popq %r14
popq %r15
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O1/adelciotto[P]scg/examples/../scg.h
// Function: scg_tween_exponential_ease_in_out
float32_t scg_tween_exponential_ease_in_out(float32_t t) {
    if (t == 0.0f || t == 1.0f) {
        return t;
    }

    if (t < 0.5f) {
        return 0.5f * powf(2.0f, (20.0f * t) - 10.0f);
    }

    return -0.5f * powf(2.0f, (-20.0f * t) + 10.0f) + 1.0f;
}

// Assembly:
pushq %rax
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x50f4
jnp 0x5150
ucomiss 0xf0d(%rip), %xmm0      # 0x6008
jne 0x50ff
jnp 0x5150
movss 0xefd(%rip), %xmm1      # 0x6004
ucomiss %xmm0, %xmm1
jbe 0x512b
mulss 0xf10(%rip), %xmm0      # 0x6024
addss 0xefc(%rip), %xmm0      # 0x6018
callq 0x23e0
mulss 0xedb(%rip), %xmm0      # 0x6004
jmp 0x5150
mulss 0xee9(%rip), %xmm0      # 0x601c
addss 0xed9(%rip), %xmm0      # 0x6014
callq 0x23e0
mulss 0xed8(%rip), %xmm0      # 0x6020
addss 0xeb8(%rip), %xmm0      # 0x6008
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/adelciotto[P]scg/examples/../scg.h
// Function: scg_tween_elastic_ease_in
float32_t scg_tween_elastic_ease_in(float32_t t) {
    if (t == 0.0f) {
        return 0.0f;
    }

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

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

// Assembly:
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x5160
jp 0x5160
retq
movss 0xea0(%rip), %xmm0      # 0x6008
ucomiss %xmm0, %xmm1
jne 0x516f
jnp 0x515f
subq $0x28, %rsp
movss 0xe95(%rip), %xmm0      # 0x6010
addss %xmm1, %xmm0
mulss 0xe8d(%rip), %xmm0      # 0x6014
movss %xmm1, 0xc(%rsp)
callq 0x23e0
xorps 0xec7(%rip), %xmm0      # 0x6060
movaps %xmm0, 0x10(%rsp)
movss 0xc(%rsp), %xmm0
addss 0xe7c(%rip), %xmm0      # 0x6028
mulss 0xe78(%rip), %xmm0      # 0x602c
mulss 0xe74(%rip), %xmm0      # 0x6030
callq 0x21d0
mulss 0x10(%rsp), %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/adelciotto[P]scg/examples/../scg.h
// Function: scg_tween_elastic_ease_out
float32_t scg_tween_elastic_ease_out(float32_t t) {
    if (t == 0.0f) {
        return 0.0f;
    }

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

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

// Assembly:
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x51da
jp 0x51da
retq
movss 0xe26(%rip), %xmm0      # 0x6008
ucomiss %xmm0, %xmm1
jne 0x51e9
jnp 0x51d9
pushq %rax
movss 0xe26(%rip), %xmm0      # 0x6018
mulss %xmm1, %xmm0
movss %xmm1, (%rsp)
callq 0x23e0
movss %xmm0, 0x4(%rsp)
movss (%rsp), %xmm0
addss 0xe21(%rip), %xmm0      # 0x6034
mulss 0xe11(%rip), %xmm0      # 0x602c
mulss 0xe0d(%rip), %xmm0      # 0x6030
callq 0x21d0
mulss 0x4(%rsp), %xmm0
addss 0xdd2(%rip), %xmm0      # 0x6008
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x524a
jnp 0x52f6
movss 0xdb6(%rip), %xmm0      # 0x6008
ucomiss %xmm0, %xmm1
jne 0x525d
jnp 0x52f6
addss %xmm1, %xmm1
movss 0xd9f(%rip), %xmm0      # 0x6008
ucomiss %xmm1, %xmm0
movss 0xd9c(%rip), %xmm0      # 0x6010
addss %xmm1, %xmm0
addss 0xda8(%rip), %xmm1      # 0x6028
mulss 0xda4(%rip), %xmm1      # 0x602c
mulss 0xda0(%rip), %xmm1      # 0x6030
movss %xmm1, 0x4(%rsp)
jbe 0x52c4
mulss 0xd74(%rip), %xmm0      # 0x6014
callq 0x23e0
mulss 0xd73(%rip), %xmm0      # 0x6020
movss %xmm0, (%rsp)
movss 0x4(%rsp), %xmm0
callq 0x21d0
mulss (%rsp), %xmm0
jmp 0x52f6
mulss 0xd4c(%rip), %xmm0      # 0x6018
callq 0x23e0
mulss 0xd2b(%rip), %xmm0      # 0x6004
movss %xmm0, (%rsp)
movss 0x4(%rsp), %xmm0
callq 0x21d0
mulss (%rsp), %xmm0
addss 0xd12(%rip), %xmm0      # 0x6008
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5468
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 0x536e
movss 0x30(%rbx), %xmm0
subss 0x28(%rbx), %xmm0
divss %xmm1, %xmm0
xorps %xmm2, %xmm2
cmpeqps %xmm1, %xmm2
movss 0xc82(%rip), %xmm3      # 0x6008
movaps %xmm3, %xmm1
cmpltps %xmm0, %xmm1
orps %xmm2, %xmm1
movd %xmm1, %eax
testb $0x1, %al
jne 0x539b
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 0x5407
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 0x53be
ucomiss 0xbfa(%rip), %xmm3      # 0x6008
movss 0x4(%rsp), %xmm0
jne 0x545a
jp 0x545a
testb $0x1, 0x2(%rsp)
je 0x5442
testl %r15d, %r15d
jle 0x543e
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
movq (%r12,%rcx,8), %rdx
rolq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x542a
xorb $0x1, 0x2e(%rbx)
testb $0x1, 0x3(%rsp)
jne 0x544f
cmpb $0x1, 0x2e(%rbx)
jne 0x5456
movss %xmm0, 0x28(%rbx)
jmp 0x545a
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_O1/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 0x54d4
cmpb $0x1, 0x2d(%rdi)
jne 0x54d4
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_O1/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 0x1af35(%rip), %rax     # 0x283c8
movq (%rax), %rsi
xorl %eax, %eax
leaq 0x38e61(%rip), %rcx     # 0x46300
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
incq %rdx
leaq (%rcx,%r10), %rax
addq $-0x15f0, %rax          # imm = 0xEA10
cmpq $0x1, %rdx
je 0xd4fc
decq %rdx
leaq -0x15f8(%rax), %rsi
cmpl %edi, (%rax)
movq %rsi, %rax
je 0xd4e3
jmp 0xd4fe
xorl %edx, %edx
imulq $0x15f8, %rdx, %rax     # imm = 0x15F8
cmpb $0x1, 0x15d0(%rcx,%rax)
jne 0xd51b
cmpl %edi, 0x1600(%rax,%rcx)
jne 0xd52a
incq %rdx
imulq $0x15f8, %rdx, %rax     # imm = 0x15F8
addq 0x38aa7(%rip), %rax     # 0x45fd0
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x1ae8e(%rip), %rax     # 0x283c8
movq (%rax), %rcx
leaq 0x38dbc(%rip), %rax     # 0x46300
testq %rcx, %rcx
jle 0xd57b
imulq $0x15f8, %rcx, %rcx     # imm = 0x15F8
addq %rcx, %rax
leaq 0x38da6(%rip), %rcx     # 0x46300
movq %rcx, %r14
cmpb $0x0, 0x15d0(%rcx)
cmovneq %rcx, %r14
cmpl %ebx, 0x8(%rcx)
jae 0xd57e
addq $0x15f8, %rcx           # imm = 0x15F8
cmpq %rax, %rcx
jb 0xd55d
jmp 0xd57e
movq %rax, %r14
testq %r14, %r14
jne 0xd593
leaq 0x1aa7a(%rip), %rdi     # 0x28004
movl %ebx, %esi
xorl %eax, %eax
callq 0x25603
movl 0x8(%r14), %esi
leaq 0x1aab2(%rip), %rdi     # 0x28050
movl %ebx, %edx
xorl %eax, %eax
callq 0x254dd
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd958
cmpl %ebp, 0x15c0(%rax)
jbe 0xd96d
movl %ebp, %ecx
imulq $0xa8, %rcx, %rcx
leaq (%rax,%rcx), %r14
addq $0x18, %r14
jmp 0xd982
leaq 0x1a9f2(%rip), %rdi     # 0x28351
xorl %r14d, %r14d
movl %ebx, %esi
xorl %eax, %eax
callq 0x254dd
jmp 0xd982
leaq 0x1a9f0(%rip), %rdi     # 0x28364
xorl %r14d, %r14d
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x254dd
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1aa29(%rip), %rax     # 0x283c8
cmpq $0x0, (%rax)
je 0xda9a
movl %edi, %ebx
leaq 0x3894e(%rip), %r15     # 0x46300
xorl %ecx, %ecx
movzbl %bl, %eax
movl %eax, 0xc(%rsp)
movq %rcx, 0x10(%rsp)
imulq $0x15f8, %rcx, %r14     # imm = 0x15F8
leaq 0x38932(%rip), %r12     # 0x46300
movq (%r12,%r14), %rdi
xorl %ebp, %ebp
movl 0xc(%rsp), %esi
xorl %edx, %edx
callq 0xdaa9
movq %rax, 0x15c8(%r12,%r14)
movl $0x70, %r13d
movl $0x1, %r14d
movq -0x58(%r15,%r13), %r12
testq %r12, %r12
je 0xda7b
movq (%r15,%r13), %rdi
testq %rdi, %rdi
je 0xda1e
testb %bl, %bl
je 0xda3b
testb $0x1, %bpl
movl $0x0, %edx
cmovnel %r14d, %edx
movl $0x1, %esi
jmp 0xda32
testb $0x1, %bpl
movl $0x0, %edx
cmovnel %r14d, %edx
movq %r12, %rdi
movl 0xc(%rsp), %esi
callq 0xdaa9
movq %rax, (%r15,%r13)
movq %r12, %rdi
leaq 0x1a93e(%rip), %rsi     # 0x28383
callq 0xd1a0
testl %eax, %eax
je 0xda61
movq %r12, %rdi
leaq 0x1a934(%rip), %rsi     # 0x2838c
callq 0xd1a0
testl %eax, %eax
jne 0xda64
movb $0x1, %bpl
incl %r14d
addq $0xa8, %r13
cmpq $0x1618, %r13           # imm = 0x1618
jne 0xd9f3
movq 0x10(%rsp), %rcx
incq %rcx
addq $0x15f8, %r15           # imm = 0x15F8
leaq 0x1a937(%rip), %rax     # 0x283c8
cmpq %rcx, (%rax)
ja 0xd9bb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %ebp
movl %esi, %r12d
movq %rdi, %r14
callq 0xd0f0
leaq 0x4(%rax), %rdi
callq 0xd200
testq %rax, %rax
je 0xdb83
movq %rax, %rbx
movl %ebp, 0xc(%rsp)
movq %r14, 0x10(%rsp)
movb (%r14), %r14b
movq %rax, %r15
testb %r14b, %r14b
je 0xdb4a
xorb $0x1, %r12b
callq 0xd350
movq %rax, %r13
movq 0x10(%rsp), %rax
leaq 0x1(%rax), %rbp
movq %rbx, %r15
movq (%r13), %rax
movzbl %r14b, %ecx
testb $0xc, 0x1(%rax,%rcx,2)
je 0xdb21
testb $0x1, %r12b
je 0xdb26
callq 0xd340
jmp 0xdb2e
xorl %r12d, %r12d
jmp 0xdb3e
movb $0x1, %r12b
callq 0xd030
movsbq %r14b, %rcx
movq (%rax), %rax
movb (%rax,%rcx,4), %al
movb %al, (%r15)
incq %r15
movb (%rbp), %r14b
incq %rbp
testb %r14b, %r14b
jne 0xdb05
movl 0xc(%rsp), %ebp
testl %ebp, %ebp
movq 0x10(%rsp), %r14
jle 0xdb7d
leaq 0x1a825(%rip), %rsi     # 0x28383
movq %r14, %rdi
callq 0xd1a0
testl %eax, %eax
je 0xdb87
leaq 0x1a81b(%rip), %rsi     # 0x2838c
movq %r14, %rdi
callq 0xd1a0
testl %eax, %eax
je 0xdb87
movb $0x0, (%r15)
jmp 0xdb9a
xorl %ebx, %ebx
jmp 0xdb9a
leaq 0x321e8(%rip), %rsi     # 0x3fd76
movq %r15, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xd2c0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xdddb
movq (%rsi), %rsi
leaq 0x1d419(%rip), %rdi     # 0x2b1ed
xorl %eax, %eax
callq 0xd110
movq (%rbx), %rsi
leaq 0x1d428(%rip), %rdi     # 0x2b20d
xorl %eax, %eax
callq 0xd110
leaq 0x1e343(%rip), %rdi     # 0x2c136
callq 0xd0c0
leaq 0x1e375(%rip), %rdi     # 0x2c174
callq 0xd0c0
leaq 0x1e3a6(%rip), %rdi     # 0x2c1b1
callq 0xd0c0
leaq 0x1e3e1(%rip), %rdi     # 0x2c1f8
callq 0xd0c0
leaq 0x1e41b(%rip), %rdi     # 0x2c23e
callq 0xd0c0
leaq 0x1e45a(%rip), %rdi     # 0x2c289
callq 0xd0c0
leaq 0x1e488(%rip), %rdi     # 0x2c2c3
callq 0xd0c0
leaq 0x1e4b5(%rip), %rdi     # 0x2c2fc
callq 0xd0c0
leaq 0x1e4ea(%rip), %rdi     # 0x2c33d
callq 0xd0c0
movl $0xa, %edi
callq 0xd050
movl $0x1, %edi
callq 0xd2d0
// File: /workspace/github_c_makefile_star2_O1/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 0x1e506(%rip), %rdi     # 0x2c383
callq 0xd0c0
leaq 0x1e924(%rip), %rdi     # 0x2c7ad
callq 0xd0c0
leaq 0x39a63(%rip), %rbx     # 0x478f8
movl $0x37, %r14d
cmpw $0x0, 0xc(%rbx)
jne 0xdebe
cmpl $0x3ffff, 0x8(%rbx)     # imm = 0x3FFFF
ja 0xdebe
movl $0x2bf, %ecx            # imm = 0x2BF
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0xef58
addq $0x15f8, %rbx           # imm = 0x15F8
decq %r14
jne 0xde9b
leaq 0x1e8fd(%rip), %rdi     # 0x2c7ce
callq 0xd0c0
leaq 0x39a1b(%rip), %rbx     # 0x478f8
movl $0x37, %r14d
cmpw $0x0, 0xc(%rbx)
je 0xdf06
cmpl $0x3ffff, 0x8(%rbx)     # imm = 0x3FFFF
ja 0xdf06
movl $0x2bf, %ecx            # imm = 0x2BF
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0xef58
addq $0x15f8, %rbx           # imm = 0x15F8
decq %r14
jne 0xdee3
addq $0x15f8, %rsp           # imm = 0x15F8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf464
movzbl 0x15ec(%rbx), %edx
addl %edx, %eax
movl %ecx, %r15d
subl %eax, %r15d
movb $0x1, (%r14)
movl 0x8(%rbx), %esi
leaq 0x1c12e(%rip), %rdi     # 0x2b59c
xorl %ebp, %ebp
movl %r15d, %edx
xorl %eax, %eax
callq 0x254dd
testl %r15d, %r15d
je 0xf4a9
movl %r15d, %eax
imulq $0xa8, %rax, %rax
xorl %ecx, %ecx
xorl %ebp, %ebp
movl 0x28(%rbx,%rcx), %edx
testl %edx, %edx
je 0xf499
addl %edx, %ebp
jmp 0xf49d
movb $0x1, (%r14)
addq $0xa8, %rcx
cmpq %rcx, %rax
jne 0xf48d
testb $0x7, %bpl
je 0xf4c5
movl 0x8(%rbx), %esi
movq (%rbx), %rdx
leaq 0x1c0ff(%rip), %rdi     # 0x2b5bb
movl %ebp, %ecx
xorl %eax, %eax
callq 0x25603
shrl $0x3, %ebp
cmpl $0x0, 0x10(%rbx)
jne 0xf4f1
cmpl $0x8, %ebp
je 0xf4f1
movl 0x8(%rbx), %esi
cmpl $0xea00, %esi           # imm = 0xEA00
je 0xf4f1
movq (%rbx), %rdx
leaq 0x1c119(%rip), %rdi     # 0x2b601
movl %ebp, %ecx
xorl %eax, %eax
callq 0x25603
movl 0x8(%rbx), %esi
leaq 0x1c152(%rip), %rdi     # 0x2b64d
movl %ebp, %edx
xorl %eax, %eax
callq 0x254dd
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2455c
movq %rax, %r14
leaq 0x1c77f(%rip), %rdi     # 0x2bdaf
movq %r12, %rsi
xorl %eax, %eax
callq 0xd110
xorl %edi, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0xf74b
movl $0x27, %edi
callq 0xd050
testq %r14, %r14
je 0xf712
movq %r14, %rcx
movq %rcx, %rax
movq 0x88(%rcx), %rcx
testq %rcx, %rcx
jne 0xf65c
movq (%rax), %rsi
leaq 0x1c606(%rip), %rdi     # 0x2bc7b
xorl %eax, %eax
callq 0xd110
movl 0x60(%r14), %eax
testl %eax, %eax
je 0xf6a7
cmpl $0x2, %eax
leaq 0x1dcd8(%rip), %rax     # 0x2d366
leaq 0x1be0b(%rip), %rsi     # 0x2b4a0
cmoveq %rax, %rsi
leaq 0x1c5eb(%rip), %rdi     # 0x2bc8b
xorl %eax, %eax
callq 0xd110
movsd 0x58(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf6b9
jnp 0xf6c7
leaq 0x1c5d9(%rip), %rdi     # 0x2bc99
movb $0x1, %al
callq 0xd110
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0xf6de
leaq 0x1c5d3(%rip), %rdi     # 0x2bcaa
xorl %eax, %eax
callq 0xd110
testq %rbx, %rbx
je 0xf6fc
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xf6fc
leaq 0x1c5c2(%rip), %rdi     # 0x2bcb5
xorl %eax, %eax
callq 0xd110
jmp 0xf712
movl 0x28(%r14), %esi
testl %esi, %esi
je 0xf712
leaq 0x1c5b6(%rip), %rdi     # 0x2bcc1
xorl %eax, %eax
callq 0xd110
testq %rbx, %rbx
je 0xf734
leaq 0x1d5c4(%rip), %rdi     # 0x2cce2
callq 0xd0c0
movq %rbx, %rdi
callq 0xf83f
leaq 0x1dd09(%rip), %rdi     # 0x2d43b
jmp 0xf73b
leaq 0x1de63(%rip), %rdi     # 0x2d59e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd0c0
// File: /workspace/github_c_makefile_star2_O1/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 0xf83e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
testq %rsi, %rsi
je 0xf79e
movl %edi, %ebp
testl %edi, %edi
jle 0xf78d
movq 0x36851(%rip), %rbx     # 0x45fc8
leaq 0x1bc8b(%rip), %r15     # 0x2b409
movq (%rbx), %rsi
movq %r15, %rdi
callq 0xd170
decl %ebp
jne 0xf77e
leaq 0x1c477(%rip), %rdi     # 0x2bc0b
movq %r12, %rsi
xorl %eax, %eax
callq 0xd110
movq %r12, (%rsp)
movq 0x3681f(%rip), %rbx     # 0x45fc8
leaq 0x1c470(%rip), %r15     # 0x2bc20
leaq 0x1c459(%rip), %r12     # 0x2bc10
leaq 0x1c458(%rip), %r13     # 0x2bc16
leaq 0x1c456(%rip), %rbp     # 0x2bc1b
movzbl (%r14), %eax
cmpl $0x3b, %eax
jg 0xf7e0
cmpl $0x22, %eax
je 0xf7f2
cmpl $0x26, %eax
jne 0xf80a
movq (%rbx), %rsi
movq %r12, %rdi
jmp 0xf800
cmpl $0x3c, %eax
je 0xf7fa
cmpl $0x3e, %eax
jne 0xf80e
movq (%rbx), %rsi
movq %rbp, %rdi
jmp 0xf800
movq (%rbx), %rsi
movq %r15, %rdi
jmp 0xf800
movq (%rbx), %rsi
movq %r13, %rdi
callq 0xd170
incq %r14
jmp 0xf7c5
testl %eax, %eax
je 0xf818
movsbl %al, %edi
callq 0xd050
jmp 0xf805
movq (%rsp), %rsi
testq %rsi, %rsi
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
je 0xf83e
leaq 0x1c56b(%rip), %rdi     # 0x2bda2
xorl %eax, %eax
jmp 0xd110
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf8ea
movq %rdi, %rbx
leaq 0x18b60(%rip), %rcx     # 0x283b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1, 0x8be94(%rip)     # 0x9b6fc
jne 0xf904
leaq 0x1dcc3(%rip), %rdi     # 0x2d538
callq 0xd0c0
leaq 0xed(%rip), %rdi        # 0xf96e
callq *0x10(%rbx)
leaq 0x1dcc4(%rip), %rdi     # 0x2d54f
jmp 0xf8db
cmpb $0x1, 0x8be68(%rip)     # 0x9b6fc
jne 0xf8ec
leaq 0x1dcca(%rip), %rdi     # 0x2d567
callq 0xd0c0
leaq 0x97(%rip), %rdi        # 0xf940
callq *0x10(%rbx)
leaq 0x1dcce(%rip), %rdi     # 0x2d581
jmp 0xf8db
cmpb $0x1, 0x8be40(%rip)     # 0x9b6fc
jne 0xf8f8
leaq 0x1dc32(%rip), %rdi     # 0x2d4f7
callq 0xd0c0
leaq 0x11c(%rip), %rdi       # 0xf9ed
callq *0x10(%rbx)
leaq 0x1dc3c(%rip), %rdi     # 0x2d517
popq %rbx
jmp 0xd0c0
cmpb $0x0, 0x8be14(%rip)     # 0x9b6fc
je 0xf919
popq %rbx
retq
movq (%rbx), %rdx
leaq 0x1c3d6(%rip), %rsi     # 0x2bccc
jmp 0xf90e
movq (%rbx), %rdx
leaq 0x1c42f(%rip), %rsi     # 0x2bd31
jmp 0xf90e
movq (%rbx), %rdx
leaq 0x1c3d3(%rip), %rsi     # 0x2bce1
movl $0xa, %edi
popq %rbx
jmp 0xf74b
movq (%rbx), %rdx
leaq 0x1c3d0(%rip), %rsi     # 0x2bcf3
movl $0xa, %edi
callq 0xf74b
movzbl 0x18(%rbx), %edx
leaq 0x1c3d5(%rip), %rsi     # 0x2bd0d
movl $0xa, %edi
popq %rbx
jmp 0xf99c
// File: /workspace/github_c_makefile_star2_O1/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 0xf9cf
movl %edi, %r14d
movq 0x36611(%rip), %r12     # 0x45fc8
leaq 0x1ba4b(%rip), %r15     # 0x2b409
movq (%r12), %rsi
movq %r15, %rdi
callq 0xd170
decl %r14d
jne 0xf9be
leaq 0x1c3c6(%rip), %rdi     # 0x2bd9c
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_O1/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 0x2455c
movq %rax, %r14
leaq 0x1c399(%rip), %rdi     # 0x2bda9
movq %r12, %rsi
xorl %eax, %eax
callq 0xd110
xorl %edi, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0xf74b
movl $0x27, %edi
callq 0xd050
testq %r14, %r14
je 0xfb15
xorl %esi, %esi
movq %r14, %rax
movq 0x38(%rax), %r15
testq %r15, %r15
jne 0xfa55
movq 0x88(%rax), %rax
testq %rax, %rax
jne 0xfa3e
jmp 0xfa71
leaq 0x1c37b(%rip), %rsi     # 0x2bdd7
movq %r15, %rdi
callq 0xd1a0
testl %eax, %eax
leaq 0x2a1eb(%rip), %rsi     # 0x39c58
cmovneq %r15, %rsi
leaq 0x1c203(%rip), %rdi     # 0x2bc7b
xorl %eax, %eax
callq 0xd110
movl 0x60(%r14), %eax
testl %eax, %eax
je 0xfaaa
cmpl $0x2, %eax
leaq 0x1d8d5(%rip), %rax     # 0x2d366
leaq 0x1ba08(%rip), %rsi     # 0x2b4a0
cmoveq %rax, %rsi
leaq 0x1c1e8(%rip), %rdi     # 0x2bc8b
xorl %eax, %eax
callq 0xd110
movsd 0x58(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xfabc
jnp 0xfaca
leaq 0x1c1d6(%rip), %rdi     # 0x2bc99
movb $0x1, %al
callq 0xd110
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0xfae1
leaq 0x1c1d0(%rip), %rdi     # 0x2bcaa
xorl %eax, %eax
callq 0xd110
testq %rbx, %rbx
je 0xfaff
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xfaff
leaq 0x1c1bf(%rip), %rdi     # 0x2bcb5
xorl %eax, %eax
callq 0xd110
jmp 0xfb15
movl 0x28(%r14), %esi
testl %esi, %esi
je 0xfb15
leaq 0x1c1b3(%rip), %rdi     # 0x2bcc1
xorl %eax, %eax
callq 0xd110
leaq 0x1da82(%rip), %rdi     # 0x2d59e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd0c0
// File: /workspace/github_c_makefile_star2_O1/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 0x2274a
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 0x72e8f(%rip), %rdi     # 0x95600
leaq 0x790c8(%rip), %rax     # 0x9b840
subl %edi, %eax
addl $0x1fff, %eax           # imm = 0x1FFF
testl %eax, %eax
jle 0x22799
movl %eax, %esi
movq %rsp, %rcx
movq %r10, %rdx
callq 0xd0d0
cltq
addq %rax, 0x72e67(%rip)     # 0x95600
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x72e12(%rip), %rdx     # 0x95600
leaq (%rdx,%rax), %r13
leaq 0x79047(%rip), %r15     # 0x9b840
movq %r13, %rax
subq %r15, %rax
cmpq $0x2000, %rax           # imm = 0x2000
ja 0x22830
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, 0x72dd0(%rip)     # 0x95600
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x708b2(%rip), %rax     # 0x93148
movq (%rax), %rbx
leaq 0x78e52(%rip), %rcx     # 0x9b6f2
cmpb $0x1, (%rcx)
jne 0x228e7
leaq 0x1d681(%rip), %rcx     # 0x3ff2d
movq %rcx, (%rax)
movq %rbx, %rdi
movl $0x7b, %esi
callq 0xd100
testq %rax, %rax
je 0x228f1
leaq 0x78e48(%rip), %r14     # 0x9b710
movq %r14, %rdi
callq 0xd0f0
cmpq $0xe, %rax
jae 0x228fc
movq %r14, %rdi
callq 0xd0f0
movw $0x7d, (%r14,%rax)
jmp 0x228f1
leaq 0x9326(%rip), %rcx      # 0x2bc14
movq %rcx, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1806d(%rip), %rdi     # 0x3a970
xorl %eax, %eax
callq 0x25570
movl $0x2, %edi
callq 0xd2d0
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbx
subq $0x10, %rsp
movq %r8, %r9
addq $0x18, %rdi
testq %rsi, %rsi
je 0x22b5f
movb $0x1, %al
xorl %r11d, %r11d
xorl %r10d, %r10d
leaq 0x1(%r11), %rbx
cmpq %rsi, %rbx
jne 0x22b3d
movq %r10, %r8
jmp 0x22b4c
imulq $0xa8, %r11, %r11
movl 0x10(%rdi,%r11), %r11d
addq %r11, %r10
cmpq %rsi, %rbx
je 0x22b62
movzbl %al, %r11d
movl %r11d, %eax
incb %al
cmpq %rsi, %r11
jb 0x22b2f
xorl %r8d, %r8d
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 0x8(%rsp), %rsi
movq %rsi, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x22937
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x22937
testb %al, %al
je 0x22d3f
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 0x22ce8
movb 0x15ef(%rax), %al
cmpb 0x4b(%r14), %al
jne 0x22ce8
movq (%rbx), %rsi
leaq 0x182bd(%rip), %rdi     # 0x3af93
xorl %eax, %eax
callq 0x254dd
movl (%rbx), %eax
leaq 0x78a3a(%rip), %rcx     # 0x9b720
movl %eax, (%rcx)
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x22d1d
movb 0x15f0(%rax), %al
cmpb 0x4b(%r14), %al
jne 0x22d1d
movq (%rbx), %rsi
leaq 0x182b9(%rip), %rdi     # 0x3afc3
xorl %eax, %eax
callq 0x254dd
movl (%rbx), %eax
leaq 0x78a06(%rip), %rcx     # 0x9b720
movl %eax, 0x4(%rcx)
movq (%rbx), %rax
movq %rax, 0x7ab21(%rip)     # 0x9d848
movq (%rbx), %rsi
movq (%r15), %rcx
addq %rcx, %r12
movb $0x1, %al
cmpq %r12, %rsi
jle 0x22d41
subq %rcx, %rsi
callq 0x22ba4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl %r8d, %eax
andl $0x7, %eax
xorl %ebx, %ebx
cmpq %rcx, %rdi
cmovaeq %rbx, %rdi
cmovaeq %r8, %rax
jae 0x22fd5
movq (%r9), %r8
movq %r8, %r9
xorq $0x4, %r9
orq %rax, %r9
je 0x22f90
leaq 0x17b61(%rip), %rdi     # 0x3aae0
xorl %ebx, %ebx
movq %r8, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x25570
jmp 0x22fd5
subq %rdi, %rcx
cmpq $0x4, %rcx
jae 0x22f9d
xorl %ebx, %ebx
jmp 0x22fd5
cvtss2sd (%rdx,%rdi), %xmm0
leaq 0x17b6f(%rip), %rdi     # 0x3ab18
movb $0x1, %bl
movb $0x1, %al
callq 0x226ec
leaq 0x78739(%rip), %rax     # 0x9b6f2
cmpb $0x0, (%rax)
jne 0x22fd5
movq 0x18(%r14), %rsi
testq %rsi, %rsi
je 0x22fd5
leaq 0x1ce52(%rip), %rdi     # 0x3fe20
xorl %eax, %eax
callq 0x226ec
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rcx, %rsi
movq %rdx, %r15
movq %r8, %rdi
shrq $0x3, %rdi
movl %r8d, %ecx
andl $0x7, %ecx
xorl %eax, %eax
cmpq %rdi, %rsi
cmovaq %rdi, %rax
movq %rsi, 0x8(%rsp)
movq %rsi, %rdx
movq %rdi, (%rsp)
subq %rdi, %rdx
cmovbeq %r8, %rcx
jbe 0x230e0
movl $0x1, %ebp
shll %cl, %ebp
movq (%r9), %rsi
addq %rcx, %rsi
shlq $0x3, %rdx
cmpq %rdx, %rsi
jbe 0x2303e
subq %rcx, %rdx
movq %rdx, (%r9)
cmpq $0x0, (%r9)
je 0x230e0
addq %rax, %r15
movl $0x1, %edx
xorl %r13d, %r13d
movl $0x1, %esi
xorl %r14d, %r14d
movq %r9, 0x10(%rsp)
movl %r13d, %eax
movzbl (%r15), %r13d
movzbl %bpl, %ecx
andl %ebp, %r13d
cmovnel %edx, %r13d
orb %al, %r13b
leal (%rcx,%rcx), %ebp
xorl %ebx, %ebx
cmpl $0x80, %ecx
cmovel %esi, %ebp
sete %r12b
movl %r14d, %eax
notl %eax
testb $0x7, %al
jne 0x230c1
movl $0x1, %edx
cmpb $0x63, %r13b
ja 0x230c6
movzbl %r13b, %esi
xorl %r13d, %r13d
leaq 0x17d01(%rip), %rdi     # 0x3adaa
xorl %eax, %eax
callq 0x226ec
movl $0x1, %esi
movl $0x1, %edx
movq 0x10(%rsp), %r9
jmp 0x230c9
addq %rdx, %rdx
jmp 0x230c9
xorl %r13d, %r13d
cmpq $0x3fe, %r14            # imm = 0x3FE
ja 0x230e0
movb %r12b, %bl
addq %rbx, %r15
incq %r14
cmpq (%r9), %r14
jb 0x23060
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
seta %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq