// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: tagcode
void
tagcode()
{
     int      i, j, k, l, s, dax, day, cnt, good;
     short     startwall, endwall, dasector, p, oldang;

     for(i=0;i<warpsectorcnt;i++)
     {
          dasector = warpsectorlist[i];
          j = ((lockclock&127)>>2);
          if (j >= 16) j = 31-j;
          {
               sector[dasector].ceilingshade = j;
               sector[dasector].floorshade = j;
               startwall = sector[dasector].wallptr;
               endwall = startwall+sector[dasector].wallnum-1;
               for(s=startwall;s<=endwall;s++)
                    wall[s].shade = j;
          }
     }

     for(p=connecthead;p>=0;p=connectpoint2[p])
          if (sector[cursectnum[p]].lotag == 10)  //warp sector
          {
               if (cursectnum[p] != ocursectnum[p])
               {
                    warpsprite(playersprite[p]);
                    posx[p] = sprite[playersprite[p]].x;
                    posy[p] = sprite[playersprite[p]].y;
                    posz[p] = sprite[playersprite[p]].z;
                    ang[p] = sprite[playersprite[p]].ang;
                    cursectnum[p] = sprite[playersprite[p]].sectnum;
                    sprite[playersprite[p]].z += (KENSPLAYERHEIGHT<<8);
               }
          }


     for( i=0; i<xpanningsectorcnt; i++ ) {
          dasector = xpanningsectorlist[i];
          startwall = sector[dasector].wallptr;
          endwall = startwall+sector[dasector].wallnum-1;
          for( s=startwall; s<=endwall; s++ ) {
               wall[s].xpanning = ((lockclock>>2)&255);
          }
     }

     for( i=0; i<ypanningwallcnt; i++ ) {
          wall[ypanningwalllist[i]].ypanning = ~(lockclock&255);
     }

     for( i=0; i<rotatespritecnt; i++ ) {
          sprite[rotatespritelist[i]].ang += (TICSPERFRAME<<2);
          sprite[rotatespritelist[i]].ang &= 2047;
     }

     // kens slime floor
     for( i=0; i<floorpanningcnt; i++ ) {
          sector[floorpanninglist[i]].floorxpanning = ((lockclock>>2)&255);
          sector[floorpanninglist[i]].floorypanning = ((lockclock>>2)&255);
     }

     for( i=0; i<dragsectorcnt; i++ ) {
          dasector = dragsectorlist[i];
          startwall = sector[dasector].wallptr;
          endwall = startwall+sector[dasector].wallnum-1;
          if (wall[startwall].x+dragxdir[i] < dragx1[i]) dragxdir[i] = 16;
          if (wall[startwall].y+dragydir[i] < dragy1[i]) dragydir[i] = 16;
          if (wall[startwall].x+dragxdir[i] > dragx2[i]) dragxdir[i] = -16;
          if (wall[startwall].y+dragydir[i] > dragy2[i]) dragydir[i] = -16;
          for( j=startwall; j<=endwall; j++) {
               dragpoint(j,wall[j].x+dragxdir[i],wall[j].y+dragydir[i]);
          }
          j = sector[dasector].floorz;
          sector[dasector].floorz = dragfloorz[i]+(sintable[(lockclock<<4)&2047]>>3);
          for( p=connecthead; p>=0; p=connectpoint2[p] ) {
               if( cursectnum[p] == dasector ) {
                    posx[p] += dragxdir[i];
                    posy[p] += dragydir[i];
                    posz[p] += (sector[dasector].floorz-j);
                    setsprite(playersprite[p],posx[p],posy[p],posz[p]+(KENSPLAYERHEIGHT<<8));
                    sprite[playersprite[p]].ang = ang[p];
                    frameinterpolate = 0;
               }
          }
     }

     for(i=0;i<swingcnt;i++)
     {
          if (swinganginc[i] != 0)
          {
               oldang = swingang[i];
               for(j=0;j<(TICSPERFRAME<<2);j++)
               {
                    swingang[i] = ((swingang[i]+2048+swinganginc[i])&2047);
                    if (swingang[i] == swingangclosed[i])
                    {
                         if( j == ((TICSPERFRAME<<2)-1) ) {
                              playsound(S_JUMP,swingx[i][0],swingy[i][0],0,ST_UPDATE);
                         }
                         swinganginc[i] = 0;
                    }
                    if (swingang[i] == swingangopen[i]) {
                         if( j == ((TICSPERFRAME<<2)-1) ) {
                              playsound(S_JUMP,swingx[i][0],swingy[i][0],0,ST_UPDATE);
                         }
                         swinganginc[i] = 0;
                    }
               }
               for(k=1;k<=3;k++)
                    rotatepoint(swingx[i][0],swingy[i][0],swingx[i][k],swingy[i][k],swingang[i],&wall[swingwall[i][k]].x,&wall[swingwall[i][k]].y);

               if (swinganginc[i] != 0)
               {
                    for(p=connecthead;p>=0;p=connectpoint2[p])
                         if ((cursectnum[p] == swingsector[i]) || (testneighborsectors(cursectnum[p],swingsector[i]) == 1))
                         {
                              cnt = 256;
                              do
                              {
                                   good = 1;

                                        //swingangopendir is -1 if forwards, 1 is backwards
                                   l = (swingangopendir[i] > 0);
                                   for(k=l+3;k>=l;k--)
                                        if (clipinsidebox(posx[p],posy[p],swingwall[i][k],128L) != 0)
                                        {
                                             good = 0;
                                             break;
                                        }

                                   if (good == 0)
                                   {
                                        if (cnt == 256)
                                        {
                                             swinganginc[i] = -swinganginc[i];
                                             swingang[i] = oldang;
                                        }
                                        else
                                        {
                                             swingang[i] = ((swingang[i]+2048-swinganginc[i])&2047);
                                        }
                                        for(k=1;k<=3;k++)
                                             rotatepoint(swingx[i][0],swingy[i][0],swingx[i][k],swingy[i][k],swingang[i],&wall[swingwall[i][k]].x,&wall[swingwall[i][k]].y);
                                        if (swingang[i] == swingangclosed[i])
                                        {
                                             swinganginc[i] = 0;
                                             break;
                                        }
                                        if (swingang[i] == swingangopen[i])
                                        {
                                             swinganginc[i] = 0;
                                             break;
                                        }
                                        cnt--;
                                   }
                              } while ((good == 0) && (cnt > 0));
                         }
               }

          }
     }

     for(i=0;i<revolvecnt;i++)
     {
          startwall = sector[revolvesector[i]].wallptr;
          endwall = startwall + sector[revolvesector[i]].wallnum - 1;

          revolveang[i] = ((revolveang[i]+2048-(TICSPERFRAME<<2))&2047);
          for(k=startwall;k<=endwall;k++)
          {
               rotatepoint(revolvepivotx[i],revolvepivoty[i],revolvex[i][k-startwall],revolvey[i][k-startwall],revolveang[i],&dax,&day);
               dragpoint(k,dax,day);
          }
     }

     for(i=0;i<subwaytrackcnt;i++)
     {
          if( subwaysound[i] == -1 ) {
               subwaysound[i]=playsound(S_SUBWAYLOOP,subwayx[i],subwaytracky1[i],-1,ST_VEHUPDATE);
          }
          else {
               updatevehiclesnds(subwaysound[i],subwayx[i],subwaytracky1[i]);
          }

          dasector = subwaytracksector[i][0];
          startwall = sector[dasector].wallptr;
          endwall = startwall+sector[dasector].wallnum-1;
          for(k=startwall;k<=endwall;k++)
          {
               if (wall[k].x > subwaytrackx1[i])
                    if (wall[k].y > subwaytracky1[i])
                         if (wall[k].x < subwaytrackx2[i])
                              if (wall[k].y < subwaytracky2[i])
                                   wall[k].x += (subwayvel[i]&0xfffffffc);
          }

          for(j=1;j<subwaynumsectors[i];j++)
          {
               dasector = subwaytracksector[i][j];

               startwall = sector[dasector].wallptr;
               endwall = startwall+sector[dasector].wallnum-1;
               for(k=startwall;k<=endwall;k++)
                    wall[k].x += (subwayvel[i]&0xfffffffc);

               s = headspritesect[dasector];
               while (s != -1)
               {
                    k = nextspritesect[s];
                    sprite[s].x += (subwayvel[i]&0xfffffffc);
                    s = k;
               }
          }

          for(p=connecthead;p>=0;p=connectpoint2[p])
               if (cursectnum[p] != subwaytracksector[i][0])
                    if (sector[cursectnum[p]].floorz != sector[subwaytracksector[i][0]].floorz)
                         if (posx[p] > subwaytrackx1[i])
                              if (posy[p] > subwaytracky1[i])
                                   if (posx[p] < subwaytrackx2[i])
                                        if (posy[p] < subwaytracky2[i])
                                        {
                                             posx[p] += (subwayvel[i]&0xfffffffc);

                                                  //Update sprite representation of player
                                             setsprite(playersprite[p],posx[p],posy[p],posz[p]+(KENSPLAYERHEIGHT<<8));
                                             sprite[playersprite[p]].ang = ang[p];
                                             frameinterpolate = 0;
                                        }

          subwayx[i] += (subwayvel[i]&0xfffffffc);

          k = subwaystop[i][subwaygoalstop[i]] - subwayx[i];
          if( k > 0 ) {
               if( k > 2048 ) {
                    if( subwayvel[i] == 12 ) {
                         playsound(S_SUBWAYSTART,subwayx[0],subwaytracky1[0],0,ST_UNIQUE | ST_NOUPDATE);
                    }
                    if (subwayvel[i] < 128) subwayvel[i]++;
               }
               else {
                    if( subwayvel[i] == 32 ) {
                         playsound(S_SUBWAYSTOP,subwayx[0],subwaytracky1[0],0,ST_UNIQUE | ST_NOUPDATE);
                    }
                    subwayvel[i] = (k>>4)+1;
               }
          }
          else if( k < 0 ) {
               if( k < -2048 ) {
                    if( subwayvel[i] == -12 ) {
                         playsound(S_SUBWAYSTART,subwayx[0],subwaytracky1[0],0,ST_UNIQUE | ST_NOUPDATE);
                    }
                    if (subwayvel[i] > -128) subwayvel[i]--;
               }
               else {
                    if( subwayvel[i] == -32) {
                         playsound(S_SUBWAYSTOP,subwayx[0],subwaytracky1[0],0,ST_UNIQUE | ST_NOUPDATE);
                    }
                    subwayvel[i] = ((k>>4)-1);
               }
          }

          if (((subwayvel[i]>>2) == 0) && (labs(k) < 2048))
          {
               if (subwaypausetime[i] == 720)
               {
                    for(j=1;j<subwaynumsectors[i];j++)   //Open all subway doors
                    {
                         dasector = subwaytracksector[i][j];
                         if (sector[dasector].lotag == 17)
                         {
                              sector[dasector].lotag = 16;
                              playsound(S_BIGSWINGCL,subwayx[i],subwaytracky1[i],0,ST_NOUPDATE | ST_UNIQUE);
                              operatesector(dasector);
                              sector[dasector].lotag = 17;
                         }
                    }
               }
               if ((subwaypausetime[i] >= 120) && (subwaypausetime[i]-TICSPERFRAME < 120))
               {
                    for(j=1;j<subwaynumsectors[i];j++)   //Close all subway doors
                    {
                         dasector = subwaytracksector[i][j];
                         if (sector[dasector].lotag == 17)
                         {
                              sector[dasector].lotag = 16;
                              playsound(S_BIGSWINGCL,subwayx[i],subwaytracky1[i],0,ST_NOUPDATE | ST_UNIQUE);
                              operatesector(dasector);
                              sector[dasector].lotag = 17;
                         }
                    }
               }

               subwaypausetime[i] -= TICSPERFRAME;
               if (subwaypausetime[i] < 0)
               {
                    subwaypausetime[i] = 720;
                    if( subwaygoalstop[i] == (subwaystopcnt[i]-1) ) {
                         subwaystopdir[i]=-1;
                         subwaygoalstop[i]=subwaystopcnt[i]-2;
                    }
                    else if( subwaygoalstop[i] == 0 ) {
                         subwaygoalstop[i]=1;
                         subwaystopdir[i]= 1;
                    }
                    else {
                         subwaygoalstop[i]+=subwaystopdir[i];
                    }
               }
          }
     }

     tektagcode();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xfe35f(%rip), %rax     # 0x123ca0
movzwl (%rax), %edx
leaq 0xb4b3d(%rip), %rax     # 0xda488
movl (%rax), %ecx
shrl $0x2, %ecx
andl $0x1f, %ecx
movl %ecx, %eax
xorb $0x1f, %al
cmpl $0x10, %ecx
movzbl %al, %eax
cmovbl %ecx, %eax
xorl %ecx, %ecx
testw %dx, %dx
cmovlel %ecx, %edx
movzwl %dx, %edx
leaq 0xfe2ae(%rip), %rsi     # 0x123c20
leaq 0x3c4f67(%rip), %rbp    # 0x3ea8e0
leaq 0x339f50(%rip), %r12    # 0x35f8d0
cmpq %rdx, %rcx
je 0x259d3
movswq (%rsi,%rcx,2), %rdi
imulq $0x28, %rdi, %r8
movb %al, 0x14(%rbp,%r8)
movb %al, 0x1c(%rbp,%r8)
movswq (%rbp,%r8), %rdi
movzwl 0x2(%rbp,%r8), %r8d
addw %di, %r8w
decl %r8d
movswq %r8w, %r8
movq %rdi, %r9
shlq $0x5, %r9
addq %r12, %r9
addq $0x14, %r9
cmpq %r8, %rdi
jg 0x259ce
movb %al, (%r9)
incq %rdi
addq $0x20, %r9
jmp 0x259bd
incq %rcx
jmp 0x25980
leaq 0x776156(%rip), %rbx    # 0x79bb30
leaq 0xb5d9f(%rip), %r14     # 0xdb780
movl (%rbx), %ebx
testw %bx, %bx
js 0x25aad
andl $0x7fff, %ebx           # imm = 0x7FFF
movl %ebx, %eax
leaq 0xb5d25(%rip), %rcx     # 0xdb720
movswq (%rcx,%rax,2), %rax
imulq $0x28, %rax, %rcx
cmpw $0xa, 0x22(%rbp,%rcx)
jne 0x25a9e
cmpw (%r14,%rbx,2), %ax
je 0x25a9e
leal (%rbx,%rbx), %r15d
leaq 0xb5d2a(%rip), %r13     # 0xdb750
movswl (%r13,%r15), %edi
callq 0x2688a
movswq (%r13,%r15), %rax
imulq $0x2c, %rax, %rax
leaq 0x3fe0ee(%rip), %rdi    # 0x423b30
movl (%rdi,%rax), %ecx
leal (,%rbx,4), %edx
leaq 0xb4a7d(%rip), %rsi     # 0xda4d0
movl %ecx, (%rsi,%rdx)
movl 0x4(%rdi,%rax), %ecx
leaq 0xb4aaf(%rip), %rsi     # 0xda510
movl %ecx, (%rsi,%rdx)
movl 0x8(%rdi,%rax), %ecx
leaq 0xb4ae1(%rip), %rsi     # 0xda550
movl %ecx, (%rsi,%rdx)
movzwl 0x1c(%rdi,%rax), %edx
leaq 0xb4a32(%rip), %rsi     # 0xda4b0
movw %dx, (%rsi,%r15)
movzwl 0x18(%rdi,%rax), %edx
leaq 0xb5c91(%rip), %rsi     # 0xdb720
movw %dx, (%rsi,%r15)
addl $0x2200, %ecx           # imm = 0x2200
movl %ecx, 0x8(%rdi,%rax)
shll $0x2, %ebx
addq 0xa1538(%rip), %rbx     # 0xc6fe0
jmp 0x259e1
leaq 0xfe21c(%rip), %rax     # 0x123cd0
movzwl (%rax), %esi
leaq 0xb49ca(%rip), %rax     # 0xda488
movl (%rax), %ecx
movl %ecx, %eax
shrl $0x2, %eax
xorl %edx, %edx
testw %si, %si
cmovlel %edx, %esi
movzwl %si, %esi
leaq 0xfe1d9(%rip), %rdi     # 0x123cb0
cmpq %rsi, %rdx
je 0x25b20
movswq (%rdi,%rdx,2), %r8
imulq $0x28, %r8, %r9
movswq (%rbp,%r9), %r8
movzwl 0x2(%rbp,%r9), %r9d
addw %r8w, %r9w
decl %r9d
movswq %r9w, %r9
movq %r8, %r10
shlq $0x5, %r10
addq %r12, %r10
addq $0x18, %r10
cmpq %r9, %r8
jg 0x25b1b
movb %al, (%r10)
incq %r8
addq $0x20, %r10
jmp 0x25b0a
incq %rdx
jmp 0x25ad7
leaq 0xfe239(%rip), %rdx     # 0x123d60
movzwl (%rdx), %esi
notb %cl
xorl %edx, %edx
testw %si, %si
cmovlel %edx, %esi
movzwl %si, %esi
leaq 0xfe1a2(%rip), %rdi     # 0x123ce0
cmpq %rdx, %rsi
je 0x25b56
movswq (%rdi,%rdx,2), %r8
shlq $0x5, %r8
movb %cl, 0x19(%r12,%r8)
incq %rdx
jmp 0x25b3e
leaq 0xfe0b3(%rip), %rcx     # 0x123c10
movzwl (%rcx), %edx
xorl %ecx, %ecx
testw %dx, %dx
cmovlel %ecx, %edx
movzwl %dx, %edx
leaq 0xfe07e(%rip), %rsi     # 0x123bf0
leaq 0x3fdfb7(%rip), %r9     # 0x423b30
cmpq %rcx, %rdx
je 0x25ba2
movswq (%rsi,%rcx,2), %rdi
imulq $0x2c, %rdi, %rdi
movl 0x1c(%r9,%rdi), %r8d
addl $0xc, %r8d
andl $0x7ff, %r8d            # imm = 0x7FF
movw %r8w, 0x1c(%r9,%rdi)
incq %rcx
jmp 0x25b79
leaq 0xfe247(%rip), %rcx     # 0x123df0
movzwl (%rcx), %edx
xorl %ecx, %ecx
testw %dx, %dx
cmovlel %ecx, %edx
movzwl %dx, %edx
leaq 0xfe1b2(%rip), %rsi     # 0x123d70
cmpq %rcx, %rdx
je 0x25bd9
movswq (%rsi,%rcx,2), %rdi
imulq $0x28, %rdi, %rdi
movb %al, 0x1e(%rbp,%rdi)
movb %al, 0x1f(%rbp,%rdi)
incq %rcx
jmp 0x25bbe
xorl %r14d, %r14d
leaq 0xfe27d(%rip), %rax     # 0x123e60
movswq (%rax), %rax
cmpq %rax, %r14
jge 0x25e45
movq %rbp, %rax
leaq 0xfe206(%rip), %rcx     # 0x123e00
movswq (%rcx,%r14,2), %rbp
imulq $0x28, %rbp, %rcx
movswq (%rax,%rcx), %r15
movq %r15, %rax
shlq $0x5, %rax
movl (%r12,%rax), %edx
leaq 0xfe206(%rip), %rsi     # 0x123e20
movswl (%rsi,%r14,2), %esi
movl %esi, %edi
addl %edx, %edi
leaq 0xfe246(%rip), %r8      # 0x123e70
cmpl (%r8,%r14,4), %edi
jge 0x25c42
leaq 0xfe1e9(%rip), %rsi     # 0x123e20
movw $0x10, (%rsi,%r14,2)
movw $0x10, %si
leaq (%r12,%rax), %rdi
movl 0x4(%rdi), %edi
leaq 0xfe1f0(%rip), %r8      # 0x123e40
movswl (%r8,%r14,2), %r8d
movl %r8d, %r9d
addl %edi, %r9d
leaq 0xfe24e(%rip), %r10     # 0x123eb0
cmpl (%r10,%r14,4), %r9d
jge 0x25c7b
leaq 0xfe1d1(%rip), %r8      # 0x123e40
movw $0x10, (%r8,%r14,2)
movw $0x10, %r8w
movswl %si, %esi
addl %esi, %edx
leaq 0xfe269(%rip), %rsi     # 0x123ef0
cmpl (%rsi,%r14,4), %edx
leaq 0xfe18e(%rip), %r12     # 0x123e20
jle 0x25c9b
movw $0xfff0, (%r12,%r14,2)  # imm = 0xFFF0
movswl %r8w, %edx
addl %edx, %edi
leaq 0xfe288(%rip), %rdx     # 0x123f30
cmpl (%rdx,%r14,4), %edi
jle 0x25cbc
leaq 0xfe18b(%rip), %rdx     # 0x123e40
movw $0xfff0, (%rdx,%r14,2)  # imm = 0xFFF0
leaq 0x3c4c1d(%rip), %rdx    # 0x3ea8e0
leaq (%rdx,%rcx), %rsi
movq %rsi, 0x10(%rsp)
movzwl 0x2(%rdx,%rcx), %ecx
addw %r15w, %cx
decl %ecx
movswq %cx, %r13
leaq 0x339bee(%rip), %rcx    # 0x35f8d0
leaq (%rcx,%rax), %rbx
addq $0x4, %rbx
cmpq %r13, %r15
jg 0x25d17
movswl (%r12,%r14,2), %esi
addl -0x4(%rbx), %esi
leaq 0xfe142(%rip), %rax     # 0x123e40
movswl (%rax,%r14,2), %edx
addl (%rbx), %edx
movswl %r15w, %edi
callq 0x45ffc
incq %r15
addq $0x20, %rbx
jmp 0x25cea
movq 0x10(%rsp), %rdx
movl 0x8(%rdx), %r15d
leaq 0xb4761(%rip), %rax     # 0xda488
movl (%rax), %eax
andl $0x7f, %eax
shll $0x5, %eax
leaq 0x54fe9a(%rip), %rcx    # 0x575bd0
movswl (%rcx,%rax), %eax
sarl $0x3, %eax
leaq 0xfe22c(%rip), %rcx     # 0x123f70
addl (%rcx,%r14,4), %eax
movl %eax, 0x8(%rdx)
leaq 0x775dde(%rip), %r13    # 0x79bb30
movl (%r13), %r13d
testw %r13w, %r13w
js 0x25e2f
andl $0x7fff, %r13d          # imm = 0x7FFF
movl %r13d, %eax
leaq 0xb59af(%rip), %rcx     # 0xdb720
cmpw %bp, (%rcx,%rax,2)
jne 0x25e1f
movswl (%r12,%r14,2), %esi
leal (,%r13,4), %eax
leaq 0xb4741(%rip), %rcx     # 0xda4d0
addl (%rcx,%rax), %esi
movl %esi, (%rcx,%rax)
movq 0x10(%rsp), %rcx
movl 0x8(%rcx), %ecx
subl %r15d, %ecx
leaq 0xb47a9(%rip), %r8      # 0xda550
movl (%r8,%rax), %edi
leal (%rdi,%rcx), %edx
movl %edx, (%r8,%rax)
leaq 0xfe087(%rip), %rdx     # 0x123e40
movswl (%rdx,%r14,2), %edx
leaq 0xb474b(%rip), %r8      # 0xda510
addl (%r8,%rax), %edx
movl %edx, (%r8,%rax)
leal (,%r13,2), %ebx
addl %edi, %ecx
addl $0x2200, %ecx           # imm = 0x2200
leaq 0xb596c(%rip), %r12     # 0xdb750
movswl (%r12,%rbx), %edi
callq 0x43f76
leaq 0xb46bb(%rip), %rax     # 0xda4b0
movzwl (%rax,%rbx), %eax
movswq (%r12,%rbx), %rcx
leaq 0xfe01b(%rip), %r12     # 0x123e20
imulq $0x2c, %rcx, %rcx
leaq 0x3fdd20(%rip), %rdx    # 0x423b30
movw %ax, 0x1c(%rdx,%rcx)
leaq 0xa1ce4(%rip), %rax     # 0xc7b00
movb $0x0, (%rax)
shll $0x2, %r13d
addq 0xa11b6(%rip), %r13     # 0xc6fe0
jmp 0x25d52
incq %r14
leaq 0x3c4aa7(%rip), %rbp    # 0x3ea8e0
leaq 0x339a90(%rip), %r12    # 0x35f8d0
jmp 0x25bdc
leaq 0xfe434(%rip), %rax     # 0x124280
leaq 0xfe82d(%rip), %rcx     # 0x124680
leaq 0xfe166(%rip), %rdx     # 0x123fc0
xorl %r13d, %r13d
leaq 0xfe39c(%rip), %r15     # 0x124200
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %rax, 0x28(%rsp)
leaq 0xfe136(%rip), %rax     # 0x123fb0
movswq (%rax), %rax
cmpq %rax, %r13
jge 0x2619f
leaq 0xfe3b2(%rip), %rax     # 0x124240
movzwl (%rax,%r13,2), %eax
testw %ax, %ax
je 0x2617e
movzwl (%r15,%r13,2), %ecx
movw %cx, 0x1e(%rsp)
movq %r13, %rbp
shlq $0x5, %rbp
leaq 0xfe3cc(%rip), %rcx     # 0x124280
addq %rbp, %rcx
movq %rcx, 0x10(%rsp)
addq 0xa1095(%rip), %rbp     # 0xc6f58
pushq $0xc
popq %rbx
movl %ebx, %r14d
subl $0x1, %r14d
jb 0x25f67
movzwl (%r15,%r13,2), %ecx
addw %ax, %cx
andl $0x7ff, %ecx            # imm = 0x7FF
movw %cx, (%r15,%r13,2)
leaq 0xfe293(%rip), %rdx     # 0x124180
cmpw (%rdx,%r13,2), %cx
jne 0x25f25
cmpl $0x1, %ebx
jne 0x25f16
movq 0x10(%rsp), %rax
movl (%rax), %esi
movl (%rbp), %edx
pushq $0x6f
popq %rdi
xorl %ecx, %ecx
pushq $0x2
popq %r8
callq 0x1ab2a
movzwl (%r15,%r13,2), %ecx
leaq 0xfe323(%rip), %rax     # 0x124240
andw $0x0, (%rax,%r13,2)
xorl %eax, %eax
leaq 0xfe214(%rip), %rdx     # 0x124140
cmpw (%rdx,%r13,2), %cx
jne 0x25f5f
cmpl $0x1, %ebx
jne 0x25f50
movq 0x10(%rsp), %rax
movl (%rax), %esi
movl (%rbp), %edx
pushq $0x6f
popq %rdi
xorl %ecx, %ecx
pushq $0x2
popq %r8
callq 0x1ab2a
leaq 0xfe2e9(%rip), %rax     # 0x124240
andw $0x0, (%rax,%r13,2)
xorl %eax, %eax
movl %r14d, %ebx
jmp 0x25ec9
pushq $0x1
popq %r14
cmpq $0x4, %r14
je 0x25fb9
movq 0x10(%rsp), %rax
movl (%rax), %edi
movl (%rbp), %esi
movq 0x28(%rsp), %rax
movl (%rax,%r14,4), %edx
movq 0x30(%rsp), %rax
movl (%rax,%r14,4), %ecx
movswl (%r15,%r13,2), %r8d
movq 0x38(%rsp), %rax
movswq (%rax,%r14,2), %rax
shlq $0x5, %rax
leaq (%r12,%rax), %r9
addq %r12, %rax
addq $0x4, %rax
movq %rax, (%rsp)
callq 0x4838e
incq %r14
jmp 0x25f6b
leaq 0xfe280(%rip), %rax     # 0x124240
cmpw $0x0, (%rax,%r13,2)
je 0x2617e
leaq 0x775b5d(%rip), %r14    # 0x79bb30
movl (%r14), %r14d
testw %r14w, %r14w
js 0x2617e
movq %r15, %rbx
andl $0x7fff, %r14d          # imm = 0x7FFF
movl %r14d, %eax
leaq 0xb572c(%rip), %rcx     # 0xdb720
movzwl (%rcx,%rax,2), %eax
leaq 0xfe101(%rip), %rcx     # 0x124100
movzwl (%rcx,%r13,2), %ecx
cmpw %cx, %ax
je 0x2601c
movswl %ax, %edi
movswl %cx, %esi
callq 0x268f8
testl %eax, %eax
je 0x26164
movl $0x100, %eax            # imm = 0x100
movq %rax, 0x20(%rsp)
xorl %r12d, %r12d
leaq 0xfe190(%rip), %rax     # 0x1241c0
cmpw $0x0, (%rax,%r13,2)
setg %r12b
leal 0x3(%r12), %r15d
cmpl %r12d, %r15d
jl 0x26164
leal (,%r14,4), %eax
leaq 0xb4479(%rip), %rcx     # 0xda4d0
movl (%rcx,%rax), %edi
leaq 0xb44af(%rip), %rcx     # 0xda510
movl (%rcx,%rax), %esi
movl %r15d, %eax
imulq $0xa, %r13, %rcx
addq 0xa0eae(%rip), %rcx     # 0xc6f20
movswl (%rcx,%rax,2), %edx
movl $0x80, %ecx
callq 0x43c1e
decl %r15d
testl %eax, %eax
je 0x2603f
cmpl $0x100, 0x20(%rsp)      # imm = 0x100
leaq 0x33983a(%rip), %r12    # 0x35f8d0
jne 0x260ae
leaq 0xfe1a1(%rip), %rax     # 0x124240
negw (%rax,%r13,2)
movzwl 0x1e(%rsp), %eax
movq %rbx, %rdx
jmp 0x260c7
movq %rbx, %rdx
movzwl (%rbx,%r13,2), %eax
leaq 0xfe183(%rip), %rcx     # 0x124240
subw (%rcx,%r13,2), %ax
andl $0x7ff, %eax            # imm = 0x7FF
movw %ax, (%rdx,%r13,2)
pushq $0x1
popq %r15
cmpq $0x4, %r15
je 0x2611e
movq 0x10(%rsp), %rax
movl (%rax), %edi
movl (%rbp), %esi
movq 0x28(%rsp), %rax
movl (%rax,%r15,4), %edx
movq 0x30(%rsp), %rax
movl (%rax,%r15,4), %ecx
movswl (%rbx,%r13,2), %r8d
movq 0x38(%rsp), %rax
movswq (%rax,%r15,2), %rax
shlq $0x5, %rax
leaq (%r12,%rax), %r9
addq %r12, %rax
addq $0x4, %rax
movq %rax, (%rsp)
callq 0x4838e
incq %r15
jmp 0x260d0
movzwl (%rbx,%r13,2), %eax
leaq 0xfe056(%rip), %rcx     # 0x124180
cmpw (%rcx,%r13,2), %ax
je 0x26157
leaq 0xfe008(%rip), %rcx     # 0x124140
cmpw (%rcx,%r13,2), %ax
je 0x26157
movq 0x20(%rsp), %rcx
leal -0x1(%rcx), %eax
cmpl $0x1, %ecx
movq %rax, 0x20(%rsp)
ja 0x26026
jmp 0x26164
leaq 0xfe0e2(%rip), %rax     # 0x124240
andw $0x0, (%rax,%r13,2)
shll $0x2, %r14d
addq 0xa0e71(%rip), %r14     # 0xc6fe0
leaq 0x33975a(%rip), %r12    # 0x35f8d0
movq %rbx, %r15
jmp 0x25fd3
incq %r13
addq $0x20, 0x28(%rsp)
addq $0x20, 0x30(%rsp)
addq $0xa, 0x38(%rsp)
leaq 0x3c4746(%rip), %rbp    # 0x3ea8e0
jmp 0x25e73
leaq 0xfe8fa(%rip), %rax     # 0x124aa0
movq %rax, 0x10(%rsp)
leaq 0xfe9ee(%rip), %r15     # 0x124ba0
xorl %r12d, %r12d
leaq 0xfe8d4(%rip), %rax     # 0x124a90
movswq (%rax), %rax
cmpq %rax, %r12
jge 0x2628f
leaq 0xfe8b0(%rip), %rax     # 0x124a80
movswq (%rax,%r12,2), %rax
imulq $0x28, %rax, %rax
movzwl (%rbp,%rax), %r13d
movswq %r13w, %rbx
movzwl 0x2(%rbp,%rax), %eax
addw %r13w, %ax
decl %eax
leaq 0xfe893(%rip), %rdx     # 0x124a88
movzwl (%rdx,%r12,2), %ecx
addl $0x7f4, %ecx            # imm = 0x7F4
andl $0x7ff, %ecx            # imm = 0x7FF
movw %cx, (%rdx,%r12,2)
movswq %ax, %rbp
xorl %r14d, %r14d
leaq (%rbx,%r14), %rax
cmpq %rbp, %rax
jg 0x26276
leaq 0xfea7e(%rip), %rax     # 0x124ca0
movl (%rax,%r12,4), %edi
leaq 0xfea83(%rip), %rax     # 0x124cb0
movl (%rax,%r12,4), %esi
movq 0x10(%rsp), %rax
movl (%rax,%r14,4), %edx
movl (%r15,%r14,4), %ecx
leaq 0xfe843(%rip), %rax     # 0x124a88
movswl (%rax,%r12,2), %r8d
leaq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x44(%rsp), %r9
callq 0x4838e
leal (%r14,%r13), %eax
movl 0x44(%rsp), %esi
movl 0x40(%rsp), %edx
movswl %ax, %edi
callq 0x45ffc
incq %r14
jmp 0x26212
incq %r12
addq $0x40, 0x10(%rsp)
addq $0x40, %r15
leaq 0x3c4656(%rip), %rbp    # 0x3ea8e0
jmp 0x261b5
leaq 0xfea2a(%rip), %rax     # 0x124cc0
xorl %ebx, %ebx
leaq 0x100e71(%rip), %rcx    # 0x127110
leaq 0xfeeca(%rip), %r10     # 0x125170
leaq 0x5370f3(%rip), %r14    # 0x55d3a0
leaq 0xfef0c(%rip), %r13     # 0x1251c0
movq %rax, 0x10(%rsp)
leaq 0x339610(%rip), %r12    # 0x35f8d0
leaq 0xfee01(%rip), %rax     # 0x1250c8
movswq (%rax), %rax
cmpq %rax, %rbx
jge 0x26876
movl (%rcx,%rbx,4), %edi
leaq 0xfeec2(%rip), %rax     # 0x1251a0
movl (%rax,%rbx,4), %esi
movl (%r10,%rbx,4), %edx
cmpl $-0x1, %edi
je 0x262f1
callq 0x1add3
jmp 0x26309
movq %rcx, %r15
pushq $0x4b
popq %rdi
pushq $-0x1
popq %rcx
movl $0x80, %r8d
callq 0x1ab2a
movl %eax, (%r15,%rbx,4)
movq %rbx, %rax
shlq $0x8, %rax
leaq 0xfe9a9(%rip), %rcx     # 0x124cc0
leaq (%rcx,%rax), %r15
movswq (%rcx,%rax), %rax
imulq $0x28, %rax, %rcx
movswq (%rbp,%rcx), %rax
movzwl 0x2(%rbp,%rcx), %ecx
addw %ax, %cx
decl %ecx
movswq %cx, %rcx
movq %rax, %rdx
shlq $0x5, %rdx
addq %r12, %rdx
leaq 0xfee27(%rip), %r10     # 0x125170
leaq 0x52d040(%rip), %r11    # 0x553390
cmpq %rcx, %rax
jg 0x2639b
movl (%rdx), %esi
leaq 0xfee02(%rip), %rdi     # 0x125160
cmpl (%rdi,%rbx,4), %esi
jle 0x26392
movl 0x4(%rdx), %edi
cmpl (%r10,%rbx,4), %edi
jle 0x26392
leaq 0xfee0d(%rip), %r8      # 0x125180
cmpl (%r8,%rbx,4), %esi
jge 0x26392
leaq 0xfee10(%rip), %r8      # 0x125190
cmpl (%r8,%rbx,4), %edi
jge 0x26392
movl (%r13,%rbx,4), %edi
andl $-0x4, %edi
addl %esi, %edi
movl %edi, (%rdx)
incq %rax
addq $0x20, %rdx
jmp 0x26350
leaq 0xfed1e(%rip), %rax     # 0x1250c0
movswq (%rax,%rbx,2), %rax
pushq $0x1
popq %rcx
cmpq %rax, %rcx
jge 0x26422
movswq (%r15,%rcx,2), %rdx
imulq $0x28, %rdx, %rdi
movswq (%rbp,%rdi), %rsi
movzwl 0x2(%rbp,%rdi), %edi
addw %si, %di
decl %edi
movswq %di, %rdi
movq %rsi, %r8
shlq $0x5, %r8
addq %r12, %r8
cmpq %rdi, %rsi
jg 0x263f0
movl (%r13,%rbx,4), %r9d
andl $-0x4, %r9d
addl %r9d, (%r8)
incq %rsi
addq $0x20, %r8
jmp 0x263d6
movzwl (%r11,%rdx,2), %edx
cmpw $-0x1, %dx
je 0x2641d
movswq %dx, %rsi
movzwl (%r14,%rsi,2), %edx
movl (%r13,%rbx,4), %edi
andl $-0x4, %edi
imulq $0x2c, %rsi, %rsi
leaq 0x3fd719(%rip), %r8     # 0x423b30
addl %edi, (%r8,%rsi)
jmp 0x263f5
incq %rcx
jmp 0x263aa
leaq 0x775707(%rip), %r12    # 0x79bb30
movl (%r12), %r12d
testw %r12w, %r12w
js 0x26550
andl $0x7fff, %r12d          # imm = 0x7FFF
movl %r12d, %eax
leaq 0xb52d8(%rip), %rcx     # 0xdb720
movswq (%rcx,%rax,2), %rax
movswq (%r15), %rcx
cmpw %cx, %ax
je 0x26540
imulq $0x28, %rax, %rax
movl 0x8(%rbp,%rax), %eax
imulq $0x28, %rcx, %rcx
cmpl 0x8(%rbp,%rcx), %eax
je 0x26540
leaq 0xb4059(%rip), %rax     # 0xda4d0
movl (%rax,%r12,4), %eax
leaq 0xfecde(%rip), %rcx     # 0x125160
cmpl (%rcx,%rbx,4), %eax
jle 0x26540
leaq 0xb407e(%rip), %rcx     # 0xda510
movl (%rcx,%r12,4), %edx
cmpl (%r10,%rbx,4), %edx
jle 0x26540
leaq 0xfecd9(%rip), %rcx     # 0x125180
cmpl (%rcx,%rbx,4), %eax
jge 0x26540
leaq 0xfecd9(%rip), %rcx     # 0x125190
cmpl (%rcx,%rbx,4), %edx
jge 0x26540
movl (%r13,%rbx,4), %esi
andl $-0x4, %esi
addl %eax, %esi
leal (,%r12,4), %eax
leaq 0xb3ff7(%rip), %rcx     # 0xda4d0
movl %esi, (%rcx,%rax)
leal (%r12,%r12), %ebp
leaq 0xb5269(%rip), %rcx     # 0xdb750
movswl (%rcx,%rbp), %edi
leaq 0xb405e(%rip), %rcx     # 0xda550
movl (%rcx,%rax), %ecx
movl $0x2200, %eax           # imm = 0x2200
addl %eax, %ecx
callq 0x43f76
leaq 0xfec68(%rip), %r10     # 0x125170
leaq 0xb3fa1(%rip), %rax     # 0xda4b0
movzwl (%rax,%rbp), %eax
leaq 0xb5236(%rip), %rcx     # 0xdb750
movswq (%rcx,%rbp), %rcx
leaq 0x3c43ba(%rip), %rbp    # 0x3ea8e0
imulq $0x2c, %rcx, %rcx
leaq 0x3fd5ff(%rip), %rdx    # 0x423b30
movw %ax, 0x1c(%rdx,%rcx)
leaq 0xa15c3(%rip), %rax     # 0xc7b00
movb $0x0, (%rax)
shll $0x2, %r12d
addq 0xa0a95(%rip), %r12     # 0xc6fe0
jmp 0x26429
movl (%r13,%rbx,4), %eax
movl %eax, %ecx
andl $-0x4, %ecx
leaq 0xfec3f(%rip), %rdx     # 0x1251a0
addl (%rdx,%rbx,4), %ecx
movl %ecx, (%rdx,%rbx,4)
leaq 0xfec42(%rip), %r15     # 0x1251b0
movslq (%r15,%rbx,4), %rdx
movq %rbx, %rsi
shlq $0x5, %rsi
addq 0xa0a40(%rip), %rsi     # 0xc6fc0
movl (%rsi,%rdx,4), %ebp
subl %ecx, %ebp
jle 0x265c8
cmpl $0x801, %ebp            # imm = 0x801
leaq 0x33933c(%rip), %r12    # 0x35f8d0
jb 0x26612
cmpl $0xc, %eax
jne 0x265c1
leaq 0xfebfe(%rip), %rax     # 0x1251a0
movl (%rax), %esi
movl (%r10), %edx
pushq $0x4c
popq %rdi
xorl %ecx, %ecx
pushq $0xc
popq %r8
callq 0x1ab2a
leaq 0xfebb4(%rip), %r10     # 0x125170
movl (%r13,%rbx,4), %eax
cmpl $0x7f, %eax
jle 0x2663d
jmp 0x26644
leaq 0x339301(%rip), %r12    # 0x35f8d0
jns 0x26644
cmpl $0xfffff7ff, %ebp       # imm = 0xFFFFF7FF
ja 0x2681b
cmpl $-0xc, %eax
jne 0x26608
leaq 0xfebb7(%rip), %rax     # 0x1251a0
movl (%rax), %esi
movl (%r10), %edx
pushq $0x4c
popq %rdi
xorl %ecx, %ecx
pushq $0xc
popq %r8
callq 0x1ab2a
leaq 0xfeb6d(%rip), %r10     # 0x125170
movl (%r13,%rbx,4), %eax
cmpl $-0x7f, %eax
jl 0x26644
jmp 0x26846
cmpl $0x20, %eax
jne 0x26638
leaq 0xfeb82(%rip), %rax     # 0x1251a0
movl (%rax), %esi
movl (%r10), %edx
pushq $0x4d
popq %rdi
xorl %ecx, %ecx
pushq $0xc
popq %r8
callq 0x1ab2a
leaq 0xfeb38(%rip), %r10     # 0x125170
movl %ebp, %eax
shrl $0x4, %eax
incl %eax
movl %eax, (%r13,%rbx,4)
movl %ebp, %ecx
negl %ecx
cmovsl %ebp, %ecx
cmpl $0x7ff, %ecx            # imm = 0x7FF
leaq 0x3c4288(%rip), %rbp    # 0x3ea8e0
ja 0x2685e
cmpl $0x3, %eax
ja 0x2685e
leaq 0xfeb62(%rip), %rax     # 0x1251d0
movl (%rax,%rbx,4), %eax
cmpl $0x2d0, %eax            # imm = 0x2D0
jne 0x26715
pushq $0x1
popq %r15
leaq 0xfea39(%rip), %rax     # 0x1250c0
movswq (%rax,%rbx,2), %rax
cmpq %rax, %r15
jge 0x26704
movq 0x10(%rsp), %rax
movswq (%rax,%r15,2), %r12
imulq $0x28, %r12, %rax
cmpw $0x11, 0x22(%rbp,%rax)
jne 0x266f5
leaq 0x3c4232(%rip), %rcx    # 0x3ea8e0
leaq (%rcx,%rax), %rbp
addq $0x22, %rbp
movw $0x10, (%rbp)
leaq 0xfeadd(%rip), %rax     # 0x1251a0
movl (%rax,%rbx,4), %esi
movl (%r10,%rbx,4), %edx
pushq $0x3e
popq %rdi
xorl %ecx, %ecx
pushq $0xc
popq %r8
callq 0x1ab2a
movswl %r12w, %edi
callq 0x253e8
leaq 0xfea88(%rip), %r10     # 0x125170
movw $0x11, (%rbp)
leaq 0x3c41eb(%rip), %rbp    # 0x3ea8e0
incq %r15
leaq 0x3391d1(%rip), %r12    # 0x35f8d0
jmp 0x26680
leaq 0xfeac5(%rip), %rax     # 0x1251d0
movl (%rax,%rbx,4), %eax
leaq 0xfea9b(%rip), %r15     # 0x1251b0
leal -0x78(%rax), %ecx
cmpl $0x2, %ecx
ja 0x267ba
pushq $0x1
popq %r15
leaq 0xfe994(%rip), %rax     # 0x1250c0
movswq (%rax,%rbx,2), %rax
cmpq %rax, %r15
jge 0x267a9
movq 0x10(%rsp), %rax
movswq (%rax,%r15,2), %r12
imulq $0x28, %r12, %rax
cmpw $0x11, 0x22(%rbp,%rax)
jne 0x2679a
leaq 0x3c418d(%rip), %rcx    # 0x3ea8e0
leaq (%rcx,%rax), %rbp
addq $0x22, %rbp
movw $0x10, (%rbp)
leaq 0xfea38(%rip), %rax     # 0x1251a0
movl (%rax,%rbx,4), %esi
movl (%r10,%rbx,4), %edx
pushq $0x3e
popq %rdi
xorl %ecx, %ecx
pushq $0xc
popq %r8
callq 0x1ab2a
movswl %r12w, %edi
callq 0x253e8
leaq 0xfe9e3(%rip), %r10     # 0x125170
movw $0x11, (%rbp)
leaq 0x3c4146(%rip), %rbp    # 0x3ea8e0
incq %r15
leaq 0x33912c(%rip), %r12    # 0x35f8d0
jmp 0x26725
leaq 0xfea20(%rip), %rax     # 0x1251d0
movl (%rax,%rbx,4), %eax
leaq 0xfe9f6(%rip), %r15     # 0x1251b0
leal -0x3(%rax), %ecx
leaq 0xfea0c(%rip), %rdx     # 0x1251d0
movl %ecx, (%rdx,%rbx,4)
cmpl $0x2, %eax
jg 0x2685e
leaq 0xfe9f9(%rip), %rax     # 0x1251d0
movl $0x2d0, (%rax,%rbx,4)   # imm = 0x2D0
movl (%r15,%rbx,4), %eax
leaq 0xfe967(%rip), %rcx     # 0x125150
movl (%rcx,%rbx,4), %ecx
leal -0x1(%rcx), %edx
cmpl %edx, %eax
jne 0x26807
leaq 0xa2176(%rip), %rax     # 0xc8970
orl $-0x1, (%rax,%rbx,4)
addl $-0x2, %ecx
movl %ecx, (%r15,%rbx,4)
jmp 0x2685e
testl %eax, %eax
je 0x2684d
leaq 0xa215e(%rip), %rcx     # 0xc8970
addl (%rcx,%rbx,4), %eax
movl %eax, (%r15,%rbx,4)
jmp 0x2685e
cmpl $-0x20, %eax
jne 0x26841
leaq 0xfe979(%rip), %rax     # 0x1251a0
movl (%rax), %esi
movl (%r10), %edx
pushq $0x4d
popq %rdi
xorl %ecx, %ecx
pushq $0xc
popq %r8
callq 0x1ab2a
leaq 0xfe92f(%rip), %r10     # 0x125170
movl %ebp, %eax
sarl $0x4, %eax
decl %eax
jmp 0x2663f
pushq $0x1
popq %rcx
movl %ecx, (%r15,%rbx,4)
leaq 0xa2115(%rip), %rax     # 0xc8970
movl %ecx, (%rax,%rbx,4)
incq %rbx
addq $0x100, 0x10(%rsp)      # imm = 0x100
leaq 0x10089f(%rip), %rcx    # 0x127110
jmp 0x262c0
callq 0x2698e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq