// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movl %edi, %ebp
leaq 0xc991a(%rip), %rbx     # 0xda5f0
leaq 0x707d6(%rip), %rsi     # 0x814b3
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x8f20
pushq $0x2
popq %rsi
movq %rbx, %rdi
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0x8670
cmpl $-0x1, %eax
je 0x1187d
movl %eax, %ebx
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x83b0
decl %ebp
movslq %ebp, %rax
imulq $0xc, %rax, %rsi
addq 0xb62cf(%rip), %rsi     # 0xc6ff0
pushq $0xc
popq %rdx
movl %ebx, %edi
callq 0x8b20
leaq 0xcaade(%rip), %r14     # 0xdb810
pushq $0x50
popq %rdx
movl %ebx, %edi
movq %r14, %rsi
callq 0x8b20
movq %r14, %rdi
callq 0x15bef
leaq 0x78adde(%rip), %rsi    # 0x79bb2c
pushq $0x2
popq %r14
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x78adc1(%rip), %rsi    # 0x79bb24
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x78adbc(%rip), %r15    # 0x79bb30
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8b20
leaq 0x78adb8(%rip), %r14    # 0x79bb40
pushq $0x20
popq %rdx
movl %ebx, %edi
movq %r14, %rsi
callq 0x8b20
movslq (%r15), %r15
testq %r15, %r15
js 0x10daf
movswl %r15w, %edi
callq 0x19ac0
shlq $0x2, %r15
addq %r14, %r15
jmp 0x10d95
leaq 0xc971a(%rip), %rsi     # 0xda4d0
pushq $0x40
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xc9745(%rip), %rsi     # 0xda510
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xc9774(%rip), %rsi     # 0xda550
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xcaa73(%rip), %rsi     # 0xdb860
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xcaad2(%rip), %rsi     # 0xdb8d0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca991(%rip), %rsi     # 0xdb7a0
movl %ebx, %edi
movq %r15, %rdx
movq %r15, %r12
callq 0x8b20
leaq 0xc968d(%rip), %rsi     # 0xda4b0
pushq $0x20
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca8e8(%rip), %rsi     # 0xdb720
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca937(%rip), %rsi     # 0xdb780
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca8f6(%rip), %rsi     # 0xdb750
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca985(%rip), %rsi     # 0xdb7f0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x1127c4(%rip), %rsi    # 0x123640
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0xc9703(%rip), %rsi     # 0xda590
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x1127e2(%rip), %rsi    # 0x123680
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x112811(%rip), %rsi    # 0x1236c0
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x112840(%rip), %rsi    # 0x123700
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xe(%rsp), %rsi
pushq $0x2
popq %r13
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xcaa7c(%rip), %rsi     # 0xdb960
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca9cb(%rip), %rsi     # 0xdb8c0
pushq $0x10
popq %rbp
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca837(%rip), %rsi     # 0xdb740
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x112806(%rip), %rsi    # 0x123720
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112815(%rip), %rsi    # 0x123740
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112824(%rip), %rsi    # 0x123760
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x112853(%rip), %rsi    # 0x1237a0
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x565e82(%rip), %r15    # 0x576de0
movl %ebx, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8b20
movswq (%r15), %rax
imulq $0x28, %rax, %rdx
leaq 0x3d9966(%rip), %r12    # 0x3ea8e0
movl %ebx, %edi
movq %r12, %rsi
callq 0x8b20
leaq 0x5acb5d(%rip), %r15    # 0x5bdae8
movl %ebx, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8b20
movswq (%r15), %rdx
shlq $0x5, %rdx
leaq 0x34e929(%rip), %rsi    # 0x35f8d0
movl %ebx, %edi
callq 0x8b20
leaq 0x412b7b(%rip), %rsi    # 0x423b30
movl $0xb0000, %edx          # imm = 0xB0000
movl %ebx, %edi
callq 0x8b20
leaq 0x5423c8(%rip), %rsi    # 0x553390
movl $0x2002, %edx           # imm = 0x2002
movl %ebx, %edi
callq 0x8b20
leaq 0x5443c5(%rip), %rsi    # 0x5553a0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8b20
leaq 0x54c3b2(%rip), %rsi    # 0x55d3a0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8b20
leaq 0x55439f(%rip), %rsi    # 0x5653a0
movl $0x802, %edx            # imm = 0x802
movl %ebx, %edi
callq 0x8b20
leaq 0x554b9c(%rip), %rsi    # 0x565bb0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8b20
leaq 0x55cb89(%rip), %rsi    # 0x56dbb0
movl $0x8000, %edx           # imm = 0x8000
movl %ebx, %edi
callq 0x8b20
leaq 0xca7a6(%rip), %rsi     # 0xdb7e0
pushq $0x4
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca795(%rip), %rsi     # 0xdb7e4
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca788(%rip), %rsi     # 0xdb7e8
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x10fbef(%rip), %rsi    # 0x120c60
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x10fc03(%rip), %rsi    # 0x120c85
pushq $0x1
popq %rbp
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca47a(%rip), %rsi     # 0xdb510
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x10fbdf(%rip), %rsi    # 0x120c86
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca45a(%rip), %rsi     # 0xdb512
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x10fbbf(%rip), %rsi    # 0x120c88
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca43c(%rip), %rsi     # 0xdb516
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xcaab9(%rip), %rsi     # 0xdbba4
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca41e(%rip), %rsi     # 0xdb51a
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x11238b(%rip), %rsi    # 0x123498
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112372(%rip), %rsi    # 0x123490
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca3e2(%rip), %rsi     # 0xdb511
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x112352(%rip), %rsi    # 0x123492
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca3c3(%rip), %rsi     # 0xdb514
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x112332(%rip), %rsi    # 0x123494
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca3a5(%rip), %rsi     # 0xdb518
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x112312(%rip), %rsi    # 0x123496
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca387(%rip), %rsi     # 0xdb51c
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca39a(%rip), %rsi     # 0xdb540
movl %ebx, %edi
pushq $0x10
popq %rbp
movq %rbp, %rdx
callq 0x8b20
leaq 0xca376(%rip), %rsi     # 0xdb530
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca3b5(%rip), %rsi     # 0xdb580
movl %ebx, %edi
pushq $0x20
popq %rbp
movq %rbp, %rdx
callq 0x8b20
leaq 0xca381(%rip), %rsi     # 0xdb560
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca3f0(%rip), %rsi     # 0xdb5e0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca3bf(%rip), %rsi     # 0xdb5c0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xc927e(%rip), %rsi     # 0xda490
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca3fd(%rip), %rsi     # 0xdb620
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xc922a(%rip), %rsi     # 0xda45e
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xc921b(%rip), %rsi     # 0xda460
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xc920c(%rip), %rsi     # 0xda462
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca6cb(%rip), %rsi     # 0xdb932
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca6b8(%rip), %rsi     # 0xdb930
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xca6ab(%rip), %rsi     # 0xdb934
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0xc91ee(%rip), %rsi     # 0xda488
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112935(%rip), %rsi    # 0x123be0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca67c(%rip), %rsi     # 0xdb938
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca253(%rip), %rsi     # 0xdb520
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112912(%rip), %rsi    # 0x123bf0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x112921(%rip), %rsi    # 0x123c10
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x112920(%rip), %rsi    # 0x123c20
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x11298f(%rip), %rsi    # 0x123ca0
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x11298e(%rip), %rsi    # 0x123cb0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x11299d(%rip), %rsi    # 0x123cd0
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x11299c(%rip), %rsi    # 0x123ce0
movl $0x80, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x112a09(%rip), %rsi    # 0x123d60
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x112a08(%rip), %rsi    # 0x123d70
movl $0x80, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x112a75(%rip), %rsi    # 0x123df0
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x112a74(%rip), %rsi    # 0x123e00
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x112a83(%rip), %rsi    # 0x123e20
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x112a92(%rip), %rsi    # 0x123e40
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x112aa1(%rip), %rsi    # 0x123e60
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x112aa0(%rip), %rsi    # 0x123e70
movl %ebx, %edi
pushq $0x40
popq %r15
movq %r15, %rdx
callq 0x8b20
leaq 0x112acb(%rip), %rsi    # 0x123eb0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112afa(%rip), %rsi    # 0x123ef0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112b29(%rip), %rsi    # 0x123f30
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112b58(%rip), %rsi    # 0x123f70
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112b87(%rip), %rsi    # 0x123fb0
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x112b86(%rip), %rsi    # 0x123fc0
movl $0x140, %edx            # imm = 0x140
movl %ebx, %edi
callq 0x8b20
leaq 0x112cb3(%rip), %rsi    # 0x124100
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112ce2(%rip), %rsi    # 0x124140
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112d11(%rip), %rsi    # 0x124180
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112d40(%rip), %rsi    # 0x1241c0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112d6f(%rip), %rsi    # 0x124200
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112d9e(%rip), %rsi    # 0x124240
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x112dcd(%rip), %rsi    # 0x124280
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
callq 0x8b20
leaq 0x1131ba(%rip), %rsi    # 0x124680
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
callq 0x8b20
leaq 0x1135a7(%rip), %rsi    # 0x124a80
pushq $0x8
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x11359a(%rip), %rsi    # 0x124a88
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x113591(%rip), %rsi    # 0x124a90
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x113590(%rip), %rsi    # 0x124aa0
movl $0x100, %edx            # imm = 0x100
movl %ebx, %edi
callq 0x8b20
leaq 0x11367d(%rip), %rsi    # 0x124ba0
movl $0x100, %edx            # imm = 0x100
movl %ebx, %edi
callq 0x8b20
leaq 0x11376a(%rip), %rsi    # 0x124ca0
movl %ebx, %edi
pushq $0x10
popq %rbp
movq %rbp, %rdx
callq 0x8b20
leaq 0x113766(%rip), %rsi    # 0x124cb0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113765(%rip), %rsi    # 0x124cc0
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
callq 0x8b20
leaq 0x113b52(%rip), %rsi    # 0x1250c0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x113b49(%rip), %rsi    # 0x1250c8
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x113b40(%rip), %rsi    # 0x1250d0
movl $0x80, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x113bad(%rip), %rsi    # 0x125150
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113bac(%rip), %rsi    # 0x125160
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113bab(%rip), %rsi    # 0x125170
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113baa(%rip), %rsi    # 0x125180
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113ba9(%rip), %rsi    # 0x125190
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113ba8(%rip), %rsi    # 0x1251a0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113ba7(%rip), %rsi    # 0x1251b0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113ba6(%rip), %rsi    # 0x1251c0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x113ba5(%rip), %rsi    # 0x1251d0
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0xca2d4(%rip), %rsi     # 0xdb910
movl %ebx, %edi
pushq $0x20
popq %r15
movq %r15, %rdx
callq 0x8b20
leaq 0xca2ef(%rip), %rsi     # 0xdb940
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0xca23e(%rip), %rsi     # 0xdb8a0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x10(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
callq 0x8b20
movl $0x1ff, %eax            # imm = 0x1FF
leaq 0x10f607(%rip), %rcx    # 0x120c90
testl %eax, %eax
js 0x1169f
movl %eax, %edx
movq 0x10(%rsp,%rdx,8), %rsi
addq %r12, %rsi
movq %rsi, (%rcx,%rdx,8)
decl %eax
jmp 0x11689
leaq 0x1105ea(%rip), %rsi    # 0x121c90
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8b20
leaq 0x110dd7(%rip), %rsi    # 0x122490
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8b20
leaq 0x1115c4(%rip), %rsi    # 0x122c90
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8b20
leaq 0xc8d91(%rip), %rsi     # 0xda470
pushq $0x4
popq %r13
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x541c74(%rip), %r15    # 0x553368
movl %ebx, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8b20
leaq 0x5b8604(%rip), %rsi    # 0x5c9d0c
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x5cbcef(%rip), %rsi    # 0x5dd408
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x5a9f7e(%rip), %rsi    # 0x5bb6a8
pushq $0x2
popq %rbp
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x541c2e(%rip), %rsi    # 0x55336c
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x4f31f3(%rip), %rsi    # 0x504942
pushq $0x1
popq %r12
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x4f31e0(%rip), %rsi    # 0x504944
movl %ebx, %edi
movq %r13, %rdx
callq 0x8b20
leaq 0x4f2fcb(%rip), %rsi    # 0x504740
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
callq 0x8b20
leaq 0x4f31b8(%rip), %rsi    # 0x504940
movl %ebx, %edi
movq %rbp, %rdx
callq 0x8b20
leaq 0x5409c7(%rip), %rsi    # 0x552160
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
callq 0x8b20
leaq 0x5413b4(%rip), %rsi    # 0x552b60
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8b20
leaq 0x540ba1(%rip), %rsi    # 0x552360
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
callq 0x8b20
leaq 0x541b8e(%rip), %rsi    # 0x553360
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x1155ad(%rip), %rsi    # 0x126d90
pushq $0x40
popq %r12
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x1155d8(%rip), %rsi    # 0x126dd0
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
leaq 0x115607(%rip), %rsi    # 0x126e10
movl %ebx, %edi
movq %r12, %rdx
callq 0x8b20
movl %ebx, %edi
callq 0x10bcb
movl %ebx, %edi
callq 0x2a760
movl %ebx, %edi
callq 0x253a4
movl %ebx, %edi
callq 0x17db0
movl %ebx, %edi
callq 0x8310
leaq 0x78a2f3(%rip), %rbx    # 0x79bb30
movslq (%rbx), %rbx
testq %rbx, %rbx
js 0x11856
movswl %bx, %edi
callq 0x19ac0
shlq $0x2, %rbx
addq %r14, %rbx
jmp 0x1183d
leaq 0xc8c2b(%rip), %rax     # 0xda488
movl (%rax), %eax
movl %eax, (%r15)
leaq 0xc8beb(%rip), %rcx     # 0xda454
movl %eax, (%rcx)
leaq 0x6fc4f(%rip), %rdi     # 0x814c1
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1373a
jmp 0x11880
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq