// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekldsv.c
// Function: loadgame
int
loadgame(int loadno)                                             
{
     int      i, fil;
     short     dummyscreensize;
     intptr_t tmpanimates[MAXANIMATES];

     sprintf((char *)tempbuf,"savegam%d.tek",loadno);
     if( (fil=open((char *)tempbuf,O_BINARY|O_RDWR,S_IREAD)) == -1 ) {
          return(-1);
     }

     lseek(fil, 0, SEEK_SET);

     read(fil,loadsavenames[loadno-1],MAXLOADSAVESIZE);

     read(fil,boardfilename,80);
     // setup new map
     newgame(boardfilename);

     read(fil,&numplayers,2);
     read(fil,&myconnectindex,2);
     read(fil,&connecthead,2);
     read(fil,connectpoint2,MAXPLAYERS<<1);

     // Make sure palookups get set, sprites will get overwritten later
     for(i=connecthead;i>=0;i=connectpoint2[i]) initplayersprite((short)i);

     read(fil,posx,MAXPLAYERS<<2);
     read(fil,posy,MAXPLAYERS<<2);
     read(fil,posz,MAXPLAYERS<<2);
     read(fil,horiz,MAXPLAYERS<<2);
     read(fil,zoom,MAXPLAYERS<<2);
     read(fil,hvel,MAXPLAYERS<<2);
     read(fil,ang,MAXPLAYERS<<1);
     read(fil,cursectnum,MAXPLAYERS<<1);
     read(fil,ocursectnum,MAXPLAYERS<<1);
     read(fil,playersprite,MAXPLAYERS<<1);
     read(fil,deaths,MAXPLAYERS<<1);
     read(fil,lastchaingun,MAXPLAYERS<<2);
     read(fil,health,MAXPLAYERS<<2);
     read(fil,score,MAXPLAYERS<<2);
     read(fil,saywatchit,MAXPLAYERS<<2);
     read(fil,numbombs,MAXPLAYERS<<1);
     read(fil,&dummyscreensize,2);
     read(fil,oflags,MAXPLAYERS<<1);
     read(fil,dimensionmode,MAXPLAYERS);
     read(fil,revolvedoorstat,MAXPLAYERS);
     read(fil,revolvedoorang,MAXPLAYERS<<1);
     read(fil,revolvedoorrotang,MAXPLAYERS<<1);
     read(fil,revolvedoorx,MAXPLAYERS<<2);
     read(fil,revolvedoory,MAXPLAYERS<<2);

     read(fil,&numsectors,2);
     read(fil,sector,sizeof(sectortype)*numsectors);

     read(fil,&numwalls,2);
     read(fil,wall,sizeof(walltype)*numwalls);

     // Store all sprites (even holes) to preserve indeces
     read(fil,sprite,sizeof(spritetype)*MAXSPRITES);
     read(fil,headspritesect,(MAXSECTORS+1)<<1);
     read(fil,prevspritesect,MAXSPRITES<<1);
     read(fil,nextspritesect,MAXSPRITES<<1);
     read(fil,headspritestat,(MAXSTATUS+1)<<1);
     read(fil,prevspritestat,MAXSPRITES<<1);
     read(fil,nextspritestat,MAXSPRITES<<1);

     read(fil,&vel,4);
     read(fil,&svel,4);
     read(fil,&angvel,4);

     read(fil,&locselectedgun,4);
     read(fil,&locvel,1);
     read(fil,&olocvel,1);
     read(fil,&locsvel,2);                                   // Les 09/28/95
     read(fil,&olocsvel,2);                                  // Les 09/28/95
     read(fil,&locangvel,2);                                 // Les 09/28/95
     read(fil,&olocangvel,2);                                // Les 09/28/95
     read(fil,&locbits,2);
     read(fil,&olocbits,2);

     read(fil,&locselectedgun2,4);
     read(fil,&locvel2,1);
     read(fil,&olocvel2,1);
     read(fil,&locsvel2,2);                                  // Les 09/28/95
     read(fil,&olocsvel2,2);                                 // Les 09/28/95
     read(fil,&locangvel2,2);                                // Les 09/28/95
     read(fil,&olocangvel2,2);                               // Les 09/28/95
     read(fil,&locbits2,2);
     read(fil,&olocbits2,2);

     read(fil,syncvel,MAXPLAYERS);
     read(fil,osyncvel,MAXPLAYERS);
     read(fil,syncsvel,MAXPLAYERS<<1);                       // Les 09/28/95
     read(fil,osyncsvel,MAXPLAYERS<<1);                      // Les 09/28/95
     read(fil,syncangvel,MAXPLAYERS<<1);                     // Les 09/28/95
     read(fil,osyncangvel,MAXPLAYERS<<1);                    // Les 09/28/95
     read(fil,syncbits,MAXPLAYERS<<1);
     read(fil,osyncbits,MAXPLAYERS<<1);

     read(fil,&screenpeek,2);
     read(fil,&oldmousebstatus,2);
     read(fil,&brightness,2);
     read(fil,&neartagsector,2);
     read(fil,&neartagwall,2);
     read(fil,&neartagsprite,2);
     read(fil,&lockclock,4);
     read(fil,&neartagdist,4);
     read(fil,&neartaghitdist,4);
     read(fil,&masterslavetexttime,4);

     read(fil,rotatespritelist,16<<1);
     read(fil,&rotatespritecnt,2);
     read(fil,warpsectorlist,16<<1);
     read(fil,&warpsectorcnt,2);
     read(fil,xpanningsectorlist,16<<1);
     read(fil,&xpanningsectorcnt,2);
     read(fil,ypanningwalllist,64<<1);
     read(fil,&ypanningwallcnt,2);
     read(fil,floorpanninglist,64<<1);
     read(fil,&floorpanningcnt,2);
     read(fil,dragsectorlist,16<<1);
     read(fil,dragxdir,16<<1);
     read(fil,dragydir,16<<1);
     read(fil,&dragsectorcnt,2);
     read(fil,dragx1,16<<2);
     read(fil,dragy1,16<<2);
     read(fil,dragx2,16<<2);
     read(fil,dragy2,16<<2);
     read(fil,dragfloorz,16<<2);
     read(fil,&swingcnt,2);
     read(fil,swingwall,(32*5)<<1);
     read(fil,swingsector,32<<1);
     read(fil,swingangopen,32<<1);
     read(fil,swingangclosed,32<<1);
     read(fil,swingangopendir,32<<1);
     read(fil,swingang,32<<1);
     read(fil,swinganginc,32<<1);
     read(fil,swingx,(32*8)<<2);
     read(fil,swingy,(32*8)<<2);
     read(fil,revolvesector,4<<1);
     read(fil,revolveang,4<<1);
     read(fil,&revolvecnt,2);
     read(fil,revolvex,(4*16)<<2);
     read(fil,revolvey,(4*16)<<2);
     read(fil,revolvepivotx,4<<2);
     read(fil,revolvepivoty,4<<2);
     read(fil,subwaytracksector,(4*128)<<1);
     read(fil,subwaynumsectors,4<<1);
     read(fil,&subwaytrackcnt,2);
     read(fil,subwaystop,(4*8)<<2);
     read(fil,subwaystopcnt,4<<2);
     read(fil,subwaytrackx1,4<<2);
     read(fil,subwaytracky1,4<<2);
     read(fil,subwaytrackx2,4<<2);
     read(fil,subwaytracky2,4<<2);
     read(fil,subwayx,4<<2);
     read(fil,subwaygoalstop,4<<2);
     read(fil,subwayvel,4<<2);
     read(fil,subwaypausetime,4<<2);
     read(fil,waterfountainwall,MAXPLAYERS<<1);
     read(fil,waterfountaincnt,MAXPLAYERS<<1);
     read(fil,slimesoundcnt,MAXPLAYERS<<1);

     // Warning: only works if all pointers are in sector structures!
     read(fil,tmpanimates,sizeof(intptr_t) * MAXANIMATES);
     for(i=MAXANIMATES-1;i>=0;i--)
          animateptr[i] = (int *)(tmpanimates[i] + (intptr_t)sector);
     read(fil,animategoal,MAXANIMATES<<2);
     read(fil,animatevel,MAXANIMATES<<2);
     read(fil,animateacc,MAXANIMATES<<2);
     read(fil,&animatecnt,4);

     read(fil,&totalclock,4);
     read(fil,&numframes,4);
     read(fil,&randomseed,4);

    #ifdef UNINITENGINECRASH
     read(fil,startumost,MAXXDIM<<1);
     read(fil,startdmost,MAXXDIM<<1);
    #endif

     read(fil,&numpalookups,2);

     read(fil,&visibility,4);
     read(fil,&parallaxtype,1);
     read(fil,&parallaxyoffs,4);
     read(fil,pskyoff,MAXPSKYTILES<<1);
     read(fil,&pskybits,2);

     read(fil,show2dsector,MAXSECTORS>>3);
     read(fil,show2dwall,MAXWALLS>>3);
     read(fil,show2dsprite,MAXSPRITES>>3);
     read(fil,&automapping,1);

     read(fil,invredcards,MAXPLAYERS<<2);   //  sizeof(invredcards));
     read(fil,invbluecards,MAXPLAYERS<<2);  //  sizeof(invbluecards));
     read(fil,invaccutrak,MAXPLAYERS<<2);   //  sizeof(invaccutrak));

     tekgunload(fil);
     tektagload(fil);
     tekstatload(fil);

     tekloadmissioninfo(fil);
 
     close(fil);

     for(i=connecthead;i>=0;i=connectpoint2[i]) initplayersprite((short)i);

     totalclock = lockclock;
     ototalclock = lockclock;

     showmessage("GAME LOADED");

     return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %edx
leaq 0x117578(%rip), %rdi    # 0x12d970
leaq 0xc3078(%rip), %rsi     # 0xd9477
movb $0x0, %al
callq 0x8e50
leaq 0x117563(%rip), %rdi    # 0x12d970
movl $0x2, %esi
movl $0x100, %edx            # imm = 0x100
movb $0x0, %al
callq 0x8600
movl %eax, -0x10(%rbp)
cmpl $-0x1, %eax
jne 0x16432
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1715b
movl -0x10(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x8390
movl -0x10(%rbp), %edi
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x163b0e(%rip), %rsi    # 0x179f60
imulq $0xc, %rax, %rax
addq %rax, %rsi
movl $0xc, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x118363(%rip), %rsi    # 0x12e7d0
movl $0x50, %edx
callq 0x8a70
leaq 0x118352(%rip), %rdi    # 0x12e7d0
callq 0x1d7e0
movl -0x10(%rbp), %edi
leaq 0x78eabf(%rip), %rsi    # 0x7a4f4c
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x78eaa3(%rip), %rsi    # 0x7a4f44
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x78ea9b(%rip), %rsi    # 0x7a4f50
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x78ea97(%rip), %rsi    # 0x7a4f60
movl $0x20, %edx
callq 0x8a70
leaq 0x78ea76(%rip), %rax    # 0x7a4f50
movl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x16503
movl -0xc(%rbp), %eax
movswl %ax, %edi
callq 0x24f80
movslq -0xc(%rbp), %rcx
leaq 0x78ea65(%rip), %rax    # 0x7a4f60
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
jmp 0x164df
movl -0x10(%rbp), %edi
leaq 0x117343(%rip), %rsi    # 0x12d850
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x11736f(%rip), %rsi    # 0x12d890
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x11739b(%rip), %rsi    # 0x12d8d0
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1182d7(%rip), %rsi    # 0x12e820
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x118333(%rip), %rsi    # 0x12e890
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1181ef(%rip), %rsi    # 0x12e760
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1172ab(%rip), %rsi    # 0x12d830
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x118147(%rip), %rsi    # 0x12e6e0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x118193(%rip), %rsi    # 0x12e740
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x11814f(%rip), %rsi    # 0x12e710
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1181db(%rip), %rsi    # 0x12e7b0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160017(%rip), %rsi    # 0x176600
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117313(%rip), %rsi    # 0x12d910
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16002f(%rip), %rsi    # 0x176640
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16005b(%rip), %rsi    # 0x176680
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160087(%rip), %rsi    # 0x1766c0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq -0x12(%rbp), %rsi
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1182c2(%rip), %rsi    # 0x12e920
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x11820e(%rip), %rsi    # 0x12e880
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x11807a(%rip), %rsi    # 0x12e700
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160046(%rip), %rsi    # 0x1766e0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160052(%rip), %rsi    # 0x176700
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16005e(%rip), %rsi    # 0x176720
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16008a(%rip), %rsi    # 0x176760
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5b36a6(%rip), %rsi    # 0x5c9d90
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5b3692(%rip), %rax    # 0x5c9d90
movswq (%rax), %rax
imulq $0x28, %rax, %rdx
leaq 0x427183(%rip), %rsi    # 0x43d890
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5f857c(%rip), %rsi    # 0x60ec98
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5f8568(%rip), %rax    # 0x60ec98
movswq (%rax), %rdx
shlq $0x5, %rdx
leaq 0x39c141(%rip), %rsi    # 0x3b2880
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x460392(%rip), %rsi    # 0x476ae0
movl $0xb0000, %edx          # imm = 0xB0000
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x58fbde(%rip), %rsi    # 0x5a6340
movl $0x2002, %edx           # imm = 0x2002
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x591bda(%rip), %rsi    # 0x5a8350
movl $0x8000, %edx           # imm = 0x8000
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x599bc6(%rip), %rsi    # 0x5b0350
movl $0x8000, %edx           # imm = 0x8000
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5a1bb2(%rip), %rsi    # 0x5b8350
movl $0x802, %edx            # imm = 0x802
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5a23ae(%rip), %rsi    # 0x5b8b60
movl $0x8000, %edx           # imm = 0x8000
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5aa39a(%rip), %rsi    # 0x5c0b60
movl $0x8000, %edx           # imm = 0x8000
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117fc6(%rip), %rsi    # 0x12e7a0
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117fb6(%rip), %rsi    # 0x12e7a4
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117fa6(%rip), %rsi    # 0x12e7a8
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15d40a(%rip), %rsi    # 0x173c20
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15d41b(%rip), %rsi    # 0x173c45
movl $0x1, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117c92(%rip), %rsi    # 0x12e4d0
movl $0x1, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15d3f4(%rip), %rsi    # 0x173c46
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117c6c(%rip), %rsi    # 0x12e4d2
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15d3ce(%rip), %rsi    # 0x173c48
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117c48(%rip), %rsi    # 0x12e4d6
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1182c2(%rip), %rsi    # 0x12eb64
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117c24(%rip), %rsi    # 0x12e4da
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15fb8e(%rip), %rsi    # 0x176458
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15fb72(%rip), %rsi    # 0x176450
movl $0x1, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117bdf(%rip), %rsi    # 0x12e4d1
movl $0x1, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15fb4c(%rip), %rsi    # 0x176452
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117bba(%rip), %rsi    # 0x12e4d4
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15fb26(%rip), %rsi    # 0x176454
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117b96(%rip), %rsi    # 0x12e4d8
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15fb00(%rip), %rsi    # 0x176456
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117b72(%rip), %rsi    # 0x12e4dc
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117b82(%rip), %rsi    # 0x12e500
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117b5e(%rip), %rsi    # 0x12e4f0
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117b9a(%rip), %rsi    # 0x12e540
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117b66(%rip), %rsi    # 0x12e520
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117bd2(%rip), %rsi    # 0x12e5a0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117b9e(%rip), %rsi    # 0x12e580
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x116e1a(%rip), %rsi    # 0x12d810
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117bd6(%rip), %rsi    # 0x12e5e0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x116dc0(%rip), %rsi    # 0x12d7de
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x116dae(%rip), %rsi    # 0x12d7e0
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x116d9c(%rip), %rsi    # 0x12d7e2
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117e98(%rip), %rsi    # 0x12e8f2
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117e82(%rip), %rsi    # 0x12e8f0
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117e72(%rip), %rsi    # 0x12e8f4
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x116d72(%rip), %rsi    # 0x12d808
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1600f6(%rip), %rsi    # 0x176ba0
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117e3a(%rip), %rsi    # 0x12e8f8
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117a0e(%rip), %rsi    # 0x12e4e0
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1600ca(%rip), %rsi    # 0x176bb0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1600d6(%rip), %rsi    # 0x176bd0
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1600d2(%rip), %rsi    # 0x176be0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16013e(%rip), %rsi    # 0x176c60
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16013a(%rip), %rsi    # 0x176c70
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160146(%rip), %rsi    # 0x176c90
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160142(%rip), %rsi    # 0x176ca0
movl $0x80, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1601ae(%rip), %rsi    # 0x176d20
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1601aa(%rip), %rsi    # 0x176d30
movl $0x80, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160216(%rip), %rsi    # 0x176db0
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160212(%rip), %rsi    # 0x176dc0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16021e(%rip), %rsi    # 0x176de0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16022a(%rip), %rsi    # 0x176e00
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160236(%rip), %rsi    # 0x176e20
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160232(%rip), %rsi    # 0x176e30
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16025e(%rip), %rsi    # 0x176e70
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16028a(%rip), %rsi    # 0x176eb0
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1602b6(%rip), %rsi    # 0x176ef0
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1602e2(%rip), %rsi    # 0x176f30
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16030e(%rip), %rsi    # 0x176f70
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16030a(%rip), %rsi    # 0x176f80
movl $0x140, %edx            # imm = 0x140
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160436(%rip), %rsi    # 0x1770c0
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160462(%rip), %rsi    # 0x177100
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16048e(%rip), %rsi    # 0x177140
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1604ba(%rip), %rsi    # 0x177180
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1604e6(%rip), %rsi    # 0x1771c0
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160512(%rip), %rsi    # 0x177200
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16053e(%rip), %rsi    # 0x177240
movl $0x400, %edx            # imm = 0x400
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16092a(%rip), %rsi    # 0x177640
movl $0x400, %edx            # imm = 0x400
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160d16(%rip), %rsi    # 0x177a40
movl $0x8, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160d0a(%rip), %rsi    # 0x177a48
movl $0x8, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160cfe(%rip), %rsi    # 0x177a50
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160cfa(%rip), %rsi    # 0x177a60
movl $0x100, %edx            # imm = 0x100
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160de6(%rip), %rsi    # 0x177b60
movl $0x100, %edx            # imm = 0x100
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160ed2(%rip), %rsi    # 0x177c60
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160ece(%rip), %rsi    # 0x177c70
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x160eca(%rip), %rsi    # 0x177c80
movl $0x400, %edx            # imm = 0x400
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612b6(%rip), %rsi    # 0x178080
movl $0x8, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612aa(%rip), %rsi    # 0x178088
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16129e(%rip), %rsi    # 0x178090
movl $0x80, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x16130a(%rip), %rsi    # 0x178110
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x161306(%rip), %rsi    # 0x178120
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x161302(%rip), %rsi    # 0x178130
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612fe(%rip), %rsi    # 0x178140
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612fa(%rip), %rsi    # 0x178150
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612f6(%rip), %rsi    # 0x178160
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612f2(%rip), %rsi    # 0x178170
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612ee(%rip), %rsi    # 0x178180
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x1612ea(%rip), %rsi    # 0x178190
movl $0x10, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117a16(%rip), %rsi    # 0x12e8d0
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x117a32(%rip), %rsi    # 0x12e900
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x11797e(%rip), %rsi    # 0x12e860
movl $0x20, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq -0x1020(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x8a70
movl $0x1ff, -0xc(%rbp)      # imm = 0x1FF
cmpl $0x0, -0xc(%rbp)
jl 0x16f3a
movslq -0xc(%rbp), %rax
leaq 0x426978(%rip), %rdx    # 0x43d890
addq -0x1020(%rbp,%rax,8), %rdx
movslq -0xc(%rbp), %rcx
leaq 0x15cd25(%rip), %rax    # 0x173c50
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16f07
movl -0x10(%rbp), %edi
leaq 0x15dd0c(%rip), %rsi    # 0x174c50
movl $0x800, %edx            # imm = 0x800
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15e4f8(%rip), %rsi    # 0x175450
movl $0x800, %edx            # imm = 0x800
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x15ece4(%rip), %rsi    # 0x175c50
movl $0x800, %edx            # imm = 0x800
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x116870(%rip), %rsi    # 0x12d7f0
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x58f384(%rip), %rsi    # 0x5a6318
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x6039f4(%rip), %rsi    # 0x61a99c
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x6170ec(%rip), %rsi    # 0x62e0a8
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5f5888(%rip), %rsi    # 0x60c858
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x58f338(%rip), %rsi    # 0x5a631c
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5408fa(%rip), %rsi    # 0x5578f2
movl $0x1, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5408e8(%rip), %rsi    # 0x5578f4
movl $0x4, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5406d0(%rip), %rsi    # 0x5576f0
movl $0x200, %edx            # imm = 0x200
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x5408bc(%rip), %rsi    # 0x5578f0
movl $0x2, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x58e0c8(%rip), %rsi    # 0x5a5110
movl $0x200, %edx            # imm = 0x200
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x58eab4(%rip), %rsi    # 0x5a5b10
movl $0x800, %edx            # imm = 0x800
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x58e2a0(%rip), %rsi    # 0x5a5310
movl $0x800, %edx            # imm = 0x800
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x58f28c(%rip), %rsi    # 0x5a6310
movl $0x1, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x162ca8(%rip), %rsi    # 0x179d40
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x162cd4(%rip), %rsi    # 0x179d80
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
leaq 0x162d00(%rip), %rsi    # 0x179dc0
movl $0x40, %edx
callq 0x8a70
movl -0x10(%rbp), %edi
callq 0x162c0
movl -0x10(%rbp), %edi
callq 0x43b00
movl -0x10(%rbp), %edi
callq 0x39dd0
movl -0x10(%rbp), %edi
callq 0x20de0
movl -0x10(%rbp), %edi
callq 0x8300
leaq 0x78de57(%rip), %rax    # 0x7a4f50
movl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x17122
movl -0xc(%rbp), %eax
movswl %ax, %edi
callq 0x24f80
movslq -0xc(%rbp), %rcx
leaq 0x78de46(%rip), %rax    # 0x7a4f60
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
jmp 0x170fe
leaq 0x1166df(%rip), %rax    # 0x12d808
movl (%rax), %ecx
leaq 0x58f1e6(%rip), %rax    # 0x5a6318
movl %ecx, (%rax)
leaq 0x1166cd(%rip), %rax    # 0x12d808
movl (%rax), %ecx
leaq 0x116690(%rip), %rax    # 0x12d7d4
movl %ecx, (%rax)
leaq 0xc2338(%rip), %rdi     # 0xd9485
movb $0x0, %al
callq 0x1a150
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1020, %rsp           # imm = 0x1020
popq %rbp
retq
nopw (%rax,%rax)