// File: 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
subq $0x50, %rsp
cmpl $0x0, 0x252c61(%rip)    # 0x27a420
jge 0x277c6
jmp 0x28687
movl 0x252c54(%rip), %eax    # 0x27a420
cmpl 0x25020e(%rip), %eax    # 0x2779e0
jl 0x277d9
jmp 0x28687
cmpl $0x0, 0x252c44(%rip)    # 0x27a424
jge 0x277e7
jmp 0x28687
movl 0x252c37(%rip), %eax    # 0x27a424
cmpl 0x2501f1(%rip), %eax    # 0x2779e4
jl 0x277fa
jmp 0x28687
jmp 0x277fc
jmp 0x277fe
jmp 0x27800
cmpl $0x1, 0x252c35(%rip)    # 0x27a43c
jne 0x2781b
cmpl $0x0, 0x252c30(%rip)    # 0x27a440
jne 0x2781b
movl $0x1, -0x4(%rbp)
jmp 0x27822
movl $0x0, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x2784a
cmpl $0x2, 0x250189(%rip)    # 0x2779b8
jne 0x2784a
movl $0x1, %edi
callq 0xa110
movl $0x20, %edi
callq 0xf320
jmp 0x28687
cmpl $0x0, -0x4(%rbp)
je 0x27872
cmpl $0x0, 0x377fa5(%rip)    # 0x39f7fc
je 0x27872
movl $0x1, %edi
callq 0xa110
movl $0x20, %edi
callq 0xf320
jmp 0x28685
movzbl 0x34410f(%rip), %eax    # 0x36b988
cmpl $0x4b, %eax
jne 0x2789c
cmpl $0x0, -0x4(%rbp)
je 0x2789c
movl 0x252b9a(%rip), %eax    # 0x27a424
cmpl 0x2501cc(%rip), %eax    # 0x277a5c
jge 0x2789c
callq 0x26cc0
jmp 0x28683
movzbl 0x3440e5(%rip), %eax    # 0x36b988
cmpl $0x60, %eax
jne 0x27936
cmpl $0x0, -0x4(%rbp)
je 0x27936
movl 0x252b68(%rip), %eax    # 0x27a424
movl %eax, -0xc(%rbp)
imull $0x64, 0x25ae5e(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xc(%rbp), %eax
cmpl %ecx, %eax
jge 0x27936
movl 0x252b43(%rip), %eax    # 0x27a420
movl %eax, -0x10(%rbp)
imull $0x64, 0x25ae3d(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x10(%rbp), %eax
cmpl %ecx, %eax
jge 0x27936
movl $0x14d, %edi            # imm = 0x14D
callq 0xa110
movl $0xffffffff, 0x3730fc(%rip) # imm = 0xFFFFFFFF
movb $0x4b, 0x344075(%rip)   # 0x36b988
movl $0x1, %edi
callq 0x11970
movl $0x1, 0x34406d(%rip)    # 0x36b994
movl $0x0, 0x3730db(%rip)    # 0x39aa0c
jmp 0x28681
cmpb $0x0, 0x34404b(%rip)    # 0x36b988
je 0x279a2
cmpl $0x0, -0x4(%rbp)
je 0x279a2
movl 0x252ad9(%rip), %eax    # 0x27a424
movl %eax, -0x14(%rbp)
imull $0x64, 0x25adcf(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x14(%rbp), %eax
cmpl %ecx, %eax
jge 0x279a2
movl 0x252ab4(%rip), %eax    # 0x27a420
movl %eax, -0x18(%rbp)
imull $0x64, 0x25adae(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jge 0x279a2
jmp 0x27989
movl $0x2, %edi
callq 0xa110
movl $0x1b, %edi
callq 0xf320
jmp 0x2867f
cmpb $0x0, 0x252a55(%rip)    # 0x27a3fe
je 0x27a13
cmpl $0x0, -0x4(%rbp)
je 0x27a13
movl 0x252a6d(%rip), %eax    # 0x27a424
movl %eax, -0x1c(%rbp)
imull $0x64, 0x25ad63(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jge 0x27a13
movl 0x252a48(%rip), %eax    # 0x27a420
movl %eax, -0x20(%rbp)
imull $0x64, 0x25ad42(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x20(%rbp), %eax
cmpl %ecx, %eax
jge 0x27a13
movl $0x3, %edi
callq 0xa110
movb $0x4b, 0x343f84(%rip)   # 0x36b988
movl $0x1, %edi
callq 0x11970
jmp 0x2867d
cmpb $0x0, 0x2529e4(%rip)    # 0x27a3fe
je 0x27b3a
cmpl $0x0, -0x4(%rbp)
je 0x27b3a
movl 0x2529f4(%rip), %eax    # 0x27a424
movl %eax, -0x24(%rbp)
imull $0x64, 0x25acea(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0x27b3a
movl 0x2529cb(%rip), %eax    # 0x27a420
movl %eax, -0x28(%rbp)
imull $0x64, 0x25acc5(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x28(%rbp), %eax
cmpl %ecx, %eax
jle 0x27b3a
movl 0x2529a6(%rip), %eax    # 0x27a420
movl %eax, -0x2c(%rbp)
movl 0x24fef5(%rip), %eax    # 0x277978
imull 0x24ff66(%rip), %eax    # 0x2779f0
imull 0x25ac93(%rip), %eax    # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jge 0x27b3a
cmpl $0x0, 0x252953(%rip)    # 0x27a400
je 0x27ac6
movl $0x16, %edi
callq 0xa110
movl 0x252941(%rip), %edi    # 0x27a400
callq 0xf320
jmp 0x27b35
cmpq $0x0, 0x1a839a(%rip)    # 0x1cfe68
je 0x27b33
movl 0x24ff3e(%rip), %edi    # 0x277a14
movq 0x1a838b(%rip), %rdx    # 0x1cfe68
xorl %esi, %esi
callq 0x12810
callq 0x117e0
movq 0x1a8378(%rip), %rdx    # 0x1cfe68
leaq 0x373909(%rip), %rdi    # 0x39b400
leaq 0x1490c4(%rip), %rsi    # 0x170bc2
movb $0x0, %al
callq 0x9060
xorl %esi, %esi
movl $0xe, %edx
leaq 0x3738ed(%rip), %rcx    # 0x39b400
movl %esi, %edi
callq 0x10ee0
callq 0xb0d0
movl $0x19ba, 0x24fefb(%rip) # imm = 0x19BA
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xb8b0
jmp 0x27b35
jmp 0x2867b
movzbl 0x343e47(%rip), %eax    # 0x36b988
cmpl $0x46, %eax
jne 0x27b51
cmpl $0x0, -0x4(%rbp)
je 0x27b51
jmp 0x27989
movzbl 0x343e30(%rip), %eax    # 0x36b988
cmpl $0x4c, %eax
jne 0x27b68
cmpl $0x0, -0x4(%rbp)
je 0x27b68
jmp 0x27989
movzbl 0x343e19(%rip), %eax    # 0x36b988
cmpl $0x4f, %eax
jne 0x27b7f
cmpl $0x0, -0x4(%rbp)
je 0x27b7f
jmp 0x27989
movzbl 0x343e02(%rip), %eax    # 0x36b988
cmpl $0x51, %eax
jne 0x27c98
cmpl $0x0, -0x4(%rbp)
je 0x27c98
movl 0x252885(%rip), %eax    # 0x27a424
movl %eax, -0x30(%rbp)
movl 0x24fe3c(%rip), %ecx    # 0x2779e4
imull $0x64, 0x25ab75(%rip), %eax # 0x282724
movl $0x64, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x30(%rbp), %eax
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x27c8e
movl 0x252854(%rip), %eax    # 0x27a420
movl %eax, -0x34(%rbp)
imull $0x64, 0x25ab4e(%rip), %eax # 0x282724
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jge 0x27c24
movl $0x42, %edi
callq 0xa110
movl 0x344b11(%rip), %eax    # 0x36c708
addl $-0x1, %eax
movl %eax, 0x344b08(%rip)    # 0x36c708
cmpl $0x1, 0x344b01(%rip)    # 0x36c708
jge 0x27c22
movl $0xc, 0x344af5(%rip)    # 0x36c708
movl 0x344af3(%rip), %eax    # 0x36c70c
addl $-0x1, %eax
movl %eax, 0x344aea(%rip)    # 0x36c70c
jmp 0x27c8c
movl 0x2527f6(%rip), %eax    # 0x27a420
movl %eax, -0x38(%rbp)
movl 0x24fdad(%rip), %ecx    # 0x2779e0
imull $0x64, 0x25aaea(%rip), %eax # 0x282724
movl $0x64, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x38(%rbp), %eax
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x27c8a
movl $0x43, %edi
callq 0xa110
movl 0x344aab(%rip), %eax    # 0x36c708
addl $0x1, %eax
movl %eax, 0x344aa2(%rip)    # 0x36c708
cmpl $0xc, 0x344a9b(%rip)    # 0x36c708
jle 0x27c88
movl $0x1, 0x344a8f(%rip)    # 0x36c708
movl 0x344a8d(%rip), %eax    # 0x36c70c
addl $0x1, %eax
movl %eax, 0x344a84(%rip)    # 0x36c70c
jmp 0x27c8a
jmp 0x27c8c
jmp 0x27c93
jmp 0x27989
jmp 0x28673
movzbl 0x343ce9(%rip), %eax    # 0x36b988
cmpl $0x60, %eax
jne 0x27cf8
cmpl $0x0, -0x4(%rbp)
je 0x27cf8
movl $0xde, %edi
callq 0xa110
movl $0x0, 0x372d4a(%rip)    # 0x39aa08
movw $0x0, 0x376b21(%rip)    # 0x39e7e8
callq 0x266d0
cmpb $0x0, 0x3767ed(%rip)    # 0x39e4c0
je 0x27ce9
movl $0x1b, %edi
callq 0xf320
movl $0xd, %edi
callq 0xf320
movl $0x20, %edi
callq 0xf320
jmp 0x28671
cmpl $0x4, 0x343c91(%rip)    # 0x36b990
jne 0x27d31
cmpl $0x0, -0x4(%rbp)
je 0x27d31
movl $0x4, %edi
callq 0xa110
callq 0x266d0
xorl %edi, %edi
callq 0x127d80
cmpl $0x0, %eax
je 0x27d2c
movl $0x5, 0x2527b8(%rip)    # 0x27a4e4
jmp 0x2866f
cmpb $0x0, 0x343c50(%rip)    # 0x36b988
je 0x27d60
cmpl $0x0, -0x4(%rbp)
je 0x27d60
movzbl 0x343c41(%rip), %eax    # 0x36b988
cmpl $0x50, %eax
je 0x27d60
movl $0x5, %edi
callq 0xa110
callq 0x266d0
jmp 0x2866d
movzbl 0x343c21(%rip), %eax    # 0x36b988
cmpl $0x50, %eax
jne 0x27dd1
cmpl $0x0, -0x4(%rbp)
je 0x27dd1
movl 0x2526ac(%rip), %eax    # 0x27a424
movl 0x24fcde(%rip), %ecx    # 0x277a5c
subl 0x24fc70(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jge 0x27dd1
movl $0x6, %edi
callq 0xa110
movl 0x252688(%rip), %eax    # 0x27a420
movl %eax, -0x3c(%rbp)
movl 0x24fc3f(%rip), %ecx    # 0x2779e0
imull $0x64, 0x25a97c(%rip), %eax # 0x282724
movl $0x64, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x3c(%rbp), %eax
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x27dc7
movl $0x1, %edi
callq 0x14e40
jmp 0x27dcc
callq 0x266d0
jmp 0x2866b
movzbl 0x343bb0(%rip), %eax    # 0x36b988
cmpl $0x0, %eax
jne 0x27e40
cmpb $0x0, 0x3726d0(%rip)    # 0x39a4b4
je 0x27e40
cmpl $0x0, -0x4(%rbp)
je 0x27e40
movl 0x252632(%rip), %eax    # 0x27a424
cmpl 0x372680(%rip), %eax    # 0x39a478
jge 0x27e40
movl 0x252620(%rip), %eax    # 0x27a420
movl 0x24fbda(%rip), %ecx    # 0x2779e0
subl 0x37266c(%rip), %ecx    # 0x39a478
cmpl %ecx, %eax
jle 0x27e40
movl $0x7, %edi
callq 0xa110
cmpl $0x0, 0x276317(%rip)    # 0x29e138
je 0x27e3b
movl $0x0, 0x27630b(%rip)    # 0x29e138
movw $0x0, 0x3769b2(%rip)    # 0x39e7e8
jmp 0x28687
jmp 0x28270
cmpq $0x400, 0x24fc65(%rip) # imm = 0x400
jne 0x27f2b
cmpl $0x0, -0x4(%rbp)
je 0x27f26
movl $0x8, %edi
callq 0xa110
cmpl $0x0, 0x2762cc(%rip)    # 0x29e138
je 0x27e86
movl $0x0, 0x2762c0(%rip)    # 0x29e138
movw $0x0, 0x376967(%rip)    # 0x39e7e8
jmp 0x28687
movl 0x252598(%rip), %eax    # 0x27a424
movl %eax, -0x40(%rbp)
movl 0x24fb4f(%rip), %eax    # 0x2779e4
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x40(%rbp), %eax
cmpl %ecx, %eax
jle 0x27ed0
movl $0x3, 0x343ae0(%rip)    # 0x36b990
movb $0x43, 0x343ad1(%rip)   # 0x36b988
movzbl 0x3725f6(%rip), %eax    # 0x39a4b4
movl %eax, 0x343ac8(%rip)    # 0x36b98c
movl $0x7c, %edi
callq 0xeaf0
jmp 0x27f24
movl 0x25254a(%rip), %eax    # 0x27a420
movl %eax, -0x44(%rbp)
movl 0x24fb01(%rip), %eax    # 0x2779e0
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jle 0x27f22
movl $0x59, %edi
callq 0x375a0
movl $0x1, 0x343a8c(%rip)    # 0x36b990
movb $0x57, 0x343a7d(%rip)   # 0x36b988
movzbl 0x3725a2(%rip), %eax    # 0x39a4b4
movl %eax, 0x343a74(%rip)    # 0x36b98c
movl $0x7c, %edi
callq 0xeaf0
jmp 0x27f24
jmp 0x27f26
jmp 0x28667
movzbl 0x343a56(%rip), %eax    # 0x36b988
cmpl $0x0, %eax
jne 0x28096
cmpb $0x0, 0x372687(%rip)    # 0x39a5c9
je 0x28096
cmpl $0x0, 0x37267d(%rip)    # 0x39a5cc
je 0x28096
cmpl $0x0, -0x4(%rbp)
je 0x28096
movl 0x2524bf(%rip), %eax    # 0x27a424
cmpl 0x24faf1(%rip), %eax    # 0x277a5c
jl 0x28096
movl 0x2524a9(%rip), %eax    # 0x27a420
movl 0x24fae3(%rip), %ecx    # 0x277a60
addl 0x24fae1(%rip), %ecx    # 0x277a64
cmpl %ecx, %eax
jle 0x28096
movl $0x9, %edi
callq 0xa110
cmpl $0x0, 0x27619c(%rip)    # 0x29e138
je 0x27fb6
movl $0x0, 0x276190(%rip)    # 0x29e138
movw $0x0, 0x376837(%rip)    # 0x39e7e8
jmp 0x28687
cmpl $0x0, 0x377107(%rip)    # 0x39f0c4
je 0x27fd7
movl 0x25245b(%rip), %eax    # 0x27a420
movl 0x24fa15(%rip), %ecx    # 0x2779e0
subl $0x30, %ecx
cmpl %ecx, %eax
jl 0x27fd7
jmp 0x28091
cmpl $0x0, 0x3770e6(%rip)    # 0x39f0c4
je 0x27ff8
movl 0x25243e(%rip), %eax    # 0x27a424
movl 0x24f9f8(%rip), %ecx    # 0x2779e4
subl $0x30, %ecx
cmpl %ecx, %eax
jl 0x27ff8
jmp 0x2808f
movl $0x58, %edi
callq 0x375a0
movl $0x1, 0x343984(%rip)    # 0x36b990
cmpl $0x1, 0x3725b9(%rip)    # 0x39a5cc
jne 0x2801e
movb $0x57, 0x34396c(%rip)   # 0x36b988
jmp 0x28078
cmpl $0x2, 0x3725a7(%rip)    # 0x39a5cc
jne 0x28030
movb $0x4d, 0x34395a(%rip)   # 0x36b988
jmp 0x28076
cmpl $0x3, 0x372595(%rip)    # 0x39a5cc
jne 0x28042
movb $0x42, 0x343948(%rip)   # 0x36b988
jmp 0x28074
cmpl $0x4, 0x372583(%rip)    # 0x39a5cc
jne 0x28054
movb $0x53, 0x343936(%rip)   # 0x36b988
jmp 0x28072
cmpl $0x8, 0x372571(%rip)    # 0x39a5cc
jne 0x28066
movb $0x4c, 0x343924(%rip)   # 0x36b988
jmp 0x28070
movl $0x7, %edi
callq 0x376e0
jmp 0x28072
jmp 0x28074
jmp 0x28076
jmp 0x28078
movzbl 0x372435(%rip), %eax    # 0x39a4b4
movl %eax, 0x343907(%rip)    # 0x36b98c
movl $0x7c, %edi
callq 0xeaf0
jmp 0x28091
jmp 0x28665
movzbl 0x3438eb(%rip), %eax    # 0x36b988
cmpl $0x0, %eax
jne 0x281e7
cmpl $0x0, -0x4(%rbp)
je 0x281e7
cmpl $0x0, 0x273dad(%rip)    # 0x29be64
je 0x281e7
movl 0x252361(%rip), %eax    # 0x27a424
movl 0x25c097(%rip), %ecx    # 0x284160
addl $0x2, %ecx
shll %ecx
addl $0x0, %ecx
imull 0x24f91c(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jge 0x281e7
movl 0x25233a(%rip), %eax    # 0x27a420
movl 0x24f8bc(%rip), %ecx    # 0x2779a8
imull 0x24f8fd(%rip), %ecx    # 0x2779f0
cmpl %ecx, %eax
jle 0x281e7
movl 0x25231f(%rip), %eax    # 0x27a420
movl 0x273d5d(%rip), %ecx    # 0x29be64
addl $0x4f, %ecx
imull 0x24f8df(%rip), %ecx    # 0x2779f0
cmpl %ecx, %eax
jge 0x281e7
movl $0x13, %edi
callq 0xa110
cmpl $0x0, 0x27600e(%rip)    # 0x29e138
je 0x28144
movl $0x0, 0x276002(%rip)    # 0x29e138
movw $0x0, 0x3766a9(%rip)    # 0x39e7e8
jmp 0x28687
movl $0x58, %edi
callq 0x375a0
movl $0x4, 0x343838(%rip)    # 0x36b990
cmpq $0x0, 0x273c08(%rip)    # 0x29bd68
jne 0x2816b
movb $0x2, 0x273db5(%rip)    # 0x29bf1e
jmp 0x281af
cmpq $0x0, 0x273ba5(%rip)    # 0x29bd18
jne 0x2817e
movb $0x1, 0x273da2(%rip)    # 0x29bf1e
jmp 0x281ad
movl 0x2522a0(%rip), %eax    # 0x27a424
movl 0x25bfd6(%rip), %ecx    # 0x284160
addl $0x0, %ecx
addl $0x2, %ecx
imull 0x24f85d(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jge 0x281a4
movb $0x2, 0x273d7c(%rip)    # 0x29bf1e
jmp 0x281ab
movb $0x1, 0x273d73(%rip)    # 0x29bf1e
jmp 0x281ad
jmp 0x281af
movb 0x252404(%rip), %al     # 0x27a5b9
movb %al, 0x2523ff(%rip)     # 0x27a5ba
movb $0x1, 0x2523f7(%rip)    # 0x27a5b9
movl $0x464, %edi            # imm = 0x464
callq 0xeaf0
xorl %edi, %edi
callq 0x127d80
cmpl $0x0, %eax
je 0x281e2
movl $0x6, 0x252302(%rip)    # 0x27a4e4
jmp 0x28663
movzbl 0x34379a(%rip), %eax    # 0x36b988
cmpl $0x0, %eax
jne 0x28384
cmpl $0x0, -0x4(%rbp)
je 0x28384
movl 0x25221d(%rip), %eax    # 0x27a424
movl %eax, -0x48(%rbp)
movl 0x24f7d4(%rip), %eax    # 0x2779e4
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x48(%rbp), %eax
cmpl %ecx, %eax
jge 0x28384
movl 0x2521f5(%rip), %eax    # 0x27a420
movl 0x273c33(%rip), %ecx    # 0x29be64
addl $0x4f, %ecx
imull 0x24f7b5(%rip), %ecx    # 0x2779f0
cmpl %ecx, %eax
jle 0x28384
movl $0xa, %edi
callq 0xa110
cmpl $0x0, 0x275ee4(%rip)    # 0x29e138
je 0x2826e
movl $0x0, 0x275ed8(%rip)    # 0x29e138
movw $0x0, 0x37657f(%rip)    # 0x39e7e8
jmp 0x28687
jmp 0x28270
movzbl 0x273ca7(%rip), %eax    # 0x29bf1e
cmpl $0x0, %eax
jne 0x2837f
movl $0x378, %edi            # imm = 0x378
callq 0x375a0
movl $0x1, 0x3436fc(%rip)    # 0x36b990
cmpb $0x0, 0x372219(%rip)    # 0x39a4b4
je 0x282b2
cmpl $0x8, 0x372328(%rip)    # 0x39a5cc
je 0x282b2
movb $0x4c, 0x3436db(%rip)   # 0x36b988
jmp 0x28368
cmpb $0x0, 0x25232f(%rip)    # 0x27a5e8
je 0x28305
cmpb $0x0, 0x252331(%rip)    # 0x27a5f3
je 0x28305
cmpb $0x0, 0x3722fd(%rip)    # 0x39a5c8
je 0x282df
cmpl $0x2, 0x3722f8(%rip)    # 0x39a5cc
jne 0x282df
movb $0x57, 0x3436ab(%rip)   # 0x36b988
jmp 0x28303
cmpb $0x0, 0x3722e2(%rip)    # 0x39a5c8
je 0x282fa
cmpl $0x1, 0x3722dd(%rip)    # 0x39a5cc
jne 0x282fa
movb $0x4d, 0x343690(%rip)   # 0x36b988
jmp 0x28301
movb $0x42, 0x343687(%rip)   # 0x36b988
jmp 0x28303
jmp 0x28366
cmpb $0x0, 0x2522dc(%rip)    # 0x27a5e8
je 0x28320
cmpl $0x1, 0x3722b7(%rip)    # 0x39a5cc
je 0x28320
movb $0x57, 0x34366a(%rip)   # 0x36b988
jmp 0x28364
cmpb $0x0, 0x2522cc(%rip)    # 0x27a5f3
je 0x2833b
cmpl $0x2, 0x37229c(%rip)    # 0x39a5cc
je 0x2833b
movb $0x4d, 0x34364f(%rip)   # 0x36b988
jmp 0x28362
cmpb $0x0, 0x2522b3(%rip)    # 0x27a5f5
je 0x28356
cmpl $0x4, 0x372281(%rip)    # 0x39a5cc
je 0x28356
movb $0x53, 0x343634(%rip)   # 0x36b988
jmp 0x28360
movl $0x8, %edi
callq 0x376e0
jmp 0x28362
jmp 0x28364
jmp 0x28366
jmp 0x28368
movzbl 0x372145(%rip), %eax    # 0x39a4b4
movl %eax, 0x343617(%rip)    # 0x36b98c
movl $0x7c, %edi
callq 0xeaf0
jmp 0x28661
movzbl 0x3435fd(%rip), %eax    # 0x36b988
cmpl $0x0, %eax
jne 0x285a5
cmpl $0x0, -0x4(%rbp)
je 0x285a5
movl 0x252080(%rip), %eax    # 0x27a424
movl 0x24f5de(%rip), %ecx    # 0x277988
addl $0x4, %ecx
imull 0x24f640(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jge 0x285a5
movl 0x252062(%rip), %eax    # 0x27a424
movl 0x24f62c(%rip), %ecx    # 0x2779f4
shll $0x3, %ecx
cmpl %ecx, %eax
jl 0x285a5
movl 0x252047(%rip), %eax    # 0x27a420
movl 0x24f59d(%rip), %ecx    # 0x27797c
imull 0x24f60a(%rip), %ecx    # 0x2779f0
cmpl %ecx, %eax
jge 0x285a5
cmpb $0x0, 0x273b29(%rip)    # 0x29bf1e
je 0x283fc
jmp 0x285a0
movl 0x252022(%rip), %eax    # 0x27a424
imull $0xc, 0x24f5eb(%rip), %ecx # 0x2779f4
cmpl %ecx, %eax
jg 0x28477
movl 0x25200d(%rip), %eax    # 0x27a420
imull $0x18, 0x24f5d6(%rip), %ecx # 0x2779f0
cmpl %ecx, %eax
jg 0x28472
movl $0x6f, %edi
callq 0xa110
cmpl $0x0, 0x275d09(%rip)    # 0x29e138
je 0x28449
movl $0x0, 0x275cfd(%rip)    # 0x29e138
movw $0x0, 0x3763a4(%rip)    # 0x39e7e8
jmp 0x28687
cmpb $0x0, 0x372064(%rip)    # 0x39a4b4
je 0x2845e
movl $0x1, 0x343534(%rip)    # 0x36b990
jmp 0x28468
movl $0x3, 0x343528(%rip)    # 0x36b990
movl $0x1, %edi
callq 0x26b60
jmp 0x2859e
cmpl $0x0, 0x1a79ce(%rip)    # 0x1cfe4c
je 0x284b9
movl 0x251f9a(%rip), %eax    # 0x27a420
movl 0x1a79c0(%rip), %ecx    # 0x1cfe4c
addl $0x2, %ecx
imull 0x24f55a(%rip), %ecx    # 0x2779f0
cmpl %ecx, %eax
jl 0x284b9
movl 0x251f84(%rip), %eax    # 0x27a424
movl 0x275c56(%rip), %ecx    # 0x29e0fc
subl $0x0, %ecx
imull 0x24f544(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jge 0x284b9
jmp 0x2859c
movl $0x70, %edi
callq 0xa110
cmpl $0x0, 0x275c6e(%rip)    # 0x29e138
je 0x284e4
movl $0x0, 0x275c62(%rip)    # 0x29e138
movw $0x0, 0x376309(%rip)    # 0x39e7e8
jmp 0x28687
movl $0x2, 0x3434a2(%rip)    # 0x36b990
movl $0x58, %edi
callq 0x375a0
movl $0x49, -0x8(%rbp)
cmpq $0x400000, 0x24f5a6(%rip) # imm = 0x400000
jne 0x28513
movl $0x44, -0x8(%rbp)
movl 0x251f07(%rip), %eax    # 0x27a420
cmpl 0x372049(%rip), %eax    # 0x39a568
jge 0x28535
cmpb $0x0, 0x25209d(%rip)    # 0x27a5c5
je 0x28535
movl -0x8(%rbp), %eax
movb %al, 0x343455(%rip)     # 0x36b988
jmp 0x28563
movl 0x251ee9(%rip), %eax    # 0x27a424
movl 0x275bbb(%rip), %ecx    # 0x29e0fc
subl $0x0, %ecx
imull 0x24f4a9(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jge 0x2855a
movl -0x8(%rbp), %eax
movb %al, 0x343430(%rip)     # 0x36b988
jmp 0x28561
movb $0x43, 0x343427(%rip)   # 0x36b988
jmp 0x28563
cmpq $0x20000, 0x24f542(%rip) # imm = 0x20000
jne 0x28585
movzbl 0x343411(%rip), %eax    # 0x36b988
cmpl $0x49, %eax
jne 0x28585
movb $0x44, 0x343405(%rip)   # 0x36b988
jmp 0x28592
movzbl 0x371f28(%rip), %eax    # 0x39a4b4
movl %eax, 0x3433fa(%rip)    # 0x36b98c
movl $0x7c, %edi
callq 0xeaf0
jmp 0x2859e
jmp 0x285a0
jmp 0x2865f
movzbl 0x3433dc(%rip), %eax    # 0x36b988
cmpl $0x0, %eax
jne 0x28655
cmpl $0x0, -0x4(%rbp)
je 0x28655
movl 0x251e5f(%rip), %eax    # 0x27a424
movl 0x24f3bd(%rip), %ecx    # 0x277988
addl $0x4, %ecx
imull 0x24f41f(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jl 0x28655
movl 0x251e45(%rip), %eax    # 0x27a424
movl 0x24f477(%rip), %ecx    # 0x277a5c
subl 0x24f409(%rip), %ecx    # 0x2779f4
cmpl %ecx, %eax
jge 0x28655
movl $0xc, %edi
callq 0xa110
cmpl $0x0, 0x275b38(%rip)    # 0x29e138
je 0x28617
movl $0x0, 0x275b2c(%rip)    # 0x29e138
movw $0x0, 0x3761d3(%rip)    # 0x39e7e8
jmp 0x28687
movl $0x50, 0x34336f(%rip)   # 0x36b990
movl $0x59, %edi
callq 0x375a0
movb $0x50, 0x343356(%rip)   # 0x36b988
movzbl 0x371e7b(%rip), %eax    # 0x39a4b4
movl %eax, 0x34334d(%rip)    # 0x36b98c
movl $0x7c, %edi
callq 0xeaf0
movl $0x2, %edi
callq 0x127cf0
jmp 0x2865d
movl -0x4(%rbp), %edi
callq 0x26fd0
jmp 0x2865f
jmp 0x28661
jmp 0x28663
jmp 0x28665
jmp 0x28667
jmp 0x28669
jmp 0x2866b
jmp 0x2866d
jmp 0x2866f
jmp 0x28671
jmp 0x28673
jmp 0x28675
jmp 0x28677
jmp 0x28679
jmp 0x2867b
jmp 0x2867d
jmp 0x2867f
jmp 0x28681
jmp 0x28683
jmp 0x28685
jmp 0x28687
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)