// File: /workspace/github_c_makefile_star2_O1/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 0x56948b(%rip), %r10    # 0x57cbb0
movswq (%r10,%rax,2), %r8
movl %edx, 0x34(%rsp)
movslq %edx, %rax
imulq %rax, %r8
movl $0x600, %edx            # imm = 0x600
movl %ecx, 0x64(%rsp)
subl %ecx, %edx
andl %r9d, %edx
movswq (%r10,%rdx,2), %rcx
imulq %rax, %rcx
leaq 0x5a26f5(%rip), %rax    # 0x5b5e48
movslq (%rax), %rax
movq %rax, %rdx
movq %r8, 0x10(%rsp)
imulq %r8, %rdx
shrq $0x10, %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, 0x20(%rsp)
imulq %rcx, %rax
shrq $0x10, %rax
movq %rax, 0x58(%rsp)
leaq 0x56a63c(%rip), %rax    # 0x57ddc0
cmpw $0x0, (%rax)
movl %edi, 0x38(%rsp)
movslq %edi, %rax
movq %rax, 0x80(%rsp)
movl %esi, 0x3c(%rsp)
movslq %esi, %rax
movq %rax, 0x78(%rsp)
jle 0x13a23
movslq 0x50(%rsp), %rax
movq %rax, 0x48(%rsp)
movslq 0x58(%rsp), %rax
movq %rax, 0x40(%rsp)
xorl %ecx, %ecx
leaq 0x3de0fa(%rip), %r13    # 0x3f18c0
leaq 0x546373(%rip), %r9     # 0x559b40
movq %rcx, 0x28(%rsp)
leaq (%rcx,%rcx,4), %rax
movswl 0x2(%r13,%rax,8), %r12d
testl %r12d, %r12d
jle 0x13a07
leaq (,%rax,8), %r10
addq %r13, %r10
movswl (%r10), %ebx
addl %ebx, %r12d
movl 0x4(%r10), %r11d
movl 0x8(%r10), %eax
movl %eax, 0x18(%rsp)
movslq %ebx, %rax
shlq $0x5, %rax
leaq 0x35309f(%rip), %rcx    # 0x3668b0
leaq (%rcx,%rax), %r14
addq $0xe, %r14
movq %r10, (%rsp)
movl %r11d, 0x8(%rsp)
movswl -0x4(%r14), %eax
testl %eax, %eax
js 0x139ce
movl %ebx, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%r9,%rcx), %ecx
movl %ebx, %edx
andl $0x7, %edx
btl %edx, %ecx
jae 0x139ce
cmpl %eax, %ebx
jge 0x13866
movl %eax, %ecx
shrl $0x3, %ecx
movzbl (%r9,%rcx), %ecx
movl %eax, %edx
andl $0x7, %edx
btl %edx, %ecx
jb 0x139ce
movswq -0x2(%r14), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (,%rcx,8), %rcx
addq %r13, %rcx
movl 0x4(%rcx), %edx
cmpl %r11d, %edx
jne 0x138ac
movl 0x18(%rsp), %esi
cmpl %esi, 0x8(%rcx)
jne 0x138ac
movslq %eax, %rsi
shlq $0x5, %rsi
leaq 0x353017(%rip), %rdi    # 0x3668b0
movzwl 0xe(%rdi,%rsi), %esi
orw (%r14), %si
testb $0x30, %sil
je 0x139ce
leaq 0xcdbab(%rip), %rsi     # 0xe145e
movswq (%rsi), %rsi
leaq 0xcf002(%rip), %rdi     # 0xe28c0
cmpb $0x2, (%rdi,%rsi)
jne 0x138f5
movl 0x8(%r10), %esi
cmpl 0x4(%r10), %esi
je 0x138d9
movl 0x8(%rcx), %edi
cmpl %edx, %edi
jne 0x139df
movzwl 0x18(%r10), %eax
cmpw 0x18(%rcx), %ax
jne 0x139ce
movb 0x1c(%r10), %al
cmpb 0x1c(%rcx), %al
jne 0x139ce
movslq -0xe(%r14), %rdi
movq 0x80(%rsp), %r10
subq %r10, %rdi
movslq -0xa(%r14), %rax
movq 0x78(%rsp), %r11
subq %r11, %rax
movq 0x40(%rsp), %rbp
movq %rbp, %rsi
imulq %rdi, %rsi
movq 0x10(%rsp), %rdx
imulq %rdx, %rdi
shrq $0x10, %rdi
movq 0x48(%rsp), %r15
movq %r15, %rcx
imulq %rax, %rcx
movq 0x20(%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 0x352f52(%rip), %rcx    # 0x3668b0
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 0x5a24cc(%rip), %rdx    # 0x5b5e4c
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 0x5a24ad(%rip), %rcx    # 0x5b5e50
movl (%rcx), %ecx
shll $0xb, %ecx
addl %ecx, %esi
addl %ebp, %ecx
shrq $0x10, %r15
addl %r15d, %ecx
movl $0xe8, %r8d
callq 0x4d436
movl 0x8(%rsp), %r11d
movq (%rsp), %r10
leaq 0x546172(%rip), %r9     # 0x559b40
incl %ebx
addq $0x20, %r14
cmpl %r12d, %ebx
jl 0x13822
jmp 0x13a07
cmpl %edi, %esi
jne 0x138d9
movzwl %ax, %eax
shll $0x5, %eax
leaq 0x352ebc(%rip), %rdx    # 0x3668b0
movzwl 0xe(%rdx,%rax), %eax
orw (%r14), %ax
andl $0x30, %eax
je 0x139ce
jmp 0x138d9
movq 0x28(%rsp), %rcx
incq %rcx
leaq 0x56a3aa(%rip), %rax    # 0x57ddc0
movswq (%rax), %rax
cmpq %rax, %rcx
jl 0x137cd
leaq 0xcda34(%rip), %rax     # 0xe145e
movswq (%rax), %rax
leaq 0xced1b(%rip), %rcx     # 0xe2750
movswl (%rcx,%rax,2), %ebx
movl %ebx, %ecx
andb $0x7, %cl
movl $0x1, %eax
shll %cl, %eax
movl %ebx, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
leaq 0x5458ec(%rip), %r12    # 0x559340
orb %al, (%r12,%rcx)
leaq 0x56a361(%rip), %rax    # 0x57ddc0
cmpw $0x0, (%rax)
movq 0x10(%rsp), %r14
jle 0x14378
movslq 0x50(%rsp), %rax
movq %rax, 0x48(%rsp)
movslq 0x58(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x34(%rsp), %eax
shll $0x5, %eax
negl %eax
movl %eax, 0x68(%rsp)
leaq 0x41707a(%rip), %r15    # 0x42ab10
xorl %ecx, %ecx
leaq 0x5468d1(%rip), %rax    # 0x55a370
movzwl (%rax,%rcx,2), %esi
testw %si, %si
movq %rcx, 0x90(%rsp)
js 0x14359
movl %ecx, %eax
shrl $0x3, %eax
movq %rax, 0x88(%rsp)
andb $0x7, %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x6c(%rsp)
movzwl %si, %eax
movl %eax, %ecx
shrl $0x3, %ecx
movzbl (%r12,%rcx), %ecx
movl %eax, %edx
andl $0x7, %edx
btl %edx, %ecx
movl %eax, %r13d
jae 0x14344
imulq $0x2c, %r13, %r10
movzwl 0xc(%r15,%r10), %r11d
testb $0x1, %r11b
sete %cl
shlb $0x6, %cl
addb $-0x8, %cl
cmpl %eax, %ebx
movzbl %cl, %eax
movl $0x1f, %ecx
cmovel %ecx, %eax
movl (%r15,%r10), %edx
movl 0x4(%r15,%r10), %ecx
movswl 0x1a(%r15,%r10), %ebx
cmpl $0x2, %ebx
sete %dil
leal -0x1(%rbx), %r8d
cmpw $0x8, %r8w
setae %r8b
orb %dil, %r8b
jne 0x13b7e
leaq (,%r13,2), %rdi
addq %r13, %rdi
leaq 0xd6115(%rip), %r9      # 0xe9c60
movl (%r9,%rdi,4), %r8d
movl 0x4(%r9,%rdi,4), %edi
subl %r8d, %edx
leaq 0xcee22(%rip), %r9      # 0xe2980
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 %r15, %r10
movl %r11d, %edi
shrl $0x4, %edi
andl $0x3, %edi
leaq 0x78933(%rip), %r8      # 0x8c4c4
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
jmpq *%rdi
movl %eax, (%rsp)
movq %rbx, 0x18(%rsp)
movq %r13, 0x8(%rsp)
subl 0x38(%rsp), %edx
subl 0x3c(%rsp), %ecx
movslq %edx, %r13
movq 0x40(%rsp), %r12
imulq %r13, %r12
imulq %r14, %r13
shrq $0x10, %r13
movslq %ecx, %rcx
movq 0x48(%rsp), %rdx
imulq %rcx, %rdx
movq 0x20(%rsp), %rax
imulq %rax, %rcx
shrq $0x10, %rcx
subl %ecx, %r13d
shrq $0x10, %rdx
shrq $0x10, %r12
addl %edx, %r12d
leaq 0xcd86d(%rip), %rcx     # 0xe145e
movswq (%rcx), %rdx
leaq 0xcecc4(%rip), %rcx     # 0xe28c0
cmpb $0x1, (%rcx,%rdx)
jne 0x14235
movzwl 0x1c(%r10), %ecx
leal 0x200(%rcx), %edi
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %edi
leaq 0x568f8f(%rip), %r8     # 0x57cbb0
movswl (%r8,%rdi,2), %edi
shrl $0x7, %edi
andl %r9d, %ecx
movswl (%r8,%rcx,2), %r8d
shrl $0x7, %r8d
movswq %di, %rcx
movq %rcx, %rdi
imulq %r14, %rdi
shrq $0x10, %rdi
movswq %r8w, %r8
movq %r8, %r9
imulq %rax, %r9
shrq $0x10, %r9
subl %r9d, %edi
imulq %r14, %r8
shrq $0x10, %r8
imulq %rax, %rcx
shrq $0x10, %rcx
addl %r8d, %ecx
leaq 0xceae0(%rip), %r8      # 0xe2750
cmpw (%r8,%rdx,2), %si
cmovel 0x68(%rsp), %ecx
movl $0x0, %edx
cmovel %edx, %edi
leaq 0x5a21bf(%rip), %rdx    # 0x5b5e48
movslq (%rdx), %r14
movslq %edi, %r15
movq %r15, %rbp
imulq %r14, %rbp
shrq $0x10, %rbp
movslq %ecx, %rax
movq %rax, 0x28(%rsp)
imulq %rax, %r14
shrq $0x10, %r14
leaq 0x5a219b(%rip), %rcx    # 0x5b5e4c
movl (%rcx), %edx
shll $0xb, %edx
leal (%rdx,%r13), %edi
subl %r15d, %edi
leaq 0x5a218c(%rip), %rcx    # 0x5b5e50
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), %ebx
movl %ebx, %r8d
callq 0x4d436
movl %r13d, %edi
subl 0x28(%rsp), %edi
leaq 0x5a2156(%rip), %rax    # 0x5b5e4c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %edi
leaq 0x5a214c(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
shll $0xb, %ecx
leal (%rcx,%r12), %esi
addl %ebp, %esi
addl %r15d, %edx
addl %r14d, %ecx
movl %ebx, %r8d
callq 0x4d436
leaq 0x5a2128(%rip), %rax    # 0x5b5e4c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %r13d
addl 0x28(%rsp), %r13d
subl %ebp, %r12d
leaq 0x5a2115(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
shll $0xb, %ecx
addl %ecx, %r12d
addl %r15d, %edx
leaq 0x416dc3(%rip), %r15    # 0x42ab10
addl %r14d, %ecx
movl %r13d, %edi
movl %r12d, %esi
movl %ebx, %r8d
movq 0x10(%rsp), %r14
callq 0x4d436
jmp 0x14333
movswq 0xe(%r10), %rsi
leaq 0x3d4b4c(%rip), %rdi    # 0x3e88c0
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, %ebp            # imm = 0x7FF
andl %ebp, %r8d
leaq 0x568e06(%rip), %r11    # 0x57cbb0
movswq (%r11,%r8,2), %r8
imulq %r10, %r8
addl $0x600, %r9d            # imm = 0x600
andl %ebp, %r9d
movswq (%r11,%r9,2), %r9
imulq %r10, %r9
leaq 0x5aa0b3(%rip), %r10    # 0x5bde80
movswq (%r10,%rsi,2), %rsi
movq %r14, %r12
movl %esi, %r14d
sarl %r14d
addl %edi, %r14d
movslq %r14d, %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 0x38(%rsp), %r15d
subl %r15d, %esi
movl %ecx, %edi
movl 0x3c(%rsp), %ebp
subl %ebp, %edi
movslq %esi, %r10
movslq %edi, %rsi
movq %r13, %rbx
movq 0x48(%rsp), %r13
movq %r13, %r11
imulq %rsi, %r11
movl %eax, (%rsp)
movq 0x20(%rsp), %rax
imulq %rax, %rsi
shrq $0x10, %rsi
subl %r15d, %r8d
addl %edx, %r8d
subl %ebp, %r9d
addl %ecx, %r9d
leaq 0x5a1ff9(%rip), %rcx    # 0x5b5e4c
movl (%rcx), %edx
shll $0xb, %edx
movl %edx, %edi
subl %esi, %edi
movq 0x40(%rsp), %r15
movq %r15, %rsi
imulq %r10, %rsi
imulq %r12, %r10
shrq $0x10, %r10
shrq $0x10, %r11
shrq $0x10, %rsi
movslq %r8d, %r8
movslq %r9d, %r9
addl %r10d, %edi
leaq 0x5a1fc8(%rip), %rcx    # 0x5b5e50
movl (%rcx), %ecx
shll $0xb, %ecx
addl %ecx, %esi
addl %r11d, %esi
movq %r13, %r10
movq %rbx, %r13
movq %r14, %rbx
movq %r12, %r14
leaq 0x54549b(%rip), %r12    # 0x559340
imulq %r9, %r10
imulq %rax, %r9
shrq $0x10, %r9
subl %r9d, %edx
movq %r15, %r9
leaq 0x416c52(%rip), %r15    # 0x42ab10
imulq %r8, %r9
imulq %r14, %r8
shrq $0x10, %r8
addl %r8d, %edx
shrq $0x10, %r9
addl %r9d, %ecx
shrq $0x10, %r10
addl %r10d, %ecx
movzbl (%rsp), %r8d
jmp 0x1422b
leaq 0xcd572(%rip), %rsi     # 0xe145e
movswq (%rsi), %rsi
leaq 0xce9c9(%rip), %rdi     # 0xe28c0
cmpb $0x1, (%rdi,%rsi)
jne 0x14344
movswq 0xe(%r10), %rdi
leaq 0x3d49b3(%rip), %rsi    # 0x3e88c0
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, %ebp
negl %ebp
testb $0x4, %r11b
cmovel %r9d, %ebp
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 0x568c4a(%rip), %r11    # 0x57cbb0
movswq (%r11,%rsi,2), %rsi
movswq (%r11,%r8,2), %r11
leaq 0x5a9f09(%rip), %r8     # 0x5bde80
movswq (%r8,%rdi,2), %r14
movzbl 0x14(%r10), %r8d
leaq 0x59b6b8(%rip), %rbx    # 0x5af640
movswq (%rbx,%rdi,2), %rbx
movzbl 0x15(%r10), %edi
movl %r14d, %r10d
sarl %r10d
addl %ebp, %r10d
movslq %r10d, %r10
imulq %r8, %r10
movl %ebx, %ebp
sarl %ebp
addl %r9d, %ebp
movslq %ebp, %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, 0x18(%rsp)
movl %r9d, %r10d
movl 0x38(%rsp), %ebp
subl %ebp, %r10d
movl %ecx, %r11d
movl 0x3c(%rsp), %ebx
subl %ebx, %r11d
movslq %r10d, %r10
movq 0x40(%rsp), %r15
movq %r15, %r14
imulq %r10, %r14
imulq 0x10(%rsp), %r10
shrq $0x10, %r10
movq %r10, %r12
movslq %r11d, %r10
movl %eax, (%rsp)
movq 0x48(%rsp), %rax
movq %rax, %r11
imulq %r10, %r11
imulq 0x20(%rsp), %r10
shrq $0x10, %r10
subl %r10d, %r12d
movq %r12, 0x28(%rsp)
shrq $0x10, %r11
shrq $0x10, %r14
addl %r11d, %r14d
movq %r14, 0x70(%rsp)
movl %edx, %r10d
subl %ebp, %r10d
movl %r8d, %r11d
subl %ebx, %r11d
movslq %r10d, %r12
movq %r13, 0x8(%rsp)
movq %r15, %r13
imulq %r12, %r13
imulq 0x10(%rsp), %r12
shrq $0x10, %r12
movslq %r11d, %r10
movq %rax, %r11
imulq %r10, %r11
imulq 0x20(%rsp), %r10
shrq $0x10, %r10
subl %r10d, %r12d
shrq $0x10, %r11
shrq $0x10, %r13
addl %r11d, %r13d
addl %ebp, %esi
subl %esi, %edx
addl %ebx, %edi
subl %edi, %r8d
movslq %edx, %rbx
movq %r15, %rbp
imulq %rbx, %rbp
imulq 0x10(%rsp), %rbx
shrq $0x10, %rbx
movslq %r8d, %rdx
movq %rax, %r8
imulq %rdx, %r8
imulq 0x20(%rsp), %rdx
shrq $0x10, %rdx
subl %edx, %ebx
shrq $0x10, %r8
shrq $0x10, %rbp
addl %r8d, %ebp
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 0x20(%rsp), %rcx
shrq $0x10, %rcx
subl %ecx, %r14d
shrq $0x10, %rax
shrq $0x10, %r15
addl %eax, %r15d
leaq 0x5a1d06(%rip), %rcx    # 0x5b5e4c
movl (%rcx), %edx
shll $0xb, %edx
movq 0x28(%rsp), %rcx
leal (%rcx,%rdx), %edi
leaq 0x5a1cf6(%rip), %rcx    # 0x5b5e50
movl (%rcx), %ecx
shll $0xb, %ecx
movq 0x70(%rsp), %rsi
addl %ecx, %esi
addl %r12d, %edx
addl %r13d, %ecx
movzbl (%rsp), %r8d
movl %r8d, (%rsp)
callq 0x4d436
leaq 0x5a1ccb(%rip), %rax    # 0x5b5e4c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %r12d
leaq 0x5a1cc0(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
shll $0xb, %ecx
addl %ecx, %r13d
addl %ebx, %edx
addl %ebp, %ecx
movl %r12d, %edi
movl %r13d, %esi
movq 0x8(%rsp), %r13
movl (%rsp), %r12d
movl %r12d, %r8d
callq 0x4d436
leaq 0x5a1c92(%rip), %rax    # 0x5b5e4c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %ebx
leaq 0x5a1c88(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
shll $0xb, %ecx
addl %ecx, %ebp
addl %r14d, %edx
addl %r15d, %ecx
movl %ebx, %edi
movq 0x18(%rsp), %rbx
movl %ebp, %esi
movl %r12d, %r8d
movl %r12d, %ebp
callq 0x4d436
leaq 0x5a1c5c(%rip), %rax    # 0x5b5e4c
movl (%rax), %edx
shll $0xb, %edx
addl %edx, %r14d
leaq 0x5a1c51(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
shll $0xb, %ecx
addl %ecx, %r15d
addl 0x28(%rsp), %edx
addl 0x70(%rsp), %ecx
movl %r14d, %edi
movq 0x10(%rsp), %r14
leaq 0x545122(%rip), %r12    # 0x559340
movl %r15d, %esi
leaq 0x4168e8(%rip), %r15    # 0x42ab10
movl %ebp, %r8d
callq 0x4d436
jmp 0x14344
cmpl $0xc1, 0x34(%rsp)
jl 0x14333
leaq 0x569976(%rip), %rax    # 0x57dbc0
movq 0x88(%rsp), %rcx
movzbl (%rax,%rcx), %eax
andl 0x6c(%rsp), %eax
je 0x14333
movl 0x1c(%r10), %ecx
subl 0x64(%rsp), %ecx
andl $0x7ff, %ecx            # imm = 0x7FF
leaq 0x5a1bd3(%rip), %rax    # 0x5b5e48
movslq (%rax), %rax
leal (,%rax,4), %edi
shll $0x4, %r13d
leaq 0xce4c6(%rip), %r8      # 0xe2750
cmpw (%r8,%rdx,2), %si
cmovel %edi, %r12d
movl $0x0, %edx
cmovel %edx, %ecx
cmovel %edx, %r13d
leaq 0x5a1ba6(%rip), %rdx    # 0x5b5e4c
movl (%rdx), %edi
shll $0xf, %edi
addl %r13d, %edi
shll $0x4, %r12d
leaq 0x5a1b97(%rip), %rdx    # 0x5b5e50
movl (%rdx), %esi
shll $0xf, %esi
addl %r12d, %esi
movzbl 0x15(%r10), %edx
imull 0x34(%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 0x56b8e0(%rip), %r10    # 0x57fbd0
movl (%r10), %r10d
leaq 0x56d6e6(%rip), %rbx    # 0x5819e0
movl (%rbx), %ebx
leaq 0x5a1b3d(%rip), %r14    # 0x5b5e40
movl (%r14), %r14d
leaq 0x5a1b37(%rip), %r15    # 0x5b5e44
movl (%r15), %r15d
movzbl %r11b, %r11d
pushq %r15
leaq 0x4167f3(%rip), %r15    # 0x42ab10
pushq %r14
pushq %rbx
movq 0x28(%rsp), %r14
pushq %r10
pushq %r11
pushq %rax
callq 0x4bca3
addq $0x30, %rsp
leaq 0x545006(%rip), %r12    # 0x559340
movq 0x8(%rsp), %r13
movq 0x18(%rsp), %rbx
leaq 0x550035(%rip), %rax    # 0x564380
movzwl (%rax,%r13,2), %esi
testw %si, %si
jns 0x13acf
movq 0x90(%rsp), %rcx
incq %rcx
leaq 0x569a55(%rip), %rax    # 0x57ddc0
movswq (%rax), %rax
cmpq %rax, %rcx
jl 0x13a98
leaq 0x569a41(%rip), %rax    # 0x57ddc0
cmpw $0x0, (%rax)
jle 0x14526
movslq 0x50(%rsp), %rax
movq %rax, (%rsp)
movslq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %r15d, %r15d
leaq 0x54579a(%rip), %rdx    # 0x559b40
leaq 0x5a9ad3(%rip), %rsi    # 0x5bde80
leaq (%r15,%r15,4), %rax
leaq 0x3dd508(%rip), %rcx    # 0x3f18c0
movswl 0x2(%rcx,%rax,8), %r13d
testl %r13d, %r13d
jle 0x1450f
leaq 0x3dd4f2(%rip), %rcx    # 0x3f18c0
movswl (%rcx,%rax,8), %r12d
addl %r12d, %r13d
movslq %r12d, %rax
shlq $0x5, %rax
leaq 0x3524cc(%rip), %rcx    # 0x3668b0
leaq (%rcx,%rax), %rbx
addq $0x10, %rbx
cmpw $0x0, -0x6(%rbx)
js 0x14404
incl %r12d
addq $0x20, %rbx
cmpl %r13d, %r12d
jl 0x143ec
jmp 0x1450f
movl %r12d, %eax
sarl $0x3, %eax
cltq
movzbl (%rdx,%rax), %eax
movl %r12d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x143f3
movswq (%rbx), %rax
cmpw $0x0, (%rsi,%rax,2)
je 0x143f3
leaq 0x59b213(%rip), %rcx    # 0x5af640
cmpw $0x0, (%rcx,%rax,2)
je 0x143f3
movslq -0x10(%rbx), %rdi
movq 0x80(%rsp), %r10
subq %r10, %rdi
movslq -0xc(%rbx), %rax
movq 0x78(%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 0x20(%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 0x352414(%rip), %rcx    # 0x3668b0
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 0x5a198e(%rip), %rdx    # 0x5b5e4c
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 0x5a196f(%rip), %rcx    # 0x5b5e50
movl (%rcx), %ecx
shll $0xb, %ecx
addl %ecx, %esi
addl %ebp, %ecx
shrq $0x10, %r14
addl %r14d, %ecx
movl $0xef, %r8d
callq 0x4d436
leaq 0x5a997d(%rip), %rsi    # 0x5bde80
leaq 0x545636(%rip), %rdx    # 0x559b40
jmp 0x143f3
incq %r15
leaq 0x5698a7(%rip), %rax    # 0x57ddc0
movswq (%rax), %rax
cmpq %rax, %r15
jl 0x143ad
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq