LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x22c61
addq $0x10, %rsp
testb %al, %al
je 0x23623
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 0x23579
movl %ebx, %edi
callq 0xd48c
testq %rax, %rax
je 0x23579
movq (%rax), %rdx
jmp 0x2357b
xorl %edx, %edx
movq 0x8(%rsp), %rax
leaq -0x2(%rax), %rcx
cmpq %rcx, %rbx
jge 0x235a6
leaq 0x78164(%rip), %rax     # 0x9b6f4
movb (%rax), %bpl
testq %rdx, %rdx
je 0x235b3
testb %bpl, %bpl
je 0x235f3
leaq 0x17696(%rip), %rdi     # 0x3ac3a
jmp 0x23619
subq %rax, %rbx
movq %rbx, %rsi
callq 0x22ba4
jmp 0x23623
leaq 0x17497(%rip), %rdi     # 0x3aa51
movq %rbx, %rsi
xorl %eax, %eax
callq 0x226ec
testb %bpl, %bpl
je 0x23623
leaq 0x78123(%rip), %rax     # 0x9b6f3
cmpb $0x1, (%rax)
jne 0x235e3
leaq 0x1758d(%rip), %rdi     # 0x3ab69
xorl %eax, %eax
callq 0x226ec
leaq 0x1765f(%rip), %rdi     # 0x3ac49
xorl %eax, %eax
callq 0x226ec
jmp 0x23623
leaq 0x780f8(%rip), %rax     # 0x9b6f2
cmpb $0x1, (%rax)
jne 0x23612
leaq 0x1744b(%rip), %rdi     # 0x3aa51
movq %rbx, %rsi
xorl %eax, %eax
callq 0x226ec
jmp 0x23623
leaq 0x175bf(%rip), %rdi     # 0x3abd8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x226ec
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x22937
testb %al, %al
je 0x2367e
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x2368e
movb $0x1, 0x7a1c2(%rip)     # 0x9d840
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 0x236af
// File: /workspace/github_c_makefile_star2_O1/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 0x22937
testb %al, %al
je 0x238ac
cmpq $0x0, 0x10(%rsp)
je 0x238a5
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 0x236af
movb $0x1, 0x79f94(%rip)     # 0x9d840
movb $0x1, %al
addq $0x20, %rsp
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: fieldPrintDate
extern bool fieldPrintDate(const Field   *field,
                           const char    *fieldName,
                           const uint8_t *data,
                           size_t         dataLen,
                           size_t         startBit,
                           size_t        *bits)
{
  char       buf[sizeof("2008.03.10") + 1];
  time_t     t;
  struct tm *tm;
  uint16_t   d;

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

  if (startBit != 0)
  {
    return unhandledStartOffset(fieldName, startBit);
  }
  if (*bits != 16)
  {
    return unhandledBitLength(fieldName, *bits);
  }
  if (dataLen < *bits / 8)
  {
    return true;
  }

  d = data[0] + (data[1] << 8);

  if (d >= 0xfffd)
  {
    printEmpty(fieldName, d - INT64_C(0xffff));
    return true;
  }

  t  = d * 86400;
  tm = gmtime(&t);
  if (!tm)
  {
    logAbort("Unable to convert %u to gmtime\n", (unsigned int) t);
  }
  strftime(buf, sizeof(buf), "%Y.%m.%d", tm);
  if (showJson)
  {
    if (showJsonValue)
    {
      mprintf("%" PRIu16 ",\"name\":\"%s\"}", d, buf);
    }
    else
    {
      mprintf("\"%s\"", buf);
    }
  }
  else
  {
    mprintf("%s", buf);
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
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 0x23f5f
testq %rax, %rax
je 0x23f1d
leaq 0x170d9(%rip), %rdi     # 0x3aff4
jmp 0x23f53
movq (%r9), %rax
cmpq $0x10, %rax
jne 0x23f4c
subq %rdi, %rcx
movb $0x1, %bl
cmpq $0x2, %rcx
jb 0x23f5f
movzwl (%rdx,%rdi), %ebp
cmpw $-0x3, %bp
jb 0x23f6a
movzwl %bp, %esi
addq $-0xffff, %rsi          # imm = 0xFFFF0001
callq 0x22ba4
jmp 0x23f5f
leaq 0x170c4(%rip), %rdi     # 0x3b017
xorl %ebx, %ebx
movq %rax, %rdx
xorl %eax, %eax
callq 0x25570
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
imull $0x15180, %ebp, %eax    # imm = 0x15180
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
callq 0xd280
movq %rax, %r14
testq %rax, %rax
jne 0x23f97
movl 0x18(%rsp), %esi
leaq 0x16e1f(%rip), %rdi     # 0x3adaf
xorl %eax, %eax
callq 0x25603
leaq 0x16e31(%rip), %rdx     # 0x3adcf
leaq 0xc(%rsp), %rdi
movl $0xc, %esi
movq %r14, %rcx
callq 0xd260
leaq 0x7773b(%rip), %rax     # 0x9b6f2
cmpb $0x1, (%rax)
jne 0x23fdf
leaq 0x77731(%rip), %rax     # 0x9b6f4
cmpb $0x1, (%rax)
jne 0x23fe8
leaq 0x16e09(%rip), %rdi     # 0x3add8
leaq 0xc(%rsp), %rdx
movl %ebp, %esi
xorl %eax, %eax
callq 0x226ec
jmp 0x23f5f
leaq 0x1be3b(%rip), %rdi     # 0x3fe21
jmp 0x23fef
leaq 0x16c5e(%rip), %rdi     # 0x3ac4d
leaq 0xc(%rsp), %rsi
xorl %eax, %eax
callq 0x226ec
jmp 0x23f5f
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintStringFix
extern bool fieldPrintStringFix(const Field   *field,
                                const char    *fieldName,
                                const uint8_t *data,
                                size_t         dataLen,
                                size_t         startBit,
                                size_t        *bits)
{
  size_t len = field->size / 8;

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

  logDebug("fieldPrintStringFix('%s',%zu) size=%zu\n", fieldName, dataLen, len);

  len   = CB_MIN(len, dataLen); // Cap length to remaining bytes in message
  *bits = BYTES(len);
  return printString(fieldName, data, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
shrq $0x3, %rbx
movq %rcx, %rbp
subq %rbx, %rbp
jbe 0x2406a
movq %rdx, %r12
movq %rsi, %r13
addq %rbx, %r12
movl 0x10(%rdi), %r15d
shrl $0x3, %r15d
leaq 0x16db3(%rip), %rdi     # 0x3ade8
movq %rbp, %rdx
movq %r15, %rcx
xorl %eax, %eax
movq %r9, (%rsp)
callq 0x254dd
cmpq %r15, %rbp
cmovbq %rbp, %r15
leal (,%r15,8), %eax
movq (%rsp), %rcx
movq %rax, (%rcx)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2407f
cmpq %rbx, %r14
seta %al
addq $0x8, %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/print.c
// Function: printString
static bool printString(const char *fieldName, const uint8_t *data, size_t len)
{
  const uint8_t *p;

  if (len > 0)
  {
    // find the first zero byte (Raymarine does this, followed by junk)
    for (p = data; p < data + len - 1; p++)
    {
      if (*p == '\0')
      {
        logDebug("printString: shorten len from %zu to %zu (C string seen)\n", len, p - data);
        len = p - data;
        p--;
        break;
        // still do the next part, maybe they have @ or spaces at the end still?
      }
    }
    // rtrim funny stuff from end, we see all sorts. 0xff is believed to be the correct
    // content according to NMEA 2000. '@' originates from badly converted NMEA AIS data.
    // Space is just to avoid funny strings, 0 looks like incorrect C data.
    while (len > 0 && (*p == 0xff || isspace((unsigned char) *p) || *p == 0 || *p == '@'))
    {
      len--;
      p--;
    }
  }

  if (len == 0)
  {
    printEmpty(fieldName, DATAFIELD_UNKNOWN);
    return true;
  }

  if (showJson)
  {
    mprintf("\"");
    print_ascii_json_escaped(data, len);
    mprintf("\"");
  }
  else
  {
    print_ascii_json_escaped(data, len);
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdx, %rdx
je 0x2410c
leaq (%rbx,%rdx), %r15
decq %r15
cmpq %rbx, %r15
jbe 0x240b6
leaq -0x1(%rdx), %rax
xorl %r14d, %r14d
cmpb $0x0, (%rbx,%r14)
je 0x240be
incq %r14
cmpq %r14, %rax
jne 0x240a2
movq %rdx, %r14
jmp 0x240d9
movq %rdx, %r14
movq %rbx, %r15
jmp 0x240d9
leaq 0x16f72(%rip), %rdi     # 0x3b037
movq %rdx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x254dd
leaq (%rbx,%r14), %r15
decq %r15
testq %r14, %r14
je 0x2410c
movzbl (%r15), %r12d
cmpq $0xff, %r12
je 0x24104
callq 0xd350
movq (%rax), %rax
movzwl (%rax,%r12,2), %eax
btl $0xd, %eax
jb 0x24104
testb $-0x41, %r12b
jne 0x2410f
decq %r15
decq %r14
jne 0x240de
xorl %r14d, %r14d
testq %r14, %r14
je 0x24151
leaq 0x775d7(%rip), %rax     # 0x9b6f2
cmpb $0x1, (%rax)
jne 0x24163
leaq 0x16f5a(%rip), %r15     # 0x3b081
movq %r15, %rdi
xorl %eax, %eax
callq 0x226ec
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2446d
movq %r15, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x226ec
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22ba4
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2446d
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintStringLZ
extern bool fieldPrintStringLZ(const Field   *field,
                               const char    *fieldName,
                               const uint8_t *data,
                               size_t         dataLen,
                               size_t         startBit,
                               size_t        *bits)
{
  // STRINGLZ format is <len> [ <data> ... ] <zero>
  size_t len;

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

  // Cap to dataLen
  len   = *data++;
  len   = CB_MIN(len, dataLen - 1);
  *bits = BYTES(len + 2);

  return printString(fieldName, data, len);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
shrq $0x3, %rbx
cmpq %rcx, %rbx
jae 0x241bf
leaq (%rdx,%rbx), %rax
incq %rax
movzbl -0x1(%rax), %ecx
movq %rbx, %rdx
notq %rdx
addq %r14, %rdx
cmpq %rcx, %rdx
cmovaeq %rcx, %rdx
movl %edx, %ecx
leaq 0x10(,%rcx,8), %rcx
movq %rcx, (%r9)
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2407f
cmpq %r14, %rbx
setb %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/print.c
// Function: fieldPrintKeyValue
extern bool fieldPrintKeyValue(const Field   *field,
                               const char    *fieldName,
                               const uint8_t *data,
                               size_t         dataLen,
                               size_t         startBit,
                               size_t        *bits)
{
  bool r = false;

  if (g_length != 0)
  {
    *bits = ((size_t) g_length) * 8;
  }
  else
  {
    *bits = field->size;
  }
  logDebug("fieldPrintKeyValue('%s') bits=%zu\n", fieldName, *bits);

  if (dataLen >= ((startBit + *bits) >> 3))
  {
    if (g_ftf != NULL)
    {
      const Field *f = g_ftf;

      logDebug("fieldPrintKeyValue('%s') is actually a '%s' field bits=%u\n", fieldName, f->ft->name, f->size);

      if (*bits == 0)
      {
        *bits = f->size;
      }
      if (*bits == 0 && f->ft && f->ft->name && strcmp(f->ft->name, "LOOKUP") == 0)
      {
        *bits = f->lookup.size;
      }

      r = (f->ft->pf)(f, fieldName, data, dataLen, startBit, bits);
    }
    else
    {
      r = fieldPrintBinary(field, fieldName, data, dataLen, startBit, bits);
    }
  }
  else
  {
    logError("PGN %u key-value has insufficient bytes for field %s\n", field->pgn ? field->pgn->pgn : 0, fieldName);
  }

  g_ftf    = NULL;
  g_length = 0;

  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, (%rsp)
movq %rsi, %rbx
movq %rdi, %r13
movq 0x7950e(%rip), %rdx     # 0x9d858
testq %rdx, %rdx
je 0x24355
shlq $0x3, %rdx
jmp 0x24359
movl 0x10(%r13), %edx
movq %rdx, (%r14)
leaq 0x16b9c(%rip), %rdi     # 0x3aeff
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x254dd
movq (%r14), %rax
addq %r15, %rax
shrq $0x3, %rax
cmpq %r12, %rax
jbe 0x243a5
movq 0x90(%r13), %rax
testq %rax, %rax
je 0x2438d
movl 0x8(%rax), %ebp
leaq 0x16bc9(%rip), %rdi     # 0x3af5d
xorl %r14d, %r14d
movl %ebp, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x25570
jmp 0x24418
movq 0x794a4(%rip), %rbp     # 0x9d850
testq %rbp, %rbp
je 0x24400
movq 0x88(%rbp), %rax
movq (%rax), %rdx
movl 0x10(%rbp), %ecx
leaq 0x16b5d(%rip), %rdi     # 0x3af22
movq %rbx, %rsi
xorl %eax, %eax
callq 0x254dd
cmpq $0x0, (%r14)
jne 0x243db
movl 0x10(%rbp), %eax
movq %rax, (%r14)
cmpq $0x0, (%r14)
je 0x2443a
movq 0x88(%rbp), %rax
movq %rbp, %rdi
movq %rbx, %rsi
movq (%rsp), %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq *0x78(%rax)
jmp 0x24415
movq %r13, %rdi
movq (%rsp), %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x236af
movl %eax, %r14d
xorl %eax, %eax
movq %rax, 0x7942f(%rip)     # 0x9d850
movq %rax, 0x79430(%rip)     # 0x9d858
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x88(%rbp), %rax
testq %rax, %rax
je 0x243e1
movq (%rax), %rdi
testq %rdi, %rdi
je 0x243e1
leaq 0x141e1(%rip), %rsi     # 0x38636
callq 0xd1a0
testl %eax, %eax
jne 0x243e1
movq 0x80(%rbp), %rax
movq %rax, (%r14)
jmp 0x243e1
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/print.c
// Function: print_ascii_json_escaped
static void print_ascii_json_escaped(const uint8_t *data, int len)
{
  int c;
  int k;

  for (k = 0; k < len; k++)
  {
    c = data[k];
    switch (c)
    {
      case '\b':
        mprintf("%s", "\\b");
        break;

      case '\n':
        mprintf("%s", "\\n");
        break;

      case '\r':
        mprintf("%s", "\\r");
        break;

      case '\t':
        mprintf("%s", "\\t");
        break;

      case '\f':
        mprintf("%s", "\\f");
        break;

      case '"':
        mprintf("%s", "\\\"");
        break;

      case '\\':
        mprintf("%s", "\\\\");
        break;

      case '/':
        mprintf("%s", "\\/");
        break;

      case '\377':
        // 0xff has been seen on recent Simrad VHF systems, and it seems to indicate
        // end-of-field, with noise following. Assume this does not break other systems.
        return;

      default:
        if (c > 0x00)
        {
          mprintf("%c", c);
        }
    }
  }
}

// Assembly:
testl %esi, %esi
jle 0x24558
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r15d
leaq 0x1644b(%rip), %r12     # 0x3a8d8
leaq 0x1b98d(%rip), %r14     # 0x3fe21
leaq 0x16be8(%rip), %rbp     # 0x3b083
xorl %r13d, %r13d
movzbl (%rbx,%r13), %esi
cmpl $0x21, %esi
jg 0x244c8
cmpl $0xd, %esi
ja 0x2453a
movl %esi, %eax
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq %r14, %rdi
leaq 0x16bab(%rip), %rsi     # 0x3b071
jmp 0x24525
cmpl $0x22, %esi
je 0x2450f
cmpl $0x2f, %esi
je 0x2451b
cmpl $0x5c, %esi
jne 0x2453a
movq %r14, %rdi
movq %rbp, %rsi
jmp 0x24525
movq %r14, %rdi
leaq 0x16b94(%rip), %rsi     # 0x3b07d
jmp 0x24525
movq %r14, %rdi
leaq 0x16b85(%rip), %rsi     # 0x3b07a
jmp 0x24525
movq %r14, %rdi
leaq 0x16b73(%rip), %rsi     # 0x3b074
jmp 0x24525
movq %r14, %rdi
leaq 0x16b6a(%rip), %rsi     # 0x3b077
jmp 0x24525
movq %r14, %rdi
leaq 0x16b67(%rip), %rsi     # 0x3b080
jmp 0x24525
movq %r14, %rdi
leaq 0x16b61(%rip), %rsi     # 0x3b086
xorl %eax, %eax
callq 0x226ec
incq %r13
cmpq %r13, %r15
jne 0x2449e
jmp 0x2454a
leaq 0x1679a(%rip), %rdi     # 0x3acdb
xorl %eax, %eax
callq 0x226ec
jmp 0x2452c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/fieldtype.c
// Function: getFieldType
extern FieldType *getFieldType(const char *name)
{
  for (size_t i = 0; i < fieldTypeCount; i++)
  {
    if (strcmp(name, fieldTypeList[i].name) == 0)
    {
      return &fieldTypeList[i];
    }
  }
  logError("fieldType '%s' not found\n", name);
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x710a2(%rip), %rsi     # 0x95610
callq 0xd1a0
leaq 0x71096(%rip), %r14     # 0x95610
testl %eax, %eax
je 0x245b3
xorl %ecx, %ecx
leaq 0x770b9(%rip), %r12     # 0x9b640
movq %rcx, %r15
cmpq $0xab, %rcx
je 0x245b7
movq 0x90(%r14), %rsi
addq $0x90, %r14
movq %rbx, %rdi
callq 0xd1a0
leaq 0x1(%r15), %rcx
testl %eax, %eax
jne 0x24587
jmp 0x245ba
xorl %eax, %eax
jmp 0x245c4
movq %r12, %r14
cmpq $0xab, %r15
setae %al
testb %al, %al
je 0x245dc
leaq 0x1a0b3(%rip), %rdi     # 0x3e682
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x25570
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/fieldtype.c
// Function: getMinRange
static double getMinRange(const char *name, uint32_t size, double resolution, bool sign, int32_t offset)
{
  uint32_t highbit = (sign && offset == 0) ? (size - 1) : size;
  int64_t  minValue;
  double   r;

  if (!sign || offset != 0)
  {
    minValue = INT64_C(0) + offset;
    r        = minValue * resolution;
  }
  else
  {
    minValue = (UINT64_C(1) << highbit) - 1;
    r        = minValue * resolution * -1.0;
  }
  logDebug(
      "%s bits=%llu sign=%u minValue=%lld res=%g offset=%d -> rangeMin %g\n", name, highbit, sign, minValue, resolution, offset, r);
  return r;
}

// Assembly:
movl %ecx, %r9d
movl %edx, %eax
movl %esi, %edx
movq %rdi, %rsi
testl %ecx, %ecx
sete %cl
andb %al, %cl
movzbl %cl, %ecx
subl %ecx, %edx
testb %cl, %cl
je 0x250c8
movq $-0x1, %r8
movl %edx, %ecx
shlq %cl, %r8
notq %r8
cvtsi2sd %r8, %xmm1
xorpd 0x1600a(%rip), %xmm1    # 0x3b0d0
jmp 0x250d0
movslq %r9d, %r8
cvtsi2sd %r9d, %xmm1
subq $0x18, %rsp
mulsd %xmm0, %xmm1
movzbl %al, %ecx
leaq 0x1a8af(%rip), %rdi     # 0x3f991
movapd %xmm1, (%rsp)
movb $0x2, %al
callq 0x254dd
movaps (%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/fieldtype.c
// Function: getMaxRange
static double getMaxRange(const char *name, uint32_t size, double resolution, bool sign, int32_t offset, LookupInfo *lookup)
{
  uint64_t specialvalues = (size >= 8) ? 3 : (size >= 4) ? 2 : (size >= 2) ? 1 : 0;
  uint32_t highbit       = (sign && offset == 0) ? (size - 1) : size;
  uint64_t maxValue;
  double   r;

  maxValue = (UINT64_C(1) << highbit) - 1 - specialvalues;
  if (offset != 0)
  {
    maxValue += offset;
  }

#ifdef EXPLAIN
  if (lookup != NULL && lookup->type == LOOKUP_TYPE_PAIR)
  {
    // maybe the specialValues are actually lookups, correct these.
    // Remember, when EXPLAIN is set the lookup function is like:
    // void lookupYES_NO(EnumPairCallback cb)
    // {
    //   (cb)(0, "No");
    //   (cb)(1, "Yes");
    // }
    g_max = maxValue;
    (*lookup->function.pairEnumerator)(fillMaxRangeLookup);
    maxValue = g_max;
  }
#endif

  r = maxValue * resolution;
  logDebug(
      "%s bits=%llu sign=%u maxValue=%lld res=%g offset=%d -> rangeMax %g\n", name, highbit, sign, maxValue, resolution, offset, r);
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
movq $-0x3, %rdx
cmpl $0x7, %esi
ja 0x2512c
movq $-0x2, %rdx
cmpl $0x3, %ebp
ja 0x2512c
xorl %edx, %edx
cmpl $0x2, %ebp
adcq $-0x1, %rdx
testl %ebx, %ebx
sete %al
andb %r15b, %al
movzbl %al, %eax
subl %eax, %ebp
movq $-0x1, %rsi
movl %ebp, %ecx
shlq %cl, %rsi
notq %rsi
movslq %ebx, %rax
addq %rdx, %rax
addq %rsi, %rax
testq %r8, %r8
je 0x25180
cmpl $0x1, 0x8(%r8)
jne 0x25180
movq %rax, 0x786fc(%rip)     # 0x9d860
leaq 0x139(%rip), %rdi       # 0x252a4
movsd %xmm0, (%rsp)
callq *0x10(%r8)
movsd (%rsp), %xmm0
movq 0x786e0(%rip), %rax     # 0x9d860
movq %rax, %xmm1
punpckldq 0x157c3(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x157cb(%rip), %xmm1    # 0x3a960
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm2, %xmm1
movapd %xmm2, (%rsp)
movzbl %r15b, %ecx
leaq 0x1a81c(%rip), %rdi     # 0x3f9d5
movq %r14, %rsi
movl %ebp, %edx
movq %rax, %r8
movl %ebx, %r9d
movb $0x2, %al
callq 0x254dd
movaps (%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/fieldtype.c
// Function: fillFieldTypeLookupField
extern void fillFieldTypeLookupField(Field *f, const char *lookup, const size_t key, const char *str, const char *ft)
{
  f->ft = getFieldType(ft);
  if (f->ft == NULL)
  {
    logAbort("LookupFieldType %s(%d) contains an invalid fieldtype '%s'\n", lookup, key, ft);
  }
  f->unit       = f->ft->unit;
  f->resolution = f->ft->resolution;
  f->hasSign    = f->ft->hasSign == True;
  if (f->size == 0)
  {
    f->size = f->ft->size;
  }
  f->name = str;
  if (f->unit != NULL)
  {
    fixupUnit(f);
  }

  logDebug("fillFieldTypeLookupField(Field, lookup='%s', key=%zu, str='%s', ft='%s' unit='%s' bits=%u\n",
           lookup,
           key,
           str,
           ft,
           STRNULL(f->unit),
           f->size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %r8, %rdi
callq 0x2455c
movq %rax, 0x88(%r13)
testq %rax, %rax
jne 0x25221
leaq 0x199d9(%rip), %rdi     # 0x3ebea
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x25603
movq 0x88(%r13), %rcx
movq 0x48(%rcx), %rax
movq %rax, 0x18(%r13)
movsd 0x58(%rcx), %xmm0
movsd %xmm0, 0x30(%r13)
cmpl $0x2, 0x60(%rcx)
sete 0x49(%r13)
cmpl $0x0, 0x10(%r13)
jne 0x25252
movl 0x28(%rcx), %ecx
movl %ecx, 0x10(%r13)
movq %r14, (%r13)
testq %rax, %rax
je 0x25263
movq %r13, %rdi
callq 0x245eb
movq 0x18(%r13), %rax
testq %rax, %rax
leaq 0x6e94(%rip), %r9       # 0x2c105
cmovneq %rax, %r9
movl 0x10(%r13), %eax
movl %eax, (%rsp)
leaq 0x199a2(%rip), %rdi     # 0x3ec25
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x254dd
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/../common/parse.c
// Function: parseRawFormatPlain
int parseRawFormatPlain(char *msg, RawMessage *m, bool showJson)
{
  unsigned int prio, pgn, dst, src, len, junk, r, i;
  char        *p;
  unsigned int data[8];

  p = findOccurrence(msg, ',', 1);
  if (!p)
  {
    return 1;
  }
  p--; // Back to comma

  memcpy(m->timestamp, msg, p - msg);
  m->timestamp[p - msg] = 0;

  /* Moronic Windows does not support %hh<type> so we use intermediate variables */
  r = sscanf(p,
             ",%u,%u,%u,%u,%u"
             ",%x,%x,%x,%x,%x,%x,%x,%x,%x",
             &prio,
             &pgn,
             &src,
             &dst,
             &len,
             &data[0],
             &data[1],
             &data[2],
             &data[3],
             &data[4],
             &data[5],
             &data[6],
             &data[7],
             &junk);
  if (r < 5)
  {
    logError("Error reading message, scanned %zu from %s", r, msg);
    if (!showJson)
      fprintf(stdout, "%s", msg);
    return 2;
  }

  if (len > 8)
  {
    // This is not PLAIN format but FAST format */
    return -1;
  }

  if (r <= 5 + 8)
  {
    for (i = 0; i < len; i++)
    {
      m->data[i] = data[i];
    }
  }
  else
  {
    return -1;
  }

  return setParsedValues(m, prio, pgn, dst, src, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %r15d
movl $0x2c, %esi
movl $0x1, %edx
callq 0x267af
testq %rax, %rax
je 0x2679d
movq %rax, %r12
movl %ebp, 0x8(%rsp)
decq %r12
movq %r12, %r15
subq %r14, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd1e0
movb $0x0, (%rbx,%r15)
leaq 0x30(%rsp), %r11
leaq 0x34(%rsp), %r15
leaq 0x38(%rsp), %r13
leaq 0x3c(%rsp), %r10
leaq 0x44(%rsp), %rbp
leaq 0x195e4(%rip), %rsi     # 0x3fc9f
leaq 0x1c(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x14(%rsp), %r9
movq %r12, %rdi
movl $0x0, %eax
pushq %rbp
pushq %r10
pushq %r13
pushq %r15
pushq %r11
leaq 0x54(%rsp), %r10
pushq %r10
leaq 0x58(%rsp), %r10
pushq %r10
leaq 0x5c(%rsp), %r10
pushq %r10
leaq 0x60(%rsp), %r10
pushq %r10
leaq 0x54(%rsp), %r10
pushq %r10
callq 0xd220
addq $0x50, %rsp
cmpl $0x4, %eax
ja 0x26745
leaq 0x195b2(%rip), %rdi     # 0x3fcca
movl %eax, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x25570
movl $0x2, %r15d
cmpb $0x0, 0x8(%rsp)
jne 0x2679d
movq 0x1f890(%rip), %rax     # 0x45fc8
movq (%rax), %rsi
movq %r14, %rdi
callq 0xd170
jmp 0x2679d
movl 0xc(%rsp), %ecx
cmpq $0x9, %rcx
setae %dl
cmpl $0xe, %eax
setae %al
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
orb %dl, %al
jne 0x2679d
testq %rcx, %rcx
je 0x26777
xorl %eax, %eax
movb 0x20(%rsp,%rax,4), %dl
movb %dl, 0x47(%rbx,%rax)
incq %rax
cmpq %rax, %rcx
jne 0x26767
movb 0x1c(%rsp), %al
movl 0x18(%rsp), %edx
movb 0x14(%rsp), %sil
movb 0x10(%rsp), %dil
movb %al, 0x3c(%rbx)
movl %edx, 0x40(%rbx)
movb %sil, 0x44(%rbx)
movb %dil, 0x45(%rbx)
movb %cl, 0x46(%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x48, %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/../common/parse.c
// Function: findOccurrence
static char *findOccurrence(char *msg, char c, int count)
{
  int   i;
  char *p;

  if (*msg == 0 || *msg == '\n')
  {
    return 0;
  }
  for (i = 0, p = msg; p && i < count; i++, p++)
  {
    p = strchr(p, c);
    if (!p)
    {
      return 0;
    }
  }
  return p;
}

// Assembly:
movzbl (%rdi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x267f2
cmpl $0xa, %ecx
je 0x267f2
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebx
testl %edx, %edx
jle 0x267e5
movzbl %sil, %ebp
movq %rdi, %rax
movq %rax, %rdi
movl %ebp, %esi
callq 0xd100
testq %rax, %rax
je 0x267ea
incq %rax
decl %ebx
jne 0x267cd
jmp 0x267ec
movq %rdi, %rax
jmp 0x267ec
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/../common/parse.c
// Function: parseRawFormatChetco
int parseRawFormatChetco(char *msg, RawMessage *m, bool showJson)
{
  unsigned int pgn, src, i;
  unsigned int tstamp;
  time_t       t;
  struct tm    tm;
  char        *p;

  if (*msg == 0 || *msg == '\n')
  {
    return 1;
  }

  if (sscanf(msg, "$PCDIN,%x,%x,%x,", &pgn, &tstamp, &src) < 3)
  {
    logError("Error reading Chetco message: %s", msg);
    if (!showJson)
      fprintf(stdout, "%s", msg);
    return 2;
  }

  t = (time_t) tstamp / 1000;
  localtime_r(&t, &tm);
  strftime(m->timestamp, sizeof(m->timestamp), "%Y-%m-%dT%H:%M:%S", &tm);
  sprintf(m->timestamp + strlen(m->timestamp), ",%3.3u", tstamp % 1000);

  p = msg + STRSIZE("$PCDIN,01FD07,089C77D!,03,"); // Fixed length where data bytes start;

  for (i = 0; *p != '*'; i++)
  {
    if (scanHex(&p, &m->data[i]))
    {
      logError("Error reading message, scanned %zu bytes from %s/%s, index %u", p - msg, msg, p, i);
      if (!showJson)
        fprintf(stdout, "%s", msg);
      return 2;
    }
  }

  return setParsedValues(m, 0, pgn, 255, src, i + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movzbl (%rdi), %eax
movl $0x1, %r15d
testl %eax, %eax
je 0x26d50
cmpl $0xa, %eax
je 0x26d50
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x19198(%rip), %rsi     # 0x3fdaa
leaq 0x14(%rsp), %rdx
leaq 0x4(%rsp), %rcx
leaq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0xd220
cmpl $0x2, %eax
jg 0x26c43
leaq 0x19187(%rip), %rdi     # 0x3fdbb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x25570
jmp 0x26d33
movl 0x4(%rsp), %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0xd0a0
leaq 0x18dea(%rip), %rdx     # 0x3fa58
movl $0x3c, %esi
movq %r14, %rdi
movq %r15, %rcx
callq 0xd260
movq %r14, %rdi
callq 0xd0f0
leaq (%rax,%r14), %rdi
movl 0x4(%rsp), %edx
imulq $0x10624dd3, %rdx, %rax # imm = 0x10624DD3
shrq $0x26, %rax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %edx
leaq 0x19134(%rip), %rsi     # 0x3fddc
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xd2c0
leaq 0x1a(%rbx), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %al
cmpb $0x2a, 0x1a(%rbx)
je 0x26cf1
leaq 0x47(%r14), %r13
leaq 0x8(%rsp), %r12
movl %r15d, %esi
addq %r13, %rsi
movq %r12, %rdi
callq 0x262e5
testl %eax, %eax
jne 0x26d14
incl %r15d
movq 0x8(%rsp), %rax
cmpb $0x2a, (%rax)
jne 0x26ccc
incb %r15b
movl %r15d, %eax
movl 0x14(%rsp), %ecx
movb 0x10(%rsp), %dl
movb $0x0, 0x3c(%r14)
movl %ecx, 0x40(%r14)
movb $-0x1, 0x44(%r14)
movb %dl, 0x45(%r14)
movb %al, 0x46(%r14)
xorl %r15d, %r15d
jmp 0x26d50
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
subq %rbx, %rsi
leaq 0x19015(%rip), %rdi     # 0x3fd3b
movq %rbx, %rdx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x25570
movl $0x2, %r15d
testb %bpl, %bpl
jne 0x26d50
movq 0x1f283(%rip), %rax     # 0x45fc8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xd170
movl %r15d, %eax
addq $0x58, %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/../common/parse.c
// Function: parseRawFormatYDWG02
int parseRawFormatYDWG02(char *msg, RawMessage *m, bool showJson)
{
  char        *token;
  char        *nexttoken;
  time_t       tiden;
  struct tm    tm;
  unsigned int msgid;
  unsigned int prio, pgn, src, dst;
  int          i;

  // parse timestamp. YDWG doesn't give us date so let's figure it out ourself
  token = strtok_r(msg, " ", &nexttoken);
  if (!token)
  {
    return -1;
  }
  tiden = (time_t) (getNow() / UINT64_C(1000));
  localtime_r(&tiden, &tm);
  strftime(m->timestamp, sizeof(m->timestamp), "%Y-%m-%dT", &tm);
  sprintf(m->timestamp + strlen(m->timestamp), "%s", token);

  // parse direction, not really used in analyzer
  token = strtok_r(NULL, " ", &nexttoken);
  if (!token)
  {
    return -1;
  }

  // parse msgid
  token = strtok_r(NULL, " ", &nexttoken);
  if (!token)
  {
    return -1;
  }
  msgid = strtoul(token, NULL, 16);
  getISO11783BitsFromCanId(msgid, &prio, &pgn, &src, &dst);

  // parse data
  i = 0;
  while ((token = strtok_r(NULL, " ", &nexttoken)) != 0)
  {
    m->data[i] = strtoul(token, NULL, 16);
    i++;
    if (i > FASTPACKET_MAX_SIZE)
    {
      return -1;
    }
  }

  return setParsedValues(m, prio, pgn, dst, src, i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
leaq 0x435c(%rip), %rsi      # 0x2b409
leaq 0x8(%rsp), %rdx
callq 0xd190
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x271eb
movq %rax, %r14
callq 0x252bc
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, (%rdi)
leaq 0x28(%rsp), %r15
movq %r15, %rsi
callq 0xd0a0
leaq 0x18d67(%rip), %rdx     # 0x3fe65
movl $0x3c, %esi
movq %rbx, %rdi
movq %r15, %rcx
callq 0xd260
movq %rbx, %rdi
callq 0xd0f0
leaq (%rax,%rbx), %rdi
movq %r14, %rsi
callq 0xd0b0
leaq 0x42e0(%rip), %rsi      # 0x2b409
leaq 0x8(%rsp), %rdx
xorl %edi, %edi
callq 0xd190
testq %rax, %rax
je 0x271eb
leaq 0x42c4(%rip), %rsi      # 0x2b409
leaq 0x8(%rsp), %rdx
xorl %edi, %edi
callq 0xd190
testq %rax, %rax
je 0x271eb
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd2a0
leaq 0x1c(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x14(%rsp), %rcx
leaq 0x10(%rsp), %r8
movl %eax, %edi
callq 0x26077
leaq 0x427b(%rip), %r14      # 0x2b409
leaq 0x8(%rsp), %r15
xorl %edi, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd190
testq %rax, %rax
je 0x271c7
movq %rax, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd2a0
movb %al, 0x47(%rbx,%r12)
incq %r12
cmpq $0xe0, %r12
jne 0x27193
jmp 0x271eb
movb 0x1c(%rsp), %al
movl 0x18(%rsp), %ecx
movb 0x10(%rsp), %dl
movb 0x14(%rsp), %sil
movb %al, 0x3c(%rbx)
movl %ecx, 0x40(%rbx)
movb %dl, 0x44(%rbx)
movb %sil, 0x45(%rbx)
movb %r12b, 0x46(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/../common/utf.c
// Function: utf16_to_utf8
size_t utf16_to_utf8(utf16_t const *utf16, size_t utf16_len, utf8_t *utf8, size_t utf8_len)
{
  // The next codepoint that will be written in the UTF-8 string
  // or the size of the required buffer if utf8 is NULL
  size_t utf8_index = 0;

  for (size_t utf16_index = 0; utf16_index < utf16_len; utf16_index++)
  {
    codepoint_t codepoint = decode_utf16(utf16, utf16_len, &utf16_index);

    if (utf8 == NULL)
      utf8_index += calculate_utf8_len(codepoint);
    else
      utf8_index += encode_utf8(codepoint, utf8, utf8_len, utf8_index);
  }

  return utf8_index;
}

// Assembly:
testq %rsi, %rsi
je 0x2791b
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq -0x1(%rsi), %r8
xorl %r10d, %r10d
leaq 0x187b6(%rip), %r9      # 0x3ffa9
xorl %r11d, %r11d
movzwl (%rdi,%r11,2), %ebx
movl %ebx, %eax
andl $0xf800, %eax           # imm = 0xF800
cmpl $0xd800, %eax           # imm = 0xD800
jne 0x2785a
movl %ebx, %eax
andl $0xdc00, %eax           # imm = 0xDC00
cmpl $0xd800, %eax           # imm = 0xD800
setne %al
cmpq %r8, %r11
sete %bpl
orb %al, %bpl
jne 0x27855
movzwl 0x2(%rdi,%r11,2), %eax
movl %eax, %ebp
andl $0xfc00, %ebp           # imm = 0xFC00
cmpl $0xdc00, %ebp           # imm = 0xDC00
jne 0x27855
incq %r11
shll $0xa, %ebx
andl $0xffc00, %ebx          # imm = 0xFFC00
andl $0x3ff, %eax            # imm = 0x3FF
addl %eax, %ebx
addl $0x10000, %ebx          # imm = 0x10000
jmp 0x2785a
movl $0xfffd, %ebx           # imm = 0xFFFD
testq %rdx, %rdx
je 0x27896
movl $0x1, %eax
cmpl $0x80, %ebx
jb 0x27887
movl $0x2, %eax
cmpl $0x800, %ebx            # imm = 0x800
jb 0x27887
cmpl $0x10000, %ebx          # imm = 0x10000
movl $0x4, %eax
sbbl $0x0, %eax
movl %eax, %eax
leaq (%r10,%rax), %r14
cmpq %rcx, %r14
jbe 0x278c1
xorl %eax, %eax
jmp 0x27900
movl $0x1, %eax
cmpl $0x80, %ebx
jb 0x27900
movl $0x2, %eax
cmpl $0x800, %ebx            # imm = 0x800
jb 0x27900
cmpl $0x10000, %ebx          # imm = 0x10000
movl $0x4, %eax
sbbq $0x0, %rax
jmp 0x27900
leal -0x1(%rax), %ebp
leaq (%rdx,%r10), %r14
movl %ebp, %r15d
cmpl $0x2, %eax
jb 0x278ef
leaq 0x1(%r15), %r12
movl %ebx, %ebp
andb $0x3f, %bpl
orb $-0x80, %bpl
movb %bpl, -0x1(%r14,%r12)
shrl $0x6, %ebx
decq %r12
cmpq $0x1, %r12
jg 0x278d4
movzbl (%r9,%r15,2), %ebp
notl %ebp
andl %ebx, %ebp
orb 0x1(%r9,%r15,2), %bpl
movb %bpl, (%r14)
addq %r10, %rax
incq %r11
movq %rax, %r10
cmpq %rsi, %r11
jb 0x277f6
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/gitluin[P]sara/src/sarasock.c
// Function: main
int
main(int argc, char* argv[]){
	int i, sfd, left = MAXBUFF;
	char msg[MAXBUFF];
	struct sockaddr saddress = {AF_UNIX, INPUTSOCK};

	if (argc < 2)
		die("please provide at least one argument!");

	for (i=1;i < argc && left > 0;i++){
		if (i != 1){
			strncat(msg, " ", 2);
			left--;
		}

		strncat(msg, argv[i], slen(argv[i]) > left ? left : slen(argv[i]) );
		left -= slen(argv[i]);
	}

	msg[MAXBUFF-1] = '\0';

	if ( (sfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
		die("failed to create socket!");
	if (connect(sfd, &saddress, sizeof(saddress)) < 0)
		die("failed to connect to socket!");
	if (send(sfd, msg, MAXBUFF, 0) < 0)
		die("failed to send to socket!");

	close(sfd);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movups 0xe3e(%rip), %xmm0      # 0x2004
movaps %xmm0, 0x20(%rsp)
cmpl $0x1, %edi
jg 0x11de
leaq 0xe3d(%rip), %rdi       # 0x2014
xorl %eax, %eax
callq 0x12d8
cmpl $0x2, %ebp
jl 0x124f
movl %ebp, %r12d
movl $0x12, %ebp
movl $0x2, %r13d
movq %rsp, %r14
cmpq $0x2, %r13
je 0x120a
movq %r14, %rdi
callq 0x1060
movw $0x20, (%rsp,%rax)
decl %ebp
movq -0x8(%rbx,%r13,8), %r15
movq %r15, %rdi
callq 0x12fe
movl %eax, %ecx
movl %ebp, %eax
cmpl %ebp, %ecx
jg 0x1229
movq -0x8(%rbx,%r13,8), %rdi
callq 0x12fe
movslq %eax, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1040
movq -0x8(%rbx,%r13,8), %rdi
callq 0x12fe
cmpq %r12, %r13
jae 0x124f
subl %eax, %ebp
incq %r13
testl %ebp, %ebp
jg 0x11f4
movb $0x0, 0x11(%rsp)
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1080
movl %eax, %ebx
testl %eax, %eax
jns 0x1279
leaq 0xdc8(%rip), %rdi       # 0x203a
xorl %eax, %eax
callq 0x12d8
leaq 0x20(%rsp), %rsi
movl %ebx, %edi
movl $0x10, %edx
callq 0x1070
testl %eax, %eax
jns 0x129c
leaq 0xdbe(%rip), %rdi       # 0x2053
xorl %eax, %eax
callq 0x12d8
movq %rsp, %rsi
movl $0x12, %edx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x1090
testq %rax, %rax
jns 0x12c0
leaq 0xdb7(%rip), %rdi       # 0x2070
xorl %eax, %eax
callq 0x12d8
movl %ebx, %edi
callq 0x1030
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MAGI003769[P]EE450-Socket-Project/serverA.c
// Function: split_args2
void split_args2(char *args[], char *message) {
    char *p = strtok (message, " ");
    int i = 0;
    while (p != NULL)
    {
        args[i++] = p;
        p = strtok (NULL, " ");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xccd(%rip), %rsi       # 0x2004
movq %rax, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1361
leaq 0xcb9(%rip), %r14       # 0x2004
movq %rax, (%rbx)
xorl %edi, %edi
movq %r14, %rsi
callq 0x10f0
addq $0x8, %rbx
testq %rax, %rax
jne 0x134b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MAGI003769[P]EE450-Socket-Project/serverA.c
// Function: search_map
void search_map(char *map_id, char *map_data) {
    // open corresponding txt file
    FILE *file = fopen(MAPDIR, "r");
    if(file == NULL) {
        printf("File %s not found", MAPDIR);
        return;
    }

    char* line = NULL;
    size_t len = 0;
    ssize_t read;

    read = getline(&line, &len, file);
    strcpy(map_data, line);
    //strcat(data, "\n");
    
    if(map_id[0] != line[0]) {
        while ((read = getline(&line, &len, file)) != -1) {
            //printf("Retrieved line of length %zu:\n", read);
            if(map_id[0] == line[0]) {
                break;
            }
        }
    }

    if(map_id[0] != line[0]) {
        strcpy(map_data, MAPNOTFOUND);
        return;
    } else {
        strcpy(map_data, line);
        while ((read = getline(&line, &len, file)) != -1) {
            if(isalpha(line[0]) != 0) {
                break;
            }
            strcat(map_data, line);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xc82(%rip), %rdi       # 0x2006
leaq 0xc8b(%rip), %rsi       # 0x2016
callq 0x10d0
testq %rax, %rax
je 0x1464
movq %rax, %r14
xorl %eax, %eax
leaq -0x30(%rbp), %r12
movq %rax, (%r12)
leaq -0x38(%rbp), %rsi
movq %rax, (%rsi)
movq %r12, %rdi
movq %r14, %rdx
callq 0x1100
movq (%r12), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1030
movb (%r15), %al
cmpb (%r12), %al
je 0x13f7
leaq -0x30(%rbp), %r12
leaq -0x38(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1100
cmpq $-0x1, %rax
je 0x13f7
movb (%r15), %al
movq -0x30(%rbp), %rcx
cmpb (%rcx), %al
jne 0x13d8
movb (%r15), %al
movq -0x30(%rbp), %rsi
cmpb (%rsi), %al
jne 0x1487
movq %rbx, %rdi
callq 0x1030
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movq %r14, %rdx
callq 0x1100
cmpq $-0x1, %rax
je 0x14a2
callq 0x1150
movq %rax, %r15
leaq -0x30(%rbp), %r12
leaq -0x38(%rbp), %r13
movq (%r15), %rax
movq -0x30(%rbp), %rsi
movsbq (%rsi), %rcx
testb $0x4, 0x1(%rax,%rcx,2)
jne 0x14a2
movq %rbx, %rdi
callq 0x1110
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1100
cmpq $-0x1, %rax
jne 0x1434
jmp 0x14a2
leaq 0xbad(%rip), %rdi       # 0x2018
leaq 0xb94(%rip), %rsi       # 0x2006
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
movabsq $0x646e756f662074, %rax # imm = 0x646E756F662074
movq %rax, 0x6(%rbx)
movabsq $0x20746f6e2070614d, %rax # imm = 0x20746F6E2070614D
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/openshmem-org[P]openshmem-examples/c/amo-set.c
// Function: main
int
main()
{
    int me;

    shmem_init();
    me = shmem_my_pe();

    dst = 123;
    shmem_barrier_all();

    if (me == 0) {
        shmem_int_atomic_set(&dst, 999, 1);
    }
    else if (me != 1) {
        dst++;
    }

    shmem_barrier_all();

    printf("%d: dst = %d\n", me, dst);

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %rbx
callq 0x1070
callq 0x1050
movl %eax, %ebx
movl $0x7b, 0x2eb9(%rip)     # 0x405c
callq 0x1060
cmpl $0x1, %ebx
je 0x11cf
testl %ebx, %ebx
jne 0x11c9
leaq 0x2ea4(%rip), %rdi      # 0x405c
movl $0x3e7, %esi            # imm = 0x3E7
movl $0x1, %edx
callq 0x1080
jmp 0x11cf
incl 0x2e8d(%rip)            # 0x405c
callq 0x1060
movl 0x2e82(%rip), %edx      # 0x405c
leaq 0xe23(%rip), %rdi       # 0x2004
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
callq 0x1040
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/JavieW[P]CSCC69_Ext2_File-System/utilities.c
// Function: getFirstEmptyBitIndex
int getFirstEmptyBitIndex(int bitmapNum) {
    int index, maxLength;
    unsigned char *bitmap;
    if (bitmapNum == INODE_BITMAP) {
        index = EXT2_GOOD_OLD_FIRST_INO;
        maxLength = getSuperblock()->s_inodes_count;
        bitmap = getBitmap(INODE_BITMAP);
    } else {
        index = 0;
        maxLength = getSuperblock()->s_blocks_count;
        bitmap = getBitmap(BLOCK_BITMAP);
    }
    while (index < maxLength) {
        if (getBit(bitmap, index) == 0) {
            return index;
        }
        index++;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %esi, %esi
xorl %edx, %edx
cmpl $0x1, %edi
sete %dil
setne %dl
leaq 0x3997(%rip), %r8       # 0x50b0
movl $0xb, %ecx
cmovnel %eax, %ecx
movq (%r8), %r8
movl 0x400(%r8,%rdx,4), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, %ecx
jge 0x1766
movb %dil, %sil
movl 0x800(%r8,%rsi,4), %esi
shll $0xa, %esi
addq %r8, %rsi
movl %ecx, %edi
shrl $0x3, %edi
movzbl (%rsi,%rdi), %edi
movl %ecx, %r8d
andl $0x7, %r8d
btl %r8d, %edi
jae 0x1764
incl %ecx
cmpl %ecx, %edx
jne 0x1746
jmp 0x1766
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JavieW[P]CSCC69_Ext2_File-System/utilities.c
// Function: initInode
int initInode(unsigned short mode) {

    // find the first free inode
    int index = getFirstEmptyBitIndex(INODE_BITMAP);
    
    // change its bitmap and update field in gd
    char unsigned *bitmap = getBitmap(INODE_BITMAP);
    changeBitmap(bitmap, index, 'a');
    getGroupDesc()->bg_free_inodes_count--;

    // initialize inode attribute
    struct ext2_inode *inode_table = getInodeTable();
    inode_table[index].i_mode = mode;
    inode_table[index].i_size = 1024;
    inode_table[index].i_links_count = 1;
    inode_table[index].i_blocks = 2;
    for(int i=0; i<15; i++) {
        inode_table[index].i_block[i] = 0;
    }

    // set creation time for this inode
    inode_table[index].i_ctime = time(NULL);
    return index+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x38b0(%rip), %rax      # 0x50b0
movq (%rax), %rcx
movl 0x804(%rcx), %esi
shll $0xa, %esi
addq %rcx, %rsi
movl 0x400(%rcx), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpl $0xc, %ecx
jl 0x184b
movl $0xb, %r8d
movl %r8d, %r9d
shrl $0x3, %r9d
movzbl (%rsi,%r9), %r9d
movl %r8d, %r10d
andl $0x7, %r10d
btl %r10d, %r9d
jae 0x1848
incl %r8d
cmpl %r8d, %ecx
jne 0x1825
jmp 0x184b
movl %r8d, %edx
movl %edx, %ecx
andb $0x7, %cl
movl $0x1, %r8d
shll %cl, %r8d
leal 0x7(%rdx), %ecx
testl %edx, %edx
cmovnsl %edx, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
orb %r8b, (%rsi,%rcx)
movq (%rax), %rax
decw 0x80e(%rax)
movl 0x808(%rax), %r14d
shll $0xa, %r14d
addq %rax, %r14
movslq %edx, %rbx
movq %rbx, %r15
shlq $0x7, %r15
movw %di, (%r15,%r14)
movl $0x400, 0x4(%r15,%r14)  # imm = 0x400
movw $0x1, 0x1a(%r15,%r14)
movl $0x2, 0x1c(%r15,%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15,%r14)
movups %xmm0, 0x38(%r15,%r14)
movups %xmm0, 0x48(%r15,%r14)
movups %xmm0, 0x54(%r15,%r14)
xorl %edi, %edi
callq 0x10d0
movl %eax, 0xc(%r15,%r14)
incl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JavieW[P]CSCC69_Ext2_File-System/utilities.c
// Function: allocateNewBlock
int allocateNewBlock() {
    int index = getFirstEmptyBitIndex(BLOCK_BITMAP);
    changeBitmap(getBitmap(BLOCK_BITMAP), index, 'a');
    getGroupDesc()->bg_free_blocks_count--;
    return index+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x3639(%rip), %rdx      # 0x50b0
movq (%rdx), %rax
movl 0x800(%rax), %esi
shll $0xa, %esi
addq %rax, %rsi
movl 0x404(%rax), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jle 0x1aba
xorl %edi, %edi
movl %edi, %r8d
shrl $0x3, %r8d
movzbl (%rsi,%r8), %r8d
movl %edi, %r9d
andl $0x7, %r9d
btl %r9d, %r8d
jae 0x1ab8
incl %edi
cmpl %edi, %ecx
jne 0x1a97
jmp 0x1aba
movl %edi, %eax
movl %eax, %ecx
andb $0x7, %cl
movl $0x1, %edi
shll %cl, %edi
leal 0x7(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
orb %dil, (%rsi,%rcx)
movq (%rdx), %rcx
decw 0x80c(%rcx)
incl %eax
popq %rbp
retq