// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, %rbx
movl $0x1, %r13d
movl $0x2c, %esi
movl $0x1, %edx
callq 0x1dff3
testq %rax, %rax
je 0x1e20e
movq %rax, %r12
decq %r12
movq %r12, %r14
subq %rbx, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xd1e0
movb $0x0, (%r15,%r14)
leaq 0xc(%rsp), %rax
movq %rax, (%rsp)
leaq 0x149f8(%rip), %rsi     # 0x32a92
leaq 0x24(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x1c(%rsp), %r9
movq %r12, %rdi
xorl %eax, %eax
callq 0xd220
cmpl $0x4, %eax
ja 0x1e0d5
leaq 0x149a3(%rip), %rdi     # 0x32a67
movl %eax, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1cde8
jmp 0x1e194
movq %r12, %rdi
movl $0x2c, %esi
movl $0x6, %edx
callq 0x1dff3
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1e183
xorl %r13d, %r13d
cmpl $0x0, 0xc(%rsp)
je 0x1e1b3
movl %ebp, 0x8(%rsp)
movq %rbx, 0x28(%rsp)
leaq 0x47(%r15), %r13
xorl %r12d, %r12d
leaq 0x10(%rsp), %rbx
movq %r13, 0x30(%rsp)
leaq (%r12,%r13), %rsi
movq %rbx, %rdi
callq 0x1db3f
testl %eax, %eax
jne 0x1e1dd
movl 0xc(%rsp), %r14d
cmpq %r14, %r12
jae 0x1e176
movq %r15, %r13
movq %rbx, %r15
movq 0x10(%rsp), %rbp
movzbl (%rbp), %ebx
cmpq $0x2c, %rbx
je 0x1e163
callq 0xd350
movq (%rax), %rax
testb $0x20, 0x1(%rax,%rbx,2)
je 0x1e220
incq %rbp
movq %rbp, 0x10(%rsp)
movq %r15, %rbx
movq %r13, %r15
movq 0x30(%rsp), %r13
incq %r12
cmpq %r14, %r12
jb 0x1e11d
xorl %r13d, %r13d
jmp 0x1e1b6
leaq 0x14919(%rip), %rdi     # 0x32aa3
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1cde8
movl $0x2, %r13d
testb %bpl, %bpl
jne 0x1e20e
movq 0x1ae22(%rip), %rax     # 0x38fc8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xd170
jmp 0x1e20e
xorl %r14d, %r14d
movb 0x24(%rsp), %al
movl 0x20(%rsp), %ecx
movb 0x1c(%rsp), %dl
movb 0x18(%rsp), %sil
movb %al, 0x3c(%r15)
movl %ecx, 0x40(%r15)
movb %dl, 0x44(%r15)
movb %sil, 0x45(%r15)
movb %r14b, 0x46(%r15)
jmp 0x1e20e
movq 0x10(%rsp), %rcx
movq %rcx, %rsi
movq 0x28(%rsp), %rbx
subq %rbx, %rsi
leaq 0x148e4(%rip), %rdi     # 0x32ad8
movq %rbx, %rdx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x1cde8
movl $0x2, %r13d
cmpb $0x0, 0x8(%rsp)
je 0x1e19f
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rsp), %rbx
subq %rbx, %rbp
leaq 0x148e7(%rip), %rdi     # 0x32b16
movq %rbp, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1cde8
jmp 0x1e201