// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bc3fa(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x64c2c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %esi, %ecx
movl %edi, %edx
leaq 0x19dc99(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x10, %rax
je 0x64d00
cmpq $0x1000, %rax           # imm = 0x1000
je 0x64c92
movabsq $0x100000000, %rsi      # imm = 0x100000000
cmpq %rsi, %rax
je 0x64cd1
movl $0x80000000, %esi       # imm = 0x80000000
cmpq %rsi, %rax
je 0x64cbd
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x64c25
movl %ecx, %eax
orl %edx, %eax
je 0x64d60
testl %edx, %edx
js 0x64d69
leaq 0x2c159a(%rip), %rdi    # 0x326220
leaq 0xa67e1(%rip), %rsi     # 0x10b46e
jmp 0x64d79
leaq 0x1a034f(%rip), %rax    # 0x204fe8
cmpl $0x4f, (%rax)
jne 0x64d23
testl %edx, %edx
js 0x64d8e
leaq 0x2c156f(%rip), %rdi    # 0x326220
leaq 0xa682d(%rip), %rsi     # 0x10b4e5
jmp 0x64db0
testl %edx, %edx
js 0x64d37
leaq 0x2c1558(%rip), %rdi    # 0x326220
leaq 0xa67cb(%rip), %rsi     # 0x10b49a
jmp 0x64d47
testl %edx, %edx
jns 0x64cd9
negl %edx
negl %ecx
leaq 0x2c1540(%rip), %rdi    # 0x326220
leaq 0xa6858(%rip), %rsi     # 0x10b53f
xorl %eax, %eax
callq 0x9060
leaq 0x2c152b(%rip), %rdi    # 0x326220
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57b55
leaq 0x2c1519(%rip), %rbx    # 0x326220
leaq 0xa67c6(%rip), %rsi     # 0x10b4d4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rsi
movq %rbx, %rdi
jmp 0x64dc3
testl %edx, %edx
js 0x64da0
leaq 0x2c14f2(%rip), %rdi    # 0x326220
leaq 0xa67dc(%rip), %rsi     # 0x10b511
jmp 0x64db0
negl %edx
leaq 0x2c14e0(%rip), %rdi    # 0x326220
leaq 0xa6770(%rip), %rsi     # 0x10b4b7
xorl %eax, %eax
callq 0x9060
leaq 0x2c14cb(%rip), %rdi    # 0x326220
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57791
leaq 0xa66f5(%rip), %rdi     # 0x10b45c
jmp 0x64d87
negl %edx
leaq 0x2c14ae(%rip), %rdi    # 0x326220
leaq 0xa670b(%rip), %rsi     # 0x10b484
xorl %eax, %eax
callq 0x9060
leaq 0x2c1499(%rip), %rdi    # 0x326220
movl $0x198, %esi            # imm = 0x198
jmp 0x64dc3
negl %edx
leaq 0x2c1489(%rip), %rdi    # 0x326220
leaq 0xa675d(%rip), %rsi     # 0x10b4fb
jmp 0x64db0
negl %edx
leaq 0x2c1477(%rip), %rdi    # 0x326220
leaq 0xa6778(%rip), %rsi     # 0x10b528
xorl %eax, %eax
callq 0x9060
leaq 0x2c1462(%rip), %rdi    # 0x326220
movl $0xd9, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4