// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rcvr_tzone(int, int)
void set_rcvr_tzone(int hh, int mm)
{
   // send command to set the receiver's time zone offset (must be 0:0 for Heather)
   if(read_only) return;

   if(rcvr_type == BRANDY_RCVR) {
      if((hh == 0) && (mm == 0)) {
         queue_brandy_cmd("$PRCCG,O,U,+00:00", BRANDY_ZONE_MSG);
      }
      else {
         if(hh >= 0) sprintf(out,"$PRCCG,O,L,+%02d:%02d", hh, mm);
         else        sprintf(out,"$PRCCG,O,L,-%02d:%02d", 0-hh, mm);
         queue_brandy_cmd(out, BRANDY_ZONE_MSG);
      }
   }
   else if(rcvr_type == ESIP_RCVR) {
      if(hh >= 0) sprintf(out, "PERDAPI,TIMEZONE,0,%02d:%02d", hh,mm);
      else        sprintf(out, "PERDAPI,TIMEZONE,1,%02d:%02d", 0-hh,mm);
      send_esip_cmd(out);
   }
   else if(rcvr_type == SCPI_RCVR) {
      sprintf(out, ":PTIM:TZON %d,%d", hh,mm);  // GMT time zone (Heather does time zone conversions)
      queue_scpi_cmd(out, SCPI_NULL_MSG);     
   }
   else if(rcvr_type == STAR_RCVR) {
      if(star_type == OSA_TYPE) {
         if(hh >= 0) sprintf(out, "GMT_OFFSET=+%02d:%02d", hh,mm);
         else        sprintf(out, "GMT_OFFSET=-%02d:%02d", 0-hh,mm);
      }
      else {
         if(hh >= 0) sprintf(out, "UTC_OFFSET=+%02d:%02d;", hh,mm);
         else        sprintf(out, "UTC_OFFSET=-%02d:%02d;", 0-hh,mm);
      }
      queue_star_cmd(out, STAR_TZONE_MSG);
   }
   else if(rcvr_type == Z12_RCVR) {
      if(hh >= 0) sprintf(out,"PASHS,LTZ,+%02d,+%02d", hh, mm);
      else        sprintf(out,"PASHS,LTZ,+%02d,+%02d", 0-hh, 0-mm);
      send_z12_cmd(out);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2c9038(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6dfee
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %esi, %ecx
movl %edi, %edx
leaq 0x1aa8d7(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x3ffff, %rax          # imm = 0x3FFFF
jle 0x6e04e
movabsq $0x100000000, %rsi      # imm = 0x100000000
cmpq %rsi, %rax
je 0x6e087
movl $0x80000000, %esi       # imm = 0x80000000
cmpq %rsi, %rax
je 0x6e0b6
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x6dfe7
movl %ecx, %eax
orl %edx, %eax
je 0x6e12c
testl %edx, %edx
js 0x6e135
leaq 0x2ce1de(%rip), %rdi    # 0x33c220
leaq 0xb34dd(%rip), %rsi     # 0x121526
jmp 0x6e145
cmpq $0x10, %rax
je 0x6e0ca
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x6dfe7
leaq 0x1acf85(%rip), %rax    # 0x21afe8
cmpl $0x4f, (%rax)
jne 0x6e0ef
testl %edx, %edx
js 0x6e15a
leaq 0x2ce1a5(%rip), %rdi    # 0x33c220
leaq 0xb351b(%rip), %rsi     # 0x12159d
jmp 0x6e17c
testl %edx, %edx
jns 0x6e08f
negl %edx
negl %ecx
leaq 0x2ce18a(%rip), %rdi    # 0x33c220
leaq 0xb355a(%rip), %rsi     # 0x1215f7
xorl %eax, %eax
callq 0x9060
leaq 0x2ce175(%rip), %rdi    # 0x33c220
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f2c8
testl %edx, %edx
js 0x6e103
leaq 0x2ce15f(%rip), %rdi    # 0x33c220
leaq 0xb348a(%rip), %rsi     # 0x121552
jmp 0x6e113
leaq 0x2ce14f(%rip), %rbx    # 0x33c220
leaq 0xb34b4(%rip), %rsi     # 0x12158c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x6e18f
testl %edx, %edx
js 0x6e16c
leaq 0x2ce126(%rip), %rdi    # 0x33c220
leaq 0xb34c8(%rip), %rsi     # 0x1215c9
jmp 0x6e17c
negl %edx
leaq 0x2ce114(%rip), %rdi    # 0x33c220
leaq 0xb345c(%rip), %rsi     # 0x12156f
xorl %eax, %eax
callq 0x9060
leaq 0x2ce0ff(%rip), %rdi    # 0x33c220
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee9b
leaq 0xb33e1(%rip), %rdi     # 0x121514
jmp 0x6e153
negl %edx
leaq 0x2ce0e2(%rip), %rdi    # 0x33c220
leaq 0xb33f7(%rip), %rsi     # 0x12153c
xorl %eax, %eax
callq 0x9060
leaq 0x2ce0cd(%rip), %rdi    # 0x33c220
movl $0x198, %esi            # imm = 0x198
jmp 0x6e18f
negl %edx
leaq 0x2ce0bd(%rip), %rdi    # 0x33c220
leaq 0xb3449(%rip), %rsi     # 0x1215b3
jmp 0x6e17c
negl %edx
leaq 0x2ce0ab(%rip), %rdi    # 0x33c220
leaq 0xb3464(%rip), %rsi     # 0x1215e0
xorl %eax, %eax
callq 0x9060
leaq 0x2ce096(%rip), %rdi    # 0x33c220
movl $0xd9, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5edda