// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %edi, %ebp
leaq 0xd1a95(%rip), %rbx     # 0xe45f0
leaq 0x7c951(%rip), %rsi     # 0x8f4b3
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x8f20
movq %rbx, %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x80, %edx
xorl %eax, %eax
callq 0x8670
cmpl $-0x1, %eax
je 0x13772
movl %eax, %ebx
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x83b0
decl %ebp
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x2, %rsi
addq 0xbe43c(%rip), %rsi     # 0xd0fe8
movl $0xc, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2c51(%rip), %rsi     # 0xe5810
movl $0x50, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x792f5a(%rip), %rsi    # 0x7a5b2c
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x792f3f(%rip), %rsi    # 0x7a5b24
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x792f38(%rip), %rsi    # 0x7a5b30
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x792f35(%rip), %rsi    # 0x7a5b40
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd18b2(%rip), %rsi     # 0xe44d0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd18df(%rip), %rsi     # 0xe4510
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd190c(%rip), %rsi     # 0xe4550
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2c09(%rip), %rsi     # 0xe5860
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2c66(%rip), %rsi     # 0xe58d0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2b23(%rip), %rsi     # 0xe57a0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd1820(%rip), %rsi     # 0xe44b0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2a7d(%rip), %rsi     # 0xe5720
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2aca(%rip), %rsi     # 0xe5780
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2a87(%rip), %rsi     # 0xe5750
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2b14(%rip), %rsi     # 0xe57f0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a951(%rip), %rsi    # 0x12d640
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd188e(%rip), %rsi     # 0xe4590
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a96b(%rip), %rsi    # 0x12d680
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a998(%rip), %rsi    # 0x12d6c0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a9c5(%rip), %rsi    # 0x12d700
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2e54(%rip), %rsi     # 0xe5ba2
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2bff(%rip), %rsi     # 0xe5960
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2b4c(%rip), %rsi     # 0xe58c0
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd29b9(%rip), %rsi     # 0xe5740
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a986(%rip), %rsi    # 0x12d720
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a993(%rip), %rsi    # 0x12d740
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a9a0(%rip), %rsi    # 0x12d760
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a9cd(%rip), %rsi    # 0x12d7a0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x56dffa(%rip), %r14    # 0x580de0
movl $0x2, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x8f10
movswq (%r14), %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdx
leaq 0x3e1ad8(%rip), %rsi    # 0x3f48e0
movl %ebx, %edi
callq 0x8f10
leaq 0x5b4cd2(%rip), %r14    # 0x5c7ae8
movl $0x2, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x8f10
movswq (%r14), %rdx
shlq $0x5, %rdx
leaq 0x356a9c(%rip), %rsi    # 0x3698d0
movl %ebx, %edi
callq 0x8f10
leaq 0x41acee(%rip), %rsi    # 0x42db30
movl $0xb0000, %edx          # imm = 0xB0000
movl %ebx, %edi
callq 0x8f10
leaq 0x54a53b(%rip), %rsi    # 0x55d390
movl $0x2002, %edx           # imm = 0x2002
movl %ebx, %edi
callq 0x8f10
leaq 0x54c538(%rip), %rsi    # 0x55f3a0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8f10
leaq 0x554525(%rip), %rsi    # 0x5673a0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8f10
leaq 0x55c512(%rip), %rsi    # 0x56f3a0
movl $0x802, %edx            # imm = 0x802
movl %ebx, %edi
callq 0x8f10
leaq 0x55cd0f(%rip), %rsi    # 0x56fbb0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8f10
leaq 0x564cfc(%rip), %rsi    # 0x577bb0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8f10
leaq 0xd2919(%rip), %rsi     # 0xe57e0
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd290a(%rip), %rsi     # 0xe57e4
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd28fb(%rip), %rsi     # 0xe57e8
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x117d60(%rip), %rsi    # 0x12ac60
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x117d72(%rip), %rsi    # 0x12ac85
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd25ea(%rip), %rsi     # 0xe5510
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x117d4d(%rip), %rsi    # 0x12ac86
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd25c6(%rip), %rsi     # 0xe5512
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x117d29(%rip), %rsi    # 0x12ac88
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd25a4(%rip), %rsi     # 0xe5516
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2c1f(%rip), %rsi     # 0xe5ba4
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2582(%rip), %rsi     # 0xe551a
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a4ed(%rip), %rsi    # 0x12d498
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a4d2(%rip), %rsi    # 0x12d490
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2540(%rip), %rsi     # 0xe5511
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a4ae(%rip), %rsi    # 0x12d492
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd251d(%rip), %rsi     # 0xe5514
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a48a(%rip), %rsi    # 0x12d494
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd24fb(%rip), %rsi     # 0xe5518
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a466(%rip), %rsi    # 0x12d496
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd24d9(%rip), %rsi     # 0xe551c
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd24ea(%rip), %rsi     # 0xe5540
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd24c7(%rip), %rsi     # 0xe5530
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2504(%rip), %rsi     # 0xe5580
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd24d1(%rip), %rsi     # 0xe5560
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd253e(%rip), %rsi     # 0xe55e0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd250b(%rip), %rsi     # 0xe55c0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd13c8(%rip), %rsi     # 0xe4490
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2545(%rip), %rsi     # 0xe5620
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd1370(%rip), %rsi     # 0xe445e
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd135f(%rip), %rsi     # 0xe4460
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd134e(%rip), %rsi     # 0xe4462
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd280b(%rip), %rsi     # 0xe5932
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd27f6(%rip), %rsi     # 0xe5930
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd27e7(%rip), %rsi     # 0xe5934
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd1328(%rip), %rsi     # 0xe4488
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aa6d(%rip), %rsi    # 0x12dbe0
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd27b2(%rip), %rsi     # 0xe5938
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd2387(%rip), %rsi     # 0xe5520
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aa44(%rip), %rsi    # 0x12dbf0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aa51(%rip), %rsi    # 0x12dc10
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aa4e(%rip), %rsi    # 0x12dc20
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aabb(%rip), %rsi    # 0x12dca0
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aab8(%rip), %rsi    # 0x12dcb0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aac5(%rip), %rsi    # 0x12dcd0
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aac2(%rip), %rsi    # 0x12dce0
movl $0x80, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ab2f(%rip), %rsi    # 0x12dd60
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ab2c(%rip), %rsi    # 0x12dd70
movl $0x80, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ab99(%rip), %rsi    # 0x12ddf0
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ab96(%rip), %rsi    # 0x12de00
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aba3(%rip), %rsi    # 0x12de20
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11abb0(%rip), %rsi    # 0x12de40
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11abbd(%rip), %rsi    # 0x12de60
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11abba(%rip), %rsi    # 0x12de70
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11abe7(%rip), %rsi    # 0x12deb0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ac14(%rip), %rsi    # 0x12def0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ac41(%rip), %rsi    # 0x12df30
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ac6e(%rip), %rsi    # 0x12df70
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ac9b(%rip), %rsi    # 0x12dfb0
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ac98(%rip), %rsi    # 0x12dfc0
movl $0x140, %edx            # imm = 0x140
movl %ebx, %edi
callq 0x8f10
leaq 0x11adc5(%rip), %rsi    # 0x12e100
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11adf2(%rip), %rsi    # 0x12e140
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ae1f(%rip), %rsi    # 0x12e180
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ae4c(%rip), %rsi    # 0x12e1c0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11ae79(%rip), %rsi    # 0x12e200
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aea6(%rip), %rsi    # 0x12e240
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11aed3(%rip), %rsi    # 0x12e280
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
callq 0x8f10
leaq 0x11b2c0(%rip), %rsi    # 0x12e680
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
callq 0x8f10
leaq 0x11b6ad(%rip), %rsi    # 0x12ea80
movl $0x8, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11b6a2(%rip), %rsi    # 0x12ea88
movl $0x8, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11b697(%rip), %rsi    # 0x12ea90
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11b694(%rip), %rsi    # 0x12eaa0
movl $0x100, %edx            # imm = 0x100
movl %ebx, %edi
callq 0x8f10
leaq 0x11b781(%rip), %rsi    # 0x12eba0
movl $0x100, %edx            # imm = 0x100
movl %ebx, %edi
callq 0x8f10
leaq 0x11b86e(%rip), %rsi    # 0x12eca0
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11b86b(%rip), %rsi    # 0x12ecb0
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11b868(%rip), %rsi    # 0x12ecc0
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
callq 0x8f10
leaq 0x11bc55(%rip), %rsi    # 0x12f0c0
movl $0x8, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bc4a(%rip), %rsi    # 0x12f0c8
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bc3f(%rip), %rsi    # 0x12f0d0
movl $0x80, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bcac(%rip), %rsi    # 0x12f150
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bca9(%rip), %rsi    # 0x12f160
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bca6(%rip), %rsi    # 0x12f170
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bca3(%rip), %rsi    # 0x12f180
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bca0(%rip), %rsi    # 0x12f190
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bc9d(%rip), %rsi    # 0x12f1a0
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bc9a(%rip), %rsi    # 0x12f1b0
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bc97(%rip), %rsi    # 0x12f1c0
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11bc94(%rip), %rsi    # 0x12f1d0
movl $0x10, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd23c1(%rip), %rsi     # 0xe5910
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd23de(%rip), %rsi     # 0xe5940
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0xd232b(%rip), %rsi     # 0xe58a0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
movl $0x1fe, %eax            # imm = 0x1FE
leaq 0x117703(%rip), %rcx    # 0x12ac90
movq 0xbd993(%rip), %xmm0    # 0xd0f28
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa (%rcx,%rax,8), %xmm1
psubq %xmm0, %xmm1
movdqa %xmm1, (%rsp,%rax,8)
addq $-0x2, %rax
cmpq $-0x2, %rax
jne 0x1359a
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
callq 0x8f10
leaq 0x1186c8(%rip), %rsi    # 0x12bc90
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8f10
leaq 0x118eb5(%rip), %rsi    # 0x12c490
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8f10
leaq 0x1196a2(%rip), %rsi    # 0x12cc90
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8f10
leaq 0xd0e6f(%rip), %rsi     # 0xe4470
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x549d54(%rip), %rsi    # 0x55d368
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x5c06e5(%rip), %rsi    # 0x5d3d0c
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x5d3dce(%rip), %rsi    # 0x5e7408
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x5b205b(%rip), %rsi    # 0x5c56a8
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x549d0c(%rip), %rsi    # 0x55d36c
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x4fb2cf(%rip), %rsi    # 0x50e942
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x4fb2be(%rip), %rsi    # 0x50e944
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x4fb0a7(%rip), %rsi    # 0x50e740
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
callq 0x8f10
leaq 0x4fb294(%rip), %rsi    # 0x50e940
movl $0x2, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x548aa1(%rip), %rsi    # 0x55c160
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
callq 0x8f10
leaq 0x54948e(%rip), %rsi    # 0x55cb60
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8f10
leaq 0x548c7b(%rip), %rsi    # 0x55c360
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8f10
leaq 0x549c68(%rip), %rsi    # 0x55d360
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d685(%rip), %rsi    # 0x130d90
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d6b2(%rip), %rsi    # 0x130dd0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d6df(%rip), %rsi    # 0x130e10
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
movl %ebx, %edi
callq 0x11cb2
movl %ebx, %edi
callq 0x2e320
movl %ebx, %edi
callq 0x27c21
movl %ebx, %edi
callq 0x191e9
movl %ebx, %edi
callq 0x8310
leaq 0x7bd66(%rip), %rdi     # 0x8f4cd
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x14be7
jmp 0x13777
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)