// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekgame.c
// Function: app_main
int
app_main(int argc, char const * const argv[])
{
     int      i, waitplayers;
     int     other;

#if defined(DATADIR)
     {
          const char *datadir = DATADIR;
          if (datadir && datadir[0]) {
               addsearchpath(datadir);
          }
     }
#endif

     {
          char *supportdir = Bgetsupportdir(1);
          char *appdir = Bgetappdir();
          char dirpath[BMAX_PATH+1];

          // the OSX app bundle, or on Windows the directory where the EXE was launched
          if (appdir) {
               addsearchpath(appdir);
               free(appdir);
          }

          // the global support files directory
          if (supportdir) {
               Bsnprintf(dirpath, sizeof(dirpath), "%s/JFTekWar", supportdir);
               addsearchpath(dirpath);
               free(supportdir);
          }
     }

     tekargv(argc, argv);

     // default behaviour is to write to the user profile directory, but
     // creating a 'user_profiles_disabled' file in the current working
     // directory where the game was launched makes the installation
     // "portable" by writing into the working directory
     if (access("user_profiles_disabled", F_OK) == 0) {
          char cwd[BMAX_PATH+1];
          if (getcwd(cwd, sizeof(cwd))) {
               addsearchpath(cwd);
          }
     } else {
          char *supportdir;
          char dirpath[BMAX_PATH+1];
          int asperr;

          if ((supportdir = Bgetsupportdir(0))) {
#if defined(_WIN32) || defined(__APPLE__)
               const char *confdir = "JFTekWar";
#else
               const char *confdir = ".jftekwar";
#endif
               Bsnprintf(dirpath, sizeof(dirpath), "%s/%s", supportdir, confdir);
               asperr = addsearchpath(dirpath);
               if (asperr == -2) {
                    if (Bmkdir(dirpath, S_IRWXU) == 0) {
                         asperr = addsearchpath(dirpath);
                    } else {
                         asperr = -1;
                    }
               }
               if (asperr == 0) {
                    chdir(dirpath);
               }
               free(supportdir);
          }
     }

     buildsetlogfile("tekwar.log");

     wm_setapptitle("JFTekWar");
     buildprintf("\nJFTekWar\n"
          "Based on " TITLE "\n"
          "Version %s.\nBuilt %s %s.\n",
        VERS, game_version, game_date, game_time);

     if (preinitengine()) {
          wm_msgbox("Build Engine Initialisation Error",
               "There was a problem initialising the Build engine: %s", engineerrstr);
          exit(1);
     }

     lm("tekloadsetup");
     tekloadsetup();

#ifdef HAVE_STARTWIN
    {
        struct startwin_settings settings;

        memset(&settings, 0, sizeof(settings));
        settings.fullscreen = fullscreen;
        settings.xdim3d = xdimgame;
        settings.ydim3d = ydimgame;
        settings.bpp3d = bppgame;
        settings.forcesetup = forcesetup;
        settings.usemouse = !!(option[3]&1);
        settings.usejoy = !!(option[3]&2);
        settings.samplerate = digihz[option[7]>>4];
        settings.bitspersample = 1<<(((option[7]&2)>0)+3);
        settings.channels = ((option[7]&4)>0)+1;

        if (forcesetup) {
            if (startwin_run(&settings) == STARTWIN_CANCEL) {
                uninitengine();
                exit(0);
            }
        }

        fullscreen = settings.fullscreen;
        xdimgame = settings.xdim3d;
        ydimgame = settings.ydim3d;
        bppgame = settings.bpp3d;
        forcesetup = settings.forcesetup;
        option[3] = (option[3]&~1)|(settings.usemouse);
        option[3] = (option[3]&~2)|(settings.usejoy<<1);
        option[7] = 0;
        for (i=0;i<8;i++) if (digihz[i] <= settings.samplerate) option[7] = i<<4;
        option[7] |= (settings.bitspersample == 16)<<1;
        option[7] |= (settings.channels == 2)<<2;
    }
#endif

     lm("initgroupfile");
     initgroupfile("stuff.dat");

     if (initengine()) {
          wm_msgbox("Build Engine Initialisation Error",
               "There was a problem initialising the Build engine: %s", engineerrstr);
          exit(1);
     }

     lm("inittimer");
     inittimer(CLKIPS, NULL);
     lm("tekinitmultiplayers");
     tekinitmultiplayers(0, NULL);
     lm("loadpics");
     loadpics("tiles000.art", 8*1048576);
     lm("tekpreinit");
     tekpreinit();
     lm("tekgamestarted");
     tekgamestarted();
     lm("initinput");
     initinput();
     lm("initmouse");
     if( option[3] != 0 ) initmouse();

     if (dbgflag) {
          lm("debug mode: ON");
          sprintf(dbgfname,"DEBUG.%03d",dbgfilen++);
          dbgfp=fopen(dbgfname,"wt");
          fprintf(dbgfp," P  CLOCK PLC BITS  ANG   X     Y     Z   HEALTH RSEED\n");
          fprintf(dbgfp,"== ====== === ==== ==== ===== ===== ===== ====== =========\n");
          dbgcolumn=0;
     }

     setgamemode(fullscreen, xdimgame, ydimgame, bppgame);

     lm("initsb");
     initsb(option[1],option[2],digihz[option[7]>>4],((option[7]&4)>0)+1,((option[7]&2)>0)+1,0,0);

     if( option[4] > 0 ) {
        lm("multiplayer init");
        teknetpickmap();
          sendlogon();
          if( option[4] < 5 ) {
               waitplayers=2;
          }
          else {
               waitplayers=option[4]-3;
          }
          while( numplayers < waitplayers ) {
               clearview(0);
               overwritesprite((xdim>>1)-160,0,408,0,0,0);
               sprintf((char *)tempbuf,"  MULTIPLAYER MODE  ");
               printext((xdim>>1)-80,(ydim>>1)-24,(char *)tempbuf,ALPHABET2,0);
               sprintf((char *)tempbuf,"%2d OF %2d PLAYERS IN",numplayers,waitplayers);
               printext((xdim>>1)-80,ydim>>1,(char *)tempbuf,ALPHABET2,0);
               nextpage();
               if( getpacket(&other,tempbuf) > 0 ) {
                    if( tempbuf[0] == 255 ) {
                         keystatus[1] = 1;
                    }
               }
               if( keystatus[1] > 0 ) {
                    goto gameends;
               }
          }
          screenpeek = myconnectindex;
          clearview(0);
     }
     for( i=connecthead ; i >= 0 ; i=connectpoint2[i] ) {
          initplayersprite((short)i);
     }

     if( option[4] == 0 ) {
          i = smkplayseq("tvopen");
          if (i < 1) i = smkplayseq("tekndie");
          if (i < 1) i = smkplayseq("tekintro");
          smkplayseq("intro");
     }

missionselection:
     if( option[4] == 0 ) {
          if( choosemission() == 0 ) {
               goto gameends;
          }
     }

     reccnt=0;
     movefifoplc = 0; movefifoend = 0;
     syncvalplc = 0; othersyncvalplc = 0;
     syncvalend = 0; othersyncvalend = 0;
     syncvalcnt = 0L; othersyncvalcnt = 0L;
     olocvel = 0; olocvel2 = 0;
     olocsvel = 0; olocsvel2 = 0;
     olocangvel = 0; olocangvel2 = 0;
     olocbits = 0; olocbits2 = 0;
     lockclock = 0;
     ototalclock = 0;
     gotlastpacketclock = 0;
     masterslavetexttime = 0;
     for( i=0; i<MAXPLAYERS; i++ ) {
          fsyncvel[i] = syncvel[i] = osyncvel[i] = 0;
          fsyncsvel[i] = syncsvel[i] = osyncsvel[i] = 0;
          fsyncangvel[i] = syncangvel[i] = osyncangvel[i] = 0;
          fsyncbits[i] = syncbits[i] = osyncbits[i] = 0;
     }
     resettiming();

     ready2send = 1;
    #ifdef NETNAMES
     if( option[4] != 0 ) {
          tempbuf[0]=8;
          tempbuf[1]=myconnectindex;
          memcpy(&tempbuf[2],localname,10);
          tempbuf[12]=0;
          for( i=connecthead; i>=0; i=connectpoint2[i] ) {
               if( i != myconnectindex ) {
                    sendpacket(i,tempbuf,12);
               }
          }
          memcpy(netnames[myconnectindex],localname,10);
          netnames[myconnectindex][10]=0;
     }
    #endif
     screenpeek=myconnectindex;
     while( !gameover ) {
        handleevents();
          while( movefifoplc != movefifoend ) {
               domovethings();
          }
          drawscreen(screenpeek,(totalclock-gotlastpacketclock)*(65536/TICSPERFRAME));
     }
     ready2send = 0;

     if( option[4] == 0 ) {
          debrief=1;
          goto missionselection;
     }

gameends:

     copyrightscreen();

     sendlogoff();
     uninitmultiplayers();
     uninitsb();
     cduninit();
     uninittimer();
     uninitinput();
     uninitengine();
     uninitgroupfile();

     teksavesetup();

     if (dbgflag) {
          fclose(dbgfp);
     }

     exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %r14
movl %edi, %ebp
leaq 0x770d8(%rip), %rdi     # 0x80f35
callq 0x2fba2
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x31cf3
movq %rax, %r15
callq 0x31c67
testq %rax, %rax
je 0x9e8c
movq %rax, %r12
movq %rax, %rdi
callq 0x2fba2
movq %r12, %rdi
callq 0x8270
testq %r15, %r15
je 0x9ebf
leaq 0x770bd(%rip), %rdx     # 0x80f55
leaq 0x10(%rsp), %r12
movl $0x401, %esi            # imm = 0x401
movq %r12, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x8710
movq %r12, %rdi
callq 0x2fba2
movq %r15, %rdi
callq 0x8270
movl %ebp, %edi
movq %r14, %rsi
callq 0x16cd8
leaq 0x77091(%rip), %rdi     # 0x80f61
xorl %esi, %esi
callq 0x8190
testl %eax, %eax
jne 0x9eff
leaq 0x10(%rsp), %rdi
movl $0x401, %esi            # imm = 0x401
callq 0x8540
testq %rax, %rax
je 0x9f73
leaq 0x10(%rsp), %rdi
callq 0x2fba2
jmp 0x9f73
xorl %edi, %edi
callq 0x31cf3
testq %rax, %rax
je 0x9f73
movq %rax, %r14
leaq 0x7706d(%rip), %rdx     # 0x80f82
leaq 0x7705c(%rip), %r8      # 0x80f78
leaq 0x10(%rsp), %r15
movl $0x401, %esi            # imm = 0x401
movq %r15, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x8710
movq %r15, %rdi
callq 0x2fba2
cmpl $-0x2, %eax
jne 0x9f5d
leaq 0x10(%rsp), %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x8380
testl %eax, %eax
jne 0x9f6b
leaq 0x10(%rsp), %rdi
callq 0x2fba2
testl %eax, %eax
jne 0x9f6b
leaq 0x10(%rsp), %rdi
callq 0x9190
movq %r14, %rdi
callq 0x8270
leaq 0x7700e(%rip), %rdi     # 0x80f88
callq 0x4a9b2
leaq 0x76fd2(%rip), %rdi     # 0x80f58
callq 0x7480e
leaq 0xcf296(%rip), %rax     # 0xd9228
movq (%rax), %rdx
leaq 0xcf294(%rip), %rax     # 0xd9230
movq (%rax), %rcx
leaq 0xcf292(%rip), %rax     # 0xd9238
movq (%rax), %r8
leaq 0x76fe3(%rip), %rdi     # 0x80f93
leaq 0x77036(%rip), %rsi     # 0x80fed
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x33127
callq 0x3308f
testl %eax, %eax
jne 0xa482
leaq 0x77077(%rip), %rdi     # 0x8104b
leaq 0x77078(%rip), %rsi     # 0x81053
xorl %eax, %eax
callq 0x80b0
xorl %eax, %eax
callq 0x19eb4
leaq 0x31af48(%rip), %r14    # 0x324f38
movl (%r14), %edx
movl %edx, 0x10(%rsp)
movl 0xbd96b(%rip), %esi     # 0xc7968
movl %esi, 0x14(%rsp)
movl 0xbd964(%rip), %r8d     # 0xc796c
movl %r8d, 0x18(%rsp)
movl 0xbd95c(%rip), %r9d     # 0xc7970
movl %r9d, 0x1c(%rsp)
movl 0xbd954(%rip), %r12d    # 0xc7974
movl %r12d, 0x20(%rsp)
movzbl 0xbd94f(%rip), %edi     # 0xc797b
movl %edi, %r11d
andl $0x1, %r11d
movl %r11d, 0x24(%rsp)
movl %edi, %r10d
shrl %r10d
andl $0x1, %r10d
movl %r10d, 0x28(%rsp)
movzbl 0xbd930(%rip), %r13d    # 0xc797f
movl %r13d, %eax
shrl $0x4, %eax
leaq 0xbda84(%rip), %r15     # 0xc7ae0
movl (%r15,%rax,4), %eax
btl $0x1, %r13d
movl $0x0, %ecx
adcb $0x3, %cl
shll %cl, %ebx
movl %eax, 0x2c(%rsp)
movl %ebx, 0x30(%rsp)
btl $0x2, %r13d
movl $0x0, %ecx
adcl $0x1, %ecx
movl %ecx, 0x34(%rsp)
testl %r12d, %r12d
je 0xa0d4
leaq 0x10(%rsp), %rdi
callq 0x2e478
testl %eax, %eax
jne 0xa0a5
callq 0x339df
jmp 0xa813
movl 0x10(%rsp), %edx
movl 0x14(%rsp), %esi
movl 0x18(%rsp), %r8d
movl 0x1c(%rsp), %r9d
movl 0x20(%rsp), %ebp
movb 0xbd8b9(%rip), %dil     # 0xc797b
movb 0x24(%rsp), %r11b
movb 0x28(%rsp), %r10b
movl 0x2c(%rsp), %eax
andb $-0x3, %r11b
movl %edx, (%r14)
movl %esi, 0xbd88b(%rip)     # 0xc7968
movl %r8d, 0xbd888(%rip)     # 0xc796c
movl %r9d, 0xbd885(%rip)     # 0xc7970
movl %ebp, 0xbd883(%rip)     # 0xc7974
andb $-0x4, %dil
orb %r11b, %dil
addb %r10b, %r10b
orb %dil, %r10b
movb %r10b, 0xbd876(%rip)    # 0xc797b
xorl %edx, %edx
xorl %ecx, %ecx
cmpq $0x80, %rdx
je 0xa129
cmpl %eax, (%r15)
jg 0xa11f
movb %dl, 0xbd862(%rip)      # 0xc797f
movl %edx, %ecx
addq $0x10, %rdx
addq $0x4, %r15
jmp 0xa109
cmpl $0x10, 0x30(%rsp)
sete %al
addb %al, %al
cmpl $0x2, 0x34(%rsp)
sete %dl
shlb $0x2, %dl
orb %al, %dl
orb %cl, %dl
movb %dl, 0xbd837(%rip)      # 0xc797f
leaq 0x76efc(%rip), %rdi     # 0x8104b
leaq 0x76f0a(%rip), %rsi     # 0x81060
xorl %eax, %eax
callq 0x80b0
leaq 0x76f0a(%rip), %rdi     # 0x8106e
callq 0x2feab
callq 0x3324a
testl %eax, %eax
jne 0xa482
leaq 0x76ece(%rip), %rbx     # 0x8104b
leaq 0x76ef4(%rip), %rsi     # 0x81078
movq %rbx, %rdi
xorl %eax, %eax
callq 0x80b0
pushq $0x78
popq %rdi
xorl %esi, %esi
callq 0x75194
leaq 0x76ee3(%rip), %rsi     # 0x81082
movq %rbx, %rdi
xorl %eax, %eax
callq 0x80b0
xorl %edi, %edi
xorl %esi, %esi
callq 0x19e1f
leaq 0x76edd(%rip), %rsi     # 0x81096
movq %rbx, %rdi
xorl %eax, %eax
callq 0x80b0
leaq 0x76ed5(%rip), %rdi     # 0x8109f
movl $0x800000, %esi         # imm = 0x800000
callq 0x4351c
leaq 0x76ed1(%rip), %rsi     # 0x810ac
movq %rbx, %rdi
xorl %eax, %eax
callq 0x80b0
callq 0x19c73
leaq 0x76ec6(%rip), %rsi     # 0x810b7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x80b0
callq 0x13843
leaq 0x76ebf(%rip), %rsi     # 0x810c6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x80b0
callq 0x74e7c
leaq 0x76eb3(%rip), %rsi     # 0x810d0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x80b0
cmpb $0x0, 0xbd74d(%rip)     # 0xc797b
je 0xa235
callq 0x750b9
cmpl $0x0, 0xd03a8(%rip)     # 0xda5e4
je 0xa2cc
leaq 0x76e02(%rip), %rdi     # 0x8104b
leaq 0x76e8a(%rip), %rsi     # 0x810da
xorl %eax, %eax
callq 0x80b0
movl 0xd0383(%rip), %edx     # 0xda5e0
leal 0x1(%rdx), %eax
movl %eax, 0xd037a(%rip)     # 0xda5e0
leaq 0xd0363(%rip), %rbx     # 0xda5d0
leaq 0x76c42(%rip), %rsi     # 0x80eb6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f20
leaq 0x75ddf(%rip), %rsi     # 0x80064
movq %rbx, %rdi
callq 0x91d0
movq %rax, 0xd01ec(%rip)     # 0xda480
leaq 0x76c26(%rip), %rdi     # 0x80ec1
pushq $0x37
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
movq %rax, %rcx
callq 0x8ff0
movq 0xd01cd(%rip), %rcx     # 0xda480
leaq 0x76c3f(%rip), %rdi     # 0x80ef9
pushq $0x3b
popq %rsi
movq %rbx, %rdx
callq 0x8ff0
andl $0x0, 0xd01ac(%rip)     # 0xda478
movsbl (%r14), %edi
movl 0xbd692(%rip), %esi     # 0xc7968
movl 0xbd690(%rip), %edx     # 0xc796c
movl 0xbd68e(%rip), %ecx     # 0xc7970
callq 0x41b98
leaq 0x76d5d(%rip), %rdi     # 0x8104b
leaq 0x76df4(%rip), %rsi     # 0x810e9
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x80b0
movsbl 0xbd674(%rip), %edi     # 0xc7979
movzbl 0xbd673(%rip), %eax     # 0xc797f
movl %eax, %ecx
shrl $0x4, %ecx
leaq 0xbd7c8(%rip), %rdx     # 0xc7ae0
movl (%rdx,%rcx,4), %edx
btl $0x2, %eax
movl $0x0, %ecx
adcb $0x1, %cl
movsbl 0xbd64c(%rip), %esi     # 0xc797a
btl $0x1, %eax
adcb $0x1, %bl
andl $0x0, (%rsp)
movzbl %cl, %ecx
movzbl %bl, %r8d
xorl %r9d, %r9d
callq 0x1a804
cmpb $0x0, 0xbd62d(%rip)     # 0xc797c
je 0xa4c1
leaq 0x76cef(%rip), %rdi     # 0x8104b
leaq 0x76d8d(%rip), %rsi     # 0x810f0
xorl %eax, %eax
callq 0x80b0
callq 0x19e24
callq 0x53daf
movzbl 0xbd601(%rip), %eax     # 0xc797c
leal -0x3(%rax), %ecx
cmpl $0x5, %eax
pushq $0x2
popq %rbx
cmovael %ecx, %ebx
leaq 0x79179e(%rip), %r13    # 0x79bb2c
leaq 0x5a4ad7(%rip), %rbp    # 0x5aee6c
leaq 0xd0254(%rip), %r14     # 0xda5f0
leaq 0x5a4acd(%rip), %r15    # 0x5aee70
leaq 0x10(%rsp), %r12
cmpl %ebx, (%r13)
jge 0xa4a9
xorl %edi, %edi
callq 0x4974f
movl (%rbp), %edi
sarl %edi
addl $0xffffff60, %edi       # imm = 0xFFFFFF60
xorl %esi, %esi
movl $0x198, %edx            # imm = 0x198
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x94b6
movabsq $0x202045444f4d20, %rax # imm = 0x202045444F4D20
movq %rax, 0xd0214(%rip)     # 0xda5fd
movups 0x76d11(%rip), %xmm0    # 0x81101
movaps %xmm0, 0xd01f9(%rip)    # 0xda5f0
movl (%rbp), %edi
sarl %edi
addl $-0x50, %edi
movl (%r15), %esi
sarl %esi
addl $-0x18, %esi
movq %r14, %rdx
movl $0x15d, %ecx            # imm = 0x15D
xorl %r8d, %r8d
callq 0x9558
movl (%r13), %edx
movq %r14, %rdi
leaq 0x76cf1(%rip), %rsi     # 0x81116
movl %ebx, %ecx
xorl %eax, %eax
callq 0x8f20
movl (%rbp), %edi
sarl %edi
addl $-0x50, %edi
movl (%r15), %esi
sarl %esi
movq %r14, %rdx
movl $0x15d, %ecx            # imm = 0x15D
xorl %r8d, %r8d
callq 0x9558
callq 0x422ff
movq %r12, %rdi
movq %r14, %rsi
callq 0x5486a
testl %eax, %eax
jle 0xa46c
cmpb $-0x1, 0xd018a(%rip)    # 0xda5f0
je 0xa534
leaq 0x31acad(%rip), %rax    # 0x325120
cmpb $0x0, 0x1(%rax)
jle 0xa3a8
jmp 0xa7ca
leaq 0x355417(%rip), %rax    # 0x35f8a0
movq (%rax), %rdx
leaq 0x76b60(%rip), %rdi     # 0x80ff3
leaq 0x76b7b(%rip), %rsi     # 0x81015
xorl %eax, %eax
callq 0x74534
pushq $0x1
popq %rdi
callq 0x8950
leaq 0x791674(%rip), %rax    # 0x79bb24
movzwl (%rax), %eax
movw %ax, 0xcffa4(%rip)      # 0xda45e
xorl %edi, %edi
callq 0x4974f
leaq 0x791668(%rip), %rbx    # 0x79bb30
leaq 0x791671(%rip), %r14    # 0x79bb40
movslq (%rbx), %rbx
testq %rbx, %rbx
js 0xa4e8
movswl %bx, %edi
callq 0x19ac0
shlq $0x2, %rbx
addq %r14, %rbx
jmp 0xa4cf
cmpb $0x0, 0xbd48d(%rip)     # 0xc797c
jne 0xa553
leaq 0x76c34(%rip), %rdi     # 0x8112c
callq 0x19ef8
testl %eax, %eax
jg 0xa51d
leaq 0x76c2b(%rip), %rdi     # 0x81133
callq 0x19ef8
testl %eax, %eax
jg 0xa51d
leaq 0x76c23(%rip), %rdi     # 0x8113b
callq 0x19ef8
leaq 0x76c1a(%rip), %rdi     # 0x8113e
callq 0x19ef8
cmpb $0x0, 0xbd44c(%rip)     # 0xc797c
je 0xa544
jmp 0xa553
leaq 0x31abe5(%rip), %rax    # 0x325120
movb $0x1, 0x1(%rax)
jmp 0xa7ca
xorl %eax, %eax
callq 0x172a9
testl %eax, %eax
je 0xa7ca
andl $0x0, 0xd0f96(%rip)     # 0xdb4f0
andl $0x0, 0xcff2b(%rip)     # 0xda48c
andl $0x0, 0xd0f8c(%rip)     # 0xdb4f4
andl $0x0, 0xd0f89(%rip)     # 0xdb4f8
andl $0x0, 0xd0f86(%rip)     # 0xdb4fc
andl $0x0, 0xd0f83(%rip)     # 0xdb500
andl $0x0, 0xd0f80(%rip)     # 0xdb504
andl $0x0, 0xd0f7d(%rip)     # 0xdb508
andl $0x0, 0xd0f7a(%rip)     # 0xdb50c
andw $0x0, 0xd0f78(%rip)     # 0xdb512
andw $0x0, 0xd0f72(%rip)     # 0xdb514
andw $0x0, 0xd0f6c(%rip)     # 0xdb516
andw $0x0, 0xd0f66(%rip)     # 0xdb518
andw $0x0, 0xd0f60(%rip)     # 0xdb51a
andw $0x0, 0xd0f5a(%rip)     # 0xdb51c
andl $0x0, 0xcfebf(%rip)     # 0xda488
andl $0x0, 0xcfe84(%rip)     # 0xda454
andl $0x0, 0xcfe81(%rip)     # 0xda458
xorl %eax, %eax
andl $0x0, 0xd0f40(%rip)     # 0xdb520
movb %al, 0xd0f2a(%rip)      # 0xdb510
movb %al, 0xd0f25(%rip)      # 0xdb511
pushq $-0x20
popq %rcx
leaq 0xd0f3a(%rip), %rdx     # 0xdb530
leaq 0xd0f43(%rip), %rsi     # 0xdb540
leaq 0xd0f4c(%rip), %rdi     # 0xdb550
leaq 0xd0f55(%rip), %r8      # 0xdb560
leaq 0xd0f6e(%rip), %r9      # 0xdb580
leaq 0xd0f87(%rip), %r10     # 0xdb5a0
leaq 0xd0fa0(%rip), %r11     # 0xdb5c0
leaq 0xd0fb9(%rip), %rbx     # 0xdb5e0
leaq 0xd0fd2(%rip), %r14     # 0xdb600
leaq 0xd0feb(%rip), %r12     # 0xdb620
leaq 0xcfe54(%rip), %r13     # 0xda490
leaq 0xd0ffd(%rip), %rbp     # 0xdb640
xorl %r15d, %r15d
testq %rcx, %rcx
je 0xa69d
andw $0x0, 0x20(%rcx,%r8)
andw $0x0, 0x20(%rcx,%r9)
andw $0x0, 0x20(%rcx,%r10)
andw $0x0, 0x20(%rcx,%r11)
andw $0x0, 0x20(%rcx,%rbx)
andw $0x0, 0x20(%rcx,%r14)
andw $0x0, 0x20(%rcx,%r12)
andw $0x0, 0x20(%rcx,%r13)
movb %al, (%r15,%rdx)
andw $0x0, 0x20(%rcx,%rbp)
movb %al, (%r15,%rsi)
movb %al, (%r15,%rdi)
incq %r15
addq $0x2, %rcx
jmp 0xa646
xorl %eax, %eax
callq 0x95e2
movb $0x1, 0xcfda8(%rip)     # 0xda453
cmpb $0x0, 0xbd2ca(%rip)     # 0xc797c
leaq 0x79146b(%rip), %r12    # 0x79bb24
movl (%r12), %eax
je 0xa75a
movb $0x8, 0xcff26(%rip)     # 0xda5f0
movb %al, 0xcff21(%rip)      # 0xda5f1
movq 0xd0f89(%rip), %rax     # 0xdb660
movq %rax, 0xcff14(%rip)     # 0xda5f2
movzwl 0xd0f83(%rip), %eax     # 0xdb668
movw %ax, 0xcff0e(%rip)      # 0xda5fa
movb $0x0, 0xcff09(%rip)     # 0xda5fc
leaq 0x791436(%rip), %rbx    # 0x79bb30
leaq 0xcfeef(%rip), %r14     # 0xda5f0
pushq $0xc
popq %rbp
leaq 0x791435(%rip), %r15    # 0x79bb40
movslq (%rbx), %rbx
movl (%r12), %eax
testq %rbx, %rbx
js 0xa730
cmpl %eax, %ebx
je 0xa727
movl %ebx, %edi
movq %r14, %rsi
movl %ebp, %edx
callq 0x54ffd
shlq $0x2, %rbx
addq %r15, %rbx
jmp 0xa70b
movslq %eax, %rcx
imulq $0xb, %rcx, %rcx
leaq 0xd0f32(%rip), %rdx     # 0xdb670
movzwl 0xd0f23(%rip), %esi     # 0xdb668
movw %si, 0x8(%rcx,%rdx)
movq 0xd0f0f(%rip), %rsi     # 0xdb660
movq %rsi, (%rcx,%rdx)
movb $0x0, 0xa(%rcx,%rdx)
movw %ax, 0xcfcfd(%rip)      # 0xda45e
leaq 0x11ad91(%rip), %rbx    # 0x1254f9
leaq 0x548bf9(%rip), %r14    # 0x553368
cmpb $0x0, (%rbx)
jne 0xa7ab
callq 0x75fe9
movl 0xcfd0d(%rip), %eax     # 0xda48c
cmpl 0xd0d6f(%rip), %eax     # 0xdb4f4
je 0xa78e
callq 0xc4c6
jmp 0xa779
movswl 0xcfcc9(%rip), %edi     # 0xda45e
movl (%r14), %eax
subl 0xcfcba(%rip), %eax     # 0xda458
imull $0x5555, %eax, %esi     # imm = 0x5555
callq 0xa81a
jmp 0xa76f
movb $0x0, 0xcfca1(%rip)     # 0xda453
cmpb $0x0, 0xbd1c3(%rip)     # 0xc797c
jne 0xa7ca
leaq 0x11c886(%rip), %rax    # 0x127048
movb $0x1, (%rax)
jmp 0xa544
xorl %eax, %eax
callq 0x17f11
callq 0x53db0
callq 0x53db1
callq 0x1aa8f
callq 0x99a7
callq 0x74d8e
callq 0x74d5c
callq 0x339df
callq 0x3024b
callq 0x19ec7
cmpl $0x0, 0xcfddf(%rip)     # 0xda5e4
je 0xa813
movq 0xcfc72(%rip), %rdi     # 0xda480
callq 0x8640
xorl %edi, %edi
callq 0x8950