// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: verify_scpi_type(char*)
void verify_scpi_type(char *unit_name)
{
   if(unit_name == 0) return;

   if(detect_rcvr_type && (rcvr_type == SCPI_RCVR) && (scpi_type_changed == 0)) {
      if(strstr(unit_name, "3801")) {
         rcvr_type = SCPI_RCVR;
         scpi_type = SCPI_TYPE;
         config_rcvr_type(0);
         need_msg_init = 2007;
         need_msg_init = 0;
         scpi_type = SCPI_TYPE;
         scpi_type_changed = SCPI_RCVR;
      }
      else if(strstr(unit_name, "3805")) {
         goto hp_rcvr;
      }
      else if(strstr(unit_name, "3810")) {
         goto hp_rcvr;
      }
      else if(strstr(unit_name, "3811")) {
         rcvr_type = SCPI_RCVR;
         scpi_type = LUCENT_TYPE;
         config_rcvr_type(0);
         need_msg_init = 2008;
         need_msg_init = 0;
         scpi_type = LUCENT_TYPE;
         scpi_type_changed = SCPI_RCVR;
      }
      else if(strstr(unit_name, "3812")) {
         rcvr_type = SCPI_RCVR;
         scpi_type = LUCENT_TYPE;
         config_rcvr_type(0);
         need_msg_init = 2009;
         need_msg_init = 0;
         scpi_type = LUCENT_TYPE;
         scpi_type_changed = SCPI_RCVR;
      }
      else if(strstr(unit_name, "3815")) {
         goto hp_rcvr;
      }
      else if(strstr(unit_name, "3816")) {
         goto hp_rcvr;
      }
      else if(strstr(unit_name, "3817")) {
         goto hp_rcvr;
      }
      else if(strstr(unit_name, "5071")) {  // this should never happen - handled in decode_scpi_msg()
         rcvr_type = CS_RCVR;
         scpi_type = 0;
         scpi_type_changed = CS_RCVR;
         config_rcvr_type(0);
         need_msg_init = 2010;
         scpi_type_changed = CS_RCVR;
         scpi_type = 0;
         init_messages(666, 1);
      }
      else if(strstr(unit_name, "58")) {  // HP58xxx
         hp_rcvr:
         rcvr_type = SCPI_RCVR;
         scpi_type = HP_TYPE;
         config_rcvr_type(0);
         need_msg_init = 2011;
         need_msg_init = 0;
         scpi_type = HP_TYPE;
         scpi_type_changed = SCPI_RCVR;
      }
      else if(strstr(unit_name, "59")) {  // HP59xxx has pulse edge control
         rcvr_type = SCPI_RCVR;
         scpi_type = HP_TYPE2;
         config_rcvr_type(0);
         need_msg_init = 2012;
         need_msg_init = 0;
         scpi_type = HP_TYPE2;
         scpi_type_changed = SCPI_RCVR;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x9e4a4
leaq 0x17cbe7(%rip), %rax    # 0x21afc8
cmpl $0x0, (%rax)
je 0x9e4a4
leaq 0x17a4df(%rip), %r15    # 0x2188d0
cmpq $0x10, (%r15)
jne 0x9e4a4
leaq 0x17a4e6(%rip), %r14    # 0x2188e8
cmpl $0x0, (%r14)
jne 0x9e4a4
movq %rdi, %rbx
leaq 0x86bcc(%rip), %rsi     # 0x124fe2
callq 0x9090
testq %rax, %rax
je 0x9e447
movq $0x10, (%r15)
leaq 0x17cbb2(%rip), %rbx    # 0x21afe0
xorl %r15d, %r15d
movl %r15d, (%rbx)
xorl %edi, %edi
callq 0x4b2af
leaq 0x17cbee(%rip), %rax    # 0x21b030
movl %r15d, (%rax)
jmp 0x9e49a
leaq 0x86b99(%rip), %rsi     # 0x124fe7
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x9e46f
leaq 0x86b8a(%rip), %rsi     # 0x124fec
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x9e4ad
movq $0x10, (%r15)
leaq 0x17cb63(%rip), %rbx    # 0x21afe0
movl $0x38, %r15d
movl %r15d, (%rbx)
xorl %edi, %edi
callq 0x4b2af
leaq 0x17cb9c(%rip), %rax    # 0x21b030
movl $0x0, (%rax)
movl %r15d, (%rbx)
movl $0x10, (%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x86b3d(%rip), %rsi     # 0x124ff1
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x9e4d5
leaq 0x86b2e(%rip), %rsi     # 0x124ff6
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x9e4eb
movq $0x10, (%r15)
leaq 0x17cafd(%rip), %rbx    # 0x21afe0
movl $0x4b, %r15d
jmp 0x9e483
leaq 0x86b09(%rip), %rsi     # 0x124ffb
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x9e46f
leaq 0x86af6(%rip), %rsi     # 0x125000
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x9e46f
leaq 0x86ae3(%rip), %rsi     # 0x125005
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x9e46f
leaq 0x86ad0(%rip), %rsi     # 0x12500a
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x9e595
movq $0x20000, (%r15)        # imm = 0x20000
leaq 0x17ca8b(%rip), %rbx    # 0x21afe0
xorl %r15d, %r15d
movl %r15d, (%rbx)
movl $0x20000, %r12d         # imm = 0x20000
movl %r12d, (%r14)
xorl %edi, %edi
callq 0x4b2af
leaq 0x17cabe(%rip), %rax    # 0x21b030
movl $0x7da, (%rax)          # imm = 0x7DA
movl %r12d, (%r14)
movl %r15d, (%rbx)
movl $0x29a, %edi            # imm = 0x29A
movl $0x1, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x616de
leaq 0x86a73(%rip), %rsi     # 0x12500f
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x9e46f
leaq 0x86a5e(%rip), %rsi     # 0x125012
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x9e4a4
movq $0x10, (%r15)
leaq 0x17ca0d(%rip), %rbx    # 0x21afe0
movl $0x39, %r15d
jmp 0x9e483