// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekmsc.c
// Function: domenuinput
void
domenuinput(void)
{
     int c,keystate;
     int  tries;
     struct menu *mptr = 0;

     if (activemenu == 255) {
          return;
     }
     if (activemenu == HELPSCREEN) {
          if (keystatus[1]) {
               keystatus[1]=0;
               playsound( S_BEEP ,0,0,0,ST_IMMEDIATE);
               if (menudirect) {
                    activemenu=255;
                    menudirect=0;
               }
          }
          return;
     }
     if (loctypemode) {
          while (keyfifoplc != keyfifoend) {
               c=keyfifo[keyfifoplc];
               keystate=keyfifo[(keyfifoplc+1)&(KEYFIFOSIZ-1)];
               keyfifoplc=((keyfifoplc+2)&(KEYFIFOSIZ-1));
               if (keystate != 0) {
                    if (c == 0x01) {              // ESC key
                         keystatus[1]=0;
                         locmessagelen=0;
                         loctypemode=0;
                    }
                    if (c == 0x0E) {              // backspace key
                         keystatus[14]=0;
                         if (locmessagelen == 0) {
                              break;
                         }
                         locmessagelen--;
                         lockeybuf[locmessagelen]=0;
                    }
                    if (c == 0x1C || c == 0x9C) { // enter keys
                         keystatus[0x1C]=keystatus[0x9C]=0;
                         if (locmessagelen > 0) {
                              strncpy(loadsavenames[selopt-1],lockeybuf,
                                   MAXLOADSAVESIZE);
                              locmessagelen=0;
                         }
                         loctypemode=0;
                         if( option[4] == 0 ) {
                              savegame(selopt);
                         }
                         activemenu=255;
                         break;
                    }
                    if (locmessagelen < (MAXLOADSAVESIZE-1) && c < 128) {
                         if (keystatus[0x2A] || keystatus[0x36]) {
                              c=scantoascwithshift[c];
                         }
                         else {
                              c=scantoasc[c];
                         }
                         if (c != 0) {
                              if (isalpha(c) || isdigit(c) || c == ' ') {
                                   lockeybuf[locmessagelen++]=toupper(c);
                                   lockeybuf[locmessagelen]=0;
                              }
                         }
                    }
               }
          }
          return;
     }
     mptr=&menu[activemenu][selopt];
     if (keystatus[1]) {
          keystatus[1]=0;
          playsound( S_BEEP ,0,0,0,ST_IMMEDIATE);
          if (menudirect) {
               activemenu=255;
               menudirect=0;
          }
          else {
               activemenu=mptr->backmenu;
          }
          selopt=lastselopt[activemenu];
          if (activemenu == 0) {
               activemenu=255;
          }
     }
     else if (keystatus[keys[0]]) {     // up arrow
          keystatus[keys[0]]=0;
          playsound( S_BOOP ,0,0,0,ST_IMMEDIATE);
          tries=0;
          while (tries < MAXSUBOPTIONS) {
               selopt--;
               if (selopt <= 0) {
                    selopt=5;
               }
               lastselopt[activemenu]=selopt;
               if (menu[activemenu][selopt].label != NULL) {
                    break;
               }
               tries++;
          }
     }
     else if (keystatus[keys[1]]) {     // down arrow
          keystatus[keys[1]]=0;
          playsound( S_BOOP ,0,0,0,ST_IMMEDIATE);
          tries=0;
          while (tries < MAXSUBOPTIONS) {
               selopt++;
               if (selopt > 5) {
                    selopt=1;
               }
               lastselopt[activemenu]=selopt;
               if (menu[activemenu][selopt].label != NULL) {
                    break;
               }
               tries++;
          }
     }
     else if (activemenu == 4) {
          if (keystatus[21] != 0) {                    // "Y" key
               switch (activemenu) {
               case 4:
                    gameover=1;
                    //playsound( ??? ,0,0,0,ST_IMMEDIATE);
                    break;
               case 5:
                    //endgame=1;
                    activemenu=255;
                    break;
               }
          }
          else if (keystatus[49] != 0) {               // "N" key
               activemenu=255;
          }
     }
     else if (keystatus[0x1C] || keystatus[0x9C]) {    // enter key
          keystatus[0x1C]=keystatus[0x9C]=0;
          playsound( S_MENUSOUND2 ,0,0,0,ST_IMMEDIATE);
          if (mptr->tomenu != 0) {
               activemenu=mptr->tomenu;
               selopt=lastselopt[activemenu];
               redrawborders=1;
          }
          else {
               switch (activemenu) {
               case 1:
                    break;
               case 2:
                    difficulty=selopt;
                    newgame(boardfilename);
                    activemenu=255;
                    break;
               case 3:
                    if (selopt == 3) {
                         if (strcmp(headbobstr,"HEAD BOB ON") == 0) {
                              strcpy(headbobstr,"HEAD BOB OFF");
                              headbobon=0;
                         }
                         else {
                              strcpy(headbobstr,"HEAD BOB ON");
                              headbobon=1;
                         }
                    }
                    break;
               case 5:                                 // day/night mission
                    loadnewgame=selopt;
                    break;
               case 6:                                 // load game
                    stopallsounds();
                    if( option[4] == 0 ) {
                         loadgame(selopt);
                    }
                    activemenu=255;
                    break;
               case 7:                                 // save game
                    keystatus[0x1C]=keystatus[0x9C]=0;
                    loctypemode=1;
                    keyfifoplc=keyfifoend;
                    if (strcmp(loadsavenames[selopt-1],"-EMPTY-") != 0) {
                         strncpy(lockeybuf,loadsavenames[selopt-1],
                              MAXLOADSAVESIZE);
                         locmessagelen=(int)strlen(lockeybuf);
                    }
                    else {
                         memset(lockeybuf,0,sizeof(lockeybuf));
                         locmessagelen=0;
                    }
                    break;
               }
          }
     }
     else if (activemenu == 8 || activemenu == 9) {
          if (keystatus[0x4B] || keystatus[0xCB]) {    // left arrow key
               keystatus[0x4B]=keystatus[0xCB]=0;
               switch (selopt) {
               case 1:
                    if (activemenu == 8) {
                         if (soundv > 0) {
                              soundv--;
                              soundmastervolume(soundv<<11);
                         }
                    }
                    else {
                         if (mousesensitivity > 0) {
                              mousesensitivity--;
                         }
                    }
                    break;
               case 2:
                    if (musicv > 0) {
                         musicv--;
                         songmastervolume(musicv<<3);
                    }
                    break;
               }
               playsound( S_MENUSOUND1 ,0,0,0,ST_IMMEDIATE);
          }
          else if (keystatus[0x4D] || keystatus[0xCD]) {    // right arrow key
               keystatus[0x4D]=keystatus[0xCD]=0;
               switch (selopt) {
               case 1:
                    if (activemenu == 8) {
                         if (soundv < 16) {
                              soundv++;
                              soundmastervolume(soundv<<11);
                         }
                    }
                    else {
                         if (mousesensitivity < 16) {
                              mousesensitivity++;
                         }
                    }
                    break;
               case 2:
                    if (musicv < 16) {
                         musicv++;
                         songmastervolume(musicv<<3);
                    }
                    break;
               }
               playsound( S_MENUSOUND1 ,0,0,0,ST_IMMEDIATE);
          }
     }
     else if (keystatus[16]) {
          keystatus[16]=0;
          gameover=1;
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq $0x0, -0x18(%rbp)
cmpl $0xff, 0x159b3a(%rip)   # 0x1784b4
jne 0x1e981
jmp 0x1f35c
cmpl $0x63, 0x159b2c(%rip)   # 0x1784b4
jne 0x1e9dc
leaq 0x35973f(%rip), %rax    # 0x3780d0
cmpb $0x0, 0x1(%rax)
je 0x1e9d7
leaq 0x359732(%rip), %rax    # 0x3780d0
movb $0x0, 0x1(%rax)
movl $0x36, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
cmpl $0x0, 0x15b44d(%rip)    # 0x179e0c
je 0x1e9d5
movl $0xff, 0x159ae9(%rip)   # 0x1784b4
movl $0x0, 0x15b437(%rip)    # 0x179e0c
jmp 0x1e9d7
jmp 0x1f35c
cmpl $0x0, 0x15b5c5(%rip)    # 0x179fa8
je 0x1ec47
jmp 0x1e9eb
leaq 0x35958e(%rip), %rax    # 0x377f80
movl (%rax), %eax
leaq 0x359589(%rip), %rcx    # 0x377f84
cmpl (%rcx), %eax
je 0x1ec42
leaq 0x359576(%rip), %rax    # 0x377f80
movslq (%rax), %rcx
leaq 0x35957c(%rip), %rax    # 0x377f90
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
leaq 0x35955f(%rip), %rax    # 0x377f80
movl (%rax), %eax
addl $0x1, %eax
andl $0x3f, %eax
movslq %eax, %rcx
leaq 0x35955d(%rip), %rax    # 0x377f90
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
leaq 0x359540(%rip), %rax    # 0x377f80
movl (%rax), %ecx
addl $0x2, %ecx
andl $0x3f, %ecx
leaq 0x359531(%rip), %rax    # 0x377f80
movl %ecx, (%rax)
cmpl $0x0, -0x8(%rbp)
je 0x1ec3d
cmpl $0x1, -0x4(%rbp)
jne 0x1ea80
leaq 0x359668(%rip), %rax    # 0x3780d0
movb $0x0, 0x1(%rax)
movl $0x0, 0x15b54e(%rip)    # 0x179fc4
movl $0x0, 0x15b528(%rip)    # 0x179fa8
cmpl $0xe, -0x4(%rbp)
jne 0x1eac0
leaq 0x359643(%rip), %rax    # 0x3780d0
movb $0x0, 0xe(%rax)
cmpl $0x0, 0x15b52c(%rip)    # 0x179fc4
jne 0x1ea9f
jmp 0x1ec42
movl 0x15b51f(%rip), %eax    # 0x179fc4
addl $-0x1, %eax
movl %eax, 0x15b516(%rip)    # 0x179fc4
movslq 0x15b50f(%rip), %rcx    # 0x179fc4
leaq 0x15b4f0(%rip), %rax    # 0x179fac
movb $0x0, (%rax,%rcx)
cmpl $0x1c, -0x4(%rbp)
je 0x1ead3
cmpl $0x9c, -0x4(%rbp)
jne 0x1eb5d
leaq 0x3595f6(%rip), %rax    # 0x3780d0
movb $0x0, 0x9c(%rax)
leaq 0x3595e8(%rip), %rax    # 0x3780d0
movb $0x0, 0x1c(%rax)
cmpl $0x0, 0x15b4d1(%rip)    # 0x179fc4
jle 0x1eb29
movl 0xfc099(%rip), %eax     # 0x11ab94
subl $0x1, %eax
cltq
leaq 0x15b459(%rip), %rdi    # 0x179f60
imulq $0xc, %rax, %rax
addq %rax, %rdi
leaq 0x15b497(%rip), %rsi    # 0x179fac
movl $0xc, %edx
callq 0x8200
movl $0x0, 0x15b49b(%rip)    # 0x179fc4
movl $0x0, 0x15b475(%rip)    # 0x179fa8
leaq 0xfb3de(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
jne 0x1eb4e
movl 0xfc04b(%rip), %edi     # 0x11ab94
callq 0x17170
movl $0xff, 0x15995c(%rip)   # 0x1784b4
jmp 0x1ec42
cmpl $0xb, 0x15b460(%rip)    # 0x179fc4
jge 0x1ec3b
cmpl $0x80, -0x4(%rbp)
jge 0x1ec3b
leaq 0x359552(%rip), %rax    # 0x3780d0
movsbl 0x2a(%rax), %eax
cmpl $0x0, %eax
jne 0x1eb97
leaq 0x359542(%rip), %rax    # 0x3780d0
movsbl 0x36(%rax), %eax
cmpl $0x0, %eax
je 0x1ebab
movslq -0x4(%rbp), %rcx
leaq 0xfb58e(%rip), %rax     # 0x11a130
movsbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ebbd
movslq -0x4(%rbp), %rcx
leaq 0xfb4fa(%rip), %rax     # 0x11a0b0
movsbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x1ec39
callq 0x81b0
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x1ebfd
callq 0x81b0
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x1ebfd
cmpl $0x20, -0x4(%rbp)
jne 0x1ec37
movl -0x4(%rbp), %edi
callq 0x8250
movb %al, %dl
movl 0x15b3b7(%rip), %eax    # 0x179fc4
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x15b3ac(%rip)    # 0x179fc4
movslq %eax, %rcx
leaq 0x15b38a(%rip), %rax    # 0x179fac
movb %dl, (%rax,%rcx)
movslq 0x15b398(%rip), %rcx    # 0x179fc4
leaq 0x15b379(%rip), %rax    # 0x179fac
movb $0x0, (%rax,%rcx)
jmp 0x1ec39
jmp 0x1ec3b
jmp 0x1ec3d
jmp 0x1e9eb
jmp 0x1f35c
movslq 0x159866(%rip), %rcx    # 0x1784b4
leaq 0xfb6bb(%rip), %rax     # 0x11a310
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movslq 0xfbf2e(%rip), %rcx     # 0x11ab94
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
leaq 0x359458(%rip), %rax    # 0x3780d0
cmpb $0x0, 0x1(%rax)
je 0x1ecfb
leaq 0x35944b(%rip), %rax    # 0x3780d0
movb $0x0, 0x1(%rax)
movl $0x36, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
cmpl $0x0, 0x15b166(%rip)    # 0x179e0c
je 0x1ecbe
movl $0xff, 0x159802(%rip)   # 0x1784b4
movl $0x0, 0x15b150(%rip)    # 0x179e0c
jmp 0x1eccc
movq -0x18(%rbp), %rax
movsbl 0x19(%rax), %eax
movl %eax, 0x1597e8(%rip)    # 0x1784b4
movslq 0x1597e1(%rip), %rcx    # 0x1784b4
leaq 0xfbe76(%rip), %rax     # 0x11ab50
movl (%rax,%rcx,4), %eax
movl %eax, 0xfbeb1(%rip)     # 0x11ab94
cmpl $0x0, 0x1597ca(%rip)    # 0x1784b4
jne 0x1ecf6
movl $0xff, 0x1597be(%rip)   # 0x1784b4
jmp 0x1f35c
leaq 0xfb21e(%rip), %rax     # 0x119f20
movslq (%rax), %rcx
leaq 0x3593c4(%rip), %rax    # 0x3780d0
cmpb $0x0, (%rax,%rcx)
je 0x1edc6
leaq 0xfb203(%rip), %rax     # 0x119f20
movslq (%rax), %rcx
leaq 0x3593a9(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
movl $0x37, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
movl $0x0, -0xc(%rbp)
cmpl $0x6, -0xc(%rbp)
jge 0x1edc1
movl 0xfbe40(%rip), %eax     # 0x11ab94
addl $-0x1, %eax
movl %eax, 0xfbe37(%rip)     # 0x11ab94
cmpl $0x0, 0xfbe30(%rip)     # 0x11ab94
jg 0x1ed70
movl $0x5, 0xfbe24(%rip)     # 0x11ab94
movl 0xfbe1e(%rip), %edx     # 0x11ab94
movslq 0x159737(%rip), %rcx    # 0x1784b4
leaq 0xfbdcc(%rip), %rax     # 0x11ab50
movl %edx, (%rax,%rcx,4)
movslq 0x159726(%rip), %rcx    # 0x1784b4
leaq 0xfb57b(%rip), %rax     # 0x11a310
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movslq 0xfbdee(%rip), %rcx     # 0x11ab94
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x1edb6
jmp 0x1edc1
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1ed48
jmp 0x1f35a
leaq 0xfb153(%rip), %rax     # 0x119f20
movslq 0x4(%rax), %rcx
leaq 0x3592f8(%rip), %rax    # 0x3780d0
cmpb $0x0, (%rax,%rcx)
je 0x1ee93
leaq 0xfb137(%rip), %rax     # 0x119f20
movslq 0x4(%rax), %rcx
leaq 0x3592dc(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
movl $0x37, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
movl $0x0, -0xc(%rbp)
cmpl $0x6, -0xc(%rbp)
jge 0x1ee8e
movl 0xfbd73(%rip), %eax     # 0x11ab94
addl $0x1, %eax
movl %eax, 0xfbd6a(%rip)     # 0x11ab94
cmpl $0x5, 0xfbd63(%rip)     # 0x11ab94
jle 0x1ee3d
movl $0x1, 0xfbd57(%rip)     # 0x11ab94
movl 0xfbd51(%rip), %edx     # 0x11ab94
movslq 0x15966a(%rip), %rcx    # 0x1784b4
leaq 0xfbcff(%rip), %rax     # 0x11ab50
movl %edx, (%rax,%rcx,4)
movslq 0x159659(%rip), %rcx    # 0x1784b4
leaq 0xfb4ae(%rip), %rax     # 0x11a310
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movslq 0xfbd21(%rip), %rcx     # 0x11ab94
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x1ee83
jmp 0x1ee8e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1ee15
jmp 0x1f358
cmpl $0x4, 0x15961a(%rip)    # 0x1784b4
jne 0x1eefc
leaq 0x35922d(%rip), %rax    # 0x3780d0
movsbl 0x15(%rax), %eax
cmpl $0x0, %eax
je 0x1eedb
movl 0x159602(%rip), %eax    # 0x1784b4
movl %eax, -0x1c(%rbp)
subl $0x4, %eax
je 0x1eec6
jmp 0x1eebc
movl -0x1c(%rbp), %eax
subl $0x5, %eax
je 0x1eecf
jmp 0x1eed9
movb $0x1, 0x1595ec(%rip)    # 0x1784b9
jmp 0x1eed9
movl $0xff, 0x1595db(%rip)   # 0x1784b4
jmp 0x1eef7
leaq 0x3591ee(%rip), %rax    # 0x3780d0
movsbl 0x31(%rax), %eax
cmpl $0x0, %eax
je 0x1eef5
movl $0xff, 0x1595bf(%rip)   # 0x1784b4
jmp 0x1eef7
jmp 0x1f356
leaq 0x3591cd(%rip), %rax    # 0x3780d0
movsbl 0x1c(%rax), %eax
cmpl $0x0, %eax
jne 0x1ef23
leaq 0x3591bd(%rip), %rax    # 0x3780d0
movsbl 0x9c(%rax), %eax
cmpl $0x0, %eax
je 0x1f156
leaq 0x3591a6(%rip), %rax    # 0x3780d0
movb $0x0, 0x9c(%rax)
leaq 0x359198(%rip), %rax    # 0x3780d0
movb $0x0, 0x1c(%rax)
movl $0x35, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
movq -0x18(%rbp), %rax
movsbl 0x18(%rax), %eax
cmpl $0x0, %eax
je 0x1ef90
movq -0x18(%rbp), %rax
movsbl 0x18(%rax), %eax
movl %eax, 0x159547(%rip)    # 0x1784b4
movslq 0x159540(%rip), %rcx    # 0x1784b4
leaq 0xfbbd5(%rip), %rax     # 0x11ab50
movl (%rax,%rcx,4), %eax
movl %eax, 0xfbc10(%rip)     # 0x11ab94
movb $0x1, 0x15b015(%rip)    # 0x179fa0
jmp 0x1f151
movl 0x15951e(%rip), %eax    # 0x1784b4
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x6, %eax
ja 0x1f14f
movq -0x28(%rbp), %rax
leaq 0xba57a(%rip), %rcx     # 0xd952c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x1f14f
movl 0xfbbce(%rip), %eax     # 0x11ab94
movl %eax, 0x15affc(%rip)    # 0x179fc8
leaq 0x10f7fd(%rip), %rdi    # 0x12e7d0
callq 0x1d7e0
movl $0xff, 0x1594d2(%rip)   # 0x1784b4
jmp 0x1f14f
cmpl $0x3, 0xfbba6(%rip)     # 0x11ab94
jne 0x1f04c
leaq 0xfb309(%rip), %rdi     # 0x11a300
leaq 0xbaac1(%rip), %rsi     # 0xd9abf
callq 0x8b90
cmpl $0x0, %eax
jne 0x1f02a
leaq 0xfb2f1(%rip), %rdi     # 0x11a300
leaq 0xbaab5(%rip), %rsi     # 0xd9acb
callq 0x8550
leaq 0xfbe5e(%rip), %rax     # 0x11ae80
movl $0x0, (%rax)
jmp 0x1f04a
leaq 0xfb2cf(%rip), %rdi     # 0x11a300
leaq 0xbaa87(%rip), %rsi     # 0xd9abf
callq 0x8550
leaq 0xfbe3c(%rip), %rax     # 0x11ae80
movl $0x1, (%rax)
jmp 0x1f04c
jmp 0x1f14f
movl 0xfbb3d(%rip), %eax     # 0x11ab94
movl %eax, 0x15af47(%rip)    # 0x179fa4
jmp 0x1f14f
movb $0x0, %al
callq 0x27540
leaq 0xfaea8(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
jne 0x1f084
movl 0xfbb15(%rip), %edi     # 0x11ab94
callq 0x163e0
movl $0xff, 0x159426(%rip)   # 0x1784b4
jmp 0x1f14f
leaq 0x359036(%rip), %rax    # 0x3780d0
movb $0x0, 0x9c(%rax)
leaq 0x359028(%rip), %rax    # 0x3780d0
movb $0x0, 0x1c(%rax)
movl $0x1, 0x15aef2(%rip)    # 0x179fa8
leaq 0x358ec7(%rip), %rax    # 0x377f84
movl (%rax), %ecx
leaq 0x358eba(%rip), %rax    # 0x377f80
movl %ecx, (%rax)
movl 0xfbac6(%rip), %eax     # 0x11ab94
subl $0x1, %eax
cltq
leaq 0x15ae86(%rip), %rdi    # 0x179f60
imulq $0xc, %rax, %rax
addq %rax, %rdi
leaq 0xba9cf(%rip), %rsi     # 0xd9ab7
callq 0x8b90
cmpl $0x0, %eax
je 0x1f130
movl 0xfba9c(%rip), %eax     # 0x11ab94
subl $0x1, %eax
cltq
leaq 0x15ae5c(%rip), %rsi    # 0x179f60
imulq $0xc, %rax, %rax
addq %rax, %rsi
leaq 0x15ae9a(%rip), %rdi    # 0x179fac
movl $0xc, %edx
callq 0x8200
leaq 0x15ae89(%rip), %rdi    # 0x179fac
callq 0x8540
movl %eax, 0x15ae96(%rip)    # 0x179fc4
jmp 0x1f14d
leaq 0x15ae75(%rip), %rdi    # 0x179fac
xorl %esi, %esi
movl $0xc, %edx
callq 0x8410
movl $0x0, 0x15ae77(%rip)    # 0x179fc4
jmp 0x1f14f
jmp 0x1f151
jmp 0x1f354
cmpl $0x8, 0x159357(%rip)    # 0x1784b4
je 0x1f16c
cmpl $0x9, 0x15934e(%rip)    # 0x1784b4
jne 0x1f331
leaq 0x358f5d(%rip), %rax    # 0x3780d0
movsbl 0x4b(%rax), %eax
cmpl $0x0, %eax
jne 0x1f193
leaq 0x358f4d(%rip), %rax    # 0x3780d0
movsbl 0xcb(%rax), %eax
cmpl $0x0, %eax
je 0x1f24f
leaq 0x358f36(%rip), %rax    # 0x3780d0
movb $0x0, 0xcb(%rax)
movb $0x0, 0x4b(%rax)
movl 0xfb9e9(%rip), %eax     # 0x11ab94
movl %eax, -0x2c(%rbp)
subl $0x1, %eax
je 0x1f1bf
jmp 0x1f1b5
movl -0x2c(%rbp), %eax
subl $0x2, %eax
je 0x1f20c
jmp 0x1f234
cmpl $0x8, 0x1592ee(%rip)    # 0x1784b4
jne 0x1f1f0
cmpl $0x0, 0xfb9cd(%rip)     # 0x11ab9c
jle 0x1f1ee
movl 0xfb9c5(%rip), %eax     # 0x11ab9c
addl $-0x1, %eax
movl %eax, 0xfb9bc(%rip)     # 0x11ab9c
movl 0xfb9b6(%rip), %edi     # 0x11ab9c
shll $0xb, %edi
callq 0x27350
jmp 0x1f20a
cmpl $0x0, 0x15adc9(%rip)    # 0x179fc0
jle 0x1f208
movl 0x15adc1(%rip), %eax    # 0x179fc0
addl $-0x1, %eax
movl %eax, 0x15adb8(%rip)    # 0x179fc0
jmp 0x1f20a
jmp 0x1f234
cmpl $0x0, 0xfb985(%rip)     # 0x11ab98
jle 0x1f232
movl 0xfb97d(%rip), %eax     # 0x11ab98
addl $-0x1, %eax
movl %eax, 0xfb974(%rip)     # 0x11ab98
movl 0xfb96e(%rip), %edi     # 0x11ab98
shll $0x3, %edi
callq 0x27340
jmp 0x1f234
movl $0x34, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
jmp 0x1f32f
leaq 0x358e7a(%rip), %rax    # 0x3780d0
movsbl 0x4d(%rax), %eax
cmpl $0x0, %eax
jne 0x1f276
leaq 0x358e6a(%rip), %rax    # 0x3780d0
movsbl 0xcd(%rax), %eax
cmpl $0x0, %eax
je 0x1f32d
leaq 0x358e53(%rip), %rax    # 0x3780d0
movb $0x0, 0xcd(%rax)
movb $0x0, 0x4d(%rax)
movl 0xfb906(%rip), %eax     # 0x11ab94
movl %eax, -0x30(%rbp)
subl $0x1, %eax
je 0x1f2a2
jmp 0x1f298
movl -0x30(%rbp), %eax
subl $0x2, %eax
je 0x1f2ef
jmp 0x1f317
cmpl $0x8, 0x15920b(%rip)    # 0x1784b4
jne 0x1f2d3
cmpl $0x10, 0xfb8ea(%rip)    # 0x11ab9c
jge 0x1f2d1
movl 0xfb8e2(%rip), %eax     # 0x11ab9c
addl $0x1, %eax
movl %eax, 0xfb8d9(%rip)     # 0x11ab9c
movl 0xfb8d3(%rip), %edi     # 0x11ab9c
shll $0xb, %edi
callq 0x27350
jmp 0x1f2ed
cmpl $0x10, 0x15ace6(%rip)   # 0x179fc0
jge 0x1f2eb
movl 0x15acde(%rip), %eax    # 0x179fc0
addl $0x1, %eax
movl %eax, 0x15acd5(%rip)    # 0x179fc0
jmp 0x1f2ed
jmp 0x1f317
cmpl $0x10, 0xfb8a2(%rip)    # 0x11ab98
jge 0x1f315
movl 0xfb89a(%rip), %eax     # 0x11ab98
addl $0x1, %eax
movl %eax, 0xfb891(%rip)     # 0x11ab98
movl 0xfb88b(%rip), %edi     # 0x11ab98
shll $0x3, %edi
callq 0x27340
jmp 0x1f317
movl $0x34, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
jmp 0x1f32f
jmp 0x1f352
leaq 0x358d98(%rip), %rax    # 0x3780d0
cmpb $0x0, 0x10(%rax)
je 0x1f350
leaq 0x358d8b(%rip), %rax    # 0x3780d0
movb $0x0, 0x10(%rax)
movb $0x1, 0x159169(%rip)    # 0x1784b9
jmp 0x1f352
jmp 0x1f354
jmp 0x1f356
jmp 0x1f358
jmp 0x1f35a
jmp 0x1f35c
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)