// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
testq %rdi, %rdi
je 0x8f5ee
leaq 0x175a98(%rip), %rax    # 0x204fc8
cmpl $0x0, (%rax)
je 0x8f5ee
leaq 0x173390(%rip), %r15    # 0x2028d0
cmpq $0x10, (%r15)
jne 0x8f5ee
leaq 0x173397(%rip), %r14    # 0x2028e8
cmpl $0x0, (%r14)
jne 0x8f5ee
movq %rdi, %rbx
leaq 0x7f9c5(%rip), %rsi     # 0x10ef2a
callq 0x9090
testq %rax, %rax
je 0x8f596
movq $0x10, (%r15)
leaq 0x175a63(%rip), %rbx    # 0x204fe0
andl $0x0, (%rbx)
xorl %edi, %edi
callq 0x473fa
leaq 0x175aa2(%rip), %rax    # 0x205030
andl $0x0, (%rax)
andl $0x0, (%rbx)
jmp 0x8f5e7
leaq 0x7f992(%rip), %rsi     # 0x10ef2f
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x8f5be
leaq 0x7f983(%rip), %rsi     # 0x10ef34
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x8f5f9
movq $0x10, (%r15)
leaq 0x175a14(%rip), %rbx    # 0x204fe0
pushq $0x38
popq %r15
movl %r15d, (%rbx)
xorl %edi, %edi
callq 0x473fa
leaq 0x175a4f(%rip), %rax    # 0x205030
andl $0x0, (%rax)
movl %r15d, (%rbx)
movl $0x10, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f939(%rip), %rsi     # 0x10ef39
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x8f621
leaq 0x7f92a(%rip), %rsi     # 0x10ef3e
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x8f633
movq $0x10, (%r15)
leaq 0x1759b1(%rip), %rbx    # 0x204fe0
pushq $0x4b
jmp 0x8f5ce
leaq 0x7f909(%rip), %rsi     # 0x10ef43
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x8f5be
leaq 0x7f8f6(%rip), %rsi     # 0x10ef48
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x8f5be
leaq 0x7f8e3(%rip), %rsi     # 0x10ef4d
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x8f5be
leaq 0x7f8d0(%rip), %rsi     # 0x10ef52
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x8f6da
leaq 0x17594a(%rip), %rbx    # 0x204fe0
andl $0x0, (%rbx)
movq $0x20000, (%r15)        # imm = 0x20000
movl $0x20000, %r15d         # imm = 0x20000
movl %r15d, (%r14)
xorl %edi, %edi
callq 0x473fa
leaq 0x175979(%rip), %rax    # 0x205030
movl $0x7da, (%rax)          # imm = 0x7DA
andl $0x0, (%rbx)
movl %r15d, (%r14)
pushq $0x1
popq %rsi
movl $0x29a, %edi            # imm = 0x29A
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x59afe
leaq 0x7f876(%rip), %rsi     # 0x10ef57
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
jne 0x8f5be
leaq 0x7f861(%rip), %rsi     # 0x10ef5a
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x8f5ee
movq $0x10, (%r15)
leaq 0x1758c8(%rip), %rbx    # 0x204fe0
pushq $0x39
jmp 0x8f5ce