// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: kbd_help()
void kbd_help()
{
char *s, *ems_info;
COORD help_row, help_col;
COORD row, col;
COORD help_row_1;

   // this routine displays help info about the keyboard commands
   // until a key is pressed
   //
   // NEW_RCVR

   request_version(); // so the "Press space for help" message gets updated quickly
   plot_version = 1;  // once asked for help,  switch help message to version
                      // display since the user should now know that help exists

   if(zoom_screen == 'K') {
      change_zoom_config(-100);
      cancel_zoom(10);      //zkzk
   }

   if(1 && osc_params) {   // if enabled, cancel the osc param display mode
      osc_params = 0;
      text_mode = 0;
      no_x_margin = no_y_margin = 0;
      erase_screen();
      redraw_screen();
//    do_kbd(' ');
      sure_exit();
      return;
   }

   osc_params = 0;
   erase_screen();
   redraw_screen();

   // !!! kludge: for undersized screens
   if(screen_type == 't') {   // text mode
      no_x_margin = no_y_margin = 1;
   }
   else if(ALWAYS_TEXT_HELP || (SCREEN_HEIGHT <= SHORT_SCREEN)) {  // small graphics screens
      text_mode = 2;  // say we are in text mode while help is displayed
      no_x_margin = no_y_margin = 1;
   }

   if(text_mode) {   // full screen help mode
      if(SCREEN_WIDTH >= NARROW_SCREEN) {  // there is room for a margin
         if(SCREEN_HEIGHT < TINY_HEIGHT) help_row = 0;
         else                            help_row = 1;
         help_col = 3;
      }
      else {         // no margin space available
         help_row = 0;
         help_col = HELP_COL;
      }
      erase_screen();
   }
   else {            // help is in the plot area
      help_row = HELP_ROW;
      help_col = HELP_COL+3;
   }

   row = help_row;
   col = help_col + 0;

   s = "Control ";
   ems_info = "";
   if(TEXT_COLS <= 100) {
      if(luxor) sprintf(out, "Luxor Power/LED Analyzer %sProgram", s);
      else      sprintf(out, "Lady Heather's Disciplined Oscillator %sProgram", s);
      vidstr(row,col,  HELP_COLOR, out);
      ++row;

      sprintf(out, "Rev %s - %s %s%s", VERSION, date_string, __TIME__, ems_info);
      vidstr(row,col,  HELP_COLOR, out);
      ++row;

      vidstr(row,col,  HELP_COLOR, "Keyboard command help.  Press any key to continue...");
      ++row;
      ++row;
   }
   else {
      if(luxor) sprintf(out, "Luxor Power/LED Analyzer %sProgram.  Rev %s - %s %s%s", s, VERSION, date_string, __TIME__, ems_info);
      else      sprintf(out, "Lady Heather's Disciplined Oscillator %sProgram.  Rev %s - %s %s%s", s, VERSION, date_string, __TIME__, ems_info);
      vidstr(row,col,  HELP_COLOR, out);
      ++row;

      vidstr(row,col,  HELP_COLOR, "Keyboard command help.  Press any key to continue...");
      ++row;
      ++row;
   }
   help_row = row;

   if(script_file) {  // error was in a script file,  abandon script
      sprintf(out, "Unknown command seen in script file: %s line %d, col %d: %c",
         script_name, script_line, script_col, script_err);
      vidstr(row, col,  HELP_COLOR, out);
      close_script(1);
      goto help_exit;
   }

   #ifdef ADEV_STUFF
      if(luxor == 0) {
         s = "a - select Adev type to display";
         vidstr(row++, col,  HELP_COLOR, s);
      }
   #endif

   if(luxor) {
      s = "b - Battery capacity/resistance";
      vidstr(row++, col,  HELP_COLOR, s);
   }
   else {
      s = "b - experimental OSC control PID";
      vidstr(row++, col,  HELP_COLOR, s);
   }

   s = "c - Clear collected data";
   vidstr(row++, col,  HELP_COLOR, s);

   if(luxor == 0) {
      if(rcvr_type == CS_RCVR)       s = "d - set Standby mode / DAC voltage";
      else if(rcvr_type == PRS_RCVR) s = "d - set discipline mode / FC value";
      else                           s = "d - set osc Disciplining / DAC voltage";
      vidstr(row++, col,  HELP_COLOR, s);

      s = "e - save current config to EEPROM";
      vidstr(row++, col,  HELP_COLOR, s);
   }

   if(luxor)                        s = "f - change display Filter";
   else if(rcvr_type == CS_RCVR)    s = "f - change display Filter";
   else if(rcvr_type == TICC_RCVR)  s = "f - change display Filter";
   else                             s = "f - toggle Filter or signal/elev masks";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "g - modify Graph or screen display";
   vidstr(row++, col,  HELP_COLOR, s);

   if(luxor == 0) {
      s = "h - toggle manual Holdover mode";
      vidstr(row++, col,  HELP_COLOR, s);
   }

   s = "i - set the plot queue update Interval";
   vidstr(row++, col,  HELP_COLOR, s);

   if(luxor == 0) {
      if     (rcvr_type == CS_RCVR)     s = "j - sync PPS outputs";
      else if(timing_mode == TMODE_UTC) s = "j - Jam sync PPS to UTC time";
      else if(timing_mode == TMODE_GPS) s = "j - Jam sync PPS to GPS time";
      else if(timing_mode == TMODE_SU)  s = "j - Jam sync PPS to UTC(SU) time";
      else                              s = "j - Jam sync PPS to time";
      vidstr(row++, col,  HELP_COLOR, s);

      s = "k - temperature control PID";
      vidstr(row++, col,  HELP_COLOR, s);
   }

   s = "l - data Logging";
   vidstr(row++, col,  HELP_COLOR, s);

   if(luxor) {
      s = "m - change LED driver Mode";
      vidstr(row++, col,  HELP_COLOR, s);

#ifdef WINDOWS
      s = "n - use NOTEPAD to edit a file";
      vidstr(row++, col,  HELP_COLOR, s);
#else  // __linux__  __MACH__   __FreeBSD__
      s = "n - use NANO to edit a file";
      vidstr(row++, col,  HELP_COLOR, s);
#endif

      s = "o - Set misc options";
      vidstr(row++, col,  HELP_COLOR, s);

      s = "p - set Protection values";
      vidstr(row++, col,  HELP_COLOR, s);
   }
   else {
      if(1 || jd_obs) {
         s = "m - RINEX file commands";
         vidstr(row++, col,  HELP_COLOR, s);
      }
#ifdef WINDOWS
      s = "n - use NOTEPAD to edit a file";
      vidstr(row++, col,  HELP_COLOR, s);
#else  // __linux__  __MACH__   __FreeBSD__
      s = "n - use NANO to edit a file";
      vidstr(row++, col,  HELP_COLOR, s);
#endif

      s = "o - Set misc options";
      vidstr(row++, col,  HELP_COLOR, s);

      if     (rcvr_type == CS_RCVR)   s = "p - Configuration control";
      else if(rcvr_type == TICC_RCVR) s = "p - Configuration control";
      else                            s = "p - PPS and TRAIM control";
      vidstr(row++, col,  HELP_COLOR, s);
   }

   s = "r - Read in a file";
   vidstr(row++, col,  HELP_COLOR, s);


   help_row_1 = row;      // switch to next column
   row = help_row;
   col = help_col + 40;

   if(luxor)                       s = "s - enter position (lat lon alt)";
   else if(rcvr_type == CS_RCVR)   s = "s - enter position (lat lon alt)";
   else if(rcvr_type == TICC_RCVR) s = "s - enter position (lat lon alt)";
   else      s = "s - Survey/sats/signals/positioning";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "t - Time and temperature control";
   vidstr(row++, col,  HELP_COLOR, s);

   if(luxor) {
      if(pause_data) s = "u - resume plot queue Updates";
      else           s = "u - pause plot queue Updates";
      vidstr(row++, col,  HELP_COLOR, s);

      s = "v - set View time span of plot window";
      vidstr(row++, col,  HELP_COLOR, s);
   }
   else {
      if(pause_data) s = "u - resume plot/adev queue Updates";
      else           s = "u - pause plot/adev queue Updates";
      vidstr(row++, col,  HELP_COLOR, s);
   }

   if(luxor) {
      s = "w - Write data, screen, delete file";
      vidstr(row++, col,  HELP_COLOR, s);
   }
   else {
      s = "v - set View time span of plot window";
      vidstr(row++, col,  HELP_COLOR, s);

      s = "w - Write data, screen, delete file";
      vidstr(row++, col,  HELP_COLOR, s);
   }

   sprintf(out, "x - view graphs at 1 hr/div");
   vidstr(row++, col,  HELP_COLOR, out);

   if(day_size) sprintf(out, "y - view graphs at %d hr/screen", day_size);
   else         sprintf(out, "y - view graphs at %d hr/screen", 24);
   vidstr(row++, col,  HELP_COLOR, out);

   if(luxor) s = "z - Zoom fullscreen clocks";
   else      s = "z - Zoom fullscreen clocks and maps";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "-+  lower/raise last selected graph";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "{}  shrink/grow last selected graph";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "! - device resets and diagnostics";
   vidstr(row++, col,  HELP_COLOR, s);

   if(luxor) s = "& - change calibration parameters";
   else      s = "& - oscillator discipling parameters";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "/ - startup (command line) only options";
   vidstr(row++, col,  HELP_COLOR, s);

   #ifdef GIF_FILES
      sprintf(out, "\\ - dump screen to %s.gif", unit_file_name);
   #else
      sprintf(out, "\\ - dump screen to %s.bmp", unit_file_name);
   #endif
   vidstr(row++, col,  HELP_COLOR, out);

   s = "$ - change screen resolution";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "` - RPN calculator";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "? - display command line help";
   vidstr(row++, col,  HELP_COLOR, s);



   if(text_mode) {  // full screen help
      col = help_col;
      if(SCREEN_HEIGHT < TINY_HEIGHT) row = help_row_1;
      else                            row = help_row_1 + 1;
      help_row_1 = row;
   }
   else {           // help in the plot area
      row = help_row;
      col = help_col + 80;
   }

   s = "HOME - scroll plot to beginning of data";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "END - scroll plot to end of data";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "LEFT - scroll plot forward one division";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "RIGHT - scroll plot back one division";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "PG UP - scroll plot forward one screen";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "PG DN - scroll plot back one screen";
   vidstr(row++, col,  HELP_COLOR, s);

   if(text_mode && (SCREEN_HEIGHT < SHORT_SCREEN)) {
      row = help_row_1;
      col = help_col + 40;
   }

   s = "UP - scroll plot forward one hour";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "DOWN - scroll plot back one hour";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "<> - scroll plot one day";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "[] - scroll plot one pixel";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "DEL - return plotting back to normal";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "% - scroll to next error event";
   vidstr(row++, col,  HELP_COLOR, s);

   s = "0..9,=,+,- set or move to plot markers";
   vidstr(row++, col,  HELP_COLOR, s);

   if(SCREEN_HEIGHT < TINY_HEIGHT) ;
   else ++row;
   col = help_col;
   s = "LEFT CLICK in plot area - zoom and center plot at mouse pointer";
   vidstr(row++, col, HELP_COLOR, s);
   s = "RIGHT BUTTON (at center of plot area) - scroll plot left or right";
   vidstr(row++, col, HELP_COLOR, s);
   s = "LEFT CLICK lat/lon info, sat info, plot header, adev table, maps, clock, watch";
   vidstr(row++, col, HELP_COLOR, s);
   s = "           to zoom them to full screen.  Click again to restore screen";
   vidstr(row++, col, HELP_COLOR, s);

   if(SCREEN_HEIGHT < TINY_HEIGHT) ;
   else ++row;
   sprintf(out, "Config/log directory: %s", heather_path);
   vidstr(row++, col, GREEN, out);

   help_exit:
   refresh_page();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
callq 0x5d7c2
leaq 0x1e0783(%rip), %rax    # 0x2053e1
movb $0x1, (%rax)
leaq 0x2d1b40(%rip), %rax    # 0x2f67a8
cmpb $0x4b, (%rax)
jne 0x24c7a
pushq $-0x64
popq %rdi
callq 0x257d9
callq 0x258aa
leaq 0x2d246b(%rip), %rax    # 0x2f70ec
cmpb $0x0, (%rax)
je 0x24cc3
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x1ddb47(%rip), %rax    # 0x2027d8
andl $0x0, (%rax)
leaq 0x1ddbc0(%rip), %rax    # 0x20285b
movb %cl, (%rax)
leaq 0x1ddbb6(%rip), %rax    # 0x20285a
movb %cl, (%rax)
callq 0xe7d9
callq 0xf426
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x258cd
callq 0xe7d9
callq 0xf426
leaq 0x1ddb5d(%rip), %rax    # 0x202831
cmpb $0x74, (%rax)
jne 0x24d0b
leaq 0x1ddaf8(%rip), %rax    # 0x2027d8
leaq 0x1ddb74(%rip), %rcx    # 0x20285b
movb $0x1, %dl
movb %dl, (%rcx)
leaq 0x1ddb68(%rip), %rcx    # 0x20285a
movb %dl, (%rcx)
cmpl $0x0, (%rax)
jne 0x24d2c
leaq 0x1ddb90(%rip), %rax    # 0x202890
movl (%rax), %r15d
incl %r15d
pushq $0x3
popq %rbx
jmp 0x24d6d
leaq 0x1ddac6(%rip), %rax    # 0x2027d8
movl $0x2, (%rax)
leaq 0x1ddb3c(%rip), %rax    # 0x20285b
movb $0x1, %cl
movb %cl, (%rax)
leaq 0x1ddb30(%rip), %rax    # 0x20285a
movb %cl, (%rax)
leaq 0x1ddacd(%rip), %rcx    # 0x202800
leaq 0x1e880a(%rip), %rax    # 0x20d544
imull $0x31a, (%rax), %eax    # imm = 0x31A
movl (%rcx), %ecx
pushq $0x64
popq %rsi
cltd
idivl %esi
xorl %edx, %edx
cmpl %eax, %ecx
setge %dl
leaq 0x1ddaae(%rip), %rax    # 0x202804
cmpl $0x1e0, (%rax)          # imm = 0x1E0
setge %al
andb %dl, %al
movzbl %al, %r15d
leal (%rdx,%rdx,2), %ebx
callq 0xe7d9
leaq 0x1dda94(%rip), %rax    # 0x202808
cmpl $0x64, (%rax)
leaq 0x2041c0(%rip), %rax    # 0x228f3e
movb (%rax), %al
jg 0x24dfc
testb %al, %al
leaq 0xd2e12(%rip), %rax     # 0xf7b9d
leaq 0xd2de8(%rip), %rsi     # 0xf7b7a
cmoveq %rax, %rsi
leaq 0x301483(%rip), %r14    # 0x326220
leaq 0xd2dcd(%rip), %rdx     # 0xf7b71
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
pushq $0xf
popq %rdx
movl %r15d, %edi
movl %ebx, %esi
movq %r14, %rcx
callq 0xe2d2
leal 0x1(%r15), %r13d
leaq 0xd2e73(%rip), %rsi     # 0xf7c3c
leaq 0xd2dfd(%rip), %rdx     # 0xf7bcd
leaq 0x1e8779(%rip), %rcx    # 0x20d550
leaq 0xd2dfb(%rip), %r8      # 0xf7bd9
leaq 0xf6bd1(%rip), %r9      # 0x11b9b6
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movl %r13d, %edi
pushq $0x4
popq %r14
pushq $0x2
popq %r12
jmp 0x24e50
pushq $0x3
popq %r14
testb %al, %al
leaq 0xd2e44(%rip), %rax     # 0xf7c4d
leaq 0xd2e07(%rip), %rsi     # 0xf7c17
cmoveq %rax, %rsi
leaq 0xf6b9b(%rip), %rax     # 0x11b9b6
movq %rax, (%rsp)
leaq 0x3013fa(%rip), %rdi    # 0x326220
leaq 0xd2d44(%rip), %rdx     # 0xf7b71
leaq 0xd2d99(%rip), %rcx     # 0xf7bcd
leaq 0x1e8715(%rip), %r8     # 0x20d550
leaq 0xd2d97(%rip), %r9      # 0xf7bd9
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %r12
movl %r15d, %edi
leaq 0x3013c9(%rip), %rcx    # 0x326220
pushq $0xf
popq %r13
movl %ebx, %esi
movl %r13d, %edx
callq 0xe2d2
addl %r15d, %r12d
leaq 0xd2d73(%rip), %rcx     # 0xf7be2
movl %r12d, %edi
movl %ebx, %esi
movl %r13d, %edx
callq 0xe2d2
addl %r15d, %r14d
leaq 0x204032(%rip), %rax    # 0x228eb8
cmpq $0x0, (%rax)
movq %r14, %r12
je 0x24eec
leaq 0x20402a(%rip), %rax    # 0x228ec0
movl (%rax), %ecx
leaq 0x204025(%rip), %rax    # 0x228ec4
movl (%rax), %r8d
leaq 0x20401f(%rip), %rax    # 0x228ec8
movl (%rax), %r9d
movq %rbx, %r14
leaq 0x30136a(%rip), %rbx    # 0x326220
leaq 0xd2dd3(%rip), %rsi     # 0xf7c90
leaq 0x203f6c(%rip), %rdx    # 0x228e30
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
pushq $0xf
popq %rdx
movl %r12d, %edi
movl %r14d, %esi
movq %rbx, %rcx
callq 0xe2d2
pushq $0x1
popq %rdi
callq 0x1bec0
jmp 0x2577c
leaq 0x20404b(%rip), %r13    # 0x228f3e
cmpb $0x0, (%r13)
movl %r12d, %r15d
movq %r12, -0x58(%rbp)
jne 0x24f25
leal 0x1(%r12), %r15d
leaq 0xd2dbf(%rip), %rcx     # 0xf7ccc
pushq $0xf
popq %rdx
movl %r12d, %edi
movl %ebx, %esi
callq 0xe2d2
cmpb $0x0, (%r13)
je 0x24fdf
leaq 0xd2dc0(%rip), %rcx     # 0xf7cec
pushq $0xf
popq %rdx
movl %r15d, %edi
movl %ebx, %esi
callq 0xe2d2
leal 0x1(%r15), %edi
leal 0x2(%r15), %r12d
leaq 0xd2de5(%rip), %rcx     # 0xf7d2d
pushq $0xf
popq %rdx
movl %ebx, %esi
callq 0xe2d2
leaq 0xd2e7c(%rip), %rcx     # 0xf7dd5
cmpb $0x0, (%r13)
movq %rbx, -0x38(%rbp)
je 0x24f6c
movl %r12d, %r15d
jmp 0x25014
movq %rbx, %r14
leaq 0x1dd95a(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1000000, %rax        # imm = 0x1000000
leaq 0xd2de3(%rip), %rcx     # 0xf7d69
leaq 0xd2dff(%rip), %rdx     # 0xf7d8c
cmoveq %rcx, %rdx
cmpq $0x20000, %rax          # imm = 0x20000
leaq 0xd2da8(%rip), %rcx     # 0xf7d46
cmovneq %rdx, %rcx
leal 0x3(%r15), %ebx
pushq $0xf
popq %rdx
movl %r12d, %edi
movl %r14d, %esi
movl %edx, %r12d
callq 0xe2d2
addl $0x4, %r15d
leaq 0xd2df1(%rip), %rcx     # 0xf7db3
movl %ebx, %edi
movl %r14d, %esi
movl %r12d, %edx
callq 0xe2d2
cmpb $0x0, (%r13)
je 0x24feb
leaq 0xd2df8(%rip), %rcx     # 0xf7dd5
jmp 0x25014
leaq 0xd2d26(%rip), %rcx     # 0xf7d0c
jmp 0x24f2c
movq $-0x10000, %rax         # imm = 0xFFFF0000
leaq 0x1dd8d7(%rip), %rcx    # 0x2028d0
addq (%rcx), %rax
testq $-0x10001, %rax         # imm = 0xFFFEFFFF
leaq 0xd2dcc(%rip), %rax     # 0xf7dd5
leaq 0xd2ddf(%rip), %rcx     # 0xf7def
cmoveq %rax, %rcx
leal 0x1(%r15), %r13d
pushq $0xf
popq %rbx
movl %r15d, %edi
movq -0x38(%rbp), %r14
movl %r14d, %esi
movl %ebx, %edx
callq 0xe2d2
leal 0x2(%r15), %r12d
leaq 0xd2ddf(%rip), %rcx     # 0xf7e16
movl %r13d, %edi
movl %r14d, %esi
movl %ebx, %edx
callq 0xe2d2
leaq 0x203ef3(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x2506c
addl $0x3, %r15d
leaq 0xd2dde(%rip), %rcx     # 0xf7e39
pushq $0xf
popq %rdx
movl %r12d, %edi
movl %r14d, %esi
callq 0xe2d2
movl %r15d, %r12d
leal 0x1(%r12), %r13d
leaq 0xd2de1(%rip), %rcx     # 0xf7e59
pushq $0xf
popq %rdx
movl %r12d, %edi
movl %r14d, %esi
callq 0xe2d2
leaq 0x203eb1(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x250e3
leaq 0x1dd837(%rip), %rax    # 0x2028d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0x2578f
leaq 0xd2dd3(%rip), %rcx     # 0xf7e80
leal 0x2(%r12), %ebx
pushq $0xf
popq %r15
movl %r13d, %edi
movq -0x38(%rbp), %r14
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
addl $0x3, %r12d
leaq 0xd2e36(%rip), %rcx     # 0xf7f09
movl %ebx, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
movl %r12d, %r13d
movq %r13, %r15
incl %r13d
leaq 0xd2e35(%rip), %rcx     # 0xf7f25
pushq $0xf
popq %rdx
movl %r15d, %edi
movl %r14d, %esi
callq 0xe2d2
leal 0x2(%r15), %r12d
leal 0x3(%r15), %ebx
movq %r15, -0x48(%rbp)
leal 0x4(%r15), %eax
movl %eax, -0x2c(%rbp)
leaq 0x203e26(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x25168
leaq 0xd2e12(%rip), %rcx     # 0xf7f36
pushq $0xf
popq %r15
movl %r13d, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
leaq 0xd2e14(%rip), %rcx     # 0xf7f51
movl %r12d, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
leaq 0xd2e1b(%rip), %rcx     # 0xf7f6d
movl %ebx, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
leaq 0xd2e1c(%rip), %rcx     # 0xf7f82
jmp 0x251d4
leaq 0xd2e2d(%rip), %rcx     # 0xf7f9c
pushq $0xf
popq %r15
movl %r13d, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
leaq 0xd2dc9(%rip), %rcx     # 0xf7f51
movl %r12d, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
leaq 0xd2dd0(%rip), %rcx     # 0xf7f6d
movl %ebx, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe2d2
leaq 0x1dd71f(%rip), %rax    # 0x2028d0
movq $-0x10000, %rcx         # imm = 0xFFFF0000
addq (%rax), %rcx
testq $-0x10001, %rcx         # imm = 0xFFFEFFFF
leaq 0xd2deb(%rip), %rax     # 0xf7fb4
leaq 0xd2dfe(%rip), %rcx     # 0xf7fce
cmoveq %rax, %rcx
pushq $0xf
popq %rbx
movl -0x2c(%rbp), %edi
movl %r14d, %esi
movl %ebx, %edx
callq 0xe2d2
movq -0x48(%rbp), %rax
leal 0x5(%rax), %edi
leaq 0xd2df6(%rip), %rcx     # 0xf7fe8
movl %r14d, %esi
movl %ebx, %edx
callq 0xe2d2
leal 0x28(%r14), %r13d
leaq 0x203d37(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
movq -0x58(%rbp), %r12
je 0x25219
leaq 0xd2de4(%rip), %rcx     # 0xf7ffb
jmp 0x25243
leaq 0x1dd6b0(%rip), %rax    # 0x2028d0
movq $-0x10000, %rcx         # imm = 0xFFFF0000
addq (%rax), %rcx
testq $-0x10001, %rcx         # imm = 0xFFFEFFFF
leaq 0xd2dc3(%rip), %rax     # 0xf7ffb
leaq 0xd2ddd(%rip), %rcx     # 0xf801c
cmoveq %rax, %rcx
leal 0x1(%r12), %r14d
movl %r12d, %edi
movl %r13d, %esi
movl %ebx, %edx
callq 0xe2d2
leal 0x2(%r12), %r15d
leaq 0xd2ddf(%rip), %rcx     # 0xf8040
movl %r14d, -0x4c(%rbp)
movl %r14d, %edi
movl %r13d, %esi
movl %ebx, %edx
callq 0xe2d2
leal 0x3(%r12), %ebx
leaq 0x203cc0(%rip), %r14    # 0x228f3e
cmpb $0x0, (%r14)
leaq 0x1dffab(%rip), %rax    # 0x205234
movb (%rax), %al
movl %r15d, -0x3c(%rbp)
je 0x252db
testb %al, %al
leaq 0xd2de5(%rip), %rax     # 0xf807f
leaq 0xd2dc0(%rip), %rcx     # 0xf8061
cmoveq %rax, %rcx
pushq $0xf
popq %rdx
movl %r15d, %edi
movl %r13d, %esi
movl %edx, %r15d
callq 0xe2d2
leal 0x4(%r12), %r14d
leaq 0xd2dda(%rip), %rcx     # 0xf809c
movl %ebx, %edi
movl %r13d, %esi
movl %r15d, %edx
callq 0xe2d2
movl %r14d, %ebx
leaq 0x203c65(%rip), %r14    # 0x228f3e
jmp 0x252fd
testb %al, %al
leaq 0xd2e01(%rip), %rax     # 0xf80e5
leaq 0xd2dd7(%rip), %rcx     # 0xf80c2
cmoveq %rax, %rcx
pushq $0xf
popq %rdx
movl %r15d, %edi
movl %r13d, %esi
callq 0xe2d2
leal 0x1(%rbx), %r15d
cmpb $0x0, (%r14)
jne 0x25326
leaq 0xd2d8e(%rip), %rcx     # 0xf809c
pushq $0xf
popq %rdx
movl %ebx, %edi
movl %r13d, %esi
callq 0xe2d2
movl %ebx, %eax
addl $0x2, %eax
movl %r15d, %ebx
movl %eax, %r15d
movq -0x48(%rbp), %rax
addl $0x6, %eax
movl %eax, -0x2c(%rbp)
leaq 0xd2dd0(%rip), %rcx     # 0xf8107
pushq $0xf
popq %r12
movl %ebx, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
movups 0xd2de8(%rip), %xmm0    # 0xf8137
leaq 0x300eca(%rip), %r14    # 0x326220
movups %xmm0, 0xc(%r14)
movups 0xd2dc9(%rip), %xmm0    # 0xf812b
movaps %xmm0, (%r14)
leal 0x1(%r15), %eax
movl %eax, -0x50(%rbp)
movl %r15d, %edi
movl %r13d, %esi
movl %r12d, %edx
movq %r14, %rcx
movq %r14, %rbx
callq 0xe2d2
leaq 0x1dd518(%rip), %rax    # 0x2028a0
movl (%rax), %eax
testl %eax, %eax
pushq $0x18
popq %rdx
cmovnel %eax, %edx
leaq 0xd2dae(%rip), %rsi     # 0xf8147
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
leal 0x2(%r15), %r14d
movl -0x50(%rbp), %edi
movl %r13d, %esi
movl %r12d, %edx
movq %rbx, %rcx
callq 0xe2d2
leaq 0x203b7f(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
leaq 0xd2db9(%rip), %rax     # 0xf8182
leaq 0xd2d97(%rip), %rcx     # 0xf8167
cmoveq %rax, %rcx
leal 0x3(%r15), %ebx
movl %r14d, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leal 0x4(%r15), %r14d
leaq 0xd2db5(%rip), %rcx     # 0xf81a6
movl %ebx, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leal 0x5(%r15), %ebx
leaq 0xd2dc1(%rip), %rcx     # 0xf81ca
movl %r14d, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leal 0x6(%r15), %r14d
leaq 0xd2dcc(%rip), %rcx     # 0xf81ee
movl %ebx, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leaq 0x203b08(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
leaq 0xd2df2(%rip), %rax     # 0xf8232
leaq 0xd2dc9(%rip), %rcx     # 0xf8210
cmoveq %rax, %rcx
leal 0x7(%r15), %ebx
movl %r14d, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leal 0x8(%r15), %r14d
leaq 0xd2def(%rip), %rcx     # 0xf8257
movl %ebx, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leaq 0x13580c(%rip), %rax    # 0x15ac88
movq (%rax), %rdx
leaq 0xd2df9(%rip), %rsi     # 0xf827f
leaq 0x300d93(%rip), %rdi    # 0x326220
xorl %eax, %eax
callq 0x9060
leal 0x9(%r15), %ebx
movl %r14d, %edi
movl %r13d, %esi
movl %r12d, %edx
leaq 0x300d78(%rip), %rcx    # 0x326220
callq 0xe2d2
leal 0xa(%r15), %r14d
leaq 0xd2de1(%rip), %rcx     # 0xf8299
movl %ebx, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
addl $0xb, %r15d
leaq 0xd2de6(%rip), %rcx     # 0xf82b6
movl %r14d, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leaq 0xd2de4(%rip), %rcx     # 0xf82c9
movl %r15d, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xe2d2
leaq 0x1dd2de(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
je 0x2552f
leaq 0x1dd2fe(%rip), %rax    # 0x202804
movq -0x48(%rbp), %rcx
addl $0x7, %ecx
cmpl $0x1e0, (%rax)          # imm = 0x1E0
cmovll -0x2c(%rbp), %ecx
leal 0x1(%rcx), %ebx
leal 0x2(%rcx), %eax
movl %eax, -0x3c(%rbp)
movl %ecx, %r12d
movq -0x38(%rbp), %rax
movl %eax, %r15d
movl %ecx, -0x2c(%rbp)
jmp 0x2553e
movq -0x38(%rbp), %rax
leal 0x50(%rax), %r15d
movq -0x58(%rbp), %r12
movl -0x4c(%rbp), %ebx
leaq 0xd2da2(%rip), %rcx     # 0xf82e7
pushq $0xf
popq %r14
movl %r12d, %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xe2d2
leaq 0xd2db1(%rip), %rcx     # 0xf830f
movl %ebx, %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xe2d2
leal 0x3(%r12), %ebx
leaq 0xd2db9(%rip), %rcx     # 0xf8330
movl -0x3c(%rbp), %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xe2d2
leal 0x4(%r12), %r14d
leaq 0xd2dc7(%rip), %rcx     # 0xf8358
movl %ebx, %edi
movl %r15d, %esi
pushq $0xf
popq %rdx
callq 0xe2d2
leal 0x5(%r12), %ebx
leaq 0xd2dd4(%rip), %rcx     # 0xf837e
movl %r14d, %edi
movl %r15d, %esi
pushq $0xf
popq %rdx
movl %edx, %r14d
callq 0xe2d2
addl $0x6, %r12d
leaq 0xd2ddf(%rip), %rcx     # 0xf83a5
movl %ebx, %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xe2d2
leaq 0x1dd1fe(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
setne %al
leaq 0x1dd21d(%rip), %rcx    # 0x202804
cmpl $0x258, (%rcx)          # imm = 0x258
setl %cl
testb %cl, %al
cmovnel -0x2c(%rbp), %r12d
cmovel %r15d, %r13d
leal 0x1(%r12), %ebx
leaq 0xd2dc2(%rip), %rcx     # 0xf83c9
movl %r12d, %edi
movl %r13d, %esi
movl %r14d, %r15d
movl %r14d, %edx
callq 0xe2d2
leal 0x2(%r12), %r14d
leaq 0xd2dc7(%rip), %rcx     # 0xf83eb
movl %ebx, %edi
movl %r13d, %esi
movl %r15d, %edx
callq 0xe2d2
leal 0x3(%r12), %ebx
leaq 0xd2dcf(%rip), %rcx     # 0xf840c
movl %r14d, %edi
movl %r13d, %esi
movl %r15d, %edx
callq 0xe2d2
leal 0x4(%r12), %r14d
leaq 0xd2dce(%rip), %rcx     # 0xf8425
movl %ebx, %edi
movl %r13d, %esi
movl %r15d, %edx
callq 0xe2d2
leal 0x5(%r12), %ebx
leaq 0xd2dd0(%rip), %rcx     # 0xf8440
movl %r14d, %edi
movl %r13d, %esi
movl %r15d, %edx
callq 0xe2d2
leal 0x6(%r12), %r14d
leaq 0xd2ddb(%rip), %rcx     # 0xf8465
movl %ebx, %edi
movl %r13d, %esi
movl %r15d, %edx
callq 0xe2d2
leaq 0xd2de6(%rip), %rcx     # 0xf8484
movl %r14d, %edi
movl %r13d, %esi
movl %r15d, %edx
movl %r15d, %r13d
callq 0xe2d2
movl $0x1e0, %edx            # imm = 0x1E0
xorl %eax, %eax
leaq 0x1dd147(%rip), %rcx    # 0x202804
cmpl %edx, (%rcx)
setl %al
movl %r12d, %r15d
subl %eax, %r15d
negl %eax
leal (%r12,%rax), %edi
addl $0x8, %edi
leal 0x9(%r15), %ebx
leaq 0xd2dcf(%rip), %rcx     # 0xf84ab
movq -0x38(%rbp), %r12
movl %r12d, %esi
movl %r13d, %edx
callq 0xe2d2
leal 0xa(%r15), %r14d
leaq 0xd2df5(%rip), %rcx     # 0xf84eb
movl %ebx, %edi
movl %r12d, %esi
movl %r13d, %edx
callq 0xe2d2
leal 0xb(%r15), %ebx
leaq 0xd2e1f(%rip), %rcx     # 0xf852d
movl %r14d, %edi
movl %r12d, %esi
movl %r13d, %edx
callq 0xe2d2
leaq 0xd2e59(%rip), %rcx     # 0xf857c
movl %ebx, %edi
movl %r12d, %esi
movl %r13d, %edx
callq 0xe2d2
xorl %eax, %eax
leaq 0x1dd0cb(%rip), %rcx    # 0x202804
movl $0x1e0, %edx            # imm = 0x1E0
cmpl %edx, (%rcx)
setl %al
xorl $0x5, %eax
leal (%rax,%r15), %ebx
addl $0x8, %ebx
leaq 0x300acc(%rip), %r14    # 0x326220
leaq 0xd2e68(%rip), %rsi     # 0xf85c3
leaq 0x13552e(%rip), %rdx    # 0x15ac90
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
pushq $0xa
popq %rdx
movl %ebx, %edi
movl %r12d, %esi
movq %r14, %rcx
callq 0xe2d2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xaa05
leaq 0x2d1d27(%rip), %rax    # 0x2f74bd
movzbl (%rax), %eax
cmpl $0x80, %eax
je 0x257c1
cmpl $0x3, %eax
je 0x257b5
testl %eax, %eax
jne 0x257cd
leaq 0xd2702(%rip), %rcx     # 0xf7eb2
jmp 0x250ad
leaq 0xd26d9(%rip), %rcx     # 0xf7e95
jmp 0x250ad
leaq 0xd2707(%rip), %rcx     # 0xf7ecf
jmp 0x250ad
leaq 0xd271c(%rip), %rcx     # 0xf7ef0
jmp 0x250ad