// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintName
extern bool fieldPrintName(const Field   *field,
                           const char    *fieldName,
                           const uint8_t *data,
                           size_t         dataLen,
                           size_t         startBit,
                           size_t        *bits)
{
  const Pgn *pgn            = NULL;
  size_t     variableFields = 0;

  uint64_t value;
  uint64_t maxValue;

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

  logDebug("printFieldName %zu @ %p = %" PRIx64 "\n", dataLen, data, value);

  pgn = searchForPgn(60928);

  logDebug("printFieldName v=%" PRIu64 " max=%" PRIu64 " high=%d\n", value, maxValue, (bool) (value > maxValue - 2));

  if (value > maxValue - 2)
  {
    printEmpty(fieldName, value - maxValue);
  }
  else
  {
    if (showJson)
    {
      mprintf("%" PRIu64, value);

      if (pgn != NULL && showJsonValue)
      {
        mprintf(",\"name\":{");
        sep = "";
        printFields(pgn, data + ((startBit) >> 3), BYTES(8), showData, showJson, &variableFields);
        mprintf("}}");
      }
    }
    else
    {
      mprintf("0x%" PRIx64, value);

      if (pgn != NULL)
      {
        mprintf(" name = [");
        sep = "";
        printFields(pgn, data + ((startBit) >> 3), BYTES(8), showData, showJson, &variableFields);
        mprintf("]");
      }
    }
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq $0x0, 0x10(%rsp)
movq (%r9), %r8
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x20(%rsp), %r9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r14, %rcx
callq 0x22937
testb %al, %al
je 0x2350b
movq 0x20(%rsp), %r12
leaq 0x177bb(%rip), %rdi     # 0x3ab76
movq %r15, %rsi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x254dd
movl $0xee00, %edi           # imm = 0xEE00
callq 0xd48c
movq %rax, %r15
movq 0x18(%rsp), %r13
leaq -0x2(%r13), %rbp
xorl %ecx, %ecx
cmpq %rbp, %r12
seta %cl
leaq 0x177a5(%rip), %rdi     # 0x3ab95
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x254dd
cmpq %rbp, %r12
jbe 0x23412
subq %r13, %r12
movq %r12, %rsi
callq 0x22ba4
jmp 0x2350b
leaq 0x782d9(%rip), %r13     # 0x9b6f2
cmpb $0x1, (%r13)
jne 0x2349d
leaq 0x1784e(%rip), %rdi     # 0x3ac75
movq %r12, %rsi
xorl %eax, %eax
callq 0x226ec
testq %r15, %r15
je 0x2350b
leaq 0x782b3(%rip), %rax     # 0x9b6f4
cmpb $0x1, (%rax)
jne 0x2350b
leaq 0x1776a(%rip), %rdi     # 0x3abbb
xorl %eax, %eax
callq 0x226ec
leaq 0x7f3f(%rip), %rax      # 0x2b39e
leaq 0x6fce2(%rip), %rcx     # 0x93148
movq %rax, (%rcx)
shrq $0x3, %r14
addq %r14, %rbx
leaq 0x7827a(%rip), %rax     # 0x9b6f1
movzbl (%rax), %ecx
movzbl (%r13), %r8d
leaq 0x10(%rsp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movl $0x40, %edx
callq 0xef52
leaq 0x1772a(%rip), %rdi     # 0x3abc5
jmp 0x23504
leaq 0x17724(%rip), %rdi     # 0x3abc8
movq %r12, %rsi
xorl %eax, %eax
callq 0x226ec
testq %r15, %r15
je 0x2350b
leaq 0x17714(%rip), %rdi     # 0x3abce
xorl %eax, %eax
callq 0x226ec
leaq 0x7ed6(%rip), %rax      # 0x2b39e
leaq 0x6fc79(%rip), %rcx     # 0x93148
movq %rax, (%rcx)
shrq $0x3, %r14
addq %r14, %rbx
leaq 0x78211(%rip), %rax     # 0x9b6f1
movzbl (%rax), %ecx
movzbl (%r13), %r8d
leaq 0x10(%rsp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movl $0x40, %edx
callq 0xef52
leaq 0x17776(%rip), %rdi     # 0x3ac7a
xorl %eax, %eax
callq 0x226ec
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq