// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2c, %esi
movl $0x1, %edx
callq 0x216c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x21821
movl $0x1, -0x4(%rbp)
jmp 0x21a67
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
callq 0xd1d0
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rdi
leaq 0x1467d(%rip), %rsi     # 0x35ee0
leaq -0x20(%rbp), %rdx
leaq -0x24(%rbp), %rcx
leaq -0x2c(%rbp), %r8
leaq -0x28(%rbp), %r9
leaq -0x30(%rbp), %rax
movq %rax, (%rsp)
movb $0x0, %al
callq 0xd220
movl %eax, -0x34(%rbp)
cmpl $0x5, -0x34(%rbp)
jae 0x218ce
movl -0x34(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x1461c(%rip), %rdi     # 0x35eb5
movb $0x0, %al
callq 0x1f720
testb $0x1, -0x19(%rbp)
jne 0x218c2
movq 0x1a72b(%rip), %rax     # 0x3bfd8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x14751(%rip), %rsi     # 0x3600c
movb $0x0, %al
callq 0xd1b0
movl $0x2, -0x4(%rbp)
jmp 0x21a67
movq -0x40(%rbp), %rdi
movl $0x2c, %esi
movl $0x6, %edx
callq 0x216c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x2192c
movq -0x10(%rbp), %rsi
leaq 0x145fa(%rip), %rdi     # 0x35ef1
movb $0x0, %al
callq 0x1f720
testb $0x1, -0x19(%rbp)
jne 0x21920
movq 0x1a6cd(%rip), %rax     # 0x3bfd8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x146f3(%rip), %rsi     # 0x3600c
movb $0x0, %al
callq 0xd1b0
movl $0x2, -0x4(%rbp)
jmp 0x21a67
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x21a4a
movq -0x18(%rbp), %rsi
addq $0x47, %rsi
movl -0x38(%rbp), %eax
addq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x20e30
cmpl $0x0, %eax
je 0x219ae
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rax
subq %rax, %rsi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl -0x38(%rbp), %r8d
leaq 0x145ad(%rip), %rdi     # 0x35f26
movb $0x0, %al
callq 0x1f720
testb $0x1, -0x19(%rbp)
jne 0x219a2
movq 0x1a64b(%rip), %rax     # 0x3bfd8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x14671(%rip), %rsi     # 0x3600c
movb $0x0, %al
callq 0xd1b0
movl $0x2, -0x4(%rbp)
jmp 0x21a67
movl -0x38(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x21a3a
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x21a2e
callq 0xd350
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x21a2e
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rax
subq %rax, %rsi
movq -0x10(%rbp), %rdx
leaq 0x14568(%rip), %rdi     # 0x35f64
movb $0x0, %al
callq 0x1f720
testb $0x1, -0x19(%rbp)
jne 0x21a25
movq 0x1a5c8(%rip), %rax     # 0x3bfd8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x145ee(%rip), %rsi     # 0x3600c
movb $0x0, %al
callq 0xd1b0
movl $0x2, -0x4(%rbp)
jmp 0x21a67
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x21a3c
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x21933
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x30(%rbp), %r9d
callq 0x21780
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq