// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: show_sat_table(int, int, int, int, int, int)
void show_sat_table(int row,int col, int col_switch, int col2, int top_row, int rows_avail)
{
int prn;
int i, j;
float az;
float el;
char c, cc;
u08 az_dir;
u08 el_dir;

double dop;
double phase;
int state;
float sig;
float clock;
float acc;

int datum_crapum;
int crap_count;
char el_string[10];
char az_string[10];
char bias_string[20];
int len, max_len;
char fmt[256];
int n;

   // show the satellite info table

   datum_crapum = 0;
   crap_count = 0;
   max_len = 0;
   fmt[0] = 0;

   if(ms_row) {  // clear out the "More sats..." line
      vidstr(ms_row,ms_col, WHITE,   "                             ");
      ms_row = ms_col = 0;
   }

   j = 0;

   for(prn=1; prn<=MAX_PRN; prn++) {
      if(sat[prn].disabled) ; 
      else if(sat[prn].level_msg == 0x00) continue;
      if(0 && (zoom_screen == 'I')) ;
      else if(tracked_only) {
         if(sat[prn].tracking <= 0) continue;
         if(sat[prn].health_flag == 1) continue;
      }

      if     (sort_by == SORT_ELEV)    i = sat_sort[j].prn;
      else if(sort_by == SORT_SIGS)    i = sat_sort[j].prn;
      else if(sort_by == SORT_AZ)      i = sat_sort[j].prn;
      else if(sort_by == SORT_PRN)     i = sat_sort[j].prn;
      else if(sort_by == SORT_DOPPLER) i = sat_sort[j].prn;
      else if(sort_by == SORT_CARRIER) i = sat_sort[j].prn;
      else if(sort_by == SORT_RANGE)   i = sat_sort[j].prn;
      else if(sort_by == SORT_BIAS)    i = sat_sort[j].prn;
      else if(sort_by == SORT_STATE)   i = sat_sort[j].prn;
      else if(sort_by == SORT_URA)     i = sat_sort[j].prn;
      else                             i = prn;

      if(zoom_screen == 'I') {  // zoomed sat info
         ++j;
      }
      else if(sat_cols > 1) {   // two column sat info display
         ++j;
         if(j >= (rows_avail*2)) {
            vidstr(row,col, WHITE,   "More sats... click sat table!");
            ms_row = row;
            ms_col = col;
            break;
         }

         if(all_adevs && (j > 8)) break;  // only room for 8 sats here
      } 
      else {  // single column sat info display
         ++j;
         if(j >= SAT_SHOW_ROWS) {
            vidstr(row,col, WHITE,   "                             ");
         }
         if(j > SAT_SHOW_ROWS) { 
            vidstr(row,col, WHITE,   "More sats... click sat table.");
            ms_row = row;
            ms_col = col;
            break;
         }
         else if(row >= (MOUSE_ROW)) {
            vidstr(row,col, WHITE,   "More sats... click sat table ");
            ms_row = row;
            ms_col = col;
            break;
         }

         if(j > SAT_SHOW_ROWS) break;
         if(all_adevs && (j > 8)) break;  // only room for 8 sats here
         if((col < (TEXT_COLS/2)) && (row >= MOUSE_ROW)) break;
      }

      // filter out potentially bogus data
      az = sat[i].azimuth;
      if(az != 0.0) ++datum_crapum;
      if((az < 0.0) || (az > 360.0)) az = 0.0;

      az_dir = sat[i].az_dir;
      if(az_dir == 0) az_dir = ' ';
      else if(az == 0.0) az_dir = ' ';

      el = sat[i].elevation;
      if(el != 0.0) ++datum_crapum;
      if((el < 0.0) || (el > 90.0)) el = 0.0;

      el_dir = sat[i].el_dir;
      if(el_dir == 0) el_dir = ' ';
      else if(el == 0.0) el_dir = ' ';

      dop = sat[i].doppler;
      if(1 || (rcvr_type == ESIP_RCVR)) ;
      else if((dop <= -9999.0) || (dop >= 99999.0)) dop = 0.0;

      phase = sat[i].code_phase;
      state = sat[i].state;
      sig = sat[i].sig_level;
      if((rcvr_type == MOTO_RCVR) || (rcvr_type == SCPI_RCVR)) {
         if(sig > 255.0F) sig = 0.0F;
         if(sig <= (0.0F)) sig = 0.0F;
      }
      else {
         if(sig > 100.0F) sig = 0.0F;
         if(sig <= (-100.0F)) sig = 0.0F;
         if(sig < 0.0F) sig = 0.0F - sig;
      }

      clock = sat[i].sat_bias;

      acc = sat[i].sv_accuracy;

      out[0] = 0;


      if((az == 0.0) && (el == 0.0)) {
         strcpy(el_string, "N/A  ");
         strcpy(az_string, " N/A ");
      }
      else if(rcvr_type == RFTG_RCVR) {
         strcpy(el_string, "N/A  ");
         strcpy(az_string, " N/A ");
      }
      else {
         if(az == 0.0) strcpy(az_string, " N/A ");
         else          sprintf(az_string, "%5.1f", az);

         if(el == 0.0F)      strcpy(el_string,  " N/A");
         else if(el < 10.0F) sprintf(el_string, " %-3.1f", el);
         else                sprintf(el_string, "%-4.1f", el);
         if(el_string[3] == ' ') el_string[3] = el_dir;
         else                    el_string[4] = el_dir;
         el_string[5] = 0;
      }

      bias_string[0] = 0;
      if(have_range) {
         if(sat[i].range == 0.0)         sprintf(bias_string, "    N/A     ");
         else if(rcvr_type == ESIP_RCVR) sprintf(bias_string, "%12.3f", sat[i].range);
         else                            sprintf(bias_string, "%12.3f", sat[i].range);
      }
      else if(clock == 0.0) strcpy(bias_string,  "    N/A    ");
      else                  sprintf(bias_string, "%#11.4g", clock);

      
      // show the sat info columns
      c = gnss_letter(i);
      if(i == plot_prn) cc = '*';  // plotting this sat's az/el/sig
      else              cc = ' ';

      if(sig == 0.0) {
         if(i > 99)   sprintf(out,  "%03d%c%c  %s  %s   N/A",  i,cc,c, az_string, el_string);
         else         sprintf(out, " %02d%c%c  %s  %s   N/A",  i,cc,c, az_string, el_string);
      }
      else if(i > 99) sprintf(out,  "%03d%c%c  %s  %s %5.1f",  i,cc,c, az_string, el_string, sig);
      else            sprintf(out, " %02d%c%c  %s  %s %5.1f",  i,cc,c, az_string, el_string, sig);

      if(have_doppler && (sat_cols <= 1)) {
         if(dop == 0.0F) sprintf(fmt, "      N/A");
//       else if(rcvr_type == ESIP_RCVR) sprintf(fmt, " %8.0f", dop);
         else if((dop <= -999999.0) || (dop >= 9999999.0)) sprintf(fmt, " %8.0f", dop);
         else if((dop <= -99999.0) || (dop >= 999999.0))   sprintf(fmt, " %8.0f", dop);
         else if((dop <= -9999.0) || (dop >= 99999.0))     sprintf(fmt, " %8.1f", dop);
         else                                              sprintf(fmt, " %8.2f", dop);
         strcat(out, fmt);
      }

//    if((rcvr_type == FURUNO_RCVR) && (sat_cols < 2)) {
      if(show_short_info && ura_title && (sat_cols < 2)) {  // FURUNO_RCVR, ACU_GG, and ACU_360
         goto show_accu;  // we have room to show the URA data
      }
      else if(show_short_info == 0) {
         if(have_phase && (no_raw_table == 0)) {
            if     (phase == 0.0)           sprintf(fmt, "    N/A   ");
            else if(phase <= (-1000000.0F)) sprintf(fmt, " %9ld", (long)phase);
            else if(phase <= (-100000.0F))  sprintf(fmt, " %9.1f", phase);
            else if(phase >= (10000000.0F)) sprintf(fmt, " %9ld", (long)phase);
            else if(phase >= (1000000.0F))  sprintf(fmt, " %9.1f", phase);
            else                            sprintf(fmt, " %9.2f", phase);
            strcat(out, fmt);
         }
         else if(have_state) {
            format_sat_state(state);
         }

         if(no_raw_table) ;
         else if(have_bias || have_range) {
            sprintf(fmt, " %s", bias_string);
            strcat(out, fmt);
         }

         show_accu:
         if(have_accu) {
            if(acc <= 0.0)           sprintf(fmt, "  N/A ");
            else if(acc == 255.0)    sprintf(fmt, "  UNKN");
            else if(acc >= 10000.0F) sprintf(fmt, " LARGE");
            else if(acc >= 1000.0F)  sprintf(fmt, " %5.0f", acc);
            else if(acc >= 100.0F)   sprintf(fmt, " %5.1f", acc);
            else                     sprintf(fmt, " %5.2f", acc);
            strcat(out, fmt);
         }
      }
      else if(have_state && (have_doppler == 0)) {
         format_sat_state(state);
      }

      if(sat_cols > 1) {
         if((j == (col_switch+1)) || (row >= MOUSE_ROW)) {  // switch to next column
            if(col >= col2) ; // column already switched            
            else if(zoom_screen == 'I') ;
            else {
               col = col2;
               row = top_row+1;
            }
         }
      }

      if(sat[i].disabled) {               // user disabled satellite
         vidstr(row++, col, BLUE, out);
      }
      else if(sat[i].health_flag == 1) {  // unhealthy sat
         vidstr(row++, col, RED, out);
      }
      else if(sat[i].tracking <= 0) {     // sat is visible but not tracked
         vidstr(row++, col, YELLOW, out);
      }
      else {                              // sat is being tracked
         vidstr(row++, col, GREEN, out);
         ++crap_count;
      }
      last_sat_row = (row+1);

      len = strlen(out);
      if(len > max_len) max_len = len;

      if(plot_title[0]) n = 2;
      else              n = 1;
++n; // !!!!! should only happen on very short screens
      if(row >= (TEXT_ROWS-n)) {
         vidstr(row,col, WHITE, "More sats skipped...");
         break;
      }
   }

   if((rcvr_type == TSIP_RCVR) && (tsip_type == TBOLT_TYPE) && (res_t == 0) && detect_rcvr_type) { 
      if(datum_flag && have_sat_azel && (datum_crapum == 0) && (crap_count > 2)) { 
         tsip_type = STARLOC_TYPE;
         config_msg_ofs();
         have_el_mask = have_amu = 0;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %r9, -0x70(%rbp)
movl %r8d, %r12d
movl %ecx, -0x7c(%rbp)
movl %edx, -0x60(%rbp)
movl %esi, -0x2c(%rbp)
movl %edi, %r15d
movb $0x0, -0x1f0(%rbp)
leaq 0x25ad8f(%rip), %r14    # 0x30c78c
movl (%r14), %edi
testl %edi, %edi
je 0xb1a25
leaq 0x25ad85(%rip), %rbx    # 0x30c790
movl (%rbx), %esi
leaq 0x82044(%rip), %rcx     # 0x133a58
movl $0xf, %edx
callq 0xe7d0
xorl %eax, %eax
movl %eax, (%rbx)
movl %eax, (%r14)
movq -0x70(%rbp), %rax
addl %eax, %eax
movl %eax, -0x84(%rbp)
incl -0x60(%rbp)
incl %r12d
movl %r12d, -0x80(%rbp)
movl $0x1, %ebx
leaq 0x18d569(%rip), %rdx    # 0x23efb0
xorps %xmm2, %xmm2
xorl %r12d, %r12d
movl $0x0, -0x5c(%rbp)
xorl %r13d, %r13d
xorl %r14d, %r14d
cmpb $0x0, 0x349(%rdx,%r12)
jne 0xb1a74
cmpl $0x0, 0x364(%rdx,%r12)
je 0xb2262
leaq 0x18d499(%rip), %rax    # 0x23ef14
cmpl $0x0, (%rax)
je 0xb1a9e
cmpl $0x0, 0x560(%rdx,%r12)
jle 0xb2262
cmpb $0x1, 0x348(%rdx,%r12)
je 0xb2262
movl %r13d, -0x30(%rbp)
leaq 0x25acf3(%rip), %rax    # 0x30c79c
movl (%rax), %eax
addl $-0x41, %eax
movl %ebx, %r13d
cmpl $0x16, %eax
ja 0xb1ad5
movl $0x56901b, %ecx         # imm = 0x56901B
btl %eax, %ecx
movl %ebx, %r13d
jae 0xb1ad5
movslq %r14d, %rax
shlq $0x4, %rax
leaq 0x2c0bcf(%rip), %rcx    # 0x3726a0
movl (%rax,%rcx), %r13d
leaq 0x25accc(%rip), %rax    # 0x30c7a8
cmpb $0x49, (%rax)
jne 0xb1aed
incl %r14d
movl %r14d, -0x50(%rbp)
jmp 0xb1b8b
leal 0x1(%r14), %esi
leaq 0x25ac8c(%rip), %rax    # 0x30c784
cmpl $0x2, (%rax)
movl %esi, -0x50(%rbp)
jl 0xb1b0d
cmpl -0x84(%rbp), %esi
jl 0xb1b6f
jmp 0xb23df
leaq 0x18d490(%rip), %rax    # 0x23efa4
movl (%rax), %eax
movq -0x70(%rbp), %rcx
cmpl %ecx, %eax
cmovgel %ecx, %eax
cmpl %eax, %esi
jl 0xb1b44
movl %r15d, %edi
movl -0x2c(%rbp), %esi
movl $0xf, %edx
leaq 0x81f23(%rip), %rcx     # 0x133a58
callq 0xe7d0
xorps %xmm2, %xmm2
leaq 0x18d46c(%rip), %rdx    # 0x23efb0
leaq 0x18d459(%rip), %rax    # 0x23efa4
movl (%rax), %eax
movq -0x70(%rbp), %rcx
cmpl %ecx, %eax
cmovgel %ecx, %eax
cmpl %eax, %r14d
jge 0xb23e8
leaq 0x166c42(%rip), %rax    # 0x2187a8
cmpl (%rax), %r15d
jge 0xb23f1
leaq 0x18b1c8(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
setne %al
cmpl $0x8, %r14d
setge %cl
testb %cl, %al
jne 0xb241d
movq %r15, -0x78(%rbp)
movslq %r13d, %rax
imulq $0x348, %rax, %rax      # imm = 0x348
movss 0x20c(%rdx,%rax), %xmm1
movss 0x5b446(%rip), %xmm0    # 0x10cff0
cmpltss %xmm1, %xmm0
andnps %xmm1, %xmm0
movaps %xmm1, -0xf0(%rbp)
movaps %xmm1, %xmm3
cmpltss %xmm2, %xmm3
andnps %xmm0, %xmm3
movb 0x210(%rdx,%rax), %r15b
testb %r15b, %r15b
je 0xb1bd8
ucomiss %xmm2, %xmm3
jne 0xb1bdb
jp 0xb1bdb
movb $0x20, %r15b
leaq (%rdx,%rax), %r14
movss 0x20(%r14), %xmm0
leaq 0x166ce4(%rip), %rcx    # 0x2188d0
movq (%rcx), %rcx
cmpq $0x20, %rcx
je 0xb1bfb
cmpq $0x10, %rcx
jne 0xb1c15
movss 0x6cdc9(%rip), %xmm1    # 0x11e9cc
cmpltss %xmm0, %xmm1
andnps %xmm0, %xmm1
ucomiss %xmm1, %xmm2
jb 0xb1c46
xorps %xmm1, %xmm1
jmp 0xb1c46
movss 0x5b3bb(%rip), %xmm1    # 0x10cfd8
cmpltss %xmm0, %xmm1
andnps %xmm0, %xmm1
movaps %xmm1, %xmm0
cmpnless 0x6cd9f(%rip), %xmm0    # 0x11e9d0
andps %xmm1, %xmm0
movaps %xmm0, %xmm1
ucomiss %xmm0, %xmm2
jbe 0xb1c46
xorps %xmm0, %xmm0
subss %xmm1, %xmm0
movaps %xmm0, %xmm1
movaps %xmm1, -0xd0(%rbp)
movss 0x208(%rdx,%rax), %xmm0
movss 0x6cd1e(%rip), %xmm1    # 0x11e97c
cmpltss %xmm0, %xmm1
andnps %xmm0, %xmm1
movaps %xmm0, -0xe0(%rbp)
cmpltss %xmm2, %xmm0
andnps %xmm1, %xmm0
movsd 0x30(%r14), %xmm1
movsd %xmm1, -0xa8(%rbp)
movsd 0x28(%r14), %xmm1
movsd %xmm1, -0x58(%rbp)
ucomiss %xmm2, %xmm0
movl 0x18(%r14), %eax
movl %eax, -0x64(%rbp)
movss 0x1fc(%r14), %xmm1
movss %xmm1, -0x88(%rbp)
movss 0x238(%r14), %xmm1
leaq 0x28a567(%rip), %rax    # 0x33c220
movb $0x0, (%rax)
jne 0xb1cc7
jp 0xb1cc7
ucomiss %xmm2, %xmm3
jne 0xb1cc7
jnp 0xb1cd0
cmpq $0x400000, %rcx         # imm = 0x400000
jne 0xb1cef
movw $0x20, %ax
movw %ax, -0x38(%rbp)
movl $0x20412f4e, -0x3c(%rbp) # imm = 0x20412F4E
movw %ax, -0x48(%rbp)
movl $0x412f4e20, -0x4c(%rbp) # imm = 0x412F4E20
jmp 0xb1d9b
ucomiss %xmm2, %xmm0
jne 0xb1d05
jp 0xb1d05
movw $0x20, -0x48(%rbp)
movl $0x412f4e20, -0x4c(%rbp) # imm = 0x412F4E20
jmp 0xb1d36
cvtss2sd %xmm0, %xmm0
leaq -0x4c(%rbp), %rdi
leaq 0x7d1b2(%rip), %rsi     # 0x12eec6
movb $0x1, %al
movaps %xmm3, -0xc0(%rbp)
movss %xmm1, -0x40(%rbp)
callq 0x9060
movss -0x40(%rbp), %xmm1
movaps -0xc0(%rbp), %xmm3
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm3
jne 0xb1d4a
jp 0xb1d4a
movb $0x0, -0x38(%rbp)
movl $0x412f4e20, -0x3c(%rbp) # imm = 0x412F4E20
jmp 0xb1d86
movss %xmm1, -0x40(%rbp)
movss 0x5b289(%rip), %xmm0    # 0x10cfe0
ucomiss %xmm3, %xmm0
xorps %xmm0, %xmm0
cvtss2sd %xmm3, %xmm0
leaq -0x3c(%rbp), %rdi
jbe 0xb1d70
leaq 0x752f8(%rip), %rsi     # 0x127066
jmp 0xb1d77
leaq 0x752f7(%rip), %rsi     # 0x12706e
movb $0x1, %al
callq 0x9060
xorps %xmm2, %xmm2
movss -0x40(%rbp), %xmm1
xorl %eax, %eax
cmpb $0x20, -0x39(%rbp)
sete %al
negq %rax
movb %r15b, -0x38(%rbp,%rax)
movb $0x0, -0x37(%rbp)
movb $0x0, -0xa0(%rbp)
leaq 0x25b59f(%rip), %rax    # 0x30d348
cmpl $0x0, (%rax)
movq -0x78(%rbp), %r15
je 0xb1de8
movsd 0x38(%r14), %xmm0
ucomisd 0x57358(%rip), %xmm0    # 0x109118
jne 0xb1e0c
jp 0xb1e0c
movabsq $0x2020202020412f, %rax # imm = 0x2020202020412F
movq %rax, -0x9b(%rbp)
movabsq $0x20412f4e20202020, %rax # imm = 0x20412F4E20202020
movq %rax, -0xa0(%rbp)
jmp 0xb1e38
ucomiss %xmm2, %xmm1
jne 0xb1e1c
jp 0xb1e1c
movabsq $0x20412f4e20202020, %rax # imm = 0x20412F4E20202020
movq %rax, -0xa0(%rbp)
movl $0x202020, -0x98(%rbp)  # imm = 0x202020
jmp 0xb1e38
leaq -0xa0(%rbp), %rdi
leaq 0x75268(%rip), %rsi     # 0x127082
jmp 0xb1e31
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq -0xa0(%rbp), %rdi
leaq 0x75264(%rip), %rsi     # 0x127095
movb $0x1, %al
callq 0x9060
movl %r13d, %edi
callq 0xdbb88
leaq 0x25a94d(%rip), %rcx    # 0x30c794
cmpl (%rcx), %r13d
movl $0x20, %ecx
movl $0x2a, %edx
cmovel %edx, %ecx
xorpd %xmm0, %xmm0
movaps -0xd0(%rbp), %xmm1
ucomiss %xmm0, %xmm1
movsbl %al, %r8d
jne 0xb1e8b
jp 0xb1e8b
leaq -0x3c(%rbp), %rax
cmpl $0x64, %r13d
jl 0xb1eb0
movq %rax, (%rsp)
leaq 0x28a39e(%rip), %rdi    # 0x33c220
leaq 0x75214(%rip), %rsi     # 0x12709d
jmp 0xb1ec2
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq -0x3c(%rbp), %rax
cmpl $0x64, %r13d
jl 0xb1ed2
movq %rax, (%rsp)
leaq 0x28a379(%rip), %rdi    # 0x33c220
leaq 0x7521e(%rip), %rsi     # 0x1270cc
jmp 0xb1ee4
movq %rax, (%rsp)
leaq 0x28a365(%rip), %rdi    # 0x33c220
leaq 0x751f2(%rip), %rsi     # 0x1270b4
movl %r13d, %edx
leaq -0x4c(%rbp), %r9
xorl %eax, %eax
callq 0x9060
jmp 0xb1ef2
movq %rax, (%rsp)
leaq 0x28a343(%rip), %rdi    # 0x33c220
leaq 0x751ff(%rip), %rsi     # 0x1270e3
movl %r13d, %edx
leaq -0x4c(%rbp), %r9
movb $0x1, %al
callq 0x9060
leaq 0x25b447(%rip), %rax    # 0x30d340
cmpl $0x0, (%rax)
movl -0x30(%rbp), %r13d
movsd -0xa8(%rbp), %xmm1
je 0xb1fdf
leaq 0x25a86f(%rip), %rax    # 0x30c784
cmpl $0x1, (%rax)
jg 0xb1fdf
ucomisd 0x571f2(%rip), %xmm1    # 0x109118
jne 0xb1f4d
jp 0xb1f4d
movabsq $0x2f4e202020202020, %rax # imm = 0x2F4E202020202020
movq %rax, -0x1f0(%rbp)
movw $0x41, -0x1e8(%rbp)
leaq -0x1f0(%rbp), %r15
jmp 0xb1fcc
movsd 0x6c813(%rip), %xmm0    # 0x11e768
ucomisd %xmm1, %xmm0
jae 0xb1fb0
ucomisd 0x6c80d(%rip), %xmm1    # 0x11e770
jae 0xb1fb0
movsd 0x6c80b(%rip), %xmm0    # 0x11e778
ucomisd %xmm1, %xmm0
leaq -0x1f0(%rbp), %r15
jae 0xb1fb7
ucomisd 0x59966(%rip), %xmm1    # 0x10b8e8
jae 0xb1fb7
movsd 0x6c7f4(%rip), %xmm0    # 0x11e780
ucomisd %xmm1, %xmm0
jae 0xb22e9
ucomisd 0x57172(%rip), %xmm1    # 0x109110
jae 0xb22e9
movq %r15, %rdi
leaq 0x75165(%rip), %rsi     # 0x127113
jmp 0xb1fc1
leaq -0x1f0(%rbp), %r15
movq %r15, %rdi
leaq 0x75144(%rip), %rsi     # 0x127105
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x9060
leaq 0x28a24d(%rip), %rdi    # 0x33c220
movq %r15, %rsi
callq 0x96c0
movq -0x78(%rbp), %r15
movl 0x2c06af(%rip), %eax    # 0x372694
testl %eax, %eax
xorps %xmm0, %xmm0
je 0xb204a
cmpl $0x0, 0x2c069d(%rip)    # 0x372690
je 0xb204a
leaq 0x25a788(%rip), %rcx    # 0x30c784
cmpl $0x2, (%rcx)
jge 0xb204a
leaq 0x25b3b8(%rip), %rax    # 0x30d3c0
cmpl $0x0, (%rax)
je 0xb209b
movss -0x88(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jae 0xb2074
movaps %xmm1, %xmm0
ucomiss 0x6c9a4(%rip), %xmm1    # 0x11e9cc
jne 0xb21a1
jp 0xb21a1
movl $0x4e4b4e, -0x1ed(%rbp) # imm = 0x4E4B4E
movl $0x4e552020, -0x1f0(%rbp) # imm = 0x4E552020
jmp 0xb2088
testl %eax, %eax
je 0xb210d
leaq 0x25b2e3(%rip), %rax    # 0x30d33c
cmpl $0x0, (%rax)
je 0xb209b
leaq 0x25b2db(%rip), %rax    # 0x30d340
cmpl $0x0, (%rax)
jne 0xb209b
movl -0x64(%rbp), %edi
callq 0xb16c4
jmp 0xb209b
movl $0x20412f, -0x1ed(%rbp) # imm = 0x20412F
movl $0x2f4e2020, -0x1f0(%rbp) # imm = 0x2F4E2020
leaq 0x28a191(%rip), %rdi    # 0x33c220
leaq -0x1f0(%rbp), %rsi
callq 0x96c0
leaq 0x25a6e2(%rip), %rax    # 0x30c784
cmpl $0x2, (%rax)
jl 0xb20e0
movl -0x50(%rbp), %eax
cmpl -0x60(%rbp), %eax
je 0xb20bb
leaq 0x1666f2(%rip), %rax    # 0x2187a8
cmpl (%rax), %r15d
jl 0xb20e0
movl -0x2c(%rbp), %edx
movl -0x7c(%rbp), %esi
cmpl %esi, %edx
setge %al
leaq 0x25a6db(%rip), %rcx    # 0x30c7a8
cmpb $0x49, (%rcx)
sete %cl
orb %al, %cl
cmovel %esi, %edx
movl %edx, -0x2c(%rbp)
cmovel -0x80(%rbp), %r15d
cmpb $0x0, 0x1(%r14)
je 0xb20f7
movl %r15d, %edi
movl -0x2c(%rbp), %esi
movl $0x9, %edx
jmp 0xb21ed
cmpb $0x1, (%r14)
jne 0xb215e
movl %r15d, %edi
movl -0x2c(%rbp), %esi
movl $0xc, %edx
jmp 0xb21ed
leaq 0x25b230(%rip), %rax    # 0x30d344
cmpl $0x0, (%rax)
je 0xb2184
leaq 0x25a684(%rip), %rax    # 0x30c7a4
cmpl $0x0, (%rax)
jne 0xb2184
movsd -0x58(%rbp), %xmm0
ucomisd 0x56fe6(%rip), %xmm0    # 0x109118
jne 0xb2296
jp 0xb2296
movabsq $0x20412f4e20202020, %rax # imm = 0x20412F4E20202020
movq %rax, -0x1f0(%rbp)
movl $0x202020, -0x1e9(%rbp) # imm = 0x202020
jmp 0xb2331
cmpl $0x0, 0x218(%r14)
jle 0xb21e2
movl %r15d, %edi
movl -0x2c(%rbp), %esi
movl $0xa, %edx
leaq 0x28a0a6(%rip), %rcx    # 0x33c220
callq 0xe7d0
incl -0x5c(%rbp)
jmp 0xb21f9
leaq 0x25b1b1(%rip), %rax    # 0x30d33c
cmpl $0x0, (%rax)
je 0xb2347
movl -0x64(%rbp), %edi
callq 0xb16c4
jmp 0xb2344
ucomiss 0x6c82c(%rip), %xmm0    # 0x11e9d4
jae 0xb227d
movaps %xmm0, %xmm1
cvtss2sd %xmm0, %xmm0
ucomiss 0x6c7c4(%rip), %xmm1    # 0x11e980
leaq -0x1f0(%rbp), %rdi
jae 0xb22f8
ucomiss 0x5ae08(%rip), %xmm1    # 0x10cfd8
jae 0xb23a9
leaq 0x74f78(%rip), %rsi     # 0x127155
jmp 0xb23b0
movl %r15d, %edi
movl -0x2c(%rbp), %esi
movl $0xe, %edx
leaq 0x28a02c(%rip), %rcx    # 0x33c220
callq 0xe7d0
xorps %xmm2, %xmm2
movaps -0xe0(%rbp), %xmm0
cmpneqss %xmm2, %xmm0
movd %xmm0, %eax
subl %eax, %r13d
movaps -0xf0(%rbp), %xmm0
cmpneqss %xmm2, %xmm0
movd %xmm0, %eax
subl %eax, %r13d
leal 0x1(%r15), %edi
addl $0x2, %r15d
leaq 0x18cceb(%rip), %rax    # 0x23ef1c
movl %r15d, (%rax)
leaq 0x28c615(%rip), %rax    # 0x33e850
cmpb $0x1, (%rax)
leaq 0x1665c7(%rip), %rax    # 0x21880c
movl (%rax), %eax
adcl $-0x3, %eax
cmpl %eax, %edi
jge 0xb23c9
movl -0x50(%rbp), %eax
movl %eax, %r14d
movl %edi, %r15d
leaq 0x18cd4e(%rip), %rdx    # 0x23efb0
addq $0x348, %r12            # imm = 0x348
incl %ebx
cmpq $0xccdf8, %r12          # imm = 0xCCDF8
jne 0xb1a5a
jmp 0xb2421
movl $0x454752, -0x1ed(%rbp) # imm = 0x454752
movl $0x52414c20, -0x1f0(%rbp) # imm = 0x52414C20
jmp 0xb2088
movsd 0x6c4ea(%rip), %xmm0    # 0x11e788
ucomisd -0x58(%rbp), %xmm0
movsd -0x58(%rbp), %xmm0
jae 0xb2304
movsd 0x6c4de(%rip), %xmm0    # 0x11e790
ucomisd -0x58(%rbp), %xmm0
movsd -0x58(%rbp), %xmm0
leaq -0x1f0(%rbp), %rax
jae 0xb2320
ucomisd 0x595fb(%rip), %xmm0    # 0x10b8c8
jae 0xb23bc
ucomisd 0x56d75(%rip), %xmm0    # 0x109050
jae 0xb2320
movq %rax, %rdi
leaq 0x74e4b(%rip), %rsi     # 0x127132
jmp 0xb232a
movq %r15, %rdi
leaq 0x74e19(%rip), %rsi     # 0x12710c
jmp 0xb1fc1
leaq 0x74e4f(%rip), %rsi     # 0x12714e
jmp 0xb23b0
cvttsd2si %xmm0, %rdx
leaq -0x1f0(%rbp), %rdi
leaq 0x74e0e(%rip), %rsi     # 0x127125
xorl %eax, %eax
callq 0x9060
jmp 0xb2331
movq %rax, %rdi
leaq 0x74e01(%rip), %rsi     # 0x12712b
movb $0x1, %al
callq 0x9060
leaq -0x1f0(%rbp), %rsi
leaq 0x289ee1(%rip), %rdi    # 0x33c220
callq 0x96c0
xorps %xmm0, %xmm0
leaq 0x25a456(%rip), %rax    # 0x30c7a4
cmpl $0x0, (%rax)
jne 0xb2001
leaq 0x25afea(%rip), %rax    # 0x30d348
movl (%rax), %eax
leaq 0x25b055(%rip), %rcx    # 0x30d3bc
orl (%rcx), %eax
je 0xb2001
leaq -0x1f0(%rbp), %r15
movq %r15, %rdi
leaq 0x7bbc0(%rip), %rsi     # 0x12df40
leaq -0xa0(%rbp), %rdx
xorl %eax, %eax
callq 0x9060
leaq 0x289e8b(%rip), %rdi    # 0x33c220
movq %r15, %rsi
movq -0x78(%rbp), %r15
callq 0x96c0
xorps %xmm0, %xmm0
jmp 0xb2001
leaq 0x7cb15(%rip), %rsi     # 0x12eec5
movb $0x1, %al
callq 0x9060
jmp 0xb2088
cvttsd2si %xmm0, %rdx
movq %rax, %rdi
jmp 0xb2310
leaq 0x74d8c(%rip), %rcx     # 0x12715c
movl -0x2c(%rbp), %esi
movl $0xf, %edx
callq 0xe7d0
jmp 0xb2421
leaq 0x74c20(%rip), %rcx     # 0x127006
jmp 0xb23f8
leaq 0x74c35(%rip), %rcx     # 0x127024
jmp 0xb23f8
leaq 0x74c4a(%rip), %rcx     # 0x127042
movl %r15d, %edi
movl -0x2c(%rbp), %ebx
movl %ebx, %esi
movl $0xf, %edx
callq 0xe7d0
leaq 0x25a37b(%rip), %rax    # 0x30c78c
movl %r15d, (%rax)
leaq 0x25a375(%rip), %rax    # 0x30c790
movl %ebx, (%rax)
movl -0x30(%rbp), %r13d
leaq 0x1664a8(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0xb24a7
leaq 0x168b9f(%rip), %rax    # 0x21afd4
cmpl $0x0, (%rax)
jne 0xb24a7
leaq 0x1664c3(%rip), %rcx    # 0x218904
cmpb $0x0, (%rcx)
jne 0xb24a7
leaq 0x168b7b(%rip), %rcx    # 0x21afc8
cmpl $0x0, (%rcx)
je 0xb24a7
leaq 0x168b7f(%rip), %rcx    # 0x21afd8
cmpl $0x0, (%rcx)
setne %cl
leaq 0x25ae2e(%rip), %rdx    # 0x30d294
cmpl $0x0, (%rdx)
setne %dl
andb %cl, %dl
testl %r13d, %r13d
sete %cl
cmpl $0x3, -0x5c(%rbp)
setge %sil
andb %cl, %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xb24a7
movl $0x53, (%rax)
callq 0x47650
leaq 0x25af5e(%rip), %rax    # 0x30d3f8
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x25af57(%rip), %rax    # 0x30d3fc
movl %ecx, (%rax)
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq