// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heather.cpp
// Function: do_mouse_click()
void do_mouse_click()
{
int click;
int c;

   // process mouse clicks on the screen

   if(mouse_x < 0) return;
   else if(mouse_x >= SCREEN_WIDTH) return;
   else if(mouse_y < 0) return;
   else if(mouse_y >= SCREEN_HEIGHT) return;
// else if(first_key && (zoom_screen != 'K')) return;  // no zooms if keyboard menu showing

//if(zoom_screen == 'K') ;     // inhibt mouse clicks if menu shown
//else if(first_key) return;

   if((this_button == 1) && (last_button == 0)) click = 1;  // left mouse button clicked
   else click = 0;

   if(click && (text_mode == 2)) {  // any click exits keyboard help menu
      click_sound(1);
      add_kbd(' ');
   }
   else if(click && showing_cmd_help) { // any click exits command line help
      click_sound(1);
      add_kbd(' ');
   }
   else if((zoom_screen == 'K') && click && (mouse_y < PLOT_ROW)) {
      // click on touch screen keyboard
      do_touch_key();
   }
   else if((zoom_screen == '`') && click && (mouse_y < CORNER_SIZE) && (mouse_x < CORNER_SIZE)) {
      // switch from zoomed calculator to touch screen keyboard
      click_sound(333);
      rpn_mode = (-1);
      zoom_screen = 'K';
      show_touch_kbd(1);
      last_zoom_calc = 1;
      show_rpn_help = 0;
   }
   else if(zoom_screen && click && (mouse_y < CORNER_SIZE) && (mouse_x < CORNER_SIZE)) {
      // un-zoom plot display
      un_lla:
      click_sound(2);
      add_kbd(ESC_CHAR);
   }
   else if(touch_screen && click && (mouse_y < CORNER_SIZE) && (mouse_x < CORNER_SIZE)) {
       // show touch screen keyboard
       click_sound(3);
       if(0 && (first_key == 0)) {
          add_kbd('z');
          add_kbd('k');
       }
       else {
          zoom_screen = 'K';
          show_touch_kbd(1);
       }
   }
// else if(touch_screen && last_plot_key && click && (mouse_y < CORNER_SIZE) && (mouse_x > CORNER_SIZE) && (mouse_x < (VER_COL*TEXT_WIDTH))) {
   else if(touch_screen && click && (mouse_y < CORNER_SIZE) && (mouse_x > CORNER_SIZE) && (mouse_x < (VER_COL*TEXT_WIDTH*vc_font_scale/100))) {
      // repeat last plot control key
      if(last_plot_key) {   // repeat last plot control key
         click_sound(22);
         add_kbd(last_plot_key);
      }
      else if(unit_file_name) {   // do a screen dump
         dump_screen(invert_dump, 0, unit_file_name);

         erase_screen();
         sprintf(out, "Captured screen to file: %s.gif", unit_file_name);
         vidstr(0,0, YELLOW, out);
         refresh_page();
         need_redraw = 6586;
         Sleep(1000);
      }
   }
   else if((zoom_screen == 'F') && click) {
      // click anywhere on zoomed FFT waterfall screen
      goto un_lla;
   }
   else if((zoom_screen == 'L') && click) {
      // click anywhere on zoomed LLA screen
      goto un_lla;
   }
   else if((zoom_screen == 'O') && click) {
      // click anywhere on monitor mode screen
      goto un_lla;
   }
   else if((zoom_screen == 'Q') && click) {
      if(mouse_y > (SCREEN_HEIGHT-CORNER_SIZE)) {  // bottom left corner
         if(mouse_x < CORNER_SIZE) {
            click_sound(66);
            --cal_month;
            if(cal_month < 1) {
               cal_month = 12;
               --cal_year;
            }
         }
         else if(mouse_x > (SCREEN_WIDTH-CORNER_SIZE)) {  // bottom right corner
            click_sound(67);
            ++cal_month;
            if(cal_month > 12) {
               cal_month = 1;
               ++cal_year;
            }
         }
      }
      else goto un_lla;
   }
   else if((zoom_screen == '`') && click) {
      // click anywhere on calculator mode screen
      click_sound(222);
      rpn_mode = 0;
      getting_string = 0;
      zoom_zoomed();   // remove_zoom();
      if(edit_buffer[0]) {
         add_kbd(ESC_CHAR);
         add_kbd(0x0D);
      }
      add_kbd(' ');
//    add_kbd('z');   // boobs
//    add_kbd('z');
//    add_kbd(0x0D);
   }
   else if((un_zoom == ZOOM_ADEVS) && click) {  // un-zoom all_adevs display
      click_sound(4);
      zoom_zoomed();
      if(adevs_active(0)) last_was_adev = 5;
   }
   else if(zoom_screen && click && (zoom_screen != 'P')) {  // un-zoom display
      click_sound(5);
      zoom_zoomed();
   }
   else if((zoom_screen == 'P') && click && (mouse_y < (PLOT_ROW-TEXT_HEIGHT))) {
      // un-zoom plot display
      click_sound(6);
      if(mouse_x > (SCREEN_WIDTH-CORNER_SIZE)) {
//       add_kbd(DEL_CHAR);  // causes exit plot review and zoom screen modes
         end_review(1);      // just exit plot review mode
      }
      else zoom_zoomed();
   }
   else if((zoom_screen == 0) && show_fixes && click && (mouse_y < LLA_SIZE) && (mouse_x > (SCREEN_WIDTH-LLA_SIZE))) {
      // zoom fix map
      click_sound(7);
      if(first_key) {  // keyboard menu is on screen, cancel it
         first_key = 0;
         getting_string = 0;
         return;
      }
      goto fixes;
   }
   else if(rcvr_type == NO_RCVR) {
      if(click) {
         click_sound(8);
         if(first_key) {  // keyboard menu is on screen, cancel it
            first_key = 0;
            getting_string = 0;
            return;
         }

         if((mouse_y > (SCREEN_HEIGHT/2))) {  // zoom clock
            un_zoom = ZOOM_CLOCK;
            zoom_screen = 'C';
            zoom_fixes = show_fixes;
            config_screen(124);
         }
         else if(mouse_x > (SCREEN_WIDTH/2)) {
            change_zoom_config(89);
            un_zoom = ZOOM_AZEL;
            zoom_screen = 'W';
            zoom_fixes = show_fixes;
            config_screen(124);
         }
      }
   }
   else if((zoom_screen == 0) && share_active && shared_item && click && (mouse_y >= PLOT_ROW) && (mouse_x > (PLOT_COL+PLOT_WIDTH))) {
      // zoom shared plot item
      click_sound(9);
      if(first_key) {  // keyboard menu is on screen, cancel it
         first_key = 0;
         getting_string = 0;
         return;
      }

      if(mac_os && (mouse_x >= (SCREEN_WIDTH-48))) ;        // needed for XQuartz resize box
      else if(mac_os && (mouse_y >= (SCREEN_HEIGHT-48))) ;
      else {
         change_zoom_config(88);
         un_zoom = ZOOM_SHARED;
         if(shared_item == SHARE_WATCH) zoom_screen = 'W';
         else if(shared_item == SHARE_MAP) zoom_screen = 'M';
         else if(shared_item == (SHARE_MAP | SHARE_WATCH)) zoom_screen = 'B';
         else if(shared_item == SHARE_SIGNALS) zoom_screen = 'S';
         else if(shared_item == SHARE_LLA) zoom_screen = 'L';
         else cancel_zoom(7);
         zoom_fixes = show_fixes;
         config_screen(124);
      }
   }
   else if((zoom_screen == 0) && click && adevs_shown && (mouse_y < (ADEV_ROW+(max_adev_rows+2)*2)*TEXT_HEIGHT) && (mouse_x > (left_adev_col*TEXT_WIDTH)) && (mouse_x < ((ADEV_COL+adevs_shown)*TEXT_WIDTH)) ) {
      // zoom adev tables to all_adevs screen
      click_sound(19);
      if(first_key) {  // keyboard menu is on screen, cancel it
         first_key = 0;
         getting_string = 0;
         return;
      }

      change_zoom_config(88);
      un_zoom = ZOOM_ADEVS;
      if(osc_adev_q_count == 0) all_adevs = ALL_PPS;
      else if(pps_adev_q_count == 0) all_adevs = ALL_OSC;
      else if(mouse_y < ((ADEV_ROW+max_adev_rows+2)*TEXT_HEIGHT)) all_adevs = ALL_PPS; // PPS
      else all_adevs = ALL_OSC;  // OSC adevs  // aaaahhhh what about ALL_CHC and ALL_CHD

      old_plot_adevs = plot_adev_data;
      plot_adev_data = 1;
      config_screen(1124);
      if(adevs_active(0)) last_was_adev = 6;
   }
// else if((zoom_screen == 0) && click && (mouse_y < (ACLOCK_R*2)) && (mouse_x > ((ADEV_COL+adevs_shown)*TEXT_WIDTH))) {
   else if((zoom_screen == 0) && click && (mouse_y < (SCREEN_HEIGHT/2)) && (mouse_x > ((ADEV_COL+adevs_shown)*TEXT_WIDTH))) {
      // zoom map/watch
      click_sound(10);
      if(first_key) {  // keyboard menu is on screen, cancel it
         first_key = 0;
         getting_string = 0;
         return;
      }

      fixes:
      if(all_adevs == SINGLE_ADEVS) {
         change_zoom_config(888);
         un_zoom = ZOOM_AZEL;

         if(show_fixes && (shared_item != SHARE_LLA)) zoom_screen = 'L';  // zoom the scattergram
         else if(plot_watch && plot_azel) {      // zoom watch and/or map
            if(shared_plot && (shared_item == SHARE_MAP)) zoom_screen = 'W';
            else if(shared_plot && (shared_item == SHARE_WATCH)) zoom_screen = 'M';
            else zoom_screen = 'B';
         }
         else if(plot_watch && (shared_item != SHARE_WATCH)) zoom_screen = 'W';
         else if(plot_azel && (shared_item != SHARE_MAP)) zoom_screen = 'M';
         else if(plot_signals && (shared_item != SHARE_SIGNALS)) zoom_screen = 'S';
         else cancel_zoom(8);
         zoom_fixes = show_fixes;
         config_screen(124);
      }
   }
   else if((zoom_screen == 0) && click && (mouse_y < ((MOUSE_ROW+4)*TEXT_HEIGHT)) && (mouse_y >= ((POSN_ROW+2)*TEXT_HEIGHT)) && (mouse_x < (MINOR_COL*TEXT_WIDTH))) {
      // zoom clock or sat info

      if(all_adevs) ;
      else if(mouse_y <= ((POSN_ROW+6)*TEXT_HEIGHT)) {
         // lat/lon/alt clicked, show scattergram
         if(mouse_x <= ((SURVEY_COL+2)*TEXT_WIDTH)) {
            click_sound(111);
            if(first_key) {  // keyboard menu is on screen, cancel it
               first_key = 0;
               getting_string = 0;
               return;
            }

            if(show_fixes) un_zoom = ZOOM_LLA;
            else           un_zoom = ZOOM_CLOCK;
            config_lla_zoom(1);
         }
      }
      else if(sun_moon_shown && (mouse_x >= ((sun_moon_shown+2)*TEXT_WIDTH)) && (mouse_y < ((last_sat_row-0)*TEXT_HEIGHT))) {
         // mouse is past the sat info data
      }
      else {  // mouse in in the sat info table
         click_sound(112);
         if(first_key) {    // keyboard menu is on screen, cancel it
            first_key = 0;
            getting_string = 0;
            return;
         }

         un_zoom = ZOOM_INFO;
         change_zoom_config(88);

         c = 'I';
         if(rcvr_type == RFTG_RCVR) c = 'D';
         if((mouse_x < vc_col) && plot_digital_clock) zoom_screen = c;
         else if(mouse_y < ((last_sat_row-0)*TEXT_HEIGHT)) zoom_screen = c;
         else zoom_screen = 'C';

         if((rcvr_type == CS_RCVR) && (zoom_screen == 'I')) {
            zoom_screen = 'D';
         }
         else {
            zoom_fixes = show_fixes;
         }
         config_screen(124);
      }
   }
   else if((zoom_screen == 0) && click && (mouse_y >= ((MOUSE_ROW+4)*TEXT_HEIGHT)) && (mouse_y < ((PLOT_ROW-TEXT_HEIGHT)))) {
      // zoom plot
      click_sound(12);
      if(first_key) {  // keyboard menu is on screen, cancel it
         first_key = 0;
         getting_string = 0;
         return;
      }

      un_zoom = 'P';
      change_zoom_config(89);
      zoom_screen = 'P';
      zoom_fixes = show_fixes;
      config_screen(124);
      force_adev_redraw(2);
   }
   else {
      do_plot_click(click);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x1ffa6d(%rip), %eax    # 0x21b240
testl %eax, %eax
setns %cl
movl 0x1fd021(%rip), %r9d    # 0x218800
cmpl %r9d, %eax
setl %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1b918
movl 0x1ffa4e(%rip), %ecx    # 0x21b244
testl %ecx, %ecx
setns %dl
movl 0x1fd002(%rip), %r8d    # 0x218804
cmpl %r8d, %ecx
setl %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1b918
movl 0x1ffa40(%rip), %edx    # 0x21b25c
xorl $0x1, %edx
xorl %edi, %edi
orl 0x1ffa39(%rip), %edx    # 0x21b260
sete %sil
jne 0x1b836
cmpl $0x2, 0x1fcfa4(%rip)    # 0x2187d8
je 0x1b846
movb %sil, %dil
testl %edi, %edi
je 0x1b87b
cmpl $0x0, 0x324dd8(%rip)    # 0x34061c
je 0x1b87b
cmpb $0x0, 0x2f2a7b(%rip)    # 0x30e2c8
je 0x1b869
cmpb $0x0, 0x1ff9c8(%rip)    # 0x21b21e
je 0x1b869
leaq 0xede46(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl $0x20, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd4e7
movb 0x2f0f26(%rip), %r10b   # 0x30c7a8
testl %edi, %edi
je 0x1b8a1
cmpb $0x4b, %r10b
jne 0x1b8a1
cmpl 0x1fcfea(%rip), %ecx    # 0x21887c
jge 0x1b8a1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1af85
cmpb $0x60, %r10b
sete %bl
andb %sil, %bl
cmpb $0x1, %bl
jne 0x1b921
movl 0x207c8e(%rip), %edx    # 0x223544
cmpl %edx, %ecx
setge %r11b
cmpl %edx, %eax
setge %dl
orb %r11b, %dl
jne 0x1b921
cmpb $0x0, 0x2f29fb(%rip)    # 0x30e2c8
je 0x1b8e9
cmpb $0x0, 0x1ff948(%rip)    # 0x21b21e
je 0x1b8e9
leaq 0xeddc6(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl $0xffffffff, 0x31ff35(%rip) # imm = 0xFFFFFFFF
movb $0x4b, 0x2f0eae(%rip)   # 0x30c7a8
movl $0x1, %edi
callq 0xee7d
movl $0x1, 0x2f0ea6(%rip)    # 0x30c7b4
movl $0x0, 0x31ff14(%rip)    # 0x33b82c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %r11d
xorb $0x1, %r11b
testb %r10b, %r10b
sete %dl
orb %r11b, %dl
jne 0x1b94d
movl 0x207c0b(%rip), %edx    # 0x223544
cmpl %edx, %ecx
setge %r14b
cmpl %edx, %eax
setge %dl
orb %r14b, %dl
je 0x1ba55
movb 0x1ff8cb(%rip), %dl     # 0x21b21e
testb %dl, %dl
setne %r14b
andb %sil, %r14b
cmpb $0x1, %r14b
jne 0x1ba31
movl 0x207bd7(%rip), %r15d   # 0x223544
cmpl %r15d, %ecx
setge %r12b
cmpl %r15d, %eax
setge %r15b
orb %r12b, %r15b
jne 0x1b9b3
cmpb $0x0, 0x2f2941(%rip)    # 0x30e2c8
je 0x1b99a
leaq 0xedd15(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movb $0x4b, 0x2f0e07(%rip)   # 0x30c7a8
movl $0x1, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xee7d
testb %r14b, %r14b
je 0x1ba31
movl 0x207b85(%rip), %r14d   # 0x223544
cmpl %r14d, %ecx
setge %r15b
cmpl %r14d, %eax
setle %r12b
orb %r15b, %r12b
jne 0x1ba31
imull 0x1fcdbe(%rip), %r14d   # 0x218798
imull 0x1fce2e(%rip), %r14d   # 0x218810
movslq %r14d, %r14
imulq $0x51eb851f, %r14, %r14 # imm = 0x51EB851F
movq %r14, %r15
shrq $0x3f, %r15
sarq $0x25, %r14
addl %r15d, %r14d
cmpl %r14d, %eax
jge 0x1ba31
cmpl $0x0, 0x1ff81a(%rip)    # 0x21b220
je 0x1bd4d
cmpb $0x0, 0x2f28b5(%rip)    # 0x30e2c8
je 0x1ba26
leaq 0xedc89(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl 0x1ff7f4(%rip), %edi    # 0x21b220
jmp 0x1b86e
cmpb $0x46, %r10b
sete %r14b
cmpb $0x4c, %r10b
sete %r12b
cmpb $0x4f, %r10b
sete %r15b
testl %edi, %edi
je 0x1ba82
orb %r12b, %r14b
orb %r14b, %r15b
je 0x1ba82
cmpb $0x0, 0x2f286c(%rip)    # 0x30e2c8
je 0x1ba78
cmpb $0x0, 0x1ff7b9(%rip)    # 0x21b21e
je 0x1ba78
leaq 0xedc37(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl $0x1b, %edi
jmp 0x1b86e
cmpb $0x51, %r10b
setne %r14b
orb %r11b, %r14b
jne 0x1baf0
movl 0x207aaf(%rip), %esi    # 0x223544
subl %esi, %r8d
cmpl %r8d, %ecx
jle 0x1ba55
cmpl %esi, %eax
jge 0x1bbe4
testb %dl, %dl
je 0x1bac3
cmpb $0x0, 0x2f2818(%rip)    # 0x30e2c8
je 0x1bac3
leaq 0xedbec(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl 0x2f1a5f(%rip), %eax    # 0x30d528
leal -0x1(%rax), %ecx
movl %ecx, 0x2f1a56(%rip)    # 0x30d528
cmpl $0x1, %eax
jg 0x1b918
movl $0xc, 0x2f1a43(%rip)    # 0x30d528
decl 0x2f1a41(%rip)          # 0x30d52c
jmp 0x1b918
testb %bl, %bl
je 0x1bb50
testb %dl, %dl
je 0x1bb12
cmpb $0x0, 0x2f27c9(%rip)    # 0x30e2c8
je 0x1bb12
leaq 0xedb9d(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl $0x0, 0x31fd0c(%rip)    # 0x33b828
movw $0x0, 0x323ae3(%rip)    # 0x33f608
callq 0x1ab88
cmpb $0x0, 0x3237af(%rip)    # 0x33f2e0
je 0x1b869
movl $0x1b, %edi
callq 0xd4e7
movl $0xd, %edi
callq 0xd4e7
jmp 0x1b869
testl %edi, %edi
je 0x1bb9e
cmpl $0x4, 0x2f0c55(%rip)    # 0x30c7b0
jne 0x1bb9e
testb %dl, %dl
je 0x1bb7b
cmpb $0x0, 0x2f2760(%rip)    # 0x30e2c8
je 0x1bb7b
leaq 0xedb34(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
callq 0x1ab88
xorl %edi, %edi
callq 0xd84d7
testl %eax, %eax
je 0x1b918
movl $0x5, 0x1ff76b(%rip)    # 0x21b304
jmp 0x1b918
testl %edi, %edi
je 0x1bc3b
testb %r10b, %r10b
je 0x1bc3b
cmpb $0x50, %r10b
je 0x1bc3b
testb %dl, %dl
je 0x1bbd7
cmpb $0x0, 0x2f2704(%rip)    # 0x30e2c8
je 0x1bbd7
leaq 0xedad8(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ab88
subl %esi, %r9d
cmpl %r9d, %eax
jle 0x1b918
testb %dl, %dl
je 0x1bc0e
cmpb $0x0, 0x2f26cd(%rip)    # 0x30e2c8
je 0x1bc0e
leaq 0xedaa1(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl 0x2f1914(%rip), %eax    # 0x30d528
leal 0x1(%rax), %ecx
movl %ecx, 0x2f190b(%rip)    # 0x30d528
cmpl $0xc, %eax
jl 0x1b918
movl $0x1, 0x2f18f8(%rip)    # 0x30d528
incl 0x2f18f6(%rip)          # 0x30d52c
jmp 0x1b918
cmpb $0x50, %r10b
setne %bl
orb %bl, %r11b
jne 0x1bca2
movl 0x1fcc2e(%rip), %r11d   # 0x21887c
subl 0x1fcbbf(%rip), %r11d   # 0x218814
cmpl %r11d, %ecx
jge 0x1bca2
testb %dl, %dl
je 0x1bc78
cmpb $0x0, 0x2f2663(%rip)    # 0x30e2c8
je 0x1bc78
leaq 0xeda37(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
movl 0x1fcb82(%rip), %eax    # 0x218800
subl 0x2078c0(%rip), %eax    # 0x223544
cmpl %eax, 0x1ff5b6(%rip)    # 0x21b240
jle 0x1bbd7
movl $0x1, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11241
testl %edi, %edi
je 0x1bcd8
testb %r10b, %r10b
jne 0x1bcd8
cmpb $0x0, 0x31f622(%rip)    # 0x33b2d4
je 0x1bcd8
movl 0x31f5dd(%rip), %r11d   # 0x33b298
cmpl %r11d, %ecx
setl %bl
subl %r11d, %r9d
cmpl %r9d, %eax
setg %r9b
andb %bl, %r9b
cmpb $0x1, %r9b
je 0x1bfc2
cmpq $0x400, 0x1fcbed(%rip) # imm = 0x400
jne 0x1bdc0
testl %edi, %edi
je 0x1b918
testb %dl, %dl
je 0x1bd0f
cmpb $0x0, 0x2f25cc(%rip)    # 0x30e2c8
je 0x1bd0f
leaq 0xed9a0(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
cmpl $0x0, 0x223242(%rip)    # 0x23ef58
jne 0x1bfed
movl 0x1fcae2(%rip), %eax    # 0x218804
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ecx, 0x1ff513(%rip)    # 0x21b244
jle 0x1c216
movl $0x3, 0x2f0a6f(%rip)    # 0x30c7b0
movb $0x43, 0x2f0a60(%rip)   # 0x30c7a8
jmp 0x1c3b0
movq 0x154f34(%rip), %rdx    # 0x170c88
testq %rdx, %rdx
je 0x1b918
movl 0x1fcad1(%rip), %edi    # 0x218834
xorl %esi, %esi
callq 0xf82a
callq 0xed5e
movq 0x154f12(%rip), %rdx    # 0x170c88
leaq 0x3204a3(%rip), %rbx    # 0x33c220
leaq 0xeee41(%rip), %rsi     # 0x10abc5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
movq %rbx, %rcx
callq 0xe7d0
callq 0xab5f
movl $0x19ba, 0x1fca96(%rip) # imm = 0x19BA
movl $0xf4240, %edi          # imm = 0xF4240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9540
testl %edi, %edi
je 0x1beac
testb %r10b, %r10b
jne 0x1beac
cmpb $0x0, 0x31f611(%rip)    # 0x33b3e9
je 0x1beac
cmpl $0x0, 0x31f607(%rip)    # 0x33b3ec
je 0x1beac
cmpl 0x1fca8b(%rip), %ecx    # 0x21887c
jl 0x1beac
movl 0x1fca86(%rip), %r9d    # 0x218884
addl 0x1fca7b(%rip), %r9d    # 0x218880
cmpl %r9d, %eax
jle 0x1beac
testb %dl, %dl
je 0x1be2c
cmpb $0x0, 0x2f24af(%rip)    # 0x30e2c8
je 0x1be2c
leaq 0xed883(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
cmpl $0x0, 0x223125(%rip)    # 0x23ef58
jne 0x1bfed
movl 0x3240a5(%rip), %eax    # 0x33fee4
testl %eax, %eax
je 0x1be71
movl 0x1fc9b7(%rip), %ecx    # 0x218800
addl $-0x30, %ecx
cmpl %ecx, 0x1ff3ee(%rip)    # 0x21b240
jge 0x1b918
testl %eax, %eax
je 0x1be71
movl 0x1fc9a2(%rip), %eax    # 0x218804
addl $-0x30, %eax
cmpl %eax, 0x1ff3d9(%rip)    # 0x21b244
jge 0x1b918
movl $0x58, %edi
callq 0x27724
movl $0x1, 0x2f092b(%rip)    # 0x30c7b0
movl 0x31f561(%rip), %eax    # 0x33b3ec
decl %eax
cmpl $0x7, %eax
ja 0x1bea2
leaq 0xed633(%rip), %rcx     # 0x1094cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x7, %edi
jmp 0x1c3ab
testb %r10b, %r10b
sete %r9b
andb %r9b, %sil
movl 0x220dc7(%rip), %r9d    # 0x23cc84
testl %r9d, %r9d
setne %r10b
andb %sil, %r10b
cmpb $0x1, %r10b
jne 0x1bf94
movl 0x2090a8(%rip), %r10d   # 0x224f80
leal 0x4(,%r10,2), %r10d
imull 0x1fc92c(%rip), %r10d   # 0x218814
cmpl %r10d, %ecx
jge 0x1bf94
movl 0x1fc918(%rip), %r10d   # 0x218810
movl 0x1fc8c9(%rip), %r11d   # 0x2187c8
imull %r10d, %r11d
cmpl %r11d, %eax
jle 0x1bf94
leal 0x4f(%r9), %r11d
imull %r11d, %r10d
cmpl %r10d, %eax
jge 0x1bf94
testb %dl, %dl
je 0x1bf37
cmpb $0x0, 0x2f23a4(%rip)    # 0x30e2c8
je 0x1bf37
leaq 0xed778(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
cmpl $0x0, 0x22301a(%rip)    # 0x23ef58
jne 0x1bfed
movl $0x58, %edi
callq 0x27724
movl $0x4, 0x2f0858(%rip)    # 0x30c7b0
cmpq $0x0, 0x220c28(%rip)    # 0x23cb88
je 0x1c35f
cmpq $0x0, 0x220bca(%rip)    # 0x23cb38
je 0x1c363
movl 0x209006(%rip), %eax    # 0x224f80
addl $0x2, %eax
imull 0x1fc890(%rip), %eax    # 0x218814
cmpl %eax, 0x1ff2ba(%rip)    # 0x21b244
setl %al
incb %al
jmp 0x1c365
movl %r8d, %r10d
shrl $0x1f, %r10d
addl %r8d, %r10d
sarl %r10d
cmpl %r10d, %ecx
setl %r8b
andb %sil, %r8b
cmpb $0x1, %r8b
jne 0x1c005
addl $0x4f, %r9d
imull 0x1fc853(%rip), %r9d    # 0x218810
cmpl %r9d, %eax
jle 0x1c005
testb %dl, %dl
je 0x1bfe0
cmpb $0x0, 0x2f22fb(%rip)    # 0x30e2c8
je 0x1bfe0
leaq 0xed6cf(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
cmpl $0x0, 0x222f71(%rip)    # 0x23ef58
je 0x1c121
movl $0x0, 0x222f61(%rip)    # 0x23ef58
movw $0x0, 0x323608(%rip)    # 0x33f608
jmp 0x1b918
testb %sil, %sil
je 0x1c209
movl 0x1fc793(%rip), %r9d    # 0x2187a8
addl $0x4, %r9d
movl 0x1fc7f4(%rip), %r8d    # 0x218814
imull %r8d, %r9d
cmpl %r9d, %ecx
setge %r9b
leal (,%r8,8), %r10d
cmpl %r10d, %ecx
setl %r10b
orb %r9b, %r10b
jne 0x1c16f
movl 0x1fc7c6(%rip), %r9d    # 0x218810
movl 0x1fc74b(%rip), %r10d   # 0x21879c
imull %r9d, %r10d
cmpl %r10d, %eax
jge 0x1c16f
cmpb $0x0, 0x220cd9(%rip)    # 0x23cd3e
jne 0x1b918
leal (,%r8,4), %esi
leal (%rsi,%rsi,2), %esi
cmpl %esi, %ecx
jle 0x1c2df
movl 0x154be8(%rip), %esi    # 0x170c6c
testl %esi, %esi
je 0x1c0a4
addl $0x2, %esi
imull %r9d, %esi
cmpl %esi, %eax
jl 0x1c0a4
imull 0x222e81(%rip), %r8d    # 0x23ef1c
cmpl %r8d, %ecx
jl 0x1b918
testb %dl, %dl
je 0x1c0c2
cmpb $0x0, 0x2f2219(%rip)    # 0x30e2c8
je 0x1c0c2
leaq 0xed5ed(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
cmpl $0x0, 0x222e8f(%rip)    # 0x23ef58
jne 0x1bfed
movl $0x2, 0x2f06d7(%rip)    # 0x30c7b0
movl $0x58, %edi
callq 0x27724
movq 0x1fc7e6(%rip), %rax    # 0x2188d0
xorl %ecx, %ecx
cmpq $0x400000, %rax         # imm = 0x400000
setne %cl
leal (%rcx,%rcx,4), %ecx
addl $0x44, %ecx
movl 0x1ff13f(%rip), %edx    # 0x21b240
cmpl 0x31f281(%rip), %edx    # 0x33b388
jge 0x1c3cf
cmpb $0x0, 0x1ff2d1(%rip)    # 0x21b3e5
je 0x1c3cf
movl %ecx, %edx
jmp 0x1c3ea
cmpb $0x0, 0x220c16(%rip)    # 0x23cd3e
jne 0x1b918
movl $0x378, %edi            # imm = 0x378
callq 0x27724
movl $0x1, 0x2f066e(%rip)    # 0x30c7b0
cmpb $0x0, 0x31f18b(%rip)    # 0x33b2d4
setne %cl
movl 0x31f29a(%rip), %eax    # 0x33b3ec
cmpl $0x8, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1c247
movb $0x4c, 0x2f063e(%rip)   # 0x30c7a8
jmp 0x1c3b0
testb %sil, %sil
je 0x1c209
movl 0x1fc62a(%rip), %esi    # 0x2187a8
addl $0x4, %esi
movl 0x1fc68d(%rip), %eax    # 0x218814
imull %eax, %esi
cmpl %esi, %ecx
jl 0x1c209
movl 0x1fc6e8(%rip), %esi    # 0x21887c
subl %eax, %esi
cmpl %esi, %ecx
jge 0x1c209
testb %dl, %dl
je 0x1c1b8
cmpb $0x0, 0x2f2123(%rip)    # 0x30e2c8
je 0x1c1b8
leaq 0xed4f7(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
cmpl $0x0, 0x222d99(%rip)    # 0x23ef58
jne 0x1bfed
movl $0x50, 0x2f05e1(%rip)   # 0x30c7b0
movl $0x59, %edi
callq 0x27724
movb $0x50, 0x2f05c8(%rip)   # 0x30c7a8
movzbl 0x31f0ed(%rip), %eax    # 0x33b2d4
movl %eax, 0x2f05bf(%rip)    # 0x30c7ac
movl $0x7c, %edi
callq 0xcf81
movl $0x2, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd846f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1b198
movl 0x1fc5e4(%rip), %eax    # 0x218800
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ecx, 0x1ff015(%rip)    # 0x21b240
jle 0x1b918
movl $0x59, %edi
callq 0x27724
movl $0x1, 0x2f056b(%rip)    # 0x30c7b0
jmp 0x1c2b5
movb 0x1ff1bb(%rip), %dl     # 0x21b408
testb %dl, %dl
setne %sil
movb 0x1ff1ba(%rip), %cl     # 0x21b413
testb %cl, %cl
setne %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1c2a0
movb 0x31f17a(%rip), %cl     # 0x33b3e8
testb %cl, %cl
setne %dl
cmpl $0x2, %eax
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x1c2b5
testb %cl, %cl
setne %cl
cmpl $0x1, %eax
sete %al
andb %cl, %al
cmpb $0x1, %al
je 0x1c2d3
movb $0x42, 0x2f050d(%rip)   # 0x30c7a8
jmp 0x1c3b0
testb %dl, %dl
setne %dl
cmpl $0x1, %eax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1c2c1
movb $0x57, 0x2f04ec(%rip)   # 0x30c7a8
jmp 0x1c3b0
testb %cl, %cl
setne %cl
cmpl $0x2, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1c340
movb $0x4d, 0x2f04ce(%rip)   # 0x30c7a8
jmp 0x1c3b0
shll $0x3, %r9d
leal (%r9,%r9,2), %ecx
cmpl %ecx, %eax
jg 0x1b918
testb %dl, %dl
je 0x1c30d
cmpb $0x0, 0x2f1fce(%rip)    # 0x30e2c8
je 0x1c30d
leaq 0xed3a2(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x9cd3
cmpl $0x0, 0x222c44(%rip)    # 0x23ef58
jne 0x1bfed
xorl %eax, %eax
cmpb $0x0, 0x31efb1(%rip)    # 0x33b2d4
sete %al
leal 0x1(,%rax,2), %eax
movl %eax, 0x2f047d(%rip)    # 0x30c7b0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ae61
cmpb $0x0, 0x1ff0ce(%rip)    # 0x21b415
setne %cl
cmpl $0x4, %eax
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x1c3a6
movb $0x53, 0x2f044b(%rip)   # 0x30c7a8
jmp 0x1c3b0
movb $0x2, %al
jmp 0x1c365
movb $0x1, %al
movb %al, 0x2209d3(%rip)     # 0x23cd3e
movb 0x1ff068(%rip), %al     # 0x21b3d9
movb %al, 0x1ff063(%rip)     # 0x21b3da
movb $0x1, 0x1ff05b(%rip)    # 0x21b3d9
movl $0x464, %edi            # imm = 0x464
callq 0xcf81
xorl %edi, %edi
callq 0xd84d7
testl %eax, %eax
je 0x1b918
movl $0x6, 0x1fef63(%rip)    # 0x21b304
jmp 0x1b918
movl $0x8, %edi
callq 0x277f5
movzbl 0x31ef1d(%rip), %eax    # 0x33b2d4
movl %eax, 0x2f03ef(%rip)    # 0x30c7ac
movl $0x7c, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcf81
movl 0x1fc43f(%rip), %edx    # 0x218814
imull 0x222b40(%rip), %edx    # 0x23ef1c
cmpl %edx, 0x1fee62(%rip)    # 0x21b244
movl $0x43, %edx
cmovll %ecx, %edx
movb %dl, 0x2f03b8(%rip)     # 0x30c7a8
cmpq $0x20000, %rax          # imm = 0x20000
jne 0x1c3b0
cmpb $0x49, %dl
jne 0x1c3b0
movb $0x44, 0x2f03a4(%rip)   # 0x30c7a8
jmp 0x1c3bd