// File: /workspace/github_cpp_makefile_star2_O3/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 0x1ffa46(%rip), %eax    # 0x21b240
testl %eax, %eax
setns %cl
movl 0x1fcffa(%rip), %r9d    # 0x218800
cmpl %r9d, %eax
setl %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1b949
movl 0x1ffa27(%rip), %ecx    # 0x21b244
testl %ecx, %ecx
setns %dl
movl 0x1fcfdc(%rip), %esi    # 0x218804
cmpl %esi, %ecx
setl %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x1b949
movl 0x1ffa1b(%rip), %edx    # 0x21b25c
xorl $0x1, %edx
xorl %edi, %edi
orl 0x1ffa14(%rip), %edx    # 0x21b260
sete %r8b
jne 0x1b85b
cmpl $0x2, 0x1fcf7f(%rip)    # 0x2187d8
je 0x1b86b
movb %r8b, %dil
testl %edi, %edi
je 0x1b8a0
cmpl $0x0, 0x324db3(%rip)    # 0x34061c
je 0x1b8a0
cmpb $0x0, 0x2f2a56(%rip)    # 0x30e2c8
je 0x1b88e
cmpb $0x0, 0x1ff9a3(%rip)    # 0x21b21e
je 0x1b88e
leaq 0xede31(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl $0x20, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd4c8
movl %r8d, %r11d
xorb $0x1, %r11b
movb 0x2f0efa(%rip), %r10b   # 0x30c7a8
cmpb $0x4b, %r10b
setne %dl
orb %r11b, %dl
jne 0x1b8d3
cmpl 0x1fcfbc(%rip), %ecx    # 0x21887c
jge 0x1b952
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1af85
cmpb $0x60, %r10b
setne %dl
orb %r11b, %dl
jne 0x1b952
movl 0x207c5f(%rip), %edx    # 0x223544
cmpl %edx, %ecx
setge %r14b
cmpl %edx, %eax
setge %dl
movb $0x1, %bl
orb %r14b, %dl
jne 0x1b954
cmpb $0x0, 0x2f29ca(%rip)    # 0x30e2c8
je 0x1b91a
cmpb $0x0, 0x1ff917(%rip)    # 0x21b21e
je 0x1b91a
leaq 0xedda5(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl $0xffffffff, 0x31ff04(%rip) # imm = 0xFFFFFFFF
movb $0x4b, 0x2f0e7d(%rip)   # 0x30c7a8
movl $0x1, %edi
callq 0xedfe
movl $0x1, 0x2f0e75(%rip)    # 0x30c7b4
movl $0x0, 0x31fee3(%rip)    # 0x33b82c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
testb %r10b, %r10b
sete %dl
orb %r11b, %dl
jne 0x1b980
movl 0x207bdf(%rip), %edx    # 0x223544
cmpl %edx, %ecx
setge %r14b
cmpl %edx, %eax
setge %dl
orb %r14b, %dl
jne 0x1b980
movb 0x1ff8a3(%rip), %dl     # 0x21b21e
jmp 0x1ba7d
movb 0x1ff898(%rip), %dl     # 0x21b21e
testb %dl, %dl
sete %r14b
orb %r11b, %r14b
jne 0x1ba59
movl 0x207ba8(%rip), %r14d   # 0x223544
cmpl %r14d, %ecx
setge %r15b
cmpl %r14d, %eax
setge %r12b
orb %r15b, %r12b
jne 0x1b9e2
cmpb $0x0, 0x2f2912(%rip)    # 0x30e2c8
je 0x1b9c9
leaq 0xedcf6(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movb $0x4b, 0x2f0dd8(%rip)   # 0x30c7a8
movl $0x1, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xedfe
cmpl %r14d, %ecx
setge %r15b
cmpl %r14d, %eax
setbe %r12b
orb %r15b, %r12b
jne 0x1ba59
imull 0x1fcd9b(%rip), %r14d   # 0x218798
imull 0x1fce0b(%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 0x1ba59
movl 0x1ff7f8(%rip), %edi    # 0x21b220
testl %edi, %edi
je 0x1bc5c
cmpb $0x0, 0x2f2891(%rip)    # 0x30e2c8
je 0x1b893
leaq 0xedc71(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl 0x1ff7cc(%rip), %edi    # 0x21b220
jmp 0x1b893
cmpb $0x46, %r10b
sete %r14b
cmpb $0x4c, %r10b
sete %r12b
cmpb $0x4f, %r10b
sete %r15b
testl %edi, %edi
je 0x1baa5
orb %r12b, %r14b
orb %r14b, %r15b
je 0x1baa5
cmpb $0x0, 0x2f2844(%rip)    # 0x30e2c8
je 0x1ba9b
testb %dl, %dl
je 0x1ba9b
leaq 0xedc24(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl $0x1b, %edi
jmp 0x1b893
cmpb $0x51, %r10b
setne %r14b
orb %r11b, %r14b
jne 0x1bb11
movl 0x207a8c(%rip), %edi    # 0x223544
subl %edi, %esi
cmpl %esi, %ecx
jle 0x1ba7d
cmpl %edi, %eax
jge 0x1bc05
testb %dl, %dl
je 0x1bae4
cmpb $0x0, 0x2f27f7(%rip)    # 0x30e2c8
je 0x1bae4
leaq 0xedbdb(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl 0x2f1a3e(%rip), %eax    # 0x30d528
leal -0x1(%rax), %ecx
movl %ecx, 0x2f1a35(%rip)    # 0x30d528
cmpl $0x1, %eax
jg 0x1b949
movl $0xc, 0x2f1a22(%rip)    # 0x30d528
decl 0x2f1a20(%rip)          # 0x30d52c
jmp 0x1b949
testb %bl, %bl
je 0x1bb71
testb %dl, %dl
je 0x1bb33
cmpb $0x0, 0x2f27a8(%rip)    # 0x30e2c8
je 0x1bb33
leaq 0xedb8c(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl $0x0, 0x31fceb(%rip)    # 0x33b828
movw $0x0, 0x323ac2(%rip)    # 0x33f608
callq 0x1ab8b
cmpb $0x0, 0x32378e(%rip)    # 0x33f2e0
je 0x1b88e
movl $0x1b, %edi
callq 0xd4c8
movl $0xd, %edi
callq 0xd4c8
jmp 0x1b88e
testl %edi, %edi
je 0x1bbbf
cmpl $0x4, 0x2f0c34(%rip)    # 0x30c7b0
jne 0x1bbbf
testb %dl, %dl
je 0x1bb9c
cmpb $0x0, 0x2f273f(%rip)    # 0x30e2c8
je 0x1bb9c
leaq 0xedb23(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
callq 0x1ab8b
xorl %edi, %edi
callq 0xd8c0d
testl %eax, %eax
je 0x1b949
movl $0x5, 0x1ff74a(%rip)    # 0x21b304
jmp 0x1b949
testl %edi, %edi
je 0x1bccf
testb %r10b, %r10b
je 0x1bccf
cmpb $0x50, %r10b
je 0x1bccf
testb %dl, %dl
je 0x1bbf8
cmpb $0x0, 0x2f26e3(%rip)    # 0x30e2c8
je 0x1bbf8
leaq 0xedac7(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ab8b
subl %edi, %r9d
cmpl %r9d, %eax
jle 0x1b949
testb %dl, %dl
je 0x1bc2f
cmpb $0x0, 0x2f26ac(%rip)    # 0x30e2c8
je 0x1bc2f
leaq 0xeda90(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl 0x2f18f3(%rip), %eax    # 0x30d528
leal 0x1(%rax), %ecx
movl %ecx, 0x2f18ea(%rip)    # 0x30d528
cmpl $0xc, %eax
jl 0x1b949
movl $0x1, 0x2f18d7(%rip)    # 0x30d528
incl 0x2f18d5(%rip)          # 0x30d52c
jmp 0x1b949
movq 0x155025(%rip), %rdx    # 0x170c88
testq %rdx, %rdx
je 0x1b949
movl 0x1fcbc2(%rip), %edi    # 0x218834
xorl %esi, %esi
callq 0xf7a8
callq 0xeceb
movq 0x155003(%rip), %rdx    # 0x170c88
leaq 0x320594(%rip), %rbx    # 0x33c220
leaq 0xeef42(%rip), %rsi     # 0x10abd5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
movq %rbx, %rcx
callq 0xe787
callq 0xab54
movl $0x19ba, 0x1fcb87(%rip) # imm = 0x19BA
movl $0xf4240, %edi          # imm = 0xF4240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9540
cmpb $0x50, %r10b
setne %bl
orb %bl, %r11b
jne 0x1bd3f
movl 0x1fcb9a(%rip), %r10d   # 0x21887c
subl 0x1fcb2b(%rip), %r10d   # 0x218814
cmpl %r10d, %ecx
jge 0x1be09
testb %dl, %dl
je 0x1bd1d
cmpb $0x0, 0x2f25cb(%rip)    # 0x30e2c8
je 0x1bd1d
leaq 0xed9af(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
movl 0x1ff52a(%rip), %eax    # 0x21b240
movl 0x1fcae3(%rip), %r9d    # 0x218800
subl 0x207820(%rip), %r9d    # 0x223544
cmpl %r9d, %eax
jle 0x1bbf8
movl $0x1, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x111be
testb %r10b, %r10b
sete %r11b
testl %edi, %edi
je 0x1be0c
testb %r10b, %r10b
jne 0x1be0c
cmpb $0x0, 0x31f576(%rip)    # 0x33b2d4
je 0x1be0c
movl 0x31f52d(%rip), %r10d   # 0x33b298
cmpl %r10d, %ecx
setl %r11b
subl %r10d, %r9d
cmpl %r9d, %eax
setg %r9b
andb %r11b, %r9b
movb $0x1, %r11b
cmpb $0x1, %r9b
jne 0x1be0c
testb %dl, %dl
je 0x1bdaa
cmpb $0x0, 0x2f2531(%rip)    # 0x30e2c8
je 0x1bdaa
leaq 0xed915(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
cmpl $0x0, 0x2231a7(%rip)    # 0x23ef58
jne 0x1c1ee
cmpb $0x0, 0x220f80(%rip)    # 0x23cd3e
jne 0x1b949
movl $0x378, %edi            # imm = 0x378
callq 0x27479
movl $0x1, 0x2f09d8(%rip)    # 0x30c7b0
movb 0x31f4f6(%rip), %al     # 0x33b2d4
testb %al, %al
setne %dl
movl 0x31f603(%rip), %ecx    # 0x33b3ec
cmpl $0x8, %ecx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1c299
movb $0x4c, 0x2f09a4(%rip)   # 0x30c7a8
jmp 0x1c397
xorl %r11d, %r11d
cmpq $0x400, 0x1fcab9(%rip) # imm = 0x400
jne 0x1be7d
testl %edi, %edi
je 0x1b949
testb %dl, %dl
je 0x1be3f
cmpb $0x0, 0x2f249c(%rip)    # 0x30e2c8
je 0x1be3f
leaq 0xed880(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
cmpl $0x0, 0x223112(%rip)    # 0x23ef58
jne 0x1c1ee
movl 0x1fc9b2(%rip), %eax    # 0x218804
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ecx, 0x1ff3e3(%rip)    # 0x21b244
jle 0x1c213
movl $0x3, 0x2f093f(%rip)    # 0x30c7b0
movb $0x43, 0x2f0930(%rip)   # 0x30c7a8
jmp 0x1c249
cmpb $0x0, 0x31f565(%rip)    # 0x33b3e9
setne %r9b
andb %r11b, %r9b
cmpl $0x0, 0x31f55a(%rip)    # 0x33b3ec
setne %r10b
andb %r9b, %r10b
movl 0x1fc9dc(%rip), %r9d    # 0x21887c
cmpl %r9d, %ecx
setge %bl
andb %r8b, %bl
andb %r10b, %bl
cmpb $0x1, %bl
jne 0x1bf6b
movl 0x1fc9c8(%rip), %r10d   # 0x218884
addl 0x1fc9bd(%rip), %r10d   # 0x218880
cmpl %r10d, %eax
jle 0x1bf6b
testb %dl, %dl
je 0x1beea
cmpb $0x0, 0x2f23f1(%rip)    # 0x30e2c8
je 0x1beea
leaq 0xed7d5(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
cmpl $0x0, 0x223067(%rip)    # 0x23ef58
jne 0x1c1ee
cmpl $0x0, 0x323fe6(%rip)    # 0x33fee4
je 0x1bf2a
movl 0x1fc8fa(%rip), %eax    # 0x218800
addl $-0x30, %eax
cmpl %eax, 0x1ff331(%rip)    # 0x21b240
jge 0x1b949
movl 0x1fc8e9(%rip), %eax    # 0x218804
addl $-0x30, %eax
cmpl %eax, 0x1ff320(%rip)    # 0x21b244
jge 0x1b949
movl $0x58, %edi
callq 0x27479
movl $0x1, 0x2f0872(%rip)    # 0x30c7b0
movl 0x31f4a8(%rip), %eax    # 0x33b3ec
decl %eax
cmpl $0x7, %eax
ja 0x1c3b2
leaq 0xed586(%rip), %rcx     # 0x1094dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x4d, 0x2f0842(%rip)   # 0x30c7a8
jmp 0x1c249
andb %r11b, %r8b
movl 0x220d0f(%rip), %r10d   # 0x23cc84
testl %r10d, %r10d
setne %r11b
andb %r8b, %r11b
cmpb $0x1, %r11b
jne 0x1c04a
movl 0x208ff0(%rip), %r11d   # 0x224f80
leal 0x4(,%r11,2), %r11d
imull 0x1fc874(%rip), %r11d   # 0x218814
cmpl %r11d, %ecx
jge 0x1c04a
movl 0x1fc860(%rip), %r11d   # 0x218810
movl 0x1fc812(%rip), %ebx    # 0x2187c8
imull %r11d, %ebx
cmpl %ebx, %eax
jle 0x1c04a
leal 0x4f(%r10), %ebx
imull %ebx, %r11d
cmpl %r11d, %eax
jge 0x1c04a
testb %dl, %dl
je 0x1bfed
cmpb $0x0, 0x2f22ee(%rip)    # 0x30e2c8
je 0x1bfed
leaq 0xed6d2(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
cmpl $0x0, 0x222f64(%rip)    # 0x23ef58
jne 0x1c1ee
movl $0x58, %edi
callq 0x27479
movl $0x4, 0x2f07a2(%rip)    # 0x30c7b0
cmpq $0x0, 0x220b72(%rip)    # 0x23cb88
je 0x1c3e5
cmpq $0x0, 0x220b14(%rip)    # 0x23cb38
je 0x1c409
movl 0x208f50(%rip), %eax    # 0x224f80
addl $0x2, %eax
imull 0x1fc7da(%rip), %eax    # 0x218814
cmpl %eax, 0x1ff204(%rip)    # 0x21b244
setl %al
incb %al
jmp 0x1c40b
testb %r8b, %r8b
je 0x1c206
movl %esi, %r8d
shrl $0x1f, %r8d
addl %esi, %r8d
sarl %r8d
cmpl %r8d, %ecx
jge 0x1c07a
addl $0x4f, %r10d
imull 0x1fc79f(%rip), %r10d   # 0x218810
cmpl %r10d, %eax
jg 0x1bd8c
movl 0x1fc727(%rip), %r10d   # 0x2187a8
addl $0x4, %r10d
movl 0x1fc789(%rip), %esi    # 0x218814
imull %esi, %r10d
cmpl %r10d, %ecx
setge %r8b
leal (,%rsi,8), %r11d
cmpl %r11d, %ecx
setl %r11b
orb %r8b, %r11b
jne 0x1c1b1
movl 0x1fc75b(%rip), %r8d    # 0x218810
movl 0x1fc6e0(%rip), %r11d   # 0x21879c
imull %r8d, %r11d
cmpl %r11d, %eax
jge 0x1c1b1
cmpb $0x0, 0x220c6e(%rip)    # 0x23cd3e
jne 0x1b949
leal (,%rsi,4), %edi
leal (%rdi,%rdi,2), %edi
cmpl %edi, %ecx
jle 0x1c31a
movl 0x154b7e(%rip), %edi    # 0x170c6c
testl %edi, %edi
je 0x1c10c
addl $0x2, %edi
imull %r8d, %edi
cmpl %edi, %eax
jl 0x1c10c
imull 0x222e18(%rip), %esi    # 0x23ef1c
cmpl %esi, %ecx
jl 0x1b949
testb %dl, %dl
je 0x1c12a
cmpb $0x0, 0x2f21b1(%rip)    # 0x30e2c8
je 0x1c12a
leaq 0xed595(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
cmpl $0x0, 0x222e27(%rip)    # 0x23ef58
jne 0x1c1ee
movl $0x2, 0x2f066f(%rip)    # 0x30c7b0
movl $0x58, %edi
callq 0x27479
movq 0x1fc77e(%rip), %rax    # 0x2188d0
movl 0x1ff0e8(%rip), %ecx    # 0x21b240
cmpl 0x31f22a(%rip), %ecx    # 0x33b388
jge 0x1c169
cmpb $0x0, 0x1ff27e(%rip)    # 0x21b3e5
jne 0x1c182
movl 0x1fc6a5(%rip), %ecx    # 0x218814
imull 0x222da6(%rip), %ecx    # 0x23ef1c
cmpl %ecx, 0x1ff0c8(%rip)    # 0x21b244
jge 0x1be71
xorl %ecx, %ecx
cmpq $0x400000, %rax         # imm = 0x400000
setne %cl
leal (%rcx,%rcx,4), %ecx
addl $0x44, %ecx
movb %cl, 0x2f060f(%rip)     # 0x30c7a8
cmpq $0x20000, %rax          # imm = 0x20000
jne 0x1c249
movb $0x44, 0x2f05fc(%rip)   # 0x30c7a8
jmp 0x1c3a0
cmpl %r10d, %ecx
setge %al
subl %esi, %r9d
cmpl %r9d, %ecx
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1c206
testb %dl, %dl
je 0x1c1e5
cmpb $0x0, 0x2f20f6(%rip)    # 0x30e2c8
je 0x1c1e5
leaq 0xed4da(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
cmpl $0x0, 0x222d6c(%rip)    # 0x23ef58
je 0x1c255
movl $0x0, 0x222d60(%rip)    # 0x23ef58
movw $0x0, 0x323407(%rip)    # 0x33f608
jmp 0x1b949
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1b1bb
movl 0x1fc5e7(%rip), %eax    # 0x218800
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ecx, 0x1ff018(%rip)    # 0x21b240
jle 0x1b949
movl $0x59, %edi
callq 0x27479
movl $0x1, 0x2f056e(%rip)    # 0x30c7b0
movb $0x57, 0x2f055f(%rip)   # 0x30c7a8
movzbl 0x31f084(%rip), %eax    # 0x33b2d4
jmp 0x1c39a
movl $0x50, 0x2f0551(%rip)   # 0x30c7b0
movl $0x59, %edi
callq 0x27479
movb $0x50, 0x2f0538(%rip)   # 0x30c7a8
movzbl 0x31f05d(%rip), %eax    # 0x33b2d4
movl %eax, 0x2f052f(%rip)    # 0x30c7ac
movl $0x7c, %edi
callq 0xcf89
movl $0x2, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd8ba5
movb 0x1ff168(%rip), %sil    # 0x21b408
testb %sil, %sil
setne %dil
movb 0x1ff166(%rip), %dl     # 0x21b413
testb %dl, %dl
setne %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
jne 0x1c2fa
movb 0x31f126(%rip), %dl     # 0x33b3e8
testb %dl, %dl
setne %sil
cmpl $0x2, %ecx
sete %dil
andb %sil, %dil
cmpb $0x1, %dil
je 0x1c311
testb %dl, %dl
setne %dl
cmpl $0x1, %ecx
sete %cl
andb %dl, %cl
cmpb $0x1, %cl
je 0x1c390
movb $0x42, 0x2f04b3(%rip)   # 0x30c7a8
jmp 0x1c397
testb %sil, %sil
setne %sil
cmpl $0x1, %ecx
setne %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1c37b
movb $0x57, 0x2f0490(%rip)   # 0x30c7a8
jmp 0x1c397
shll $0x3, %r8d
leal (%r8,%r8,2), %ecx
cmpl %ecx, %eax
jg 0x1b949
testb %dl, %dl
je 0x1c348
cmpb $0x0, 0x2f1f93(%rip)    # 0x30e2c8
je 0x1c348
leaq 0xed377(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x9ccb
cmpl $0x0, 0x222c09(%rip)    # 0x23ef58
jne 0x1c1ee
xorl %eax, %eax
cmpb $0x0, 0x31ef76(%rip)    # 0x33b2d4
sete %al
leal 0x1(,%rax,2), %eax
movl %eax, 0x2f0442(%rip)    # 0x30c7b0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ae5f
testb %dl, %dl
setne %dl
cmpl $0x2, %ecx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1c3e9
movb $0x4d, 0x2f0411(%rip)   # 0x30c7a8
movzbl %al, %eax
movl %eax, 0x2f040c(%rip)    # 0x30c7ac
movl $0x7c, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcf89
movl $0x7, %edi
callq 0x2754a
jmp 0x1c249
movb $0x42, 0x2f03e0(%rip)   # 0x30c7a8
jmp 0x1c249
movb $0x53, 0x2f03d4(%rip)   # 0x30c7a8
jmp 0x1c249
movb $0x4c, 0x2f03c8(%rip)   # 0x30c7a8
jmp 0x1c249
movb $0x2, %al
jmp 0x1c40b
cmpb $0x0, 0x1ff025(%rip)    # 0x21b415
setne %dl
cmpl $0x4, %ecx
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x1c44c
movb $0x53, 0x2f03a1(%rip)   # 0x30c7a8
jmp 0x1c397
movb $0x1, %al
movb %al, 0x22092d(%rip)     # 0x23cd3e
movb 0x1fefc2(%rip), %al     # 0x21b3d9
movb %al, 0x1fefbd(%rip)     # 0x21b3da
movb $0x1, 0x1fefb5(%rip)    # 0x21b3d9
movl $0x464, %edi            # imm = 0x464
callq 0xcf89
xorl %edi, %edi
callq 0xd8c0d
testl %eax, %eax
je 0x1b949
movl $0x6, 0x1feebd(%rip)    # 0x21b304
jmp 0x1b949
movl $0x8, %edi
callq 0x2754a
movb 0x31ee78(%rip), %al     # 0x33b2d4
jmp 0x1c397