// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heather.cpp
// Function: config_watch()
void config_watch()
{
   // calculate where we can draw the watch and how big to make it
   ACLOCK_SIZE = AZEL_SIZE;
   aclock_x = (AZEL_COL+ACLOCK_SIZE/2);
   aclock_y = (AZEL_ROW+ACLOCK_SIZE/2);

   if(zoom_screen && (zoom_screen != 'K')) {
      if(map_and_watch) {
         aclock_x = AZEL_COL + AZEL_SIZE/2 - 2;
         aclock_y = AZEL_ROW + AZEL_SIZE/2 - 2;
      }
      else {
         aclock_x = SCREEN_WIDTH/2;
         aclock_y = SCREEN_HEIGHT/2;
      }
   }
   else if(all_adevs) {
      if(WIDE_SCREEN) {
         if(plot_lla) {
            goto watch_it;
         }
         else {
            ACLOCK_SIZE = (SCREEN_WIDTH-WATCH_COL);
            if(ACLOCK_SIZE > (PLOT_ROW-TEXT_HEIGHT*4)) {
               ACLOCK_SIZE = PLOT_ROW-TEXT_HEIGHT*4;
            }
            if(ACLOCK_SIZE > MAX_AZEL) ACLOCK_SIZE = MAX_AZEL;
            aclock_x = (SCREEN_WIDTH-ACLOCK_SIZE/2-TEXT_WIDTH*2);   // and azel goes in the plot area
            aclock_y = (0+ACLOCK_SIZE/2+TEXT_HEIGHT*2);
         }
      }
   }
   else if((plot_azel || plot_signals) && plot_lla && WIDE_SCREEN) {
      goto watch_it;
   }
   else if((rcvr_type == NO_RCVR) && (SCREEN_WIDTH < NARROW_SCREEN)) {
      goto watch_it;
   }
   else if((plot_azel || plot_signals) && (plot_lla == 0) && (SCREEN_HEIGHT >= SHORT_SCREEN)) {  // both azel and watch want to be on the sceen
      watch_it:
      ACLOCK_SIZE = WATCH_SIZE;               // watch goes in the adev area
      aclock_x = (WATCH_COL+ACLOCK_SIZE/2);   // and azel goes in the plot area
      aclock_y = (WATCH_ROW+ACLOCK_SIZE/2);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x328de1(%rip), %ecx    # 0x33b38c
movl %ecx, 0x328dbf(%rip)    # 0x33b370
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl 0x328dd4(%rip), %ecx    # 0x33b394
addl %eax, %ecx
addl 0x328dc8(%rip), %eax    # 0x33b390
movl %ecx, 0x328da6(%rip)    # 0x33b374
movl %eax, 0x328da4(%rip)    # 0x33b378
movzbl 0x2fa1cd(%rip), %edx    # 0x30c7a8
testl %edx, %edx
je 0x125e8
cmpl $0x4b, %edx
jne 0x12668
cmpb $0x0, 0x22a74f(%rip)    # 0x23cd3e
je 0x12686
movl 0x206205(%rip), %eax    # 0x218800
cmpl $0x690, %eax            # imm = 0x690
jl 0x12757
cmpb $0x0, 0x328ca3(%rip)    # 0x33b2b0
jne 0x12702
movl %eax, %edx
subl 0x328d4d(%rip), %edx    # 0x33b368
movl 0x20625b(%rip), %esi    # 0x21887c
movl 0x2061ed(%rip), %ecx    # 0x218814
leal (,%rcx,4), %edi
subl %edi, %esi
cmpl %esi, %edx
cmovll %edx, %esi
movl $0x140, %edx            # imm = 0x140
cmpl %edx, %esi
cmovgel %edx, %esi
movl %esi, 0x328d2b(%rip)    # 0x33b370
movl 0x2061c5(%rip), %edx    # 0x218810
addl %edx, %edx
subl %edx, %eax
movl %esi, %edx
shrl $0x1f, %edx
addl %esi, %edx
sarl %edx
subl %edx, %eax
movl %eax, 0x328d14(%rip)    # 0x33b374
leal (%rdx,%rcx,2), %eax
jmp 0x12751
cmpb $0x0, 0x208da1(%rip)    # 0x21b410
je 0x1272d
addl $-0x2, %ecx
movl %ecx, 0x328cf6(%rip)    # 0x33b374
addl $-0x2, %eax
jmp 0x12751
movb 0x208d89(%rip), %al     # 0x21b415
orb 0x208d81(%rip), %al     # 0x21b413
setne %al
movb 0x328c15(%rip), %cl     # 0x33b2b0
testb %cl, %cl
setne %sil
andb %al, %sil
movl 0x206156(%rip), %edx    # 0x218800
cmpl $0x690, %edx            # imm = 0x690
setge %dil
testb %dil, %sil
jne 0x12702
cmpq $0x400, 0x20620c(%rip) # imm = 0x400
jne 0x126eb
imull $0x31a, 0x210e74(%rip), %esi # imm = 0x31A
movslq %esi, %rsi
imulq $0x51eb851f, %rsi, %rsi # imm = 0x51EB851F
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x25, %rsi
addl %edi, %esi
cmpl %esi, %edx
jl 0x12702
testb %cl, %cl
sete %cl
andb %cl, %al
cmpb $0x1, %al
jne 0x12757
cmpl $0x258, 0x206104(%rip)  # imm = 0x258
jl 0x12757
movl 0x328c64(%rip), %ecx    # 0x33b36c
movl %ecx, 0x328c62(%rip)    # 0x33b370
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl 0x328c4b(%rip), %ecx    # 0x33b368
addl %eax, %ecx
movl %ecx, 0x328c4f(%rip)    # 0x33b374
addl 0x328c39(%rip), %eax    # 0x33b364
jmp 0x12751
movl 0x2060cd(%rip), %eax    # 0x218800
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %ecx, 0x328c32(%rip)    # 0x33b374
movl 0x2060bc(%rip), %ecx    # 0x218804
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl %eax, 0x328c21(%rip)    # 0x33b378
popq %rbp
retq