// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c8f4d(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6e0d9
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %esi, %ecx
movl %edi, %edx
leaq 0x1aa7ec(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x3ffff, %rax          # imm = 0x3FFFF
jle 0x6e139
movabsq $0x100000000, %rsi      # imm = 0x100000000
cmpq %rsi, %rax
je 0x6e172
movl $0x80000000, %esi       # imm = 0x80000000
cmpq %rsi, %rax
je 0x6e1a1
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x6e0d2
movl %ecx, %eax
orl %edx, %eax
je 0x6e217
testl %edx, %edx
js 0x6e220
leaq 0x2ce0f3(%rip), %rdi    # 0x33c220
leaq 0xb3312(%rip), %rsi     # 0x121446
jmp 0x6e230
cmpq $0x10, %rax
je 0x6e1b5
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x6e0d2
leaq 0x1ace9a(%rip), %rax    # 0x21afe8
cmpl $0x4f, (%rax)
jne 0x6e1da
testl %edx, %edx
js 0x6e245
leaq 0x2ce0ba(%rip), %rdi    # 0x33c220
leaq 0xb3350(%rip), %rsi     # 0x1214bd
jmp 0x6e267
testl %edx, %edx
jns 0x6e17a
negl %edx
negl %ecx
leaq 0x2ce09f(%rip), %rdi    # 0x33c220
leaq 0xb338f(%rip), %rsi     # 0x121517
xorl %eax, %eax
callq 0x9060
leaq 0x2ce08a(%rip), %rdi    # 0x33c220
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f340
testl %edx, %edx
js 0x6e1ee
leaq 0x2ce074(%rip), %rdi    # 0x33c220
leaq 0xb32bf(%rip), %rsi     # 0x121472
jmp 0x6e1fe
leaq 0x2ce064(%rip), %rbx    # 0x33c220
leaq 0xb32e9(%rip), %rsi     # 0x1214ac
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x6e27a
testl %edx, %edx
js 0x6e257
leaq 0x2ce03b(%rip), %rdi    # 0x33c220
leaq 0xb32fd(%rip), %rsi     # 0x1214e9
jmp 0x6e267
negl %edx
leaq 0x2ce029(%rip), %rdi    # 0x33c220
leaq 0xb3291(%rip), %rsi     # 0x12148f
xorl %eax, %eax
callq 0x9060
leaq 0x2ce014(%rip), %rdi    # 0x33c220
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ef13
leaq 0xb3216(%rip), %rdi     # 0x121434
jmp 0x6e23e
negl %edx
leaq 0x2cdff7(%rip), %rdi    # 0x33c220
leaq 0xb322c(%rip), %rsi     # 0x12145c
xorl %eax, %eax
callq 0x9060
leaq 0x2cdfe2(%rip), %rdi    # 0x33c220
movl $0x198, %esi            # imm = 0x198
jmp 0x6e27a
negl %edx
leaq 0x2cdfd2(%rip), %rdi    # 0x33c220
leaq 0xb327e(%rip), %rsi     # 0x1214d3
jmp 0x6e267
negl %edx
leaq 0x2cdfc0(%rip), %rdi    # 0x33c220
leaq 0xb3299(%rip), %rsi     # 0x121500
xorl %eax, %eax
callq 0x9060
leaq 0x2cdfab(%rip), %rdi    # 0x33c220
movl $0xd9, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ee52