// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2c
popq %rsi
pushq $0x1
popq %r15
movl %r15d, %edx
callq 0x1ced8
testq %rax, %rax
je 0x1d0cd
movq %rax, %r12
decq %r12
movq %r12, %r15
subq %rbx, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xd1e0
movb $0x0, (%r14,%r15)
leaq 0xc(%rsp), %rax
movq %rax, (%rsp)
leaq 0x14b16(%rip), %rsi     # 0x31a92
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 0x1cfb7
leaq 0x14ac1(%rip), %rdi     # 0x31a67
movl %eax, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1bdd9
jmp 0x1d055
pushq $0x2c
popq %rsi
pushq $0x6
popq %rdx
movq %r12, %rdi
callq 0x1ced8
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1d044
movl %ebp, 0x8(%rsp)
movq %rbx, 0x28(%rsp)
movq %r14, 0x30(%rsp)
leaq 0x47(%r14), %rbp
movl 0xc(%rsp), %r14d
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
movl %r14d, %eax
cmpq %rax, %r15
jae 0x1d072
leaq (%r15,%rbp), %rsi
movq %r12, %rdi
callq 0x1ca7b
testl %eax, %eax
jne 0x1d09e
movl 0xc(%rsp), %r14d
cmpq %r14, %r15
jae 0x1d03f
movq 0x10(%rsp), %r13
movzbl (%r13), %ebx
cmpq $0x2c, %rbx
je 0x1d037
callq 0xd350
movq (%rax), %rax
testb $0x20, 0x1(%rax,%rbx,2)
je 0x1d0df
incq %r13
movq %r13, 0x10(%rsp)
incq %r15
jmp 0x1cfee
leaq 0x14a58(%rip), %rdi     # 0x31aa3
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1bdd9
pushq $0x2
popq %r15
testb %bpl, %bpl
jne 0x1d0cd
movq 0x1cf63(%rip), %rax     # 0x39fc8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xd170
jmp 0x1d0cd
movb 0x24(%rsp), %al
movl 0x20(%rsp), %ecx
movb 0x1c(%rsp), %dl
movb 0x18(%rsp), %sil
movq 0x30(%rsp), %rdi
movb %al, 0x3c(%rdi)
movl %ecx, 0x40(%rdi)
movb %dl, 0x44(%rdi)
movb %sil, 0x45(%rdi)
movb %r14b, 0x46(%rdi)
xorl %r15d, %r15d
jmp 0x1d0cd
movq 0x10(%rsp), %rcx
movq %rcx, %rsi
movq 0x28(%rsp), %rbx
subq %rbx, %rsi
leaq 0x14a23(%rip), %rdi     # 0x31ad8
movq %rbx, %rdx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x1bdd9
pushq $0x2
popq %r15
cmpb $0x0, 0x8(%rsp)
je 0x1d05e
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rsp), %rbx
subq %rbx, %r13
leaq 0x14a28(%rip), %rdi     # 0x31b16
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1bdd9
jmp 0x1d0c2