// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: draw_azel_plot(int)
void draw_azel_plot(int why)
{
int save_row, save_col, save_size;
int did_watch;

   // draw satellite position map, analog watch, and/or signal level map

   if(text_mode) return;
   did_watch = 99;
   if(zoom_screen == 'L') return;
   if(zoom_screen == 'C') return;
   if((zoom_screen == 'M') || (zoom_screen == 'B') || (zoom_screen == 'X')) ;
   else if(zoom_screen == 'Y') ;
   else if(zoom_screen == 'V') ;
   else if(zoom_screen == 'I') ;
   else if(plot_azel == 0) return;

   if     (zoom_screen == 'W') ;
   else if(zoom_screen == 'B') erase_screen();
   else if(zoom_screen == 'M') ;
   else if(zoom_screen == 'S') ;
   else if(zoom_screen == 'X') ;
   else if(zoom_screen == 'Y') ;
   else if(zoom_screen == 'V') ;
   else if(zoom_screen == 'I') ;
   else if(zoom_screen == 'N') {
      erase_screen();
      return;
   }
   else if(zoom_screen) return;

// if(all_adevs && plot_signals && shared_plot) return;  //zzzzzzz
   if(plot_lla && (shared_plot == 0)) return;
   if(first_key && shared_plot && (shared_item & SHARE_MAP)) return;

   save_row = AZEL_ROW;
   save_col = AZEL_COL;
   save_size = AZEL_SIZE;

   AZEL_X = (AZEL_COL+AZEL_SIZE/2-1);   // center point of plot
   AZEL_Y = (AZEL_ROW+AZEL_SIZE/2-1);   


   if(zoom_screen == 'N') {  // blank (mostly) screen
      erase_screen();
      return;
   }

if(last_sun_x && last_sun_y && last_sun_r && (show_fixes == 0) && (zoom_screen != 'V')) {  // erase the old sun disk
   draw_circle(last_sun_x,last_sun_y, last_sun_r, BLACK, 1);
}
   if((zoom_screen == 'W') || (zoom_screen == 'B')) {
      if(luxor && luxor_fault()) ;
      else draw_watch(3);
   }
   else if(zoom_screen) ;
   else if(map_and_watch) {
      small_screen_watch();
      if(luxor && luxor_fault()) ;
      else did_watch = draw_watch(4);
   } 
   else if((plot_watch && (plot_signals == 0)) || (zoom_screen == 'B')) {  // both azel and watch want to be on the screen
      if(all_adevs) {
         if(WIDE_SCREEN == 0) return;
      }
      else if(WIDE_SCREEN && (shared_plot == 0) && plot_lla) return;  // the watch wins
      else if(WIDE_SCREEN && plot_lla) ;
      else if(WIDE_SCREEN && (shared_plot == 0) && (plot_lla == 0)) {
         AZEL_SIZE = LLA_SIZE;
         AZEL_ROW = LLA_ROW;
         AZEL_COL = LLA_COL;
      }
      else if((shared_plot == 0) || all_adevs || plot_lla) {
         return;  // the watch wins
      }
   }
   else if(all_adevs && WIDE_SCREEN && (plot_lla == 0)) {
   }

   if(zoom_screen == 'V') ;
   else if(zoom_screen == 'I') ;
   else if((plot_signals == 0) && (plot_areas == 2)) ;
   else if(map_and_watch && plot_lla && (plot_areas == 1)) ;
   else if(map_and_sigs && plot_lla && (plot_areas == 1)) ;
   else if(map_and_watch && (SCREEN_WIDTH >= XXXX) && (all_adevs == SINGLE_ADEVS)) {
      AZEL_ROW = WATCH_ROW;
      AZEL_COL = WATCH_COL;
      AZEL_SIZE = WATCH_SIZE;
   }
// else if(plot_signals && plot_azel && (SCREEN_WIDTH >= 1280)) {
   else if(plot_signals && plot_azel && (SCREEN_WIDTH >= WIDE_WIDTH) && (all_adevs == SINGLE_ADEVS)) {
      AZEL_ROW = WATCH_ROW;
      AZEL_COL = WATCH_COL;
      AZEL_SIZE = WATCH_SIZE;
   }
   else if(plot_signals && plot_azel && shared_plot && (all_adevs == SINGLE_ADEVS) && (SCREEN_WIDTH >= XXXX)) {
      AZEL_ROW = WATCH_ROW;
      AZEL_COL = WATCH_COL;
      AZEL_SIZE = WATCH_SIZE;
   }
// else if((zoom_screen == 'X') || (zoom_screen == 'Y')) {
//    AZEL_ROW = WATCH_ROW;
//    AZEL_COL = WATCH_COL;
//    AZEL_SIZE = WATCH_SIZE;
// }

   AZEL_X = (AZEL_COL+AZEL_SIZE/2-1);   // center point of plot
   AZEL_Y = (AZEL_ROW+AZEL_SIZE/2-1);   

   if(rcvr_type == NO_RCVR) return;
//// if(rcvr_type == TIDE_RCVR) return;  // ckckck

   if(zoom_screen == 'B') ;
   else if(zoom_screen) ;     
   else if(map_and_watch || map_and_sigs) ;
// else if((did_watch == 0) && (AZEL_ROW == WATCH_ROW) && (AZEL_COL == WATCH_COL)) ;
   else erase_azel(11);       // erase the old az/el plot


   azel_grid_color = AZEL_COLOR;
   if(zoom_screen == 'M') {
      erase_azel(12);
      draw_azel_prns(0);   // label the azel plot
      draw_azel_grid(0, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
   }
   else if(zoom_screen == 'X') {
      erase_azel(13);
      draw_azel_prns(0);   // label the azel plot
      draw_azel_grid(0, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
      draw_signal_map(10);
      draw_azel_sats(AZEL_X,AZEL_Y, AZEL_RADIUS);   // fill in the satellites
      draw_watch(66);
   }
   else if(zoom_screen == 'Y') {
      erase_azel(14);
      draw_azel_prns(11);   // label the azel plot
      draw_azel_grid(0, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
      draw_signal_map(12);
      draw_azel_sats(AZEL_X,AZEL_Y, AZEL_RADIUS);   // fill in the satellites
   }
   else if(zoom_screen == 'B') {
      draw_azel_prns(0);   // label the azel plot
      draw_azel_grid(0, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
   }
   else if(zoom_screen == 'S') {
      draw_azel_prns(1);   // label the azel plot
      draw_azel_grid(1, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
   }
   else if(zoom_screen == 'V') {
      draw_azel_prns(1);   // label the azel plot
      draw_azel_grid(1, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
      draw_azel_sats(AZEL_X,AZEL_Y, AZEL_RADIUS);    // fill in the satellites
   }
   else if(zoom_screen == 'I') {
      draw_azel_prns(1);   // label the azel plot
      draw_azel_grid(1, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
      draw_azel_sats(AZEL_X,AZEL_Y, AZEL_RADIUS);   // fill in the satellites
   }
   else if(zoom_screen) ;
   else if(map_and_watch || (map_and_sigs == 0)) { 
      draw_azel_prns(0);   // label the azel plot
      draw_azel_grid(0, AZEL_X,AZEL_Y, AZEL_RADIUS); // now draw the az/el grid
   }

   if(0 && (rcvr_type == NO_RCVR)) ;  // wwwwww
   else if(zoom_screen == 'X') ;
   else if(zoom_screen == 'Y') ;
   else if(zoom_screen == 'I') ;
   else if(plot_azel || (zoom_screen == 'M') || (zoom_screen == 'B')) {
      draw_azel_sats(AZEL_X,AZEL_Y, AZEL_RADIUS);   // fill in the satellites
   }

   AZEL_ROW = save_row;
   AZEL_COL = save_col;
   AZEL_SIZE = save_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x11f96f(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
je 0xe2e7d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x213924(%rip), %r12    # 0x2f67a8
movzbl (%r12), %eax
cmpl $0x43, %eax
je 0xe2e6e
cmpl $0x4c, %eax
je 0xe2e6e
leaq 0x122579(%rip), %r15    # 0x205413
cmpb $0x0, (%r15)
je 0xe2ec5
leal -0x42(%rax), %ecx
cmpl $0x17, %ecx
ja 0xe2ebf
movl $0xf20880, %edx         # imm = 0xF20880
btl %ecx, %edx
jb 0xe2ee0
testl %ecx, %ecx
je 0xe2edb
cmpl $0xc, %ecx
je 0xe2f75
testl %eax, %eax
jne 0xe2e6e
jmp 0xe2ee0
addl $-0x42, %eax
cmpl $0x17, %eax
ja 0xe2e6e
movl $0xd00880, %ecx         # imm = 0xD00880
btl %eax, %ecx
jb 0xe2ee0
testl %eax, %eax
jne 0xe2e6e
callq 0xe7d9
leaq 0x2423c9(%rip), %r14    # 0x3252b0
cmpb $0x0, (%r14)
setne %cl
leaq 0x2424f3(%rip), %r13    # 0x3253e8
movb (%r13), %al
testb %al, %al
sete %dl
testb %dl, %cl
jne 0xe2e6e
leaq 0x14604b(%rip), %rcx    # 0x228f58
cmpl $0x0, (%rcx)
setne %cl
testb %al, %al
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0xe2f2e
leaq 0x2424c7(%rip), %rax    # 0x3253ec
testb $0x2, (%rax)
jne 0xe2e6e
leaq 0x24245b(%rip), %rax    # 0x325390
movl (%rax), %esi
leaq 0x242456(%rip), %rax    # 0x325394
movl (%rax), %edi
leaq 0x242445(%rip), %rax    # 0x32538c
movl (%rax), %ebx
pushq $0x2
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
leal (%rax,%rdi), %ecx
decl %ecx
leaq 0x242443(%rip), %rdx    # 0x3253a0
movl %ecx, (%rdx)
leal -0x1(%rax,%rsi), %eax
leaq 0x24243a(%rip), %rcx    # 0x3253a4
movl %eax, (%rcx)
movb (%r12), %cl
cmpb $0x4e, %cl
jne 0xe2f88
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe7d9
movq %rdi, -0x30(%rbp)
cmpb $0x56, %cl
movq %rsi, -0x38(%rbp)
je 0xe2fd7
leaq 0x21485c(%rip), %rax    # 0x2f77f8
movl (%rax), %edi
testl %edi, %edi
je 0xe2fd7
leaq 0x214853(%rip), %rax    # 0x2f77fc
movl (%rax), %esi
testl %esi, %esi
je 0xe2fd7
leaq 0x21484a(%rip), %rax    # 0x2f7800
movl (%rax), %edx
testl %edx, %edx
je 0xe2fd7
leaq 0x242311(%rip), %rax    # 0x3252d4
cmpb $0x0, (%rax)
jne 0xe2fd7
pushq $0x1
popq %r8
xorl %ecx, %ecx
callq 0xec2f
movb (%r12), %cl
testb %cl, %cl
je 0xe2fea
movzbl %cl, %eax
cmpl $0x57, %eax
je 0xe2fff
cmpl $0x42, %eax
je 0xe2fff
jmp 0xe301d
leaq 0x12241f(%rip), %rax    # 0x205410
cmpb $0x0, (%rax)
je 0xe31c7
callq 0xe2295
leaq 0x145f38(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0xe3014
callq 0x6f8d4
testb %al, %al
jne 0xe3019
callq 0xde84e
movb (%r12), %cl
cmpb $0x49, %cl
je 0xe314a
movzbl %cl, %eax
cmpl $0x56, %eax
je 0xe314a
leaq 0x1223dc(%rip), %rax    # 0x205415
movb (%rax), %sil
testb %sil, %sil
sete %al
leaq 0x1223bb(%rip), %rdx    # 0x205404
movl (%rdx), %edx
cmpl $0x2, %edx
sete %dil
testb %dil, %al
jne 0xe314a
leaq 0x1223ae(%rip), %rax    # 0x205410
movb (%rax), %al
testb %al, %al
setne %r8b
movb (%r14), %dil
testb %dil, %dil
setne %r9b
andb %r8b, %r9b
cmpl $0x1, %edx
sete %r8b
testb %r8b, %r9b
jne 0xe314a
cmpl $0x1, %edx
sete %dl
testb %dil, %dil
setne %dil
leaq 0x122376(%rip), %r8     # 0x205411
cmpb $0x0, (%r8)
setne %r8b
andb %dil, %r8b
testb %dl, %r8b
jne 0xe314a
leaq 0x11f74a(%rip), %rdx    # 0x202800
movl (%rdx), %edi
leaq 0x143c7f(%rip), %rdx    # 0x226d3e
movb (%rdx), %r9b
pushq $0x64
popq %r8
testb %al, %al
je 0xe30ea
leaq 0x12a473(%rip), %rax    # 0x20d544
imull $0x31a, (%rax), %eax    # imm = 0x31A
cltd
idivl %r8d
cmpl %eax, %edi
setge %al
testb %r9b, %r9b
sete %dl
testb %dl, %al
jne 0xe3114
testb %sil, %sil
setne %dl
cmpb $0x0, (%r15)
setne %al
andb %dl, %al
cmpl $0x4fa, %edi            # imm = 0x4FA
setge %dl
andb %al, %dl
testb %r9b, %r9b
sete %sil
testb %sil, %dl
je 0xe3554
leaq 0x242249(%rip), %rax    # 0x325364
movl (%rax), %eax
leaq 0x24226c(%rip), %rdx    # 0x325390
movl %eax, (%rdx)
leaq 0x24223b(%rip), %rax    # 0x325368
movl (%rax), %eax
leaq 0x24225e(%rip), %rdx    # 0x325394
movl %eax, (%rdx)
leaq 0x24222d(%rip), %rax    # 0x32536c
movl (%rax), %eax
leaq 0x242244(%rip), %rdx    # 0x32538c
movl %eax, (%rdx)
leaq 0x24223b(%rip), %rax    # 0x32538c
movl (%rax), %eax
cltd
pushq $0x2
popq %rsi
idivl %esi
decl %eax
leaq 0x242232(%rip), %rdx    # 0x325394
movl (%rdx), %edx
addl %eax, %edx
leaq 0x242233(%rip), %rsi    # 0x3253a0
movl %edx, (%rsi)
leaq 0x24221a(%rip), %rdx    # 0x325390
addl (%rdx), %eax
leaq 0x242225(%rip), %rdx    # 0x3253a4
movl %eax, (%rdx)
leaq 0x11f748(%rip), %rax    # 0x2028d0
cmpq $0x400, (%rax)          # imm = 0x400
je 0xe2e6e
testb %cl, %cl
jne 0xe321d
leaq 0x12226c(%rip), %rax    # 0x205410
leaq 0x122266(%rip), %rcx    # 0x205411
movb (%rcx), %cl
orb (%rax), %cl
je 0xe3211
leaq 0x2421f0(%rip), %rax    # 0x3253a8
movl $0x8, (%rax)
movq -0x30(%rbp), %rdi
jmp 0xe32ad
leaq 0x12223a(%rip), %rax    # 0x205408
cmpb $0x0, (%rax)
je 0xe3019
leaq 0x122237(%rip), %rax    # 0x205415
cmpb $0x0, (%rax)
jne 0xe3019
leaq 0x143b50(%rip), %rax    # 0x226d3e
cmpb $0x0, (%rax)
leaq 0x11f608(%rip), %rax    # 0x202800
movl (%rax), %esi
je 0xe34cc
cmpl $0x690, %esi            # imm = 0x690
jl 0xe2e6e
jmp 0xe3019
pushq $0xb
popq %rdi
callq 0xe87c
movb (%r12), %cl
leaq 0x242184(%rip), %rax    # 0x3253a8
movl $0x8, (%rax)
movzbl %cl, %eax
leal -0x53(%rax), %edx
cmpl $0x6, %edx
movq -0x30(%rbp), %rdi
jbe 0xe3262
testl %eax, %eax
je 0xe32ad
cmpl $0x42, %eax
je 0xe32c9
cmpl $0x49, %eax
je 0xe330a
cmpl $0x4d, %eax
jne 0xe344c
pushq $0xc
popq %rdi
callq 0xe87c
jmp 0xe32c9
leaq 0x31fb7(%rip), %rax     # 0x115220
movslq (%rax,%rdx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
pushq $0x1
popq %r14
movl %r14d, %edi
callq 0xe0b23
leaq 0x24211b(%rip), %rax    # 0x3253a0
movl (%rax), %esi
leaq 0x242116(%rip), %rax    # 0x3253a4
movl (%rax), %ecx
leaq 0x2420f5(%rip), %rax    # 0x32538c
movl (%rax), %eax
cltd
pushq $0x2
popq %rdi
idivl %edi
leaq 0x2420f2(%rip), %rdx    # 0x325398
subl (%rdx), %eax
movl %r14d, %edi
jmp 0xe32fc
leaq 0x12215c(%rip), %rax    # 0x205410
cmpb $0x0, (%rax)
jne 0xe32c9
leaq 0x122151(%rip), %rax    # 0x205411
cmpb $0x0, (%rax)
jne 0xe3448
xorl %edi, %edi
callq 0xe0b23
leaq 0x2420c9(%rip), %rax    # 0x3253a0
movl (%rax), %esi
leaq 0x2420c4(%rip), %rax    # 0x3253a4
movl (%rax), %ecx
leaq 0x2420a3(%rip), %rax    # 0x32538c
movl (%rax), %eax
cltd
pushq $0x2
popq %rdi
idivl %edi
leaq 0x2420a0(%rip), %rdx    # 0x325398
subl (%rdx), %eax
xorl %edi, %edi
movl %ecx, %edx
movl %eax, %ecx
callq 0xdf180
jmp 0xe3444
pushq $0x1
popq %rdi
callq 0xe0b23
leaq 0x242087(%rip), %rax    # 0x3253a0
movl (%rax), %esi
leaq 0x242082(%rip), %rax    # 0x3253a4
movl (%rax), %ecx
leaq 0x242061(%rip), %r13    # 0x32538c
movl (%r13), %eax
cltd
pushq $0x2
popq %r14
idivl %r14d
leaq 0x24205a(%rip), %rdx    # 0x325398
subl (%rdx), %eax
pushq $0x1
popq %rdi
movl %ecx, %edx
movl %eax, %ecx
callq 0xdf180
jmp 0xe339c
pushq $0xe
popq %rdi
callq 0xe87c
pushq $0xb
popq %rdi
callq 0xe0b23
leaq 0x24203b(%rip), %rax    # 0x3253a0
movl (%rax), %esi
leaq 0x242036(%rip), %rax    # 0x3253a4
movl (%rax), %ecx
leaq 0x242015(%rip), %r13    # 0x32538c
movl (%r13), %eax
cltd
pushq $0x2
popq %r14
idivl %r14d
leaq 0x24200e(%rip), %rdx    # 0x325398
subl (%rdx), %eax
xorl %edi, %edi
movl %ecx, %edx
movl %eax, %ecx
callq 0xdf180
callq 0xe35a6
leaq 0x241ffd(%rip), %rax    # 0x3253a0
movl (%rax), %edi
leaq 0x241ff8(%rip), %rax    # 0x3253a4
movl (%rax), %esi
movl (%r13), %eax
cltd
idivl %r14d
leaq 0x241fdb(%rip), %rcx    # 0x325398
subl (%rcx), %eax
movl %eax, %edx
callq 0xe0347
jmp 0xe3444
pushq $0xd
popq %rdi
callq 0xe87c
xorl %edi, %edi
callq 0xe0b23
leaq 0x241fc2(%rip), %rax    # 0x3253a0
movl (%rax), %esi
leaq 0x241fbd(%rip), %rax    # 0x3253a4
movl (%rax), %ecx
leaq 0x241f9c(%rip), %r13    # 0x32538c
movl (%r13), %eax
cltd
pushq $0x2
popq %r14
idivl %r14d
leaq 0x241f95(%rip), %rdx    # 0x325398
subl (%rdx), %eax
xorl %edi, %edi
movl %ecx, %edx
movl %eax, %ecx
callq 0xdf180
callq 0xe35a6
leaq 0x241f84(%rip), %rax    # 0x3253a0
movl (%rax), %edi
leaq 0x241f7f(%rip), %rax    # 0x3253a4
movl (%rax), %esi
movl (%r13), %eax
cltd
idivl %r14d
leaq 0x241f62(%rip), %rcx    # 0x325398
subl (%rcx), %eax
movl %eax, %edx
callq 0xe0347
callq 0xde84e
movq -0x30(%rbp), %rdi
movb (%r12), %cl
movzbl %cl, %eax
leal -0x49(%rax), %edx
cmpl $0x10, %edx
ja 0xe3461
movl $0x18001, %esi          # imm = 0x18001
btl %edx, %esi
jb 0xe349c
cmpb $0x0, (%r15)
je 0xe34c0
leaq 0x241f32(%rip), %rax    # 0x3253a0
movl (%rax), %edi
leaq 0x241f2d(%rip), %rax    # 0x3253a4
movl (%rax), %esi
leaq 0x241f0c(%rip), %rax    # 0x32538c
movl (%rax), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
leaq 0x241f09(%rip), %rcx    # 0x325398
subl (%rcx), %eax
movl %eax, %edx
callq 0xe0347
movq -0x30(%rbp), %rdi
leaq 0x241eed(%rip), %rax    # 0x325390
movq -0x38(%rbp), %rcx
movl %ecx, (%rax)
leaq 0x241ee4(%rip), %rax    # 0x325394
movl %edi, (%rax)
leaq 0x241ed3(%rip), %rax    # 0x32538c
movl %ebx, (%rax)
jmp 0xe2e6e
cmpb $0x4d, %cl
je 0xe3467
cmpl $0x42, %eax
je 0xe3467
jmp 0xe349c
cmpl $0x690, %esi            # imm = 0x690
setge %cl
movb (%r13), %al
testb %al, %al
sete %dl
andb %cl, %dl
movb (%r14), %cl
testb %cl, %cl
setne %dil
testb %dil, %dl
jne 0xe2e6e
testb %cl, %cl
setne %dil
cmpl $0x690, %esi            # imm = 0x690
setge %sil
testb %dil, %sil
jne 0xe3019
testb %cl, %cl
sete %sil
andb %sil, %dl
cmpb $0x1, %dl
jne 0xe358f
leaq 0x241d78(%rip), %rax    # 0x325298
movl (%rax), %eax
leaq 0x241e63(%rip), %rcx    # 0x32538c
movl %eax, (%rcx)
leaq 0x241d76(%rip), %rax    # 0x3252a8
movl (%rax), %eax
leaq 0x241e55(%rip), %rcx    # 0x325390
movl %eax, (%rcx)
leaq 0x241d68(%rip), %rax    # 0x3252ac
movl (%rax), %eax
leaq 0x241e47(%rip), %rcx    # 0x325394
movl %eax, (%rcx)
jmp 0xe3019
testb %r9b, %r9b
sete %dl
cmpb $0x0, (%r13)
setne %sil
andb %dl, %sil
andb %sil, %al
cmpb $0x1, %al
jne 0xe314a
leaq 0x129fcc(%rip), %rax    # 0x20d544
imull $0x31a, (%rax), %eax    # imm = 0x31A
cltd
idivl %r8d
cmpl %eax, %edi
jge 0xe3114
jmp 0xe314a
testb %cl, %cl
setne %cl
testb %al, %al
sete %al
orb %cl, %al
jne 0xe2e6e
jmp 0xe3019