// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_id()
void parse_scpi_id()
{
int i;

   log_packet_id("scpi id");

   msg_col = 0;
   if(get_msg_field()) {  // manufacturer
      if(msg_field[0] == ' ') {
         sprintf(scpi_mfg_id, "Mfg: %-18.18s", &msg_field[0]);
         strncpy(scpi_mfg, &msg_field[1], 20);
      }
      else {
         sprintf(scpi_mfg_id, "Mfg:  %-17.17s", msg_field);
         strncpy(scpi_mfg, msg_field, 20);
      }
      scpi_mfg[20] = 0;
      scpi_mfg_id[24] = 0;
   }

   if(get_msg_field()) {  // model
      for(i=0; i<UNIT_LEN; i++) unit_name[i] = ' ';
      unit_name[UNIT_LEN] = 0;
      for(i=0; i<UNIT_LEN; i++) {
         if(msg_field[i] == 0) break;
         unit_name[i] = msg_field[i];
         scpi_model[i] = msg_field[i];
         scpi_model[i+1] = 0;
      }

      verify_scpi_type(unit_name);

      if(strstr(scpi_mfg, "SAMSUNG")) {
         if(strstr(unit_name, "UCCM-L")) {  // samsung (-LPK, -L8)
            if(user_set_scpi_type == 0) scpi_type = SAMSUNG_TYPE;
         }
      }
   }

   scpi_serno[0] = 0;
   if(get_msg_field()) {  // serial number
      if     (scpi_type == UCCMP_TYPE) sprintf(scpi_serno, "Ser:  %s", &msg_field[5]);
      else if(rcvr_type == UCCM_RCVR)  sprintf(scpi_serno, "Ser:  %s", &msg_field[3]);
      else                             sprintf(scpi_serno, "Ser:  %s", msg_field);
      strncpy(scpi_sn, msg_field, 22);
      scpi_sn[22] = 0;
      scpi_serno[23] = 0;
   }

   scpi_fw[0] = 0;
   if(get_msg_field()) {  // fw rev
      strncpy(scpi_fw, msg_field, 22);
      scpi_fw[22] = 0;
      strcat(scpi_serno, " ");
      strcat(scpi_serno, scpi_fw);
      scpi_serno[23] = 0;
   }

   if(scpi_type == NORTEL_TYPE) {
      scpi_serno[0] = 0;
      if(get_msg_field()) {  // CPC - serial number
         if     (scpi_type == UCCMP_TYPE) sprintf(scpi_serno, "Ser:  %s", &msg_field[5]);
         else if(rcvr_type == UCCM_RCVR)  sprintf(scpi_serno, "Ser:  %s", &msg_field[3]);
         else                             sprintf(scpi_serno, "Ser:  %s", msg_field);
         strncpy(scpi_sn, msg_field, 22);
         scpi_sn[22] = 0;

         strcat(scpi_serno, " ");
         strcat(scpi_serno, scpi_fw);
         scpi_serno[23] = 0;
      }

      if(get_msg_field()) {  // PEC - model
         for(i=0; i<UNIT_LEN; i++) unit_name[i] = ' ';
         unit_name[UNIT_LEN] = 0;
         for(i=0; i<UNIT_LEN; i++) {
            if(msg_field[i] == 0) break;
            unit_name[i] = msg_field[i];
            scpi_model[i] = msg_field[i];
            scpi_model[i+1] = 0;
         }
      }

      if(get_msg_field()) {  // hardware version
         msg_field[2] = 0;
         strcat(scpi_serno, "-");
         strcat(scpi_serno, msg_field);
         scpi_serno[23] = 0;
      }
   }

   have_info |= ALL_ID_INFO;

if(debug_file) fprintf(debug_file, "### id:%s  have_info:%02X\n", nmea_msg, have_info);

//show_version_info();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xb126a(%rip), %rdi     # 0x188309
callq 0x7add0
leaq 0x2c3d79(%rip), %rax    # 0x39ae24
movl $0x0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xd7152
leaq 0x2c3b5a(%rip), %rax    # 0x39ac20
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xd7108
leaq 0x2c4acb(%rip), %rdi    # 0x39bba0
leaq 0xb1235(%rip), %rsi     # 0x188311
leaq 0x2c3b3d(%rip), %rdx    # 0x39ac20
movb $0x0, %al
callq 0x9060
leaq 0x2c474f(%rip), %rdi    # 0x39b840
leaq 0x2c3b28(%rip), %rsi    # 0x39ac20
addq $0x1, %rsi
movl $0x14, %edx
callq 0x9170
jmp 0xd713c
leaq 0x2c4a91(%rip), %rdi    # 0x39bba0
leaq 0xb1209(%rip), %rsi     # 0x18831f
leaq 0x2c3b03(%rip), %rdx    # 0x39ac20
movb $0x0, %al
callq 0x9060
leaq 0x2c4715(%rip), %rdi    # 0x39b840
leaq 0x2c3aee(%rip), %rsi    # 0x39ac20
movl $0x14, %edx
callq 0x9170
leaq 0x2c46fd(%rip), %rax    # 0x39b840
movb $0x0, 0x14(%rax)
leaq 0x2c4a52(%rip), %rax    # 0x39bba0
movb $0x0, 0x18(%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xd7269
movl $0x0, -0x4(%rbp)
cmpl $0x12, -0x4(%rbp)
jge 0xd7187
movslq -0x4(%rbp), %rcx
leaq 0x2c46a8(%rip), %rax    # 0x39b820
movb $0x20, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xd7167
leaq 0x2c4692(%rip), %rax    # 0x39b820
movb $0x0, 0x12(%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x12, -0x4(%rbp)
jge 0xd720c
movslq -0x4(%rbp), %rcx
leaq 0x2c3a76(%rip), %rax    # 0x39ac20
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xd71b5
jmp 0xd720c
movslq -0x4(%rbp), %rcx
leaq 0x2c3a60(%rip), %rax    # 0x39ac20
movb (%rax,%rcx), %dl
movslq -0x4(%rbp), %rcx
leaq 0x2c4652(%rip), %rax    # 0x39b820
movb %dl, (%rax,%rcx)
movslq -0x4(%rbp), %rcx
leaq 0x2c3a44(%rip), %rax    # 0x39ac20
movb (%rax,%rcx), %dl
movslq -0x4(%rbp), %rcx
leaq 0x2c4786(%rip), %rax    # 0x39b970
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2c4773(%rip), %rax    # 0x39b970
movb $0x0, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xd7199
leaq 0x2c460d(%rip), %rdi    # 0x39b820
callq 0xd6cf0
leaq 0x2c4621(%rip), %rdi    # 0x39b840
leaq 0xb1108(%rip), %rsi     # 0x18832e
callq 0x9090
cmpq $0x0, %rax
je 0xd7267
leaq 0x2c45e8(%rip), %rdi    # 0x39b820
leaq 0xb10f7(%rip), %rsi     # 0x188336
callq 0x9090
cmpq $0x0, %rax
je 0xd7265
leaq 0x1a087b(%rip), %rax    # 0x277acc
cmpl $0x0, (%rax)
jne 0xd7263
leaq 0x1a2f63(%rip), %rax    # 0x27a1c0
movl $0x53, (%rax)
jmp 0xd7265
jmp 0xd7267
jmp 0xd7269
leaq 0x2c4720(%rip), %rax    # 0x39b990
movb $0x0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xd732a
leaq 0x1a2f38(%rip), %rax    # 0x27a1c0
cmpl $0x50, (%rax)
jne 0xd72af
leaq 0x2c46fc(%rip), %rdi    # 0x39b990
leaq 0xb10a2(%rip), %rsi     # 0x18833d
leaq 0x2c397e(%rip), %rdx    # 0x39ac20
addq $0x5, %rdx
movb $0x0, %al
callq 0x9060
jmp 0xd72fc
leaq 0x1a07fa(%rip), %rax    # 0x277ab0
cmpq $0x8, (%rax)
jne 0xd72de
leaq 0x2c46cd(%rip), %rdi    # 0x39b990
leaq 0xb1073(%rip), %rsi     # 0x18833d
leaq 0x2c394f(%rip), %rdx    # 0x39ac20
addq $0x3, %rdx
movb $0x0, %al
callq 0x9060
jmp 0xd72fa
leaq 0x2c46ab(%rip), %rdi    # 0x39b990
leaq 0xb1051(%rip), %rsi     # 0x18833d
leaq 0x2c392d(%rip), %rdx    # 0x39ac20
movb $0x0, %al
callq 0x9060
jmp 0xd72fc
leaq 0x2c45dd(%rip), %rdi    # 0x39b8e0
leaq 0x2c3916(%rip), %rsi    # 0x39ac20
movl $0x16, %edx
callq 0x9170
leaq 0x2c45c5(%rip), %rax    # 0x39b8e0
movb $0x0, 0x16(%rax)
leaq 0x2c466a(%rip), %rax    # 0x39b990
movb $0x0, 0x17(%rax)
leaq 0x2c452f(%rip), %rax    # 0x39b860
movb $0x0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xd7392
leaq 0x2c451b(%rip), %rdi    # 0x39b860
leaq 0x2c38d4(%rip), %rsi    # 0x39ac20
movl $0x16, %edx
callq 0x9170
leaq 0x2c4503(%rip), %rax    # 0x39b860
movb $0x0, 0x16(%rax)
leaq 0x2c4628(%rip), %rdi    # 0x39b990
leaq 0xaea75(%rip), %rsi     # 0x185de4
callq 0x96a0
leaq 0x2c4615(%rip), %rdi    # 0x39b990
leaq 0x2c44de(%rip), %rsi    # 0x39b860
callq 0x96a0
leaq 0x2c4602(%rip), %rax    # 0x39b990
movb $0x0, 0x17(%rax)
leaq 0x1a2e27(%rip), %rax    # 0x27a1c0
cmpl $0x4e, (%rax)
jne 0xd758d
leaq 0x2c45e7(%rip), %rax    # 0x39b990
movb $0x0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xd7489
leaq 0x1a2dff(%rip), %rax    # 0x27a1c0
cmpl $0x50, (%rax)
jne 0xd73e8
leaq 0x2c45c3(%rip), %rdi    # 0x39b990
leaq 0xb0f69(%rip), %rsi     # 0x18833d
leaq 0x2c3845(%rip), %rdx    # 0x39ac20
addq $0x5, %rdx
movb $0x0, %al
callq 0x9060
jmp 0xd7435
leaq 0x1a06c1(%rip), %rax    # 0x277ab0
cmpq $0x8, (%rax)
jne 0xd7417
leaq 0x2c4594(%rip), %rdi    # 0x39b990
leaq 0xb0f3a(%rip), %rsi     # 0x18833d
leaq 0x2c3816(%rip), %rdx    # 0x39ac20
addq $0x3, %rdx
movb $0x0, %al
callq 0x9060
jmp 0xd7433
leaq 0x2c4572(%rip), %rdi    # 0x39b990
leaq 0xb0f18(%rip), %rsi     # 0x18833d
leaq 0x2c37f4(%rip), %rdx    # 0x39ac20
movb $0x0, %al
callq 0x9060
jmp 0xd7435
leaq 0x2c44a4(%rip), %rdi    # 0x39b8e0
leaq 0x2c37dd(%rip), %rsi    # 0x39ac20
movl $0x16, %edx
callq 0x9170
leaq 0x2c448c(%rip), %rax    # 0x39b8e0
movb $0x0, 0x16(%rax)
leaq 0x2c4531(%rip), %rdi    # 0x39b990
leaq 0xae97e(%rip), %rsi     # 0x185de4
callq 0x96a0
leaq 0x2c451e(%rip), %rdi    # 0x39b990
leaq 0x2c43e7(%rip), %rsi    # 0x39b860
callq 0x96a0
leaq 0x2c450b(%rip), %rax    # 0x39b990
movb $0x0, 0x17(%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xd7545
movl $0x0, -0x4(%rbp)
cmpl $0x12, -0x4(%rbp)
jge 0xd74be
movslq -0x4(%rbp), %rcx
leaq 0x2c4371(%rip), %rax    # 0x39b820
movb $0x20, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xd749e
leaq 0x2c435b(%rip), %rax    # 0x39b820
movb $0x0, 0x12(%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x12, -0x4(%rbp)
jge 0xd7543
movslq -0x4(%rbp), %rcx
leaq 0x2c373f(%rip), %rax    # 0x39ac20
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xd74ec
jmp 0xd7543
movslq -0x4(%rbp), %rcx
leaq 0x2c3729(%rip), %rax    # 0x39ac20
movb (%rax,%rcx), %dl
movslq -0x4(%rbp), %rcx
leaq 0x2c431b(%rip), %rax    # 0x39b820
movb %dl, (%rax,%rcx)
movslq -0x4(%rbp), %rcx
leaq 0x2c370d(%rip), %rax    # 0x39ac20
movb (%rax,%rcx), %dl
movslq -0x4(%rbp), %rcx
leaq 0x2c444f(%rip), %rax    # 0x39b970
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2c443c(%rip), %rax    # 0x39b970
movb $0x0, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xd74d0
jmp 0xd7545
callq 0xb0bd0
cmpl $0x0, %eax
je 0xd758b
leaq 0x2c36ca(%rip), %rax    # 0x39ac20
movb $0x0, 0x2(%rax)
leaq 0x2c442f(%rip), %rdi    # 0x39b990
leaq 0xacec3(%rip), %rsi     # 0x18442b
callq 0x96a0
leaq 0x2c441c(%rip), %rdi    # 0x39b990
leaq 0x2c36a5(%rip), %rsi    # 0x39ac20
callq 0x96a0
leaq 0x2c4409(%rip), %rax    # 0x39b990
movb $0x0, 0x17(%rax)
jmp 0xd758d
leaq 0x2955c0(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x2955b4(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
leaq 0x1c5fc7(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xd75d7
leaq 0x1c5fba(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0x295594(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
leaq 0xb0d7d(%rip), %rsi     # 0x188346
leaq 0x2c3440(%rip), %rdx    # 0x39aa10
movb $0x0, %al
callq 0x9550
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)