// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/analyzer/../common/parse.c
// Function: parseRawFormatFast
int parseRawFormatFast(char *msg, RawMessage *m, bool showJson)
{
  unsigned int prio, pgn, dst, src, len, r, i;
  char        *p;

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

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

  r = sscanf(p, ",%u,%u,%u,%u,%u ", &prio, &pgn, &src, &dst, &len);
  if (r < 5)
  {
    logError("Error reading message, scanned %zu from %s", r, msg);
    if (!showJson)
      fprintf(stdout, "%s", msg);
    return 2;
  }

  p = findOccurrence(p, ',', 6);
  if (!p)
  {
    logError("Error reading message, cannot find sixth comma in %s", msg);
    if (!showJson)
      fprintf(stdout, "%s", msg);
    return 2;
  }
  for (i = 0; i < len; 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;
    }
    if (i < len)
    {
      if (*p != ',' && !isspace((unsigned char) *p))
      {
        logError("Error reading message, scanned %zu bytes from %s", p - msg, msg);
        if (!showJson)
          fprintf(stdout, "%s", msg);
        return 2;
      }
      p++;
    }
  }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %r15d
movl $0x2c, %esi
movl $0x1, %edx
callq 0x267af
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x26993
movq %rax, %r12
decq %r12
movq %r12, 0x10(%rsp)
movq %r12, %r15
subq %rbx, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xd1e0
movb $0x0, (%r14,%r15)
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x19495(%rip), %rsi     # 0x3fcf5
leaq 0x2c(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x24(%rsp), %r9
movq %r12, %rdi
xorl %eax, %eax
callq 0xd220
cmpl $0x4, %eax
ja 0x2689b
leaq 0x19440(%rip), %rdi     # 0x3fcca
movl %eax, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x25570
jmp 0x26976
movq 0x10(%rsp), %rdi
movl $0x2c, %esi
movl $0x6, %edx
callq 0x267af
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x26965
movl 0x18(%rsp), %eax
testl %eax, %eax
je 0x2693a
movl %ebp, 0x1c(%rsp)
leaq 0x47(%r14), %rbp
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
movq %rbx, 0x30(%rsp)
leaq (%r15,%rbp), %rsi
movq %r12, %rdi
callq 0x262e5
testl %eax, %eax
jne 0x269a5
movl 0x18(%rsp), %eax
cmpq %rax, %r15
jae 0x2692e
movq %r12, %rbx
movq 0x10(%rsp), %r13
movzbl (%r13), %r12d
cmpq $0x2c, %r12
je 0x2691e
callq 0xd350
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
je 0x269d3
incq %r13
movq %r13, 0x10(%rsp)
movq %rbx, %r12
movq 0x30(%rsp), %rbx
incq %r15
movl 0x18(%rsp), %eax
cmpq %rax, %r15
jb 0x268da
movb 0x2c(%rsp), %cl
movl 0x28(%rsp), %edx
movb 0x24(%rsp), %sil
movb 0x20(%rsp), %dil
movb %cl, 0x3c(%r14)
movl %edx, 0x40(%r14)
movb %sil, 0x44(%r14)
movb %dil, 0x45(%r14)
movb %al, 0x46(%r14)
xorl %r15d, %r15d
jmp 0x26993
leaq 0x1939a(%rip), %rdi     # 0x3fd06
movq %rbx, %rsi
xorl %eax, %eax
callq 0x25570
movl $0x2, %r15d
testb %bpl, %bpl
jne 0x26993
movq 0x1f640(%rip), %rax     # 0x45fc8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xd170
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rcx
movq %rcx, %rsi
subq %rbx, %rsi
leaq 0x19384(%rip), %rdi     # 0x3fd3b
movq %rbx, %rdx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x25570
movl $0x2, %r15d
cmpb $0x0, 0x1c(%rsp)
je 0x26981
jmp 0x26993
movq 0x30(%rsp), %rbx
subq %rbx, %r13
leaq 0x19397(%rip), %rdi     # 0x3fd79
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x25570
jmp 0x269c4