// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekmap.c
// Function: drawoverheadmap
void
drawoverheadmap(int cposx, int cposy, int czoom, short cang)
{
     int i, j, k, l, x1, y1, x2, y2, x3, y3, x4, y4, ox, oy, xoff, yoff;
     int dax, day, cosang, sinang, xspan, yspan, sprx, spry;
     int xrepeat, yrepeat, z1, z2, startwall, endwall, tilenum, daang;
     int xvect, yvect, xvect2, yvect2;
     unsigned char col;
     walltype *wal, *wal2;
     spritetype *spr;

     xvect = sintable[(2048-cang)&2047] * czoom;
     yvect = sintable[(1536-cang)&2047] * czoom;
     xvect2 = mulscale(xvect,yxaspect,16);
     yvect2 = mulscale(yvect,yxaspect,16);

          //Draw red lines
     for(i=0;i<numsectors;i++)
     {
          startwall = sector[i].wallptr;
          endwall = sector[i].wallptr + sector[i].wallnum - 1;

          z1 = sector[i].ceilingz; z2 = sector[i].floorz;

          for(j=startwall,wal=&wall[startwall];j<=endwall;j++,wal++)
          {
               k = wal->nextwall; if (k < 0) continue;

               if ((show2dwall[j>>3]&(1<<(j&7))) == 0) continue;
               if ((k > j) && ((show2dwall[k>>3]&(1<<(k&7))) > 0)) continue;

               if (sector[wal->nextsector].ceilingz == z1)
                    if (sector[wal->nextsector].floorz == z2)
                         if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0) continue;

               col = 232;

               if (dimensionmode[screenpeek] == 2)
               {
                    if (sector[i].floorz != sector[i].ceilingz)
                         if (sector[wal->nextsector].floorz != sector[wal->nextsector].ceilingz)
                              if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0)
                                   if (sector[i].floorz == sector[wal->nextsector].floorz) continue;
                    if (sector[i].floorpicnum != sector[wal->nextsector].floorpicnum) continue;
                    if (sector[i].floorshade != sector[wal->nextsector].floorshade) continue;
                    col = 232;
               }

               ox = wal->x-cposx; oy = wal->y-cposy;
               x1 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
               y1 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

               wal2 = &wall[wal->point2];
               ox = wal2->x-cposx; oy = wal2->y-cposy;
               x2 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
               y2 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

               drawline256(x1+(xdim<<11),y1+(ydim<<11),x2+(xdim<<11),y2+(ydim<<11),col);
          }
     }

          //Draw sprites
     k = playersprite[screenpeek];
     show2dsprite[k>>3] |= (1<<(k&7));
     for(i=0;i<numsectors;i++)
          for(j=headspritesect[i];j>=0;j=nextspritesect[j])
               if ((show2dsprite[j>>3]&(1<<(j&7))) > 0)
               {
                    spr = &sprite[j];
                    col = 56;
                    if ((spr->cstat&1) > 0) col = 248;
                    if (j == k) col = 31;

                    sprx = spr->x;
                    spry = spr->y;

                    k = spr->statnum;
                    if ((k >= 1) && (k <= 8) && (k != 2))  //Interpolate moving sprite
                    {
                         sprx = osprite[j].x+mulscale(sprx-osprite[j].x,smoothratio,16);
                         spry = osprite[j].y+mulscale(spry-osprite[j].y,smoothratio,16);
                    }

                    switch (spr->cstat&48)
                    {
                         case 0:
                              ox = sprx-cposx; oy = spry-cposy;
                              x1 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                              y1 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

                              if (dimensionmode[screenpeek] == 1)
                              {
                                   ox = (sintable[(spr->ang+512)&2047]>>7);
                                   oy = (sintable[(spr->ang)&2047]>>7);
                                   x2 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                                   y2 = mulscale(oy,xvect,16) + mulscale(ox,yvect,16);

                                   if (j == playersprite[screenpeek])
                                   {
                                        x2 = 0L;
                                        y2 = -(czoom<<5);
                                   }

                                   x3 = mulscale(x2,yxaspect,16);
                                   y3 = mulscale(y2,yxaspect,16);

                                   drawline256(x1-x2+(xdim<<11),y1-y3+(ydim<<11),
                                                       x1+x2+(xdim<<11),y1+y3+(ydim<<11),col);
                                   drawline256(x1-y2+(xdim<<11),y1+x3+(ydim<<11),
                                                       x1+x2+(xdim<<11),y1+y3+(ydim<<11),col);
                                   drawline256(x1+y2+(xdim<<11),y1-x3+(ydim<<11),
                                                       x1+x2+(xdim<<11),y1+y3+(ydim<<11),col);
                              }
                              else
                              {
                                   if (((gotsector[i>>3]&(1<<(i&7))) > 0) && (czoom > 192))
                                   {
                                        daang = (spr->ang-cang)&2047;
                                        if (j == playersprite[screenpeek])
                                             { x1 = 0; y1 = (yxaspect<<2); daang = 0; }
                                        rotatesprite((x1<<4)+(xdim<<15),(y1<<4)+(ydim<<15),mulscale(czoom*spr->yrepeat,yxaspect,16),daang,spr->picnum,spr->shade,spr->pal,(spr->cstat&2)>>1, windowx1, windowy1, windowx2, windowy2);
                                   }
                              }
                              break;
                         case 16:
                              x1 = sprx; y1 = spry;
                              tilenum = spr->picnum;
                              xoff = (int)((signed char)((picanm[tilenum]>>8)&255))+((int)spr->xoffset);
                              if ((spr->cstat&4) > 0) xoff = -xoff;
                              k = spr->ang; l = spr->xrepeat;
                              dax = sintable[k&2047]*l; day = sintable[(k+1536)&2047]*l;
                              l = tilesizx[tilenum]; k = (l>>1)+xoff;
                              x1 -= mulscale(dax,k,16); x2 = x1+mulscale(dax,l,16);
                              y1 -= mulscale(day,k,16); y2 = y1+mulscale(day,l,16);

                              ox = x1-cposx; oy = y1-cposy;
                              x1 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                              y1 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

                              ox = x2-cposx; oy = y2-cposy;
                              x2 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                              y2 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

                              drawline256(x1+(xdim<<11),y1+(ydim<<11),
                                                  x2+(xdim<<11),y2+(ydim<<11),col);

                              break;
                         case 32:
                              if (dimensionmode[screenpeek] == 1)
                              {
                                   tilenum = spr->picnum;
                                   xoff = (int)((signed char)((picanm[tilenum]>>8)&255))+((int)spr->xoffset);
                                   yoff = (int)((signed char)((picanm[tilenum]>>16)&255))+((int)spr->yoffset);
                                   if ((spr->cstat&4) > 0) xoff = -xoff;
                                   if ((spr->cstat&8) > 0) yoff = -yoff;

                                   k = spr->ang;
                                   cosang = sintable[(k+512)&2047]; sinang = sintable[k];
                                   xspan = tilesizx[tilenum]; xrepeat = spr->xrepeat;
                                   yspan = tilesizy[tilenum]; yrepeat = spr->yrepeat;

                                   dax = ((xspan>>1)+xoff)*xrepeat; day = ((yspan>>1)+yoff)*yrepeat;
                                   x1 = sprx + mulscale(sinang,dax,16) + mulscale(cosang,day,16);
                                   y1 = spry + mulscale(sinang,day,16) - mulscale(cosang,dax,16);
                                   l = xspan*xrepeat;
                                   x2 = x1 - mulscale(sinang,l,16);
                                   y2 = y1 + mulscale(cosang,l,16);
                                   l = yspan*yrepeat;
                                   k = -mulscale(cosang,l,16); x3 = x2+k; x4 = x1+k;
                                   k = -mulscale(sinang,l,16); y3 = y2+k; y4 = y1+k;

                                   ox = x1-cposx; oy = y1-cposy;
                                   x1 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                                   y1 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

                                   ox = x2-cposx; oy = y2-cposy;
                                   x2 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                                   y2 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

                                   ox = x3-cposx; oy = y3-cposy;
                                   x3 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                                   y3 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

                                   ox = x4-cposx; oy = y4-cposy;
                                   x4 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
                                   y4 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

                                   drawline256(x1+(xdim<<11),y1+(ydim<<11),
                                                       x2+(xdim<<11),y2+(ydim<<11),col);

                                   drawline256(x2+(xdim<<11),y2+(ydim<<11),
                                                       x3+(xdim<<11),y3+(ydim<<11),col);

                                   drawline256(x3+(xdim<<11),y3+(ydim<<11),
                                                       x4+(xdim<<11),y4+(ydim<<11),col);

                                   drawline256(x4+(xdim<<11),y4+(ydim<<11),
                                                       x1+(xdim<<11),y1+(ydim<<11),col);

                              }
                              break;
                    }
               }

          //Draw white lines
     for(i=0;i<numsectors;i++)
     {
          startwall = sector[i].wallptr;
          endwall = sector[i].wallptr + sector[i].wallnum - 1;

          for(j=startwall,wal=&wall[startwall];j<=endwall;j++,wal++)
          {
               if (wal->nextwall >= 0) continue;

               if ((show2dwall[j>>3]&(1<<(j&7))) == 0) continue;

               if (tilesizx[wal->picnum] == 0) continue;
               if (tilesizy[wal->picnum] == 0) continue;

               ox = wal->x-cposx; oy = wal->y-cposy;
               x1 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
               y1 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

               wal2 = &wall[wal->point2];
               ox = wal2->x-cposx; oy = wal2->y-cposy;
               x2 = mulscale(ox,xvect,16) - mulscale(oy,yvect,16);
               y2 = mulscale(oy,xvect2,16) + mulscale(ox,yvect2,16);

               drawline256(x1+(xdim<<11),y1+(ydim<<11),x2+(xdim<<11),y2+(ydim<<11),239);
          }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %ecx, %eax
negl %eax
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %eax
leaq 0x56c423(%rip), %r10    # 0x57fbd0
movswq (%r10,%rax,2), %r8
movl %edx, 0x2c(%rsp)
movslq %edx, %rax
imulq %rax, %r8
movl $0x600, %edx            # imm = 0x600
movl %ecx, 0x54(%rsp)
subl %ecx, %edx
andl %r9d, %edx
movswq (%r10,%rdx,2), %r10
imulq %rax, %r10
leaq 0x5a568d(%rip), %rax    # 0x5b8e68
movslq (%rax), %rdx
movq %rdx, %r9
movq %r8, 0x10(%rsp)
imulq %r8, %r9
shrq $0x10, %r9
imulq %r10, %rdx
shrq $0x10, %rdx
leaq 0x56d5e3(%rip), %rax    # 0x580de0
movzwl (%rax), %eax
movl %edi, 0x30(%rsp)
movslq %edi, %rcx
movq %rcx, 0x78(%rsp)
movl %esi, 0x34(%rsp)
movslq %esi, %rcx
movq %rcx, 0x70(%rsp)
testw %ax, %ax
movq %r10, 0x18(%rsp)
movq %rdx, 0x68(%rsp)
movq %r9, 0x60(%rsp)
jle 0x13aa6
movslq %r9d, %rcx
movq %rcx, 0x38(%rsp)
movslq %edx, %rcx
movq %rcx, 0x20(%rsp)
xorl %edx, %edx
leaq 0x3e1097(%rip), %r13    # 0x3f48e0
leaq 0x549310(%rip), %r9     # 0x55cb60
leaq (%rdx,%rdx,4), %rcx
movswl 0x2(%r13,%rcx,8), %r12d
testl %r12d, %r12d
jle 0x13a96
movq %rdx, 0x48(%rsp)
leaq (,%rcx,8), %r10
addq %r13, %r10
movswl (%r10), %ebx
addl %ebx, %r12d
movl 0x4(%r10), %r11d
movl 0x8(%r10), %eax
movl %eax, 0x40(%rsp)
movslq %ebx, %rax
shlq $0x5, %rax
leaq 0x35603c(%rip), %rcx    # 0x3698d0
leaq (%rcx,%rax), %r14
addq $0xe, %r14
movq %r10, (%rsp)
movl %r11d, 0x8(%rsp)
movswl -0x4(%r14), %eax
testl %eax, %eax
js 0x13a4e
movl %ebx, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%r9,%rcx), %ecx
movl %ebx, %edx
andl $0x7, %edx
btl %edx, %ecx
jae 0x13a4e
cmpl %eax, %ebx
jge 0x138e9
movl %eax, %ecx
shrl $0x3, %ecx
movzbl (%r9,%rcx), %ecx
movl %eax, %edx
andl $0x7, %edx
btl %edx, %ecx
jb 0x13a4e
movswq -0x2(%r14), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (,%rcx,8), %rcx
addq %r13, %rcx
movl 0x4(%rcx), %edx
cmpl %r11d, %edx
jne 0x1392f
movl 0x40(%rsp), %esi
cmpl %esi, 0x8(%rcx)
jne 0x1392f
movslq %eax, %rsi
shlq $0x5, %rsi
leaq 0x355fb4(%rip), %rdi    # 0x3698d0
movzwl 0xe(%rdi,%rsi), %esi
orw (%r14), %si
testb $0x30, %sil
je 0x13a4e
leaq 0xd0b28(%rip), %rsi     # 0xe445e
movswq (%rsi), %rsi
leaq 0xd1f7f(%rip), %rdi     # 0xe58c0
cmpb $0x2, (%rdi,%rsi)
jne 0x13978
movl 0x8(%r10), %esi
cmpl 0x4(%r10), %esi
je 0x1395c
movl 0x8(%rcx), %edi
cmpl %edx, %edi
jne 0x13a5f
movzwl 0x18(%r10), %eax
cmpw 0x18(%rcx), %ax
jne 0x13a4e
movb 0x1c(%r10), %al
cmpb 0x1c(%rcx), %al
jne 0x13a4e
movslq -0xe(%r14), %rdi
movq 0x78(%rsp), %r10
subq %r10, %rdi
movslq -0xa(%r14), %rax
movq 0x70(%rsp), %r11
subq %r11, %rax
movq 0x20(%rsp), %rbp
movq %rbp, %rsi
imulq %rdi, %rsi
movq 0x10(%rsp), %rdx
imulq %rdx, %rdi
shrq $0x10, %rdi
movq 0x38(%rsp), %r15
movq %r15, %rcx
imulq %rax, %rcx
movq 0x18(%rsp), %r9
imulq %r9, %rax
shrq $0x10, %rax
subl %eax, %edi
shrq $0x10, %rcx
shrq $0x10, %rsi
addl %ecx, %esi
movswq -0x6(%r14), %rax
shlq $0x5, %rax
leaq 0x355ef2(%rip), %rcx    # 0x3698d0
movslq (%rcx,%rax), %r8
subq %r10, %r8
movslq 0x4(%rcx,%rax), %rcx
subq %r11, %rcx
imulq %r8, %rbp
imulq %rdx, %r8
shrq $0x10, %r8
leaq 0x5a546c(%rip), %rdx    # 0x5b8e6c
movl (%rdx), %edx
shll $0xb, %edx
addl %edx, %edi
addl %r8d, %edx
imulq %rcx, %r15
imulq %r9, %rcx
shrq $0x10, %rcx
shrq $0x10, %rbp
subl %ecx, %edx
leaq 0x5a544d(%rip), %rcx    # 0x5b8e70
movl (%rcx), %ecx
shll $0xb, %ecx
addl %ecx, %esi
addl %ebp, %ecx
shrq $0x10, %r15
addl %r15d, %ecx
movl $0xe8, %r8d
callq 0x4f5ca
movl 0x8(%rsp), %r11d
movq (%rsp), %r10
leaq 0x549112(%rip), %r9     # 0x55cb60
incl %ebx
addq $0x20, %r14
cmpl %r12d, %ebx
jl 0x138a5
jmp 0x13a87
cmpl %edi, %esi
jne 0x1395c
movzwl %ax, %eax
shll $0x5, %eax
leaq 0x355e5c(%rip), %rdx    # 0x3698d0
movzwl 0xe(%rdx,%rax), %eax
orw (%r14), %ax
andl $0x30, %eax
je 0x13a4e
jmp 0x1395c
leaq 0x56d352(%rip), %rax    # 0x580de0
movzwl (%rax), %eax
movq 0x48(%rsp), %rdx
incq %rdx
movswq %ax, %rcx
cmpq %rcx, %rdx
jl 0x13850
leaq 0xd09b1(%rip), %rcx     # 0xe445e
movswq (%rcx), %rcx
leaq 0xd1c98(%rip), %rdx     # 0xe5750
movswl (%rdx,%rcx,2), %r12d
movl %r12d, %ecx
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
movl %r12d, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
leaq 0x548886(%rip), %rsi    # 0x55c360
orb %dl, (%rsi,%rcx)
testw %ax, %ax
jle 0x145a4
movq %rsi, %r13
movslq 0x60(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movslq 0x68(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movl 0x2c(%rsp), %ecx
shll $0x5, %ecx
negl %ecx
movl %ecx, 0x58(%rsp)
leaq 0x55388f(%rip), %rbx    # 0x5673a0
leaq 0x41a018(%rip), %r14    # 0x42db30
xorl %edx, %edx
movq 0x10(%rsp), %r15
leaq 0x54986a(%rip), %rcx    # 0x55d390
movzwl (%rcx,%rdx,2), %esi
testw %si, %si
js 0x143f5
movl %edx, %eax
shrl $0x3, %eax
movq %rax, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movl %edx, %ecx
andb $0x7, %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x5c(%rsp)
movzwl %si, %ebp
movl %ebp, %eax
shrl $0x3, %eax
movzbl (%r13,%rax), %eax
movl %ebp, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x143d6
imulq $0x2c, %rbp, %r10
movzwl 0xc(%r14,%r10), %r11d
testb $0x1, %r11b
sete %al
shlb $0x6, %al
addb $-0x8, %al
cmpl %ebp, %r12d
movzbl %al, %eax
movl $0x1f, %ecx
cmovel %ecx, %eax
movl %eax, (%rsp)
movl (%r14,%r10), %edx
movl 0x4(%r14,%r10), %ecx
movswl 0x1a(%r14,%r10), %r12d
cmpl $0x2, %r12d
sete %dil
leal -0x1(%r12), %r8d
cmpw $0x8, %r8w
setae %r8b
orb %dil, %r8b
jne 0x13c0a
leaq (,%rbp,2), %rdi
addq %rbp, %rdi
leaq 0xd9089(%rip), %r9      # 0xecc60
movl (%r9,%rdi,4), %r8d
movl 0x4(%r9,%rdi,4), %edi
subl %r8d, %edx
leaq 0xd1d96(%rip), %r9      # 0xe5980
movslq (%r9), %r9
movslq %edx, %rdx
imulq %r9, %rdx
shrq $0x10, %rdx
addl %r8d, %edx
subl %edi, %ecx
movslq %ecx, %rcx
imulq %r9, %rcx
shrq $0x10, %rcx
addl %edi, %ecx
addq %r14, %r10
movl %r11d, %edi
shrl $0x4, %edi
andl $0x3, %edi
leaq 0x7b8bb(%rip), %r8      # 0x8f4d8
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
jmpq *%rdi
movq %r12, 0x8(%rsp)
subl 0x30(%rsp), %edx
subl 0x34(%rsp), %ecx
movslq %edx, %r13
movq 0x38(%rsp), %r12
imulq %r13, %r12
imulq %r15, %r13
shrq $0x10, %r13
movslq %ecx, %rcx
movq 0x40(%rsp), %rdx
imulq %rcx, %rdx
movq 0x18(%rsp), %r9
imulq %r9, %rcx
shrq $0x10, %rcx
subl %ecx, %r13d
shrq $0x10, %rdx
shrq $0x10, %r12
addl %edx, %r12d
leaq 0xd07e9(%rip), %rcx     # 0xe445e
movswq (%rcx), %rdx
leaq 0xd1c40(%rip), %rcx     # 0xe58c0
cmpb $0x1, (%rcx,%rdx)
jne 0x142c5
movzwl 0x1c(%r10), %ecx
leal 0x200(%rcx), %esi
movl $0x7ff, %r8d            # imm = 0x7FF
andl %r8d, %esi
leaq 0x56bf2b(%rip), %rdi    # 0x57fbd0
movswl (%rdi,%rsi,2), %esi
shrl $0x7, %esi
andl %r8d, %ecx
movswl (%rdi,%rcx,2), %edi
shrl $0x7, %edi
movswq %si, %rcx
movq %rcx, %rsi
imulq %r15, %rsi
shrq $0x10, %rsi
movswq %di, %rdi
movq %rdi, %r8
imulq %r9, %r8
shrq $0x10, %r8
subl %r8d, %esi
imulq %r15, %rdi
shrq $0x10, %rdi
imulq %r9, %rcx
shrq $0x10, %rcx
addl %edi, %ecx
leaq 0xd1a60(%rip), %rdi     # 0xe5750
cmpw (%rdi,%rdx,2), %bp
cmovel 0x58(%rsp), %ecx
movl $0x0, %edx
cmovel %edx, %esi
leaq 0x5a5160(%rip), %rdx    # 0x5b8e68
movslq (%rdx), %r14
movslq %esi, %r15
movq %r15, %rbx
imulq %r14, %rbx
shrq $0x10, %rbx
movslq %ecx, %rax
movq %rax, 0x20(%rsp)
imulq %rax, %r14
shrq $0x10, %r14
leaq 0x5a513c(%rip), %rcx    # 0x5b8e6c
movl (%rcx), %edx
shll $0xb, %edx
leal (%rdx,%r13), %edi
subl %r15d, %edi
leaq 0x5a512d(%rip), %rcx    # 0x5b8e70
movl (%rcx), %ecx
shll $0xb, %ecx
leal (%rcx,%r12), %esi
subl %r14d, %esi
addl %r13d, %r15d
addl %r15d, %edx
addl %r12d, %r14d
addl %r14d, %ecx
movzbl (%rsp), %r8d
movl %r8d, (%rsp)
callq 0x4f5ca
movl %r13d, %edi
subl 0x20(%rsp), %edi
leaq 0x5a50f5(%rip), %rax    # 0x5b8e6c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %edi
leaq 0x5a50eb(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
shll $0xb, %ecx
leal (%rcx,%r12), %esi
addl %ebx, %esi
addl %r15d, %edx
addl %r14d, %ecx
movl (%rsp), %r8d
callq 0x4f5ca
leaq 0x5a50c6(%rip), %rax    # 0x5b8e6c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %r13d
addl 0x20(%rsp), %r13d
subl %ebx, %r12d
leaq 0x5a50b3(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
shll $0xb, %ecx
addl %ecx, %r12d
addl %r15d, %edx
movq 0x10(%rsp), %r15
addl %r14d, %ecx
leaq 0x419d59(%rip), %r14    # 0x42db30
movl %r13d, %edi
movl %r12d, %esi
movl (%rsp), %r8d
callq 0x4f5ca
jmp 0x143c3
movswq 0xe(%r10), %rsi
leaq 0x3d7ae9(%rip), %rdi    # 0x3eb8e0
movsbl 0x1(%rdi,%rsi,4), %edi
movsbl 0x16(%r10), %r8d
addl %edi, %r8d
movl %r8d, %edi
negl %edi
testb $0x4, %r11b
cmovel %r8d, %edi
movzwl 0x1c(%r10), %r9d
movzbl 0x14(%r10), %r10d
movl %r9d, %r8d
movl $0x7ff, %ebx            # imm = 0x7FF
andl %ebx, %r8d
leaq 0x56bda3(%rip), %r11    # 0x57fbd0
movswq (%r11,%r8,2), %r8
imulq %r10, %r8
addl $0x600, %r9d            # imm = 0x600
andl %ebx, %r9d
movswq (%r11,%r9,2), %r9
imulq %r10, %r9
leaq 0x5ad050(%rip), %r10    # 0x5c0ea0
movswq (%r10,%rsi,2), %rsi
movq %r15, %rax
movl %esi, %r15d
sarl %r15d
addl %edi, %r15d
movslq %r15d, %rdi
movq %rdi, %r10
imulq %r8, %r10
shrq $0x10, %r10
subl %r10d, %edx
imulq %rsi, %r8
shrq $0x10, %r8
imulq %r9, %rdi
shrq $0x10, %rdi
subl %edi, %ecx
imulq %rsi, %r9
shrq $0x10, %r9
movl %edx, %esi
movl 0x30(%rsp), %r12d
subl %r12d, %esi
movl %ecx, %edi
movl 0x34(%rsp), %r14d
subl %r14d, %edi
movslq %esi, %r10
movslq %edi, %rsi
movq 0x40(%rsp), %rbx
movq %rbx, %r11
imulq %rsi, %r11
movq 0x18(%rsp), %r13
imulq %r13, %rsi
shrq $0x10, %rsi
subl %r12d, %r8d
movq %r15, %r12
movq %rax, %r15
addl %edx, %r8d
subl %r14d, %r9d
addl %ecx, %r9d
leaq 0x5a4f94(%rip), %rcx    # 0x5b8e6c
movl (%rcx), %edx
shll $0xb, %edx
movl %edx, %edi
subl %esi, %edi
movq 0x38(%rsp), %r14
movq %r14, %rsi
imulq %r10, %rsi
imulq %rax, %r10
shrq $0x10, %r10
shrq $0x10, %r11
shrq $0x10, %rsi
movslq %r8d, %r8
movslq %r9d, %r9
addl %r10d, %edi
leaq 0x5a4f63(%rip), %rcx    # 0x5b8e70
movl (%rcx), %ecx
shll $0xb, %ecx
addl %ecx, %esi
addl %r11d, %esi
movq %rbx, %r10
leaq 0x55347f(%rip), %rbx    # 0x5673a0
imulq %r9, %r10
imulq %r13, %r9
leaq 0x548430(%rip), %r13    # 0x55c360
shrq $0x10, %r9
subl %r9d, %edx
movq %r14, %r9
leaq 0x419bef(%rip), %r14    # 0x42db30
imulq %r8, %r9
imulq %rax, %r8
shrq $0x10, %r8
addl %r8d, %edx
shrq $0x10, %r9
addl %r9d, %ecx
shrq $0x10, %r10
addl %r10d, %ecx
movzbl (%rsp), %r8d
jmp 0x142bb
leaq 0xd04ef(%rip), %rsi     # 0xe445e
movswq (%rsi), %rsi
leaq 0xd1946(%rip), %rdi     # 0xe58c0
cmpb $0x1, (%rdi,%rsi)
jne 0x143d6
movswq 0xe(%r10), %rdi
leaq 0x3d7950(%rip), %rsi    # 0x3eb8e0
movl (%rsi,%rdi,4), %esi
movl %esi, %r8d
shrl $0x8, %r8d
movsbl %r8b, %r8d
movsbl 0x16(%r10), %r9d
addl %r8d, %r9d
shrl $0x10, %esi
movsbl %sil, %esi
movsbl 0x17(%r10), %r8d
addl %esi, %r8d
movl %r9d, %r15d
negl %r15d
testb $0x4, %r11b
cmovel %r9d, %r15d
movl %r8d, %r9d
negl %r9d
testb $0x8, %r11b
cmovel %r8d, %r9d
movswq 0x1c(%r10), %r8
leal 0x200(%r8), %esi
andl $0x7ff, %esi            # imm = 0x7FF
leaq 0x56bbe6(%rip), %r11    # 0x57fbd0
movswq (%r11,%rsi,2), %rsi
movswq (%r11,%r8,2), %r11
leaq 0x5acea5(%rip), %r8     # 0x5c0ea0
movswq (%r8,%rdi,2), %r14
movzbl 0x14(%r10), %r8d
leaq 0x59e654(%rip), %rbx    # 0x5b2660
movswq (%rbx,%rdi,2), %rbx
movzbl 0x15(%r10), %edi
movl %r14d, %r10d
sarl %r10d
addl %r15d, %r10d
movslq %r10d, %r10
imulq %r8, %r10
movl %ebx, %r15d
sarl %r15d
addl %r9d, %r15d
movslq %r15d, %r15
imulq %rdi, %r15
movq %r10, %r9
imulq %r11, %r9
shrq $0x10, %r9
addl %r9d, %edx
movq %r15, %r9
imulq %rsi, %r9
shrq $0x10, %r9
addl %edx, %r9d
imulq %r11, %r15
shrq $0x10, %r15
imulq %rsi, %r10
shrq $0x10, %r10
subl %r10d, %ecx
addl %r15d, %ecx
imulq %r14, %r8
movq %r8, %r10
imulq %r11, %r10
shrq $0x10, %r10
movl %r9d, %edx
subl %r10d, %edx
imulq %rsi, %r8
shrq $0x10, %r8
addl %ecx, %r8d
imulq %rbx, %rdi
imulq %rdi, %rsi
shrq $0x10, %rsi
imulq %r11, %rdi
shrq $0x10, %rdi
movl %edi, %r10d
negl %r10d
movq %r10, 0x8(%rsp)
movl %r9d, %r10d
movl 0x30(%rsp), %r14d
subl %r14d, %r10d
movl %ecx, %r11d
movl 0x34(%rsp), %ebx
subl %ebx, %r11d
movslq %r10d, %r10
movq 0x38(%rsp), %r15
movq %r15, %r12
imulq %r10, %r12
imulq 0x10(%rsp), %r10
shrq $0x10, %r10
movq %r10, %r13
movslq %r11d, %r10
movq 0x40(%rsp), %rax
movq %rax, %r11
imulq %r10, %r11
imulq 0x18(%rsp), %r10
shrq $0x10, %r10
subl %r10d, %r13d
movq %r13, 0x20(%rsp)
shrq $0x10, %r11
shrq $0x10, %r12
addl %r11d, %r12d
movq %r12, 0x48(%rsp)
movl %edx, %r10d
subl %r14d, %r10d
movl %r8d, %r11d
subl %ebx, %r11d
movslq %r10d, %r12
movq %r15, %r13
imulq %r12, %r13
imulq 0x10(%rsp), %r12
shrq $0x10, %r12
movslq %r11d, %r10
movq %rax, %r11
imulq %r10, %r11
imulq 0x18(%rsp), %r10
shrq $0x10, %r10
subl %r10d, %r12d
shrq $0x10, %r11
shrq $0x10, %r13
addl %r11d, %r13d
movq %r13, %r10
movq %r13, 0x90(%rsp)
addl %r14d, %esi
subl %esi, %edx
addl %ebx, %edi
subl %edi, %r8d
movslq %edx, %rbx
movq %r15, %r13
imulq %rbx, %r13
imulq 0x10(%rsp), %rbx
shrq $0x10, %rbx
movslq %r8d, %rdx
movq %rax, %r8
imulq %rdx, %r8
imulq 0x18(%rsp), %rdx
shrq $0x10, %rdx
subl %edx, %ebx
shrq $0x10, %r8
shrq $0x10, %r13
addl %r8d, %r13d
subl %esi, %r9d
subl %edi, %ecx
movslq %r9d, %r14
imulq %r14, %r15
imulq 0x10(%rsp), %r14
shrq $0x10, %r14
movslq %ecx, %rcx
imulq %rcx, %rax
imulq 0x18(%rsp), %rcx
shrq $0x10, %rcx
subl %ecx, %r14d
shrq $0x10, %rax
shrq $0x10, %r15
addl %eax, %r15d
leaq 0x5a4c9b(%rip), %rcx    # 0x5b8e6c
movl (%rcx), %edx
shll $0xb, %edx
movq 0x20(%rsp), %rcx
leal (%rcx,%rdx), %edi
leaq 0x5a4c8b(%rip), %rcx    # 0x5b8e70
movl (%rcx), %ecx
shll $0xb, %ecx
movq 0x48(%rsp), %rsi
addl %ecx, %esi
addl %r12d, %edx
addl %r10d, %ecx
movzbl (%rsp), %r8d
movl %r8d, (%rsp)
callq 0x4f5ca
leaq 0x5a4c60(%rip), %rax    # 0x5b8e6c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %r12d
leaq 0x5a4c55(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
shll $0xb, %ecx
movq 0x90(%rsp), %rsi
addl %ecx, %esi
addl %ebx, %edx
addl %r13d, %ecx
movl %r12d, %edi
movq 0x8(%rsp), %r12
movl (%rsp), %r8d
callq 0x4f5ca
leaq 0x5a4c25(%rip), %rax    # 0x5b8e6c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %ebx
leaq 0x5a4c1b(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
shll $0xb, %ecx
addl %ecx, %r13d
addl %r14d, %edx
addl %r15d, %ecx
movl %ebx, %edi
leaq 0x553134(%rip), %rbx    # 0x5673a0
movl %r13d, %esi
leaq 0x5480ea(%rip), %r13    # 0x55c360
movl (%rsp), %r8d
callq 0x4f5ca
leaq 0x5a4be6(%rip), %rax    # 0x5b8e6c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %r14d
leaq 0x5a4bdb(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
shll $0xb, %ecx
addl %ecx, %r15d
addl 0x20(%rsp), %edx
addl 0x48(%rsp), %ecx
movl %r14d, %edi
leaq 0x419881(%rip), %r14    # 0x42db30
movl %r15d, %esi
movq 0x10(%rsp), %r15
movl (%rsp), %r8d
callq 0x4f5ca
jmp 0x143d6
cmpl $0xc1, 0x2c(%rsp)
jl 0x143c3
leaq 0x56c906(%rip), %rax    # 0x580be0
movq 0x88(%rsp), %rcx
movzbl (%rax,%rcx), %eax
andl 0x5c(%rsp), %eax
je 0x143c3
movl 0x1c(%r10), %ecx
subl 0x54(%rsp), %ecx
andl $0x7ff, %ecx            # imm = 0x7FF
leaq 0x5a4b63(%rip), %rax    # 0x5b8e68
movslq (%rax), %rax
leal (,%rax,4), %edi
shll $0x4, %r13d
leaq 0xd1436(%rip), %r8      # 0xe5750
cmpw (%r8,%rdx,2), %si
cmovel %edi, %r12d
movl $0x0, %edx
cmovel %edx, %ecx
cmovel %edx, %r13d
leaq 0x5a4b36(%rip), %rdx    # 0x5b8e6c
movl (%rdx), %edi
shll $0xf, %edi
addl %r13d, %edi
shll $0x4, %r12d
leaq 0x5a4b27(%rip), %rdx    # 0x5b8e70
movl (%rdx), %esi
shll $0xf, %esi
addl %r12d, %esi
movzbl 0x15(%r10), %edx
imull 0x2c(%rsp), %edx
imulq %rax, %rdx
shrq $0x10, %rdx
movswl 0xe(%r10), %r8d
movsbl 0x10(%r10), %r9d
movzbl 0x11(%r10), %eax
shrb %r11b
andb $0x1, %r11b
leaq 0x56e870(%rip), %r10    # 0x582bf0
movl (%r10), %r10d
leaq 0x570676(%rip), %rbx    # 0x584a00
movl (%rbx), %ebx
leaq 0x5a4acd(%rip), %r14    # 0x5b8e60
movl (%r14), %r14d
leaq 0x5a4ac7(%rip), %r15    # 0x5b8e64
movl (%r15), %r15d
movzbl %r11b, %r11d
pushq %r15
movq 0x18(%rsp), %r15
pushq %r14
leaq 0x41977c(%rip), %r14    # 0x42db30
pushq %rbx
pushq %r10
pushq %r11
pushq %rax
callq 0x4dcbd
addq $0x30, %rsp
leaq 0x547f96(%rip), %r13    # 0x55c360
leaq 0x552fcf(%rip), %rbx    # 0x5673a0
movq 0x8(%rsp), %r12
movzwl (%rbx,%rbp,2), %esi
testw %si, %si
jns 0x13b58
leaq 0x56c9f6(%rip), %rax    # 0x580de0
movzwl (%rax), %eax
movq 0x80(%rsp), %rdx
incq %rdx
movswq %ax, %rcx
cmpq %rcx, %rdx
jl 0x13b1f
testw %ax, %ax
jle 0x145a4
movslq 0x60(%rsp), %rcx
movq %rcx, (%rsp)
movslq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rsp)
xorl %r15d, %r15d
leaq 0x3e04b5(%rip), %rdx    # 0x3f48e0
leaq 0x54872e(%rip), %rsi    # 0x55cb60
leaq (%r15,%r15,4), %rcx
movswl 0x2(%rdx,%rcx,8), %r12d
testl %r12d, %r12d
jle 0x14594
movswl (%rdx,%rcx,8), %r13d
addl %r13d, %r12d
movslq %r13d, %rax
shlq $0x5, %rax
leaq 0x355475(%rip), %rcx    # 0x3698d0
leaq (%rcx,%rax), %rbx
addq $0x10, %rbx
cmpw $0x0, -0x6(%rbx)
js 0x1447b
incl %r13d
addq $0x20, %rbx
cmpl %r12d, %r13d
jl 0x14463
jmp 0x14583
movl %r13d, %eax
sarl $0x3, %eax
cltq
movzbl (%rsi,%rax), %eax
movl %r13d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x1446a
movswq (%rbx), %rax
leaq 0x5aca03(%rip), %rcx    # 0x5c0ea0
cmpw $0x0, (%rcx,%rax,2)
je 0x1446a
leaq 0x59e1b5(%rip), %rcx    # 0x5b2660
cmpw $0x0, (%rcx,%rax,2)
je 0x1446a
movslq -0x10(%rbx), %rdi
movq 0x78(%rsp), %r10
subq %r10, %rdi
movslq -0xc(%rbx), %rax
movq 0x70(%rsp), %r11
subq %r11, %rax
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
imulq %rdi, %rsi
movq 0x10(%rsp), %rdx
imulq %rdx, %rdi
shrq $0x10, %rdi
movq (%rsp), %r14
movq %r14, %rcx
imulq %rax, %rcx
movq 0x18(%rsp), %r9
imulq %r9, %rax
shrq $0x10, %rax
subl %eax, %edi
shrq $0x10, %rcx
shrq $0x10, %rsi
addl %ecx, %esi
movswq -0x8(%rbx), %rax
shlq $0x5, %rax
leaq 0x3553b9(%rip), %rcx    # 0x3698d0
movslq (%rcx,%rax), %r8
subq %r10, %r8
movslq 0x4(%rcx,%rax), %rcx
subq %r11, %rcx
imulq %r8, %rbp
imulq %rdx, %r8
shrq $0x10, %r8
leaq 0x5a4933(%rip), %rdx    # 0x5b8e6c
movl (%rdx), %edx
shll $0xb, %edx
addl %edx, %edi
addl %r8d, %edx
imulq %rcx, %r14
imulq %r9, %rcx
shrq $0x10, %rcx
shrq $0x10, %rbp
subl %ecx, %edx
leaq 0x5a4914(%rip), %rcx    # 0x5b8e70
movl (%rcx), %ecx
shll $0xb, %ecx
addl %ecx, %esi
addl %ebp, %ecx
shrq $0x10, %r14
addl %r14d, %ecx
movl $0xef, %r8d
callq 0x4f5ca
leaq 0x5485e2(%rip), %rsi    # 0x55cb60
jmp 0x1446a
leaq 0x56c856(%rip), %rax    # 0x580de0
movzwl (%rax), %eax
leaq 0x3e034c(%rip), %rdx    # 0x3f48e0
incq %r15
movswq %ax, %rcx
cmpq %rcx, %r15
jl 0x14432
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop