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

     sprintf((char *)tempbuf,"savegam%d.tek",saveno);
   
     if( (fil = open((char *)tempbuf,O_BINARY|O_TRUNC|O_CREAT|O_WRONLY,S_IWRITE)) == -1 ) {
          return(-1);
     }

     lseek(fil, 0, SEEK_SET);

     write(fil,loadsavenames[saveno-1],MAXLOADSAVESIZE);

     write(fil,boardfilename,80);

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

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

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

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

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

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

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

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

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

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

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

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

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

    #ifdef UNINITENGINECRASH
     write(fil,startumost,MAXXDIM<<1);
     write(fil,startdmost,MAXXDIM<<1);
    #endif
 
     write(fil,&numpalookups,2);

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

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

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

     tekgunsave(fil);
     tektagsave(fil);
     tekstatsave(fil);

     teksavemissioninfo(fil);
 
     close(fil);

     showmessage("GAME SAVED");

     return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1010, %rsp           # imm = 0x1010
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %edx
leaq 0x1167e8(%rip), %rdi    # 0x12d970
leaq 0xc22e8(%rip), %rsi     # 0xd9477
movb $0x0, %al
callq 0x8e50
leaq 0x1167d3(%rip), %rdi    # 0x12d970
movl $0x241, %esi            # imm = 0x241
movl $0x80, %edx
movb $0x0, %al
callq 0x8600
movl %eax, -0x10(%rbp)
cmpl $-0x1, %eax
jne 0x171c2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17e61
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 0x162d7e(%rip), %rsi    # 0x179f60
imulq $0xc, %rax, %rax
addq %rax, %rsi
movl $0xc, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1175d3(%rip), %rsi    # 0x12e7d0
movl $0x50, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x78dd3b(%rip), %rsi    # 0x7a4f4c
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x78dd1f(%rip), %rsi    # 0x7a4f44
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x78dd17(%rip), %rsi    # 0x7a4f50
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x78dd13(%rip), %rsi    # 0x7a4f60
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1165ef(%rip), %rsi    # 0x12d850
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11661b(%rip), %rsi    # 0x12d890
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116647(%rip), %rsi    # 0x12d8d0
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x117583(%rip), %rsi    # 0x12e820
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1175df(%rip), %rsi    # 0x12e890
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11749b(%rip), %rsi    # 0x12e760
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116557(%rip), %rsi    # 0x12d830
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1173f3(%rip), %rsi    # 0x12e6e0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11743f(%rip), %rsi    # 0x12e740
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1173fb(%rip), %rsi    # 0x12e710
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x117487(%rip), %rsi    # 0x12e7b0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f2c3(%rip), %rsi    # 0x176600
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1165bf(%rip), %rsi    # 0x12d910
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f2db(%rip), %rsi    # 0x176640
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f307(%rip), %rsi    # 0x176680
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f333(%rip), %rsi    # 0x1766c0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1177c1(%rip), %rsi    # 0x12eb62
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11756b(%rip), %rsi    # 0x12e920
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1174b7(%rip), %rsi    # 0x12e880
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x117323(%rip), %rsi    # 0x12e700
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f2ef(%rip), %rsi    # 0x1766e0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f2fb(%rip), %rsi    # 0x176700
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f307(%rip), %rsi    # 0x176720
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f333(%rip), %rsi    # 0x176760
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5b294f(%rip), %rsi    # 0x5c9d90
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5b293b(%rip), %rax    # 0x5c9d90
movswq (%rax), %rax
imulq $0x28, %rax, %rdx
leaq 0x42642c(%rip), %rsi    # 0x43d890
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5f7825(%rip), %rsi    # 0x60ec98
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5f7811(%rip), %rax    # 0x60ec98
movswq (%rax), %rdx
shlq $0x5, %rdx
leaq 0x39b3ea(%rip), %rsi    # 0x3b2880
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x45f63b(%rip), %rsi    # 0x476ae0
movl $0xb0000, %edx          # imm = 0xB0000
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x58ee87(%rip), %rsi    # 0x5a6340
movl $0x2002, %edx           # imm = 0x2002
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x590e83(%rip), %rsi    # 0x5a8350
movl $0x8000, %edx           # imm = 0x8000
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x598e6f(%rip), %rsi    # 0x5b0350
movl $0x8000, %edx           # imm = 0x8000
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5a0e5b(%rip), %rsi    # 0x5b8350
movl $0x802, %edx            # imm = 0x802
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5a1657(%rip), %rsi    # 0x5b8b60
movl $0x8000, %edx           # imm = 0x8000
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5a9643(%rip), %rsi    # 0x5c0b60
movl $0x8000, %edx           # imm = 0x8000
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11726f(%rip), %rsi    # 0x12e7a0
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11725f(%rip), %rsi    # 0x12e7a4
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11724f(%rip), %rsi    # 0x12e7a8
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15c6b3(%rip), %rsi    # 0x173c20
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15c6c4(%rip), %rsi    # 0x173c45
movl $0x1, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116f3b(%rip), %rsi    # 0x12e4d0
movl $0x1, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15c69d(%rip), %rsi    # 0x173c46
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116f15(%rip), %rsi    # 0x12e4d2
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15c677(%rip), %rsi    # 0x173c48
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116ef1(%rip), %rsi    # 0x12e4d6
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11756b(%rip), %rsi    # 0x12eb64
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116ecd(%rip), %rsi    # 0x12e4da
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15ee37(%rip), %rsi    # 0x176458
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15ee1b(%rip), %rsi    # 0x176450
movl $0x1, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e88(%rip), %rsi    # 0x12e4d1
movl $0x1, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15edf5(%rip), %rsi    # 0x176452
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e63(%rip), %rsi    # 0x12e4d4
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15edcf(%rip), %rsi    # 0x176454
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e3f(%rip), %rsi    # 0x12e4d8
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15eda9(%rip), %rsi    # 0x176456
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e1b(%rip), %rsi    # 0x12e4dc
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e2b(%rip), %rsi    # 0x12e500
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e07(%rip), %rsi    # 0x12e4f0
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e43(%rip), %rsi    # 0x12e540
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e0f(%rip), %rsi    # 0x12e520
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e7b(%rip), %rsi    # 0x12e5a0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e47(%rip), %rsi    # 0x12e580
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1160c3(%rip), %rsi    # 0x12d810
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116e7f(%rip), %rsi    # 0x12e5e0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116069(%rip), %rsi    # 0x12d7de
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116057(%rip), %rsi    # 0x12d7e0
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116045(%rip), %rsi    # 0x12d7e2
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x117141(%rip), %rsi    # 0x12e8f2
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11712b(%rip), %rsi    # 0x12e8f0
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11711b(%rip), %rsi    # 0x12e8f4
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x11601b(%rip), %rsi    # 0x12d808
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f39f(%rip), %rsi    # 0x176ba0
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1170e3(%rip), %rsi    # 0x12e8f8
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116cb7(%rip), %rsi    # 0x12e4e0
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f373(%rip), %rsi    # 0x176bb0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f37f(%rip), %rsi    # 0x176bd0
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f37b(%rip), %rsi    # 0x176be0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f3e7(%rip), %rsi    # 0x176c60
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f3e3(%rip), %rsi    # 0x176c70
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f3ef(%rip), %rsi    # 0x176c90
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f3eb(%rip), %rsi    # 0x176ca0
movl $0x80, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f457(%rip), %rsi    # 0x176d20
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f453(%rip), %rsi    # 0x176d30
movl $0x80, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f4bf(%rip), %rsi    # 0x176db0
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f4bb(%rip), %rsi    # 0x176dc0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f4c7(%rip), %rsi    # 0x176de0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f4d3(%rip), %rsi    # 0x176e00
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f4df(%rip), %rsi    # 0x176e20
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f4db(%rip), %rsi    # 0x176e30
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f507(%rip), %rsi    # 0x176e70
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f533(%rip), %rsi    # 0x176eb0
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f55f(%rip), %rsi    # 0x176ef0
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f58b(%rip), %rsi    # 0x176f30
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f5b7(%rip), %rsi    # 0x176f70
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f5b3(%rip), %rsi    # 0x176f80
movl $0x140, %edx            # imm = 0x140
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f6df(%rip), %rsi    # 0x1770c0
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f70b(%rip), %rsi    # 0x177100
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f737(%rip), %rsi    # 0x177140
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f763(%rip), %rsi    # 0x177180
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f78f(%rip), %rsi    # 0x1771c0
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f7bb(%rip), %rsi    # 0x177200
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15f7e7(%rip), %rsi    # 0x177240
movl $0x400, %edx            # imm = 0x400
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15fbd3(%rip), %rsi    # 0x177640
movl $0x400, %edx            # imm = 0x400
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15ffbf(%rip), %rsi    # 0x177a40
movl $0x8, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15ffb3(%rip), %rsi    # 0x177a48
movl $0x8, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15ffa7(%rip), %rsi    # 0x177a50
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15ffa3(%rip), %rsi    # 0x177a60
movl $0x100, %edx            # imm = 0x100
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x16008f(%rip), %rsi    # 0x177b60
movl $0x100, %edx            # imm = 0x100
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x16017b(%rip), %rsi    # 0x177c60
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x160177(%rip), %rsi    # 0x177c70
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x160173(%rip), %rsi    # 0x177c80
movl $0x400, %edx            # imm = 0x400
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x16055f(%rip), %rsi    # 0x178080
movl $0x8, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x160553(%rip), %rsi    # 0x178088
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x160547(%rip), %rsi    # 0x178090
movl $0x80, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1605b3(%rip), %rsi    # 0x178110
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1605af(%rip), %rsi    # 0x178120
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1605ab(%rip), %rsi    # 0x178130
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1605a7(%rip), %rsi    # 0x178140
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x1605a3(%rip), %rsi    # 0x178150
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x16059f(%rip), %rsi    # 0x178160
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x16059b(%rip), %rsi    # 0x178170
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x160597(%rip), %rsi    # 0x178180
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x160593(%rip), %rsi    # 0x178190
movl $0x10, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116cbf(%rip), %rsi    # 0x12e8d0
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116cdb(%rip), %rsi    # 0x12e900
movl $0x20, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x116c27(%rip), %rsi    # 0x12e860
movl $0x20, %edx
callq 0x8e40
movl $0x1ff, -0xc(%rbp)      # imm = 0x1FF
cmpl $0x0, -0xc(%rbp)
jl 0x17c80
movslq -0xc(%rbp), %rcx
leaq 0x15bff5(%rip), %rax    # 0x173c50
movq (%rax,%rcx,8), %rcx
leaq 0x425c2a(%rip), %rax    # 0x43d890
subq %rax, %rcx
movslq -0xc(%rbp), %rax
movq %rcx, -0x1010(%rbp,%rax,8)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x17c4a
movl -0x10(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15cfb2(%rip), %rsi    # 0x174c50
movl $0x800, %edx            # imm = 0x800
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15d79e(%rip), %rsi    # 0x175450
movl $0x800, %edx            # imm = 0x800
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x15df8a(%rip), %rsi    # 0x175c50
movl $0x800, %edx            # imm = 0x800
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x115b16(%rip), %rsi    # 0x12d7f0
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x58e62a(%rip), %rsi    # 0x5a6318
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x602c9a(%rip), %rsi    # 0x61a99c
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x616392(%rip), %rsi    # 0x62e0a8
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x5f4b2e(%rip), %rsi    # 0x60c858
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x58e5de(%rip), %rsi    # 0x5a631c
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x53fba0(%rip), %rsi    # 0x5578f2
movl $0x1, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x53fb8e(%rip), %rsi    # 0x5578f4
movl $0x4, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x53f976(%rip), %rsi    # 0x5576f0
movl $0x200, %edx            # imm = 0x200
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x53fb62(%rip), %rsi    # 0x5578f0
movl $0x2, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x58d36e(%rip), %rsi    # 0x5a5110
movl $0x200, %edx            # imm = 0x200
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x58dd5a(%rip), %rsi    # 0x5a5b10
movl $0x800, %edx            # imm = 0x800
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x58d546(%rip), %rsi    # 0x5a5310
movl $0x800, %edx            # imm = 0x800
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x58e532(%rip), %rsi    # 0x5a6310
movl $0x1, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x161f4e(%rip), %rsi    # 0x179d40
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x161f7a(%rip), %rsi    # 0x179d80
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
leaq 0x161fa6(%rip), %rsi    # 0x179dc0
movl $0x40, %edx
callq 0x8e40
movl -0x10(%rbp), %edi
callq 0x161a0
movl -0x10(%rbp), %edi
callq 0x43810
movl -0x10(%rbp), %edi
callq 0x39d80
movl -0x10(%rbp), %edi
callq 0x20cd0
movl -0x10(%rbp), %edi
callq 0x8300
leaq 0xc163e(%rip), %rdi     # 0xd9491
movb $0x0, %al
callq 0x1a150
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1010, %rsp           # imm = 0x1010
popq %rbp
retq
nopl (%rax)