// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: draw_azel_sats(int, int, int)
void draw_azel_sats(int grid_x,int grid_y, int grid_r)
{
float az,el;
int x, y;
int marker_size;
int row;
int i, j;
int color;
u08 m;

   // Draw the sats on the sat position map.  Sats that are being used are
   // drawn colored in.  Sats that are not being used are drawn as hollow
   // circles.

   m = 0;
   j = 0;
   row = 0;

   map_x = grid_x;
   map_y = grid_y;
   map_r = grid_r;

   if(AZEL_Y >= PLOT_ROW) shared_item = SHARE_MAP;
   if(map_and_watch && (shared_item == SHARE_MAP)) {
      if(0 && plot_lla && lla_showing) ;
      else shared_item = (SHARE_MAP | SHARE_WATCH);
   }

   log_sun_posn();
   if(1 || (shared_plot == 0) || (aclock_y < (SCREEN_HEIGHT/3)) || (zoom_screen == 'M') || (zoom_screen == 'X') || (zoom_screen == 'Y')) {
      #ifdef TRUE_MOON
         calc_moon_posn(0);
      #endif
      if((lat != 0.0) || (lon != 0.0)) {
         draw_moon(jd_utc, grid_x,grid_y, grid_r, 0);
      }
   }
   
   drawn_sats = 0;
   for(i=1; i<=SUN_MOON_PRN; i++) { // !!!!! mooooo  now draw the sat vectors
      if(sat[i].level_msg == 0x00) continue;
      if((i == SUN_PRN) && (no_sun_moon & 0x01)) continue;
      if((i == MOON_PRN) && (no_sun_moon & 0x02)) continue;

if(tracked_only & (sat[i].tracking <= 0) && (i != SUN_PRN) && (i != MOON_PRN)) continue;
      if(i == SUN_PRN) ;
      else if(i == MOON_PRN);
      else if(sat[i].sig_level <= 0.0) continue;  // zzzzzzzzzzzzzzz

      if((i == SUN_PRN) && (sun_el == 0.0F) && (sun_az == 0.0F)) continue;
      if((i == MOON_PRN) && (moon_el == 0.0F) && (moon_az == 0.0F)) continue;

      // filter out potentially bogus data
      el = sat[i].elevation;
      az = sat[i].azimuth;

      if((az == 0.0F) && (el == 0.0F)) continue;
      if((az < 0.0F) || (az >= 360.0F)) continue;
      if((el < -90.0F) || (el > 90.0F)) continue;

      if((i == SUN_PRN) || (i == MOON_PRN)) {
         if(el < 0.0F) el = 0.0F - el;
      }
      if((el < 0.0F) || (el > 90.0F)) continue;

      el = (el - 90.0F) / 90.0F;
      az += 90.0F;
      if(az < 0.0F) az += 360.0F;
      if(az >= 360.0F) az -= 360.0F;

      x = grid_x + (int) (el * cos360(az) * grid_r);
      y = grid_y + (int) (el * sin360(az) * grid_r);
      if(x < 0) continue;
      if(y < 0) continue;
      if(x >= SCREEN_WIDTH) continue;
      if(y >= SCREEN_HEIGHT) continue;

      // the size of the sat marker is based upon the signal strength
      marker_size = set_marker_size(i);
  
      
      color = j;
      if(i == SUN_PRN) {
         color = YELLOW_SAT_COLOR;  // !!!! kludge: force YELLOW for the sun
      }
      else if(i == MOON_PRN) {
         if(moon_el < 0) color = GREY_SAT_COLOR;
         else            color = YELLOW_SAT_COLOR;  // !!!! kludge: force YELLOW for the moon
      }


      #ifdef SAT_TRAILS
         // we draw the line first,  then the time marker dots
         // since the dots can be hollow and erase part of the line
         plot_sat_trail(grid_x,grid_y, grid_r,  i, az,el, sat_colors[color], 0);   // plot the satellite's path line 
         if(dot_trails) {
            plot_sat_trail(grid_x,grid_y, grid_r,  i, az,el, sat_colors[color], 1);   // dot the satellite's path with time markers
         }
      #endif

      if(i == MOON_PRN) ;  // we draw the moon separately
      else if((i == SUN_PRN) && (fancy_sats >= RECT_SATS)) {
         if(sat[i].tracking > 0) {  //  mark sats that are actively tracked with a filled box
            draw_circle(x,y, marker_size, sat_colors[color], 1);     
         }
         else {
            draw_circle(x,y, marker_size, sat_colors[color], 0);     
         }
         sat[i].plot_x = x;
         sat[i].plot_y = y;
         sat[i].plot_r = marker_size;
         sat[i].plot_color = sat_colors[color];
      }
      else if(sat[i].tracking > 0) {  //  mark sats that are actively tracked with a filled box
         draw_sat(i, x,y, marker_size, sat_colors[color], 1);     
         ++drawn_sats;
         sat[i].plot_x = x;
         sat[i].plot_y = y;
         sat[i].plot_r = marker_size;
         sat[i].plot_color = sat_colors[color];

         if((fancy_sats <= RECT_SATS) && (map_and_sigs || (zoom_screen == 'X') || (zoom_screen == 'Y'))) {  // outline the sats in black
            draw_sat(i, x,y, marker_size+1, BLACK, 0);
            draw_sat(i, x,y, marker_size+2, BLACK, 0);
         }
      }
      else {  // mark inactive sats with a hollow box
         draw_sat(i, x,y, marker_size, sat_colors[color], 0);          
         ++drawn_sats;
         sat[i].plot_x = x;
         sat[i].plot_y = y;
         sat[i].plot_r = marker_size;
         sat[i].plot_color = sat_colors[color];

         if((fancy_sats <= RECT_SATS) && (map_and_sigs || (zoom_screen == 'X') || (zoom_screen == 'Y'))) {  // outline the sats in black
            draw_sat(i, x,y, marker_size+1, BLACK, 0);
            draw_sat(i, x,y, marker_size+2, BLACK, 0);
         }
         if((fancy_sats <= RECT_SATS) && (marker_size > 1+1)) {
            draw_sat(i, x,y, marker_size-1-1, BLACK, 1);
         }
      }

      if(i == SUN_PRN) {
         draw_sun_rays(x,y, marker_size, 0);
      }
      else if(i == MOON_PRN) {
      }

      ++j;
      if(j > MAX_SAT_COLOR) j = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movb $0x0, -0x31(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x4(%rbp), %ecx
leaq 0x2485df(%rip), %rax    # 0x39a58c
movl %ecx, (%rax)
movl -0x8(%rbp), %ecx
leaq 0x2485d7(%rip), %rax    # 0x39a590
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
leaq 0x2485cf(%rip), %rax    # 0x39a594
movl %ecx, (%rax)
leaq 0x2485b6(%rip), %rax    # 0x39a584
movl (%rax), %eax
leaq 0x125a85(%rip), %rcx    # 0x277a5c
cmpl (%rcx), %eax
jl 0x151fe8
leaq 0x2485ea(%rip), %rax    # 0x39a5cc
movl $0x2, (%rax)
leaq 0x128601(%rip), %rax    # 0x27a5f0
cmpb $0x0, (%rax)
je 0x15200d
leaq 0x2485d1(%rip), %rax    # 0x39a5cc
cmpl $0x2, (%rax)
jne 0x15200d
leaq 0x2485c5(%rip), %rax    # 0x39a5cc
movl $0x3, (%rax)
callq 0x151220
xorl %edi, %edi
callq 0x14b8b0
leaq 0x21a190(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x152047
jp 0x152047
leaq 0x21a182(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x152047
jp 0x152047
jmp 0x152062
leaq 0x21a6c2(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
xorl %ecx, %ecx
callq 0x14e200
leaq 0x14c07f(%rip), %rax    # 0x29e0e8
movl $0x0, (%rax)
movl $0x1, -0x28(%rbp)
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jg 0x15290f
movslq -0x28(%rbp), %rcx
leaq 0x14c102(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
jne 0x1520a3
jmp 0x152901
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
jne 0x1520c2
leaq 0x7dd95(%rip), %rax     # 0x1cfe48
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1520c2
jmp 0x152901
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jne 0x1520e1
leaq 0x7dd76(%rip), %rax     # 0x1cfe48
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1520e1
jmp 0x152901
leaq 0x14c00c(%rip), %rax    # 0x29e0f4
movl (%rax), %eax
movslq -0x28(%rbp), %rdx
leaq 0x14c09b(%rip), %rcx    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rcx
cmpl $0x0, 0x218(%rcx)
setle %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x15212d
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
je 0x15212d
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
je 0x15212d
jmp 0x152901
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
jne 0x152138
jmp 0x152173
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jne 0x152143
jmp 0x152171
movslq -0x28(%rbp), %rcx
leaq 0x14c042(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jb 0x15216f
jmp 0x152901
jmp 0x152171
jmp 0x152173
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
jne 0x1521ad
leaq 0x21a815(%rip), %rax    # 0x36c998
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1521ad
jp 0x1521ad
leaq 0x21a817(%rip), %rax    # 0x36c9b0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1521ad
jp 0x1521ad
jmp 0x152901
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jne 0x1521e7
leaq 0x21a813(%rip), %rax    # 0x36c9d0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1521e7
jp 0x1521e7
leaq 0x21a7f5(%rip), %rax    # 0x36c9c8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1521e7
jp 0x1521e7
jmp 0x152901
movslq -0x28(%rbp), %rcx
leaq 0x14bf9e(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20c(%rax), %xmm0
movss %xmm0, -0x14(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0x14bf7c(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x208(%rax), %xmm0
movss %xmm0, -0x10(%rbp)
movss -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x15224e
jp 0x15224e
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x15224e
jp 0x15224e
jmp 0x152901
xorps %xmm0, %xmm0
ucomiss -0x10(%rbp), %xmm0
ja 0x152269
movss -0x10(%rbp), %xmm0
movss 0x310a0(%rip), %xmm1    # 0x183304
ucomiss %xmm1, %xmm0
jb 0x15226e
jmp 0x152901
movss 0x3108a(%rip), %xmm0    # 0x183300
ucomiss -0x14(%rbp), %xmm0
ja 0x15228e
movss -0x14(%rbp), %xmm0
movss 0x1f6c7(%rip), %xmm1    # 0x171950
ucomiss %xmm1, %xmm0
jbe 0x152293
jmp 0x152901
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
je 0x1522a5
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jne 0x1522bd
xorps %xmm0, %xmm0
ucomiss -0x14(%rbp), %xmm0
jbe 0x1522bb
xorps %xmm0, %xmm0
subss -0x14(%rbp), %xmm0
movss %xmm0, -0x14(%rbp)
jmp 0x1522bd
xorps %xmm0, %xmm0
ucomiss -0x14(%rbp), %xmm0
ja 0x1522d8
movss -0x14(%rbp), %xmm0
movss 0x1f67d(%rip), %xmm1    # 0x171950
ucomiss %xmm1, %xmm0
jbe 0x1522dd
jmp 0x152901
movss -0x14(%rbp), %xmm0
movss 0x1f666(%rip), %xmm1    # 0x171950
subss %xmm1, %xmm0
movss 0x1f65a(%rip), %xmm1    # 0x171950
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss 0x1f649(%rip), %xmm0    # 0x171950
addss -0x10(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x10(%rbp), %xmm0
jbe 0x15232c
movss 0x30fe2(%rip), %xmm0    # 0x183304
addss -0x10(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
movss -0x10(%rbp), %xmm0
movss 0x30fcb(%rip), %xmm1    # 0x183304
ucomiss %xmm1, %xmm0
jb 0x152354
movss -0x10(%rbp), %xmm0
movss 0x30fb9(%rip), %xmm1    # 0x183304
subss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x44(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x307bb(%rip), %xmm1    # 0x182b30
callq 0x94d0
movsd 0x1cdfe(%rip), %xmm1    # 0x16f180
divsd %xmm1, %xmm0
callq 0x96f0
movl -0x44(%rbp), %eax
movaps %xmm0, %xmm1
movss -0x40(%rbp), %xmm0
cvtsd2ss %xmm1, %xmm1
mulss %xmm1, %xmm0
cvtsi2ssl -0xc(%rbp), %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x3c(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3075f(%rip), %xmm1    # 0x182b30
callq 0x94d0
movsd 0x1cda2(%rip), %xmm1    # 0x16f180
divsd %xmm1, %xmm0
callq 0x9080
movl -0x3c(%rbp), %eax
movaps %xmm0, %xmm1
movss -0x38(%rbp), %xmm0
cvtsd2ss %xmm1, %xmm1
mulss %xmm1, %xmm0
cvtsi2ssl -0xc(%rbp), %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x152417
jmp 0x152901
cmpl $0x0, -0x1c(%rbp)
jge 0x152422
jmp 0x152901
movl -0x18(%rbp), %eax
leaq 0x1255b4(%rip), %rcx    # 0x2779e0
cmpl (%rcx), %eax
jl 0x152435
jmp 0x152901
movl -0x1c(%rbp), %eax
leaq 0x1255a5(%rip), %rcx    # 0x2779e4
cmpl (%rcx), %eax
jl 0x152448
jmp 0x152901
movl -0x28(%rbp), %edi
callq 0x14ec80
movl %eax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
jne 0x15246b
movl $0xe, -0x30(%rbp)
jmp 0x152498
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jne 0x152496
xorps %xmm0, %xmm0
leaq 0x21a552(%rip), %rax    # 0x36c9d0
ucomisd (%rax), %xmm0
jbe 0x15248d
movl $0xb, -0x30(%rbp)
jmp 0x152494
movl $0xe, -0x30(%rbp)
jmp 0x152496
jmp 0x152498
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
movl -0x28(%rbp), %ecx
movss -0x10(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movslq -0x30(%rbp), %r8
leaq 0x771c7(%rip), %rax     # 0x1c9680
movl (%rax,%r8,4), %r8d
xorl %r9d, %r9d
callq 0x150d20
leaq 0x12812e(%rip), %rax    # 0x27a5fa
cmpb $0x0, (%rax)
je 0x152501
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
movl -0x28(%rbp), %ecx
movss -0x10(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movslq -0x30(%rbp), %r8
leaq 0x7718e(%rip), %rax     # 0x1c9680
movl (%rax,%r8,4), %r8d
movl $0x1, %r9d
callq 0x150d20
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jne 0x15250f
jmp 0x1528c1
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
jne 0x152615
leaq 0x1280e9(%rip), %rax    # 0x27a60c
cmpl $0x1, (%rax)
jl 0x152615
movslq -0x28(%rbp), %rcx
leaq 0x14bc59(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
cmpl $0x0, 0x218(%rax)
jle 0x15256e
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movslq -0x30(%rbp), %rcx
leaq 0x77122(%rip), %rax     # 0x1c9680
movl (%rax,%rcx,4), %ecx
movl $0x1, %r8d
callq 0x11f00
jmp 0x15258d
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movslq -0x30(%rbp), %rcx
leaq 0x770fe(%rip), %rax     # 0x1c9680
movl (%rax,%rcx,4), %ecx
xorl %r8d, %r8d
callq 0x11f00
movl -0x18(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14bbf5(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x228(%rax)
movl -0x1c(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14bbd7(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x22c(%rax)
movl -0x20(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14bbb9(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x230(%rax)
movslq -0x30(%rbp), %rcx
leaq 0x7708e(%rip), %rax     # 0x1c9680
movl (%rax,%rcx,4), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14bb90(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x234(%rax)
jmp 0x1528bf
movslq -0x28(%rbp), %rcx
leaq 0x14bb70(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
cmpl $0x0, 0x218(%rax)
jle 0x152764
movl -0x28(%rbp), %edi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movslq -0x30(%rbp), %r8
leaq 0x77032(%rip), %rax     # 0x1c9680
movl (%rax,%r8,4), %r8d
movl $0x1, %r9d
callq 0x1516d0
leaq 0x14ba84(%rip), %rax    # 0x29e0e8
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x14ba78(%rip), %rax    # 0x29e0e8
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14bb10(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x228(%rax)
movl -0x1c(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14baf2(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x22c(%rax)
movl -0x20(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14bad4(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x230(%rax)
movslq -0x30(%rbp), %rcx
leaq 0x76fa9(%rip), %rax     # 0x1c9680
movl (%rax,%rcx,4), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14baab(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x234(%rax)
leaq 0x127f10(%rip), %rax    # 0x27a60c
cmpl $0x1, (%rax)
jg 0x15275f
leaq 0x127ee9(%rip), %rax    # 0x27a5f1
cmpb $0x0, (%rax)
jne 0x15272b
leaq 0x219274(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x58, %eax
je 0x15272b
leaq 0x219265(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x59, %eax
jne 0x15275f
movl -0x28(%rbp), %edi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x1516d0
movl -0x28(%rbp), %edi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x1516d0
jmp 0x1528bd
movl -0x28(%rbp), %edi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movslq -0x30(%rbp), %r8
leaq 0x76f05(%rip), %rax     # 0x1c9680
movl (%rax,%r8,4), %r8d
xorl %r9d, %r9d
callq 0x1516d0
leaq 0x14b95a(%rip), %rax    # 0x29e0e8
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x14b94e(%rip), %rax    # 0x29e0e8
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14b9e6(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x228(%rax)
movl -0x1c(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14b9c8(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x22c(%rax)
movl -0x20(%rbp), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14b9aa(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x230(%rax)
movslq -0x30(%rbp), %rcx
leaq 0x76e7f(%rip), %rax     # 0x1c9680
movl (%rax,%rcx,4), %ecx
movslq -0x28(%rbp), %rdx
leaq 0x14b981(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movl %ecx, 0x234(%rax)
leaq 0x127de6(%rip), %rax    # 0x27a60c
cmpl $0x1, (%rax)
jg 0x152889
leaq 0x127dbf(%rip), %rax    # 0x27a5f1
cmpb $0x0, (%rax)
jne 0x152855
leaq 0x21914a(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x58, %eax
je 0x152855
leaq 0x21913b(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x59, %eax
jne 0x152889
movl -0x28(%rbp), %edi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x1516d0
movl -0x28(%rbp), %edi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x1516d0
leaq 0x127d7c(%rip), %rax    # 0x27a60c
cmpl $0x1, (%rax)
jg 0x1528bb
cmpl $0x2, -0x20(%rbp)
jle 0x1528bb
movl -0x28(%rbp), %edi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
subl $0x1, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x1516d0
jmp 0x1528bd
jmp 0x1528bf
jmp 0x1528c1
cmpl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
jne 0x1528dc
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
xorl %ecx, %ecx
callq 0x14e670
jmp 0x1528e9
cmpl $0x3e9, -0x28(%rbp)     # imm = 0x3E9
jne 0x1528e7
jmp 0x1528e7
jmp 0x1528e9
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0xe, -0x2c(%rbp)
jle 0x1528ff
movl $0x0, -0x2c(%rbp)
jmp 0x152901
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x152076
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)