// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Cj()
void parse_moto_Cj()
{
int c;
int i;

   // Motorola receiver id message:

   // <cr><lf>
   // COPYRIGHT 1991-199X MOTOROLA INC.<cr><lf> 
   // SFTW P/N # XXXXXXXXXXXXXXX<cr><lf> 
   // SOFTWARE VER # XXXXXXXXXXX<cr><lf> 
   // SOFTWARE REV # XXXXXXXXXXX<cr><lf> 
   // SOFTWARE DATE  XXXXXXXXXXX<cr><lf> 
   // MODEL #    XXXXXXXXXXXXXXX<cr><lf> 
   // HDWR P/N # XXXXXXXXXXXXXXX<cr><lf> 
   // SERIAL #   XXXXXXXXXXXXXXX<cr><lf> 
   // MANUFACTUR DATE XXXXXXXXXX<cr><lf> 
   // OPTIONS LIST    XXXXXXXXXX<cr><lf> 

   log_packet_id("receiver id");
   i = 0;
   moto_id_lines = 0;
   moto_id[moto_id_lines][0] = 0;

   while(moto_msg_len > 0) {  // get the lines from the device id message
      c = tsip_byte();

      if(c == 0x00) ;
      else if(c == 0x0D) ;
      else if(c == 0x0A) {
         ++moto_id_lines;
         if(moto_id_lines >= MAX_ID_LINES) break;
         i = 0;
         moto_id[moto_id_lines][0] = 0;
      }
      else if(i <= 128) {
         moto_id[moto_id_lines][i++] = c;
         moto_id[moto_id_lines][i] = 0;
      }
      --moto_msg_len;
   }
   if(1 || moto_id_lines) saw_version |= 0x1000;

   have_info |= ALL_ID_INFO;
   furuno_moto = 0;
   if(moto_id[1][0]) {
      if(strstr(moto_id[1], "Furuno")) furuno_moto = 1;
   }

// show_version_info();

if(debug_file) {
   for(i=0; i<moto_id_lines; i++) fprintf(debug_file, "[%s]\n", &moto_id[i][0]);
}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x89df6(%rip), %rdi     # 0x124ad0
callq 0x58e77
leaq 0x17e256(%rip), %r15    # 0x218f3c
movl $0x0, (%r15)
leaq 0x17dc3c(%rip), %rbx    # 0x218930
movb $0x0, (%rbx)
cmpl $0x0, 0x2d1dca(%rip)    # 0x36cac8
jle 0x9ad9d
xorl %r13d, %r13d
leaq 0x17dc22(%rip), %r14    # 0x218930
leaq 0x1a425b(%rip), %r12    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ad26
orb $0x8, (%r12)
testb %al, %al
je 0x9ad85
movzbl %al, %ecx
cmpl $0xd, %ecx
je 0x9ad85
cmpl $0xa, %ecx
jne 0x9ad59
movslq (%r15), %rcx
leaq 0x1(%rcx), %rax
movl %eax, (%r15)
cmpq $0xa, %rcx
jg 0x9ad9d
movq %rax, %rcx
shlq $0x7, %rcx
addq %rax, %rcx
addq %r14, %rcx
xorl %r13d, %r13d
jmp 0x9ad82
cmpl $0x80, %r13d
jg 0x9ad85
movslq (%r15), %rcx
movslq %r13d, %rdx
incl %r13d
movq %rcx, %rsi
shlq $0x7, %rsi
addq %rcx, %rsi
addq %r14, %rsi
leaq (%rdx,%rsi), %rcx
incq %rcx
movb %al, -0x1(%rcx)
movb $0x0, (%rcx)
movl 0x2d1d3d(%rip), %eax    # 0x36cac8
leal -0x1(%rax), %ecx
movl %ecx, 0x2d1d34(%rip)    # 0x36cac8
cmpl $0x1, %eax
jg 0x9ad15
leaq 0x272664(%rip), %rax    # 0x30d408
orb $0x10, 0x1(%rax)
leaq 0x272bc5(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
leaq 0x17e187(%rip), %r14    # 0x218f40
movl $0x0, (%r14)
cmpb $0x0, 0x81(%rbx)
je 0x9aded
movl $0x81, %edi
addq 0xb51e3(%rip), %rdi     # 0x14ffb8
leaq 0x89e05(%rip), %rsi     # 0x124be1
callq 0x9090
testq %rax, %rax
je 0x9aded
movl $0x1, (%r14)
leaq 0x1a359c(%rip), %r12    # 0x23e390
cmpq $0x0, (%r12)
je 0x9ae2e
cmpl $0x0, (%r15)
jle 0x9ae2e
leaq 0x8a743(%rip), %r14     # 0x12554b
xorl %r13d, %r13d
movq (%r12), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9560
incq %r13
movslq (%r15), %rax
addq $0x81, %rbx
cmpq %rax, %r13
jl 0x9ae0b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq