// File: /workspace/github_cpp_makefile_star2_O3/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 0x328ea3(%rip), %ecx    # 0x33b38c
movl %ecx, 0x328e81(%rip)    # 0x33b370
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl 0x328e96(%rip), %ecx    # 0x33b394
addl %eax, %ecx
addl 0x328e8a(%rip), %eax    # 0x33b390
movl %ecx, 0x328e68(%rip)    # 0x33b374
movl %eax, 0x328e66(%rip)    # 0x33b378
movzbl 0x2fa28f(%rip), %edx    # 0x30c7a8
testl %edx, %edx
je 0x12526
cmpl $0x4b, %edx
jne 0x125a6
cmpb $0x0, 0x22a811(%rip)    # 0x23cd3e
je 0x125c4
movl 0x2062c7(%rip), %eax    # 0x218800
cmpl $0x690, %eax            # imm = 0x690
jl 0x12695
cmpb $0x0, 0x328d65(%rip)    # 0x33b2b0
jne 0x12640
movl %eax, %edx
subl 0x328e0f(%rip), %edx    # 0x33b368
movl 0x20631d(%rip), %esi    # 0x21887c
movl 0x2062af(%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, 0x328ded(%rip)    # 0x33b370
movl 0x206287(%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, 0x328dd6(%rip)    # 0x33b374
leal (%rdx,%rcx,2), %eax
jmp 0x1268f
cmpb $0x0, 0x208e63(%rip)    # 0x21b410
je 0x1266b
addl $-0x2, %ecx
movl %ecx, 0x328db8(%rip)    # 0x33b374
addl $-0x2, %eax
jmp 0x1268f
movb 0x208e4b(%rip), %al     # 0x21b415
orb 0x208e43(%rip), %al     # 0x21b413
setne %al
movb 0x328cd7(%rip), %cl     # 0x33b2b0
testb %cl, %cl
setne %sil
andb %al, %sil
movl 0x206218(%rip), %edx    # 0x218800
cmpl $0x690, %edx            # imm = 0x690
setge %dil
testb %dil, %sil
jne 0x12640
cmpq $0x400, 0x2062ce(%rip) # imm = 0x400
jne 0x12629
imull $0x31a, 0x210f36(%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 0x12640
testb %cl, %cl
sete %cl
andb %cl, %al
cmpb $0x1, %al
jne 0x12695
cmpl $0x258, 0x2061c6(%rip)  # imm = 0x258
jl 0x12695
movl 0x328d26(%rip), %ecx    # 0x33b36c
movl %ecx, 0x328d24(%rip)    # 0x33b370
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl 0x328d0d(%rip), %ecx    # 0x33b368
addl %eax, %ecx
movl %ecx, 0x328d11(%rip)    # 0x33b374
addl 0x328cfb(%rip), %eax    # 0x33b364
jmp 0x1268f
movl 0x20618f(%rip), %eax    # 0x218800
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %ecx, 0x328cf4(%rip)    # 0x33b374
movl 0x20617e(%rip), %ecx    # 0x218804
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl %eax, 0x328ce3(%rip)    # 0x33b378
popq %rbp
retq