// File: /workspace/github_cpp_makefile_star2_O2/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 0x313673(%rip), %eax    # 0x32538c
movl %eax, 0x313651(%rip)    # 0x325370
movl $0x2, %esi
cltd
idivl %esi
movl 0x313667(%rip), %ecx    # 0x325394
addl %eax, %ecx
addl 0x31365b(%rip), %eax    # 0x325390
movl %ecx, 0x313639(%rip)    # 0x325374
movl %eax, 0x313637(%rip)    # 0x325378
movzbl 0x2e4a60(%rip), %edx    # 0x2f67a8
testl %edx, %edx
je 0x11d55
cmpl $0x4b, %edx
jne 0x11de1
cmpb $0x0, 0x214fe2(%rip)    # 0x226d3e
je 0x11dff
movl 0x1f0a98(%rip), %edi    # 0x202800
cmpl $0x690, %edi            # imm = 0x690
jl 0x11eb4
cmpb $0x0, 0x313535(%rip)    # 0x3252b0
jne 0x11e71
movl %edi, %eax
subl 0x3135df(%rip), %eax    # 0x325368
movl 0x1f0aed(%rip), %ecx    # 0x20287c
movl 0x1f0a7e(%rip), %r8d    # 0x202814
leal (,%r8,4), %edx
subl %edx, %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movl $0x140, %eax            # imm = 0x140
cmpl %eax, %ecx
cmovgel %eax, %ecx
movl %ecx, 0x3135bb(%rip)    # 0x325370
movl $0xfffffffe, %r9d       # imm = 0xFFFFFFFE
movl %ecx, %eax
cltd
idivl %r9d
movl 0x1f0a49(%rip), %edx    # 0x202810
addl %edx, %edx
subl %edx, %edi
addl %eax, %edi
movl %edi, 0x3135a1(%rip)    # 0x325374
movl %ecx, %eax
cltd
idivl %esi
leal (%rax,%r8,2), %eax
jmp 0x11eae
cmpb $0x0, 0x1f3628(%rip)    # 0x205410
je 0x11e96
addl $-0x2, %ecx
movl %ecx, 0x31357d(%rip)    # 0x325374
addl $-0x2, %eax
jmp 0x11eae
movb 0x1f3610(%rip), %al     # 0x205415
orb 0x1f3608(%rip), %al     # 0x205413
setne %cl
movb 0x31349b(%rip), %dil    # 0x3252b0
testb %dil, %dil
setne %al
andb %cl, %al
movl 0x1f09dc(%rip), %r8d    # 0x202800
cmpl $0x690, %r8d            # imm = 0x690
setge %dl
testb %dl, %al
jne 0x11e71
cmpq $0x400, 0x1f0a93(%rip) # imm = 0x400
jne 0x11e58
imull $0x31a, 0x1fb6fb(%rip), %eax # imm = 0x31A
movl $0x64, %r9d
cltd
idivl %r9d
cmpl %eax, %r8d
jl 0x11e71
testb %dil, %dil
sete %al
andb %al, %cl
cmpb $0x1, %cl
jne 0x11eb4
cmpl $0x258, 0x1f0995(%rip)  # imm = 0x258
jl 0x11eb4
movl 0x3134f5(%rip), %eax    # 0x32536c
movl %eax, 0x3134f3(%rip)    # 0x325370
cltd
idivl %esi
movl 0x3134e2(%rip), %ecx    # 0x325368
addl %eax, %ecx
movl %ecx, 0x3134e6(%rip)    # 0x325374
addl 0x3134d0(%rip), %eax    # 0x325364
jmp 0x11eae
movl 0x1f0964(%rip), %eax    # 0x202800
cltd
idivl %esi
movl %eax, 0x3134cf(%rip)    # 0x325374
movl 0x1f0959(%rip), %eax    # 0x202804
cltd
idivl %esi
movl %eax, 0x3134c4(%rip)    # 0x325378
popq %rbp
retq