// File: /workspace/github_cpp_makefile_star2_O3/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 0x89d1b(%rip), %rdi     # 0x124bb0
callq 0x58dc2
leaq 0x17e09b(%rip), %r15    # 0x218f3c
movl $0x0, (%r15)
leaq 0x17da81(%rip), %rbx    # 0x218930
movb $0x0, (%rbx)
cmpl $0x0, 0x2d1c0f(%rip)    # 0x36cac8
jle 0x9af58
xorl %r13d, %r13d
leaq 0x17da67(%rip), %r14    # 0x218930
leaq 0x1a40a0(%rip), %r12    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aee1
orb $0x8, (%r12)
testb %al, %al
je 0x9af40
movzbl %al, %ecx
cmpl $0xd, %ecx
je 0x9af40
cmpl $0xa, %ecx
jne 0x9af14
movslq (%r15), %rcx
leaq 0x1(%rcx), %rax
movl %eax, (%r15)
cmpq $0xa, %rcx
jg 0x9af58
movq %rax, %rcx
shlq $0x7, %rcx
addq %rax, %rcx
addq %r14, %rcx
xorl %r13d, %r13d
jmp 0x9af3d
cmpl $0x80, %r13d
jg 0x9af40
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 0x2d1b82(%rip), %eax    # 0x36cac8
leal -0x1(%rax), %ecx
movl %ecx, 0x2d1b79(%rip)    # 0x36cac8
cmpl $0x1, %eax
jg 0x9aed0
leaq 0x2724a9(%rip), %rax    # 0x30d408
orb $0x10, 0x1(%rax)
leaq 0x272a0a(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
leaq 0x17dfcc(%rip), %r14    # 0x218f40
movl $0x0, (%r14)
cmpb $0x0, 0x81(%rbx)
je 0x9afa8
movl $0x81, %edi
addq 0xb5028(%rip), %rdi     # 0x14ffb8
leaq 0x89d2a(%rip), %rsi     # 0x124cc1
callq 0x9090
testq %rax, %rax
je 0x9afa8
movl $0x1, (%r14)
leaq 0x1a33e1(%rip), %r12    # 0x23e390
cmpq $0x0, (%r12)
je 0x9afe9
cmpl $0x0, (%r15)
jle 0x9afe9
leaq 0x8a668(%rip), %r14     # 0x12562b
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 0x9afc6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq