// File: /workspace/github_c_makefile_star2_O3/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 0x1a2c7
testb %al, %al
je 0x1ae67
movq 0x20(%rsp), %r12
leaq 0x12bcf(%rip), %rdi     # 0x2d8e6
movq %r15, %rsi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x1cd55
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 0x12bb9(%rip), %rdi     # 0x2d905
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1cd55
cmpq %rbp, %r12
jbe 0x1ad6e
subq %r13, %r12
movq %r12, %rsi
callq 0x1a52f
jmp 0x1ae67
leaq 0x7397d(%rip), %r13     # 0x8e6f2
cmpb $0x1, (%r13)
jne 0x1adf9
leaq 0x12c62(%rip), %rdi     # 0x2d9e5
movq %r12, %rsi
xorl %eax, %eax
callq 0x1a07c
testq %r15, %r15
je 0x1ae67
leaq 0x73957(%rip), %rax     # 0x8e6f4
cmpb $0x1, (%rax)
jne 0x1ae67
leaq 0x12b7e(%rip), %rdi     # 0x2d92b
xorl %eax, %eax
callq 0x1a07c
leaq 0x85e3(%rip), %rax      # 0x2339e
leaq 0x6b386(%rip), %rcx     # 0x86148
movq %rax, (%rcx)
shrq $0x3, %r14
addq %r14, %rbx
leaq 0x7391e(%rip), %rax     # 0x8e6f1
movzbl (%rax), %ecx
movzbl (%r13), %r8d
leaq 0x10(%rsp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movl $0x40, %edx
callq 0xeef2
leaq 0x12b3e(%rip), %rdi     # 0x2d935
jmp 0x1ae60
leaq 0x12b38(%rip), %rdi     # 0x2d938
movq %r12, %rsi
xorl %eax, %eax
callq 0x1a07c
testq %r15, %r15
je 0x1ae67
leaq 0x12b28(%rip), %rdi     # 0x2d93e
xorl %eax, %eax
callq 0x1a07c
leaq 0x857a(%rip), %rax      # 0x2339e
leaq 0x6b31d(%rip), %rcx     # 0x86148
movq %rax, (%rcx)
shrq $0x3, %r14
addq %r14, %rbx
leaq 0x738b5(%rip), %rax     # 0x8e6f1
movzbl (%rax), %ecx
movzbl (%r13), %r8d
leaq 0x10(%rsp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movl $0x40, %edx
callq 0xeef2
leaq 0x12b8a(%rip), %rdi     # 0x2d9ea
xorl %eax, %eax
callq 0x1a07c
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq