// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: show_satinfo()
void show_satinfo()
{
COORD row, col;
u08 time_exit;
u08 info_under_azel;
int prn;
int col2;
int top_row;
int track_count;
int rows_avail;
int msd;
int max_sat_show;
int col_switch;

   // This routine draws the satellite info table.  It also calls the
   // digital clock display routine (since on small screens the digital clock
   // takes the place of the sat info display).  It also controls the alarm
   // clock operation.

   last_sat_row = SAT_ROW+3;
   msd = max_sat_display;
   max_sat_show = max_sats;
   sun_moon_shown = 0;


   track_count = 0;
   for(prn=1; prn<=MAX_PRN; prn++) {  // count actively tracked satellites
      if(sat[prn].level_msg) ++track_count;
   }

   if(text_mode && first_key) {
      find_sat_changes();
      return;
   }
   
   time_exit = 0;
   print_using = 0;

   if(all_adevs && (zoom_screen != 'I')) {   // screen is showing all the adev tables
      if(text_mode) {
         col = 0;
         row = TEXT_ROWS - 8;
      }
      else {
         if(SCREEN_WIDTH >= WIDE_WIDTH) col = CRIT_COL + 19;
         else                           col = CRIT_COL + 12;
         row = 0;
      }
   }
   else {    // normal screen mode
      col = SAT_COL;
      row = SAT_ROW+eofs;
      if(text_mode) ++row;
      else if((TEXT_HEIGHT <= 14) || (SCREEN_HEIGHT >= MEDIUM_HEIGHT)) ++row;
   }

   if(sound_alarm) {
      if(ticker & 0x01)      time_color = ALARM_COLOR;
      else if(dst_ofs)       time_color = DST_TIME_COLOR;
      else if(time_zone_set) time_color = DST_TIME_COLOR;  // !!! std_time_color is rather dim for the big clock
      else                   time_color = WHITE;
   }

   // if sats are not in use show the osc control info
// if(osc_params || (osc_discipline == 0)) {  
   show_short_info = user_set_short;
   if(zoom_screen == 'I') ;
   else if(osc_params && (all_adevs == SINGLE_ADEVS) && (zoom_screen == 0)) {
      show_osc_params(row, col);
      if(rcvr_type == LPFRS_RCVR) goto no_sat_tables;
      if(rcvr_type == PRS_RCVR) goto no_sat_tables;
      if(rcvr_type == SA35_RCVR) goto no_sat_tables;
      if(rcvr_type == SRO_RCVR) goto no_sat_tables;
      if(rcvr_type == RFTG_RCVR) goto no_sat_tables;
      if(rcvr_type == X72_RCVR) goto no_sat_tables;
      find_sat_changes();
      return;
   }
   else if((rcvr_type == RFTG_RCVR) && (zoom_screen == 'C') && osc_params) ; 
//   else if((rcvr_type == RFTG_RCVR) && (zoom_screen == 'I') && osc_params) ; 
   else if(osc_params) {
     if((rcvr_type == LPFRS_RCVR) || (rcvr_type == PRS_RCVR) || (rcvr_type == SA35_RCVR) || (rcvr_type == SRO_RCVR) || (rcvr_type == RFTG_RCVR) || (rcvr_type == X72_RCVR)) {
        if(zoom_screen == 0) show_osc_params(row,col);
        goto no_sat_tables;
     }
     else show_osc_params(row, col);
     find_sat_changes();
     return;
   }

   info_under_azel = 0;
   if(SHARED_AZEL && (AZEL_BOTTOM+(TEXT_HEIGHT*(8+1)) < SCREEN_HEIGHT)) {  
      if(SCREEN_HEIGHT <= MEDIUM_HEIGHT) {
         info_under_azel = 1;
      }
      else if(plot_watch && plot_digital_clock && ebolt) info_under_azel = 1;
      else if(all_adevs) info_under_azel = 1;
   }

   digital_clock_shown = 0;
   #ifdef DIGITAL_CLOCK
      if(zoom_screen == 'I') ;
//    else if(((plot_digital_clock || all_adevs) && ((all_adevs == SINGLE_ADEVS) || (SCREEN_WIDTH > NARROW_SCREEN))) || (zoom_screen == 'C')) {
      else if((plot_digital_clock && ((all_adevs == SINGLE_ADEVS) || (SCREEN_WIDTH > NARROW_SCREEN))) || (zoom_screen == 'C')) {
         time_exit = show_digital_clock(row, col);
         if((time_exit == 0) && (all_adevs == SINGLE_ADEVS)) info_under_azel = 0;

         // there is room to sneak in the sat info table below the az/el map
         if(info_under_azel) {  
            row = AZEL_BOTTOM/TEXT_HEIGHT;
            col = (AZEL_COL/TEXT_WIDTH) + 5; 
            if(ebolt) ;        
            else if(all_adevs) col -= 2;
         }
         else if(time_exit) { // no room on screen for sat info and digital clock
            if(star_sat_sec()) return;
            find_sat_changes();
            return;
         }
      }
   #endif  // DIGITAL_CLOCK

   if(star_sat_sec()) return;

   if(zoom_screen == 'I') {
      erase_screen();
      show_time_info();
      sun_moon_shown = 0;
      if((lat != 0.0) || (lon != 0.0)) {
         show_sun_moon(VAL_ROW-1,VAL_COL);
      }
      format_lla(lat,lon,alt, VAL_ROW,VAL_COL+22, 1);
      row = 10;
   }
   else if(zoom_screen) {
      find_sat_changes();
      return;
   }

   if(luxor) return;
   if(rcvr_type == ACRON_RCVR) {
      warn_info_needed();
   }
   else if(rcvr_type == NO_RCVR) {
      sun_moon_shown = 0;
      if((lat != 0.0) || (lon != 0.0)) {
         show_sun_moon(VAL_ROW-2,VAL_COL);
      }
      else if(rcvr_type != TICC_RCVR) {
         warn_info_needed();
      }
      if(rcvr_type == ACRON_RCVR) ;
      else return;
   }

   if(zoom_screen == 'I') ;
   else if(all_adevs) {  // if no room to show info,  just check for sat changes
      if(text_mode) {
         find_sat_changes();
         return;
      }

      if(first_key && (row >= PLOT_TEXT_ROW)) {
         find_sat_changes();
         return;
      }

      if((digital_clock_shown || ((row+max_sat_show+1) >= all_adev_row))) {
         if(info_under_azel && ((plot_lla == 0) || (all_adevs == SINGLE_ADEVS))) {  
            row = AZEL_BOTTOM/TEXT_HEIGHT;
            col = (AZEL_COL/TEXT_WIDTH) + 5; 
            if(ebolt) ;        
            else if(all_adevs) col -= 2;
         }
         else {
            find_sat_changes();
            return;
         }
      }
   }

   // draw the sat info table header
   if(max_sat_display == 0) return;

   msd = MOUSE_ROW - (SAT_ROW+1) - 1;
   if(plot_digital_clock) msd = clock_show_row - (SAT_ROW+1) - 3;
   if(sat_cols > 1) --msd;
   max_sat_show = msd;

   top_row = SAT_ROW+1;  //row;
   rows_avail = msd;

   if(zoom_screen == 'I') {  // see where to switch display columns
      col_switch = 0;
   }
   else {
      col_switch = rows_avail;
   }

   col2 = col+COL2;

//sprintf(plot_title, "sat cols:%d  rows:%d  max_sats:%d  msd:%d  tracked:%d  sw:%d  avail:%d top:%d mouse:%d", 
//sat_cols, sat_rows,max_sats,max_sat_display, track_count, col_switch,rows_avail,top_row,MOUSE_ROW);

   // build and show the sat info title string
   show_short_info = user_set_short;
   if(all_adevs) show_short_info = 1;
   if(sat_cols > 1) show_short_info = 2;
// else if(rcvr_type == FURUNO_RCVR) show_short_info = 0;
   if(zoom_screen == 'I') show_short_info = 0;

   if(show_info_header(row,col)) {
      goto no_sat_tables;
   }

   top_row = row;
   ++row;

   if(zoom_screen == 'I') {
      show_short_info = 0;
   }
   else if(info_header_col < 40) {   // we don't have much info to display
      show_short_info = 3;  // ... so allow max sig levels to show
   }

   // erase and draw the sat info display
   sort_sat_table();
   erase_sat_table(row,col, col_switch, col2, top_row, rows_avail);
   show_sat_table(row,col,  col_switch, col2, top_row, rows_avail);


   no_sat_tables:
   // all 0 az el values on tracked sats is what a STARLOC_TYPE does... BASTARDS!
   // more than 3 sats with all sats having az/el = 0,0

   find_sat_changes();

   print_using = 0;
   blank_underscore = 0;

#ifdef SIG_LEVELS
   sun_moon_shown = 0;
   if(zoom_screen == 'I') ;
   else if(zoom_screen == 'D') ;
   else if(zoom_screen == 'O') return;
   else if(zoom_screen == 'H') return;
   else if(show_short_info && (sat_cols <= 1)) {
      if(1 || digital_clock_shown) {
         show_sun_moon(DIS_ROW+0+eofs+4, DIS_COL);
      }
      else {
         show_max_signals();
      }
   }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1d50b2(%rip), %rax    # 0x228f1c
movl $0xd, (%rax)
leaq 0x1d50a1(%rip), %rax    # 0x228f18
movl (%rax), %r12d
leaq 0x106deb(%rip), %rax    # 0x15ac6c
andl $0x0, (%rax)
leaq 0x1ae94d(%rip), %r13    # 0x2027d8
movl (%r13), %eax
leaq 0x1d50c2(%rip), %rcx    # 0x228f58
testl %eax, %eax
je 0x53eb2
cmpl $0x0, (%rcx)
je 0x53eb2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x56e31
leaq 0x1ae9a7(%rip), %rcx    # 0x202860
andq $0x0, (%rcx)
leaq 0x1d2e7a(%rip), %rcx    # 0x226d3e
movb (%rcx), %sil
testb %sil, %sil
setne %dl
leaq 0x2a28d4(%rip), %rcx    # 0x2f67a8
movb (%rcx), %cl
cmpb $0x49, %cl
setne %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x53ef8
testl %eax, %eax
je 0x53f0a
leaq 0x1ae91b(%rip), %rax    # 0x20280c
movl (%rax), %ebx
addl $-0x8, %ebx
jmp 0x53f57
leaq 0x1d5041(%rip), %rdx    # 0x228f40
movl (%rdx), %ebx
testl %eax, %eax
je 0x53f30
addl $0xb, %ebx
jmp 0x53f57
leaq 0x1ae8ef(%rip), %rax    # 0x202800
cmpl $0x4fa, (%rax)          # imm = 0x4FA
pushq $0x13
popq %rax
pushq $0xc
popq %r14
cmovgel %eax, %r14d
leaq 0x1ae873(%rip), %rax    # 0x20279c
addl (%rax), %r14d
xorl %ebx, %ebx
jmp 0x53f5a
leaq 0x1ae8dd(%rip), %rax    # 0x202814
cmpl $0xf, (%rax)
setl %al
leaq 0x1ae8c0(%rip), %rdx    # 0x202804
cmpl $0x2c6, (%rdx)          # imm = 0x2C6
setge %dl
orb %al, %dl
movzbl %dl, %eax
addl %eax, %ebx
addl $0xa, %ebx
xorl %r14d, %r14d
leaq 0x2a3fe7(%rip), %rax    # 0x2f7f48
cmpb $0x0, (%rax)
je 0x53f92
leaq 0x2a3f73(%rip), %rax    # 0x2f7ee0
testb $0x1, (%rax)
jne 0x53f86
leaq 0x2a3927(%rip), %rax    # 0x2f78a0
cmpl $0x0, (%rax)
je 0x542a9
pushq $0xb
jmp 0x53f88
pushq $0xc
popq %rax
leaq 0x1b9644(%rip), %rdx    # 0x20d5d4
movl %eax, (%rdx)
leaq 0x1d500f(%rip), %rax    # 0x228fa8
movl (%rax), %eax
movl %eax, 0x3086f3(%rip)    # 0x35c694
cmpb $0x49, %cl
jne 0x540a6
leaq 0x1b1462(%rip), %rax    # 0x205413
cmpb $0x0, (%rax)
je 0x54047
leaq 0x2d13cf(%rip), %rdx    # 0x325390
leaq 0x2d13c4(%rip), %rax    # 0x32538c
movl (%rax), %eax
addl (%rdx), %eax
leaq 0x1ae8a9(%rip), %rdx    # 0x20287c
cmpl (%rdx), %eax
jl 0x54047
leaq 0x1ae836(%rip), %rdx    # 0x202814
movl (%rdx), %edi
leal (%rdi,%rax), %r8d
addl %edi, %eax
decl %eax
cltd
idivl %edi
leal (%rdi,%rdi,8), %eax
subl %edx, %eax
leal (%rax,%r8), %edx
decl %edx
leaq 0x1ae807(%rip), %rax    # 0x202804
movl (%rax), %eax
cmpl %eax, %edx
jge 0x54047
movb $0x1, %r15b
cmpl $0x2c7, %eax            # imm = 0x2C7
jl 0x5404a
testb %sil, %sil
setne %al
leaq 0x1b13ee(%rip), %rdx    # 0x205408
cmpb $0x0, (%rdx)
setne %dl
leaq 0x1b13be(%rip), %rdi    # 0x2053e5
cmpb $0x0, (%rdi)
setne %dil
andb %dl, %dil
leaq 0x1d4eec(%rip), %rdx    # 0x228f24
cmpl $0x0, (%rdx)
setne %r15b
andb %dil, %r15b
orb %al, %r15b
jmp 0x5404a
xorl %r15d, %r15d
leaq 0x2a406a(%rip), %rax    # 0x2f80bb
movb $0x0, (%rax)
cmpb $0x49, %cl
je 0x542d9
leaq 0x1b1381(%rip), %rax    # 0x2053e5
cmpb $0x0, (%rax)
je 0x54222
testb %sil, %sil
je 0x5422b
leaq 0x1b94c7(%rip), %rax    # 0x20d544
imull $0x31a, (%rax), %eax    # imm = 0x31A
pushq $0x64
popq %rsi
cltd
idivl %esi
cmpb $0x43, %cl
je 0x5422b
leaq 0x1ae767(%rip), %rcx    # 0x202800
cmpl %eax, (%rcx)
jle 0x542d9
jmp 0x5422b
leaq 0x2a303f(%rip), %rax    # 0x2f70ec
movb (%rax), %dl
testb %dl, %dl
setne %al
movl %ecx, %edi
orb %sil, %dil
sete %dil
andb %al, %dil
cmpb $0x1, %dil
jne 0x5412a
movl %ebx, %edi
movl %r14d, %esi
callq 0x9f77a
leaq 0x1ae7f9(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x400000, %rax         # imm = 0x400000
je 0x5419f
cmpq $0x1000000, %rax        # imm = 0x1000000
je 0x5419f
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x5419f
cmpq $0x8000000, %rax        # imm = 0x8000000
je 0x5419f
cmpq $0x10000000, %rax       # imm = 0x10000000
je 0x5419f
movabsq $0x1000000000, %rcx     # imm = 0x1000000000
cmpq %rcx, %rax
je 0x5419f
jmp 0x53e9f
leaq 0x1ae79f(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x400000, %rax         # imm = 0x400000
setne %dil
cmpb $0x43, %cl
setne %r8b
testb %dl, %dl
je 0x53faa
orb %dil, %r8b
je 0x53faa
cmpq $0x400000, %rax         # imm = 0x400000
je 0x54191
cmpq $0x1000000, %rax        # imm = 0x1000000
je 0x54191
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x54191
cmpq $0x8000000, %rax        # imm = 0x8000000
je 0x54191
movabsq $0x1000000000, %rdx     # imm = 0x1000000000
cmpq %rdx, %rax
je 0x54191
cmpq $0x10000000, %rax       # imm = 0x10000000
jne 0x543ac
testb %cl, %cl
jne 0x5419f
movl %ebx, %edi
movl %r14d, %esi
callq 0x9f77a
callq 0x56e31
leaq 0x1ae6b5(%rip), %rax    # 0x202860
andq $0x0, (%rax)
leaq 0x1b1273(%rip), %rax    # 0x205429
leaq 0x106aaf(%rip), %rcx    # 0x15ac6c
andl $0x0, (%rcx)
movb $0x0, (%rax)
leaq 0x2a25de(%rip), %rax    # 0x2f67a8
movzbl (%rax), %eax
addl $-0x44, %eax
cmpl $0xb, %eax
ja 0x541e3
movl $0x831, %ecx            # imm = 0x831
btl %eax, %ecx
jb 0x542e2
cmpl $0x0, 0x3084aa(%rip)    # 0x35c694
je 0x542e2
leaq 0x2a258d(%rip), %rax    # 0x2f6784
cmpl $0x1, (%rax)
jg 0x542e2
leaq 0x1d4d39(%rip), %rax    # 0x228f40
movl (%rax), %edi
addl $0xa, %edi
pushq $0x28
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9e891
cmpb $0x43, %cl
jne 0x542d9
movl %ebx, %edi
movl %r14d, %esi
callq 0xdb602
leaq 0x1d2b02(%rip), %rcx    # 0x226d3e
movb (%rcx), %cl
movl %eax, %edx
orb %cl, %dl
sete %dl
testb %r15b, %r15b
je 0x542c4
testb %dl, %dl
jne 0x542c4
leaq 0x2d113b(%rip), %rax    # 0x325390
movl (%rax), %eax
leaq 0x2d112e(%rip), %rdx    # 0x32538c
leaq 0x1ae5af(%rip), %rsi    # 0x202814
movl (%rsi), %esi
addl (%rdx), %eax
addl %esi, %eax
decl %eax
cltd
idivl %esi
movl %eax, %ebx
leaq 0x2d111b(%rip), %rax    # 0x325394
movl (%rax), %eax
leaq 0x1ae58e(%rip), %rsi    # 0x202810
cltd
idivl (%rsi)
leaq 0x1d4c98(%rip), %rdx    # 0x228f24
cmpl $0x0, (%rdx)
setne %dl
testb %cl, %cl
sete %cl
orb %dl, %cl
movzbl %cl, %ecx
leal (%rax,%rcx,2), %r14d
addl $0x3, %r14d
movb $0x1, %r15b
jmp 0x542d9
leaq 0x2a35e4(%rip), %rax    # 0x2f7894
xorl %edx, %edx
cmpb $0x0, (%rax)
sete %dl
leal 0xb(,%rdx,4), %eax
jmp 0x53f89
testb %al, %al
je 0x542d6
callq 0x56de6
testl %eax, %eax
jne 0x542e2
jmp 0x53e9f
xorl %r15d, %r15d
callq 0x56de6
testl %eax, %eax
je 0x542f1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a24b0(%rip), %rax    # 0x2f67a8
movzbl (%rax), %eax
testl %eax, %eax
je 0x5437b
cmpl $0x49, %eax
jne 0x53e9f
callq 0xe7d9
callq 0x54be8
leaq 0x106953(%rip), %rax    # 0x15ac6c
andl $0x0, (%rax)
leaq 0x2a2cad(%rip), %rbx    # 0x2f6fd0
movsd (%rbx), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
leaq 0x2a2ca2(%rip), %rax    # 0x2f6fd8
jne 0x54346
jp 0x54346
movsd (%rax), %xmm1
ucomisd %xmm2, %xmm1
jne 0x54346
jnp 0x54360
pushq $-0x1
popq %rdi
pushq $0xf
popq %rsi
callq 0x9e891
movsd (%rbx), %xmm0
leaq 0x2a2c7c(%rip), %rax    # 0x2f6fd8
movsd (%rax), %xmm1
leaq 0x2a2c79(%rip), %rax    # 0x2f6fe0
movsd (%rax), %xmm2
pushq $0x25
popq %rsi
pushq $0x1
popq %rdx
xorl %edi, %edi
callq 0xa2476
pushq $0xa
popq %rbx
leaq 0x1d4bbc(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x542e2
leaq 0x1ae53e(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x400, %rax            # imm = 0x400
je 0x543bb
cmpq $0x4000, %rax           # imm = 0x4000
jne 0x54415
callq 0xa0b3f
jmp 0x54415
movl %ebx, %edi
movl %r14d, %esi
callq 0x9f77a
jmp 0x53e9f
leaq 0x1068aa(%rip), %rax    # 0x15ac6c
andl $0x0, (%rax)
leaq 0x2a2c04(%rip), %rax    # 0x2f6fd0
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x543f6
jp 0x543f6
leaq 0x2a2bf5(%rip), %rax    # 0x2f6fd8
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jne 0x543f6
jp 0x543f6
callq 0xa0b3f
jmp 0x54401
pushq $-0x2
popq %rdi
pushq $0xf
popq %rsi
callq 0x9e891
leaq 0x1ae4c8(%rip), %rax    # 0x2028d0
cmpq $0x4000, (%rax)         # imm = 0x4000
jne 0x542e2
leaq 0x2a238c(%rip), %rax    # 0x2f67a8
movb (%rax), %cl
cmpb $0x49, %cl
setne %al
leaq 0x1d2913(%rip), %rdx    # 0x226d3e
movb (%rdx), %sil
testb %sil, %sil
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x544ea
cmpl $0x0, (%r13)
jne 0x53e9f
leaq 0x1d4b07(%rip), %rax    # 0x228f58
cmpl $0x0, (%rax)
je 0x54465
leaq 0x1ae433(%rip), %rax    # 0x202890
cmpl (%rax), %ebx
jge 0x53e9f
leaq 0x2a3c4f(%rip), %rax    # 0x2f80bb
cmpb $0x0, (%rax)
jne 0x54482
leal (%r12,%rbx), %eax
incl %eax
leaq 0x1ae336(%rip), %rdx    # 0x2027b4
cmpl (%rdx), %eax
jl 0x544ea
testb %r15b, %r15b
je 0x53e9f
leaq 0x2d0e1e(%rip), %rax    # 0x3252b0
cmpb $0x0, (%rax)
jne 0x53e9f
leaq 0x2d0eee(%rip), %rax    # 0x325390
movl (%rax), %eax
leaq 0x2d0ee1(%rip), %rdx    # 0x32538c
leaq 0x1ae362(%rip), %rdi    # 0x202814
movl (%rdi), %edi
addl (%rdx), %eax
addl %edi, %eax
decl %eax
cltd
idivl %edi
movl %eax, %ebx
leaq 0x2d0ece(%rip), %rax    # 0x325394
movl (%rax), %eax
leaq 0x1ae341(%rip), %rdi    # 0x202810
cltd
idivl (%rdi)
leaq 0x1d4a4b(%rip), %rdx    # 0x228f24
xorl %edi, %edi
cmpl $0x0, (%rdx)
setne %dil
leal (%rax,%rdi,2), %r14d
addl $0x3, %r14d
leaq 0x1d4ab3(%rip), %rax    # 0x228fa4
cmpl $0x0, (%rax)
je 0x542e2
leaq 0x1ae2a7(%rip), %rax    # 0x2027a8
movl (%rax), %eax
addl $-0xc, %eax
leaq 0x1b0ed8(%rip), %rdx    # 0x2053e5
leaq 0x1b0ed4(%rip), %rdi    # 0x2053e8
movl (%rdi), %r12d
addl $-0xe, %r12d
cmpb $0x0, (%rdx)
cmovel %eax, %r12d
leaq 0x2a225b(%rip), %rax    # 0x2f6784
movl (%rax), %edx
testb %sil, %sil
jne 0x5453b
leaq 0x1d4a71(%rip), %rax    # 0x228fa8
movl (%rax), %eax
jmp 0x5453e
pushq $0x1
popq %rax
xorl %esi, %esi
cmpl $0x2, %edx
setge %sil
pushq $0x2
popq %rdx
cmovll %eax, %edx
subl %esi, %r12d
xorl %r15d, %r15d
cmpb $0x49, %cl
movl %r12d, %r13d
cmovel %r15d, %r13d
cmovel %r15d, %edx
movl %edx, 0x30812d(%rip)    # 0x35c694
movl %ebx, %edi
movl %r14d, %esi
callq 0xa0e65
testl %eax, %eax
jne 0x5419f
leal 0x1e(%r14), %eax
movl %eax, -0x30(%rbp)
leal 0x1(%rbx), %eax
movl %eax, -0x2c(%rbp)
leaq 0x2a221b(%rip), %rax    # 0x2f67a8
cmpb $0x49, (%rax)
je 0x5459f
cmpl $0x27, 0x3080ff(%rip)   # 0x35c698
jg 0x545a6
pushq $0x3
popq %r15
movl %r15d, 0x3080ee(%rip)   # 0x35c694
callq 0xa0c4b
movl -0x2c(%rbp), %edi
movl %r14d, %esi
movl %r13d, %edx
movl -0x30(%rbp), %r15d
movl %r15d, %ecx
movl %ebx, %r8d
movl %r12d, %r9d
callq 0xa1536
movl -0x2c(%rbp), %edi
movl %r14d, %esi
movl %r13d, %edx
movl %r15d, %ecx
movl %ebx, %r8d
movl %r12d, %r9d
callq 0xa19ea
jmp 0x5419f