// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tektag.c
// Function: movevehicles
void
movevehicles(int v)
{
     short     a,ato,curang,i,n,p,rotang,s,sto,stoptrack,track;
     int      distx,disty,px,py,x,y;
     int      xvect,xvect2,yvect,yvect2;
     int      lox,loy,hix,hiy;
     short     onveh[MAXPLAYERS];
     struct    sectorvehicle  *vptr;

     vptr=sectvehptr[v];

     if( vptr->soundindex == -1 ) {

          for( i=0; i<32; i++) {        //find mapno using names array
               if( !(Bstrcasecmp(boardfilename,mapnames[i]) ) )
                    break;
          }
          switch( v ) {
          case 0:
               switch( i ) {
                    case 4:   //level1.map
                         vptr->soundindex=playsound(S_TRAMBUSLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 8:   //city1.map
                         vptr->soundindex=playsound(S_TRUCKLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 11:  //beach1.map
                         vptr->soundindex=playsound(S_FORKLIFTLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 17:  //mid3.map
                         vptr->soundindex=playsound(S_TRAMBUSLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 19:  //sewer2.map
                         vptr->soundindex=playsound(S_FORKLIFTLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 20:   //inds1.map
                         vptr->soundindex=playsound(S_FORKLIFTLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 25:  //ware1.map
                         vptr->soundindex=playsound(S_FORKLIFTLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 26:   //ware2.map
                         vptr->soundindex=playsound(S_TRUCKLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    default:
                         break;
               }
               break;
          case 1:
               switch( i ) {
                    case 4:   //level1.map
                         vptr->soundindex=playsound(S_TRAMBUSLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 11:   //beach1.map
                         vptr->soundindex=playsound(S_BOATLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    case 26:   //ware2.map
                         vptr->soundindex=playsound(S_CARTLOOP,vptr->pivotx,vptr->pivoty,-1,ST_VEHUPDATE);
                         break;
                    default:
                         break;
               }
               break;
          default:
               break;
          }
     }

     if( vptr->waittics > 0 ) {
          vptr->waittics-=TICSPERFRAME;
          if( vptr->soundindex != -1 ) {
               updatevehiclesnds(vptr->soundindex, vptr->pivotx, vptr->pivoty);
          }
          return;
     }

     px=vptr->pivotx;
     py=vptr->pivoty;

     track=vptr->track;
     distx=vptr->distx;
     disty=vptr->disty;
     stoptrack=vptr->stoptrack;
     if( vptr->stop[track] && (x=distx+disty) > 0L && x < 8192L ) {
          vptr->accelto=2;
          vptr->speedto=32;
     }
     else if( vptr->accelto != 8 ) {
          vptr->accelto=8;
          vptr->speedto=vptr->movespeed;
     }
     if( distx == 0L && disty == 0L ) {
          if( vptr->stop[stoptrack] ) {
               for( i=0 ; i < vptr->numsectors ; i++ ) {
                    s=vptr->sector[i];
                    if( sectptr[s]->lotag != 0 ) {
                         operatesector(s);
                    }
               }
               vptr->waittics=vptr->waitdelay;
               vptr->acceleration=0;
               vptr->speed=0;

          }
          distx=vptr->trackx[track]-px;
          disty=vptr->tracky[track]-py;
          vptr->angleto=getangle(distx,disty);
          vptr->accelto=8;
          vptr->distx=abs(distx);
          vptr->disty=abs(disty);
          distx=vptr->distx;
          disty=vptr->disty;
     }
     a=vptr->acceleration;
     ato=vptr->accelto;
     if( a < ato ) {
          a+=TICSPERFRAME;
          if( a > ato ) {
               a=ato;
          }
          vptr->acceleration=a;
     }
     else if( a > ato ) {
          a-=TICSPERFRAME;
          if( a < ato ) {
               a=ato;
          }
          vptr->acceleration=a;
     }
     s=vptr->speed;
     sto=vptr->speedto;
     if( s > sto ) {
          s-=a;
          if( s <= sto ) {
               s=sto;
          }
          vptr->speed=s;
     }
     else if( s < sto ) {
          s+=a;
          if( s > sto ) {
               s=sto;
          }
          vptr->speed=s;
     }
     rotang=curang=vptr->angle;
     if( curang != vptr->angleto ) {
          vptr->angle=vptr->angleto;
          curang=vptr->angle;
     }
     xvect=(s*(int)TICSPERFRAME*(int)sintable[((curang+2560)&2047)])>>3;
     xvect2=xvect>>13;
     yvect=(s*(int)TICSPERFRAME*(int)sintable[((curang+2048)&2047)])>>3;
     yvect2=yvect>>13;
     distx-=labs(xvect2);
     if( distx < 0L ) {
          if( xvect2 < 0L ) {
               xvect2-=distx;
          }
          else {
               xvect2+=distx;
          }
          distx=0L;
          vptr->angleto=getangle(vptr->trackx[track]-px,vptr->tracky[track]-py);
     }
     disty-=labs(yvect2);
     if( disty < 0L ) {
          if( yvect2 < 0L ) {
               yvect2-=disty;
          }
          else {
               yvect2+=disty;
          }
          disty=0L;
          vptr->angleto=getangle(vptr->trackx[track]-px,vptr->tracky[track]-py);
     }
     if( distx == 0L && disty == 0L ) {
          vptr->stoptrack=track;
          track=(track+1)%vptr->tracknum;
          vptr->track=track;
          switch( v ) {
          //jsa vehicles
          case 0:
               if( !(Bstrcasecmp(boardfilename,"CITY1.MAP")) || !(Bstrcasecmp(boardfilename,"WARE2.MAP")))
                    playsound(S_TRUCKSTOP,vptr->pivotx,vptr->pivoty,0,ST_AMBUPDATE);
               break;
          default:
               break;
          }
     }
     vptr->distx=distx;
     vptr->disty=disty;
     px+=xvect2;
     py+=yvect2;
     n=vptr->numpoints;
     for( i=0 ; i < n ; i++ ) {
          p=vptr->point[i];
          x=vptr->pointx[i];
          y=vptr->pointy[i];
          rotatepoint(px,py,px-x,py-y,curang,&x,&y);
          dragpoint(p,x,y);
     }
     vptr->pivotx=px;
     vptr->pivoty=py;
     rotang=((curang-rotang)+2048)&2047;
     n=vptr->numsectors;
     lox=loy=0x7FFFFFFF;
     hix=hiy=-(0x7FFFFFFF);
     for( i=0 ; i < 4 ; i++ ) {
          a=vptr->killw[i];
          if( wallptr[a]->x < lox ) {
               lox=wallptr[a]->x;
          }
          else if( wallptr[a]->x > hix ) {
               hix=wallptr[a]->x;
          }
          if( wallptr[a]->y < loy ) {
               loy=wallptr[a]->y;
          }
          else if (wallptr[a]->y > hiy) {
               hiy=wallptr[a]->y;
          }
     }
     memset(onveh,0,sizeof(short)*MAXPLAYERS);
     for( i=0 ; i < n ; i++ ) {
          p=headspritesect[vptr->sector[i]];
          while (p >= 0) {
               s=nextspritesect[p];
               x=sprptr[p]->x;
               y=sprptr[p]->y;
               x+=xvect2;
               y+=yvect2;
               rotatepoint(px,py,x,y,rotang,&sprptr[p]->x,&sprptr[p]->y);
               sprptr[p]->ang+=rotang;
               p=s;
          }
          for( p=connecthead ; p >= 0 ; p=connectpoint2[p] ) {
               x=posx[p];
               y=posy[p];
               if( cursectnum[p] == vptr->sector[i] ) {
                    x+=xvect2;
                    y+=yvect2;
                    rotatepoint(px,py,x,y,rotang,&posx[p],&posy[p]);
                    ang[p]+=rotang;
                    onveh[p]=1;
               }
          }
     }
     for( p=connecthead ; p >= 0 ; p=connectpoint2[p] ) {
          if( onveh[p] ) {
               continue;
          }
          x=posx[p];
          y=posy[p];
          if( x > lox && x < hix && y > loy && y < hiy ) {
               if( (health[p] > 0) &&  (posz[p] > VEHICLEHEIGHT) ) {
                    changehealth(p,-9999);
                    changescore(p,-100);
                    if( goreflag ) {
                         tekexplodebody(playersprite[p]);
                    }
               }
          }
     }
     if( vptr->soundindex != -1 ) {
          updatevehiclesnds(vptr->soundindex, vptr->pivotx, vptr->pivoty);
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl %edi, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x3294a7(%rip), %rax    # 0x36b370
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpl $-0x1, 0xa10(%rax)
jne 0x42247
movw $0x0, -0xc(%rbp)
movswl -0xc(%rbp), %eax
cmpl $0x20, %eax
jge 0x41f2a
movswq -0xc(%rbp), %rcx
leaq 0xd8cad(%rip), %rax     # 0x11abb0
movq (%rax,%rcx,8), %rsi
leaq 0xec8c2(%rip), %rdi     # 0x12e7d0
callq 0x8b00
cmpl $0x0, %eax
jne 0x41f1a
jmp 0x41f2a
jmp 0x41f1c
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x41eee
movl -0x4(%rbp), %eax
movl %eax, -0x8c(%rbp)
testl %eax, %eax
je 0x41f4d
jmp 0x41f39
movl -0x8c(%rbp), %eax
subl $0x1, %eax
je 0x42163
jmp 0x42243
movswl -0xc(%rbp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0x98(%rbp)
subl $0x16, %eax
ja 0x4215c
movq -0x98(%rbp), %rax
leaq 0x98aac(%rip), %rcx     # 0xdaa20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x51, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x4e, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x54, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x51, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x54, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x54, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x54, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x4e, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x4215e
jmp 0x4215e
jmp 0x42245
movswl -0xc(%rbp), %eax
movl %eax, -0x9c(%rbp)
subl $0x4, %eax
je 0x42191
jmp 0x42174
movl -0x9c(%rbp), %eax
subl $0xb, %eax
je 0x421cb
jmp 0x42181
movl -0x9c(%rbp), %eax
subl $0x1a, %eax
je 0x42205
jmp 0x4223f
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x51, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x42241
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x52, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x42241
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x53, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x26af0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0xa10(%rax)
jmp 0x42241
jmp 0x42241
jmp 0x42245
jmp 0x42245
jmp 0x42247
movq -0x88(%rbp), %rax
cmpl $0x0, 0x9fc(%rax)
jle 0x422a8
movq -0x88(%rbp), %rax
movl 0x9fc(%rax), %ecx
subl $0x3, %ecx
movl %ecx, 0x9fc(%rax)
movq -0x88(%rbp), %rax
cmpl $-0x1, 0xa10(%rax)
je 0x422a3
movq -0x88(%rbp), %rax
movl 0xa10(%rax), %edi
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
callq 0x271d0
jmp 0x42e58
movq -0x88(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x88(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x88(%rbp), %rax
movw 0x7ec(%rax), %ax
movw %ax, -0x1a(%rbp)
movq -0x88(%rbp), %rax
movl 0x9b4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x88(%rbp), %rax
movl 0x9b8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x88(%rbp), %rax
movw 0xa04(%rax), %ax
movw %ax, -0x18(%rbp)
movq -0x88(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movsbl 0x980(%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x42358
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x30(%rbp)
cltq
cmpq $0x0, %rax
jle 0x42358
movslq -0x30(%rbp), %rax
cmpq $0x2000, %rax           # imm = 0x2000
jge 0x42358
movq -0x88(%rbp), %rax
movw $0x2, 0x2(%rax)
movq -0x88(%rbp), %rax
movw $0x20, 0x6(%rax)
jmp 0x4238d
movq -0x88(%rbp), %rax
movswl 0x2(%rax), %eax
cmpl $0x8, %eax
je 0x4238b
movq -0x88(%rbp), %rax
movw $0x8, 0x2(%rax)
movq -0x88(%rbp), %rax
movw 0x8(%rax), %cx
movq -0x88(%rbp), %rax
movw %cx, 0x6(%rax)
jmp 0x4238d
movslq -0x20(%rbp), %rax
cmpq $0x0, %rax
jne 0x42502
movslq -0x24(%rbp), %rax
cmpq $0x0, %rax
jne 0x42502
movq -0x88(%rbp), %rax
movswq -0x18(%rbp), %rcx
cmpb $0x0, 0x980(%rax,%rcx)
je 0x4245c
movw $0x0, -0xc(%rbp)
movswl -0xc(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0x9f8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x42429
movq -0x88(%rbp), %rax
movswq -0xc(%rbp), %rcx
movw 0x9bc(%rax,%rcx,2), %ax
movw %ax, -0x14(%rbp)
movswq -0x14(%rbp), %rcx
leaq 0x1ffddd(%rip), %rax    # 0x2421e0
movq (%rax,%rcx,8), %rax
movswl 0x22(%rax), %eax
cmpl $0x0, %eax
je 0x42419
movswl -0x14(%rbp), %edi
callq 0x39e20
jmp 0x4241b
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x423c9
movq -0x88(%rbp), %rax
movl 0xa00(%rax), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x9fc(%rax)
movq -0x88(%rbp), %rax
movw $0x0, (%rax)
movq -0x88(%rbp), %rax
movw $0x0, 0x4(%rax)
movq -0x88(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movl 0x7f0(%rax,%rcx,4), %eax
subl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x88(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movl 0x8b8(%rax,%rcx,4), %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x69950
movw %ax, %cx
movq -0x88(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x88(%rbp), %rax
movw $0x8, 0x2(%rax)
movl -0x20(%rbp), %ecx
movl %ecx, %eax
negl %eax
cmovnsl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x9b4(%rax)
movl -0x24(%rbp), %ecx
movl %ecx, %eax
negl %eax
cmovnsl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x9b8(%rax)
movq -0x88(%rbp), %rax
movl 0x9b4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x88(%rbp), %rax
movl 0x9b8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x88(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x6(%rbp)
movq -0x88(%rbp), %rax
movw 0x2(%rax), %ax
movw %ax, -0x8(%rbp)
movswl -0x6(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4255a
movswl -0x6(%rbp), %eax
addl $0x3, %eax
movw %ax, -0x6(%rbp)
movswl -0x6(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jle 0x4254a
movw -0x8(%rbp), %ax
movw %ax, -0x6(%rbp)
movw -0x6(%rbp), %cx
movq -0x88(%rbp), %rax
movw %cx, (%rax)
jmp 0x42595
movswl -0x6(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jle 0x42593
movswl -0x6(%rbp), %eax
subl $0x3, %eax
movw %ax, -0x6(%rbp)
movswl -0x6(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jge 0x42585
movw -0x8(%rbp), %ax
movw %ax, -0x6(%rbp)
movw -0x6(%rbp), %cx
movq -0x88(%rbp), %rax
movw %cx, (%rax)
jmp 0x42595
movq -0x88(%rbp), %rax
movw 0x4(%rax), %ax
movw %ax, -0x14(%rbp)
movq -0x88(%rbp), %rax
movw 0x6(%rax), %ax
movw %ax, -0x16(%rbp)
movswl -0x14(%rbp), %eax
movswl -0x16(%rbp), %ecx
cmpl %ecx, %eax
jle 0x425f2
movswl -0x6(%rbp), %ecx
movswl -0x14(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x14(%rbp)
movswl -0x14(%rbp), %eax
movswl -0x16(%rbp), %ecx
cmpl %ecx, %eax
jg 0x425e1
movw -0x16(%rbp), %ax
movw %ax, -0x14(%rbp)
movw -0x14(%rbp), %cx
movq -0x88(%rbp), %rax
movw %cx, 0x4(%rax)
jmp 0x42631
movswl -0x14(%rbp), %eax
movswl -0x16(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4262f
movswl -0x6(%rbp), %ecx
movswl -0x14(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x14(%rbp)
movswl -0x14(%rbp), %eax
movswl -0x16(%rbp), %ecx
cmpl %ecx, %eax
jle 0x42620
movw -0x16(%rbp), %ax
movw %ax, -0x14(%rbp)
movw -0x14(%rbp), %cx
movq -0x88(%rbp), %rax
movw %cx, 0x4(%rax)
jmp 0x42631
movq -0x88(%rbp), %rax
movw 0xa(%rax), %ax
movw %ax, -0xa(%rbp)
movw %ax, -0x12(%rbp)
movswl -0xa(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0xc(%rcx), %ecx
cmpl %ecx, %eax
je 0x4267c
movq -0x88(%rbp), %rax
movw 0xc(%rax), %cx
movq -0x88(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x88(%rbp), %rax
movw 0xa(%rax), %ax
movw %ax, -0xa(%rbp)
movswl -0x14(%rbp), %eax
imull $0x3, %eax, %eax
movswl -0xa(%rbp), %ecx
addl $0xa00, %ecx            # imm = 0xA00
andl $0x7ff, %ecx            # imm = 0x7FF
movslq %ecx, %rdx
leaq 0x5864e3(%rip), %rcx    # 0x5c8b80
movswl (%rcx,%rdx,2), %ecx
imull %ecx, %eax
sarl $0x3, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
sarl $0xd, %eax
movl %eax, -0x3c(%rbp)
movswl -0x14(%rbp), %eax
imull $0x3, %eax, %eax
movswl -0xa(%rbp), %ecx
addl $0x800, %ecx            # imm = 0x800
andl $0x7ff, %ecx            # imm = 0x7FF
movslq %ecx, %rdx
leaq 0x5864ac(%rip), %rcx    # 0x5c8b80
movswl (%rcx,%rdx,2), %ecx
imull %ecx, %eax
sarl $0x3, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
sarl $0xd, %eax
movl %eax, -0x44(%rbp)
movslq -0x3c(%rbp), %rcx
movq %rcx, %rax
negq %rax
cmovnsq %rax, %rcx
movslq -0x20(%rbp), %rax
subq %rcx, %rax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rax
cmpq $0x0, %rax
jge 0x42772
movslq -0x3c(%rbp), %rax
cmpq $0x0, %rax
jge 0x42723
movl -0x20(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x4272c
movl -0x20(%rbp), %eax
addl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x88(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movl 0x7f0(%rax,%rcx,4), %edi
subl -0x28(%rbp), %edi
movq -0x88(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movl 0x8b8(%rax,%rcx,4), %esi
subl -0x2c(%rbp), %esi
callq 0x69950
movw %ax, %cx
movq -0x88(%rbp), %rax
movw %cx, 0xc(%rax)
movslq -0x44(%rbp), %rcx
movq %rcx, %rax
negq %rax
cmovnsq %rax, %rcx
movslq -0x24(%rbp), %rax
subq %rcx, %rax
movl %eax, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq $0x0, %rax
jge 0x427fa
movslq -0x44(%rbp), %rax
cmpq $0x0, %rax
jge 0x427ab
movl -0x24(%rbp), %ecx
movl -0x44(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x44(%rbp)
jmp 0x427b4
movl -0x24(%rbp), %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x88(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movl 0x7f0(%rax,%rcx,4), %edi
subl -0x28(%rbp), %edi
movq -0x88(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movl 0x8b8(%rax,%rcx,4), %esi
subl -0x2c(%rbp), %esi
callq 0x69950
movw %ax, %cx
movq -0x88(%rbp), %rax
movw %cx, 0xc(%rax)
movslq -0x20(%rbp), %rax
cmpq $0x0, %rax
jne 0x428bd
movslq -0x24(%rbp), %rax
cmpq $0x0, %rax
jne 0x428bd
movw -0x1a(%rbp), %cx
movq -0x88(%rbp), %rax
movw %cx, 0xa04(%rax)
movswl -0x1a(%rbp), %eax
incl %eax
movq -0x88(%rbp), %rcx
movswl 0x7ee(%rcx), %ecx
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x1a(%rbp)
movw -0x1a(%rbp), %cx
movq -0x88(%rbp), %rax
movw %cx, 0x7ec(%rax)
movl -0x4(%rbp), %eax
testl %eax, %eax
jne 0x428b9
jmp 0x42861
leaq 0xebf68(%rip), %rdi     # 0x12e7d0
leaq 0x9830d(%rip), %rsi     # 0xdab7c
callq 0x8b00
cmpl $0x0, %eax
je 0x42891
leaq 0xebf50(%rip), %rdi     # 0x12e7d0
leaq 0x982ff(%rip), %rsi     # 0xdab86
callq 0x8b00
cmpl $0x0, %eax
jne 0x428b7
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x50, %edi
xorl %ecx, %ecx
movl $0x60, %r8d
callq 0x26af0
jmp 0x428bb
jmp 0x428bb
jmp 0x428bd
movl -0x20(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x9b4(%rax)
movl -0x24(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x9b8(%rax)
movl -0x3c(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x44(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x88(%rbp), %rax
movw 0x18(%rax), %ax
movw %ax, -0xe(%rbp)
movw $0x0, -0xc(%rbp)
movswl -0xc(%rbp), %eax
movswl -0xe(%rbp), %ecx
cmpl %ecx, %eax
jge 0x429a0
movq -0x88(%rbp), %rax
movswq -0xc(%rbp), %rcx
movw 0x1a(%rax,%rcx,2), %ax
movw %ax, -0x10(%rbp)
movq -0x88(%rbp), %rax
movswq -0xc(%rbp), %rcx
movl 0x1ac(%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movq -0x88(%rbp), %rax
movswq -0xc(%rbp), %rcx
movl 0x4cc(%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %edi
movl -0x2c(%rbp), %esi
movl -0x28(%rbp), %edx
subl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
leaq -0x30(%rbp), %r9
leaq -0x34(%rbp), %rax
movswl -0xa(%rbp), %r8d
movq %rax, (%rsp)
callq 0x70640
movw -0x10(%rbp), %ax
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %edx
movswl %ax, %edi
callq 0x6d260
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x42904
movl -0x28(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x2c(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x14(%rax)
movswl -0xa(%rbp), %eax
movswl -0x12(%rbp), %ecx
subl %ecx, %eax
addl $0x800, %eax            # imm = 0x800
andl $0x7ff, %eax            # imm = 0x7FF
movw %ax, -0x12(%rbp)
movq -0x88(%rbp), %rax
movw 0x9f8(%rax), %ax
movw %ax, -0xe(%rbp)
movl $0x7fffffff, -0x4c(%rbp) # imm = 0x7FFFFFFF
movl $0x7fffffff, -0x48(%rbp) # imm = 0x7FFFFFFF
movl $0x80000001, -0x54(%rbp) # imm = 0x80000001
movl $0x80000001, -0x50(%rbp) # imm = 0x80000001
movw $0x0, -0xc(%rbp)
movswl -0xc(%rbp), %eax
cmpl $0x4, %eax
jge 0x42afa
movq -0x88(%rbp), %rax
movswq -0xc(%rbp), %rcx
movw 0xa06(%rax,%rcx,2), %ax
movw %ax, -0x6(%rbp)
movswq -0x6(%rbp), %rcx
leaq 0x2077a9(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
cmpl -0x48(%rbp), %eax
jge 0x42a59
movswq -0x6(%rbp), %rcx
leaq 0x207792(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movl %eax, -0x48(%rbp)
jmp 0x42a87
movswq -0x6(%rbp), %rcx
leaq 0x20777b(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
cmpl -0x50(%rbp), %eax
jle 0x42a85
movswq -0x6(%rbp), %rcx
leaq 0x207764(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0x42a87
movswq -0x6(%rbp), %rcx
leaq 0x20774d(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
cmpl -0x4c(%rbp), %eax
jge 0x42ab7
movswq -0x6(%rbp), %rcx
leaq 0x207735(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x42ae7
movswq -0x6(%rbp), %rcx
leaq 0x20771d(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
cmpl -0x54(%rbp), %eax
jle 0x42ae5
movswq -0x6(%rbp), %rcx
leaq 0x207705(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x42ae7
jmp 0x42ae9
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x42a06
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x8410
movw $0x0, -0xc(%rbp)
movswl -0xc(%rbp), %eax
movswl -0xe(%rbp), %ecx
cmpl %ecx, %eax
jge 0x42d2c
movq -0x88(%rbp), %rax
movswq -0xc(%rbp), %rcx
movswq 0x9bc(%rax,%rcx,2), %rcx
leaq 0x563804(%rip), %rax    # 0x5a6340
movw (%rax,%rcx,2), %ax
movw %ax, -0x10(%rbp)
movswl -0x10(%rbp), %eax
cmpl $0x0, %eax
jl 0x42c0f
movswq -0x10(%rbp), %rcx
leaq 0x56d7f3(%rip), %rax    # 0x5b0350
movw (%rax,%rcx,2), %ax
movw %ax, -0x14(%rbp)
movswq -0x10(%rbp), %rcx
leaq 0x13766f(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movswq -0x10(%rbp), %rcx
leaq 0x13765a(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x3c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x44(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %edi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movl -0x34(%rbp), %ecx
movw -0x12(%rbp), %r8w
movswq -0x10(%rbp), %r9
leaq 0x137621(%rip), %rax    # 0x17a1e0
movq (%rax,%r9,8), %r9
movswq -0x10(%rbp), %r10
leaq 0x137611(%rip), %rax    # 0x17a1e0
movq (%rax,%r10,8), %rax
addq $0x4, %rax
movswl %r8w, %r8d
movq %rax, (%rsp)
callq 0x70640
movswl -0x12(%rbp), %edx
movswq -0x10(%rbp), %rcx
leaq 0x1375ec(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x1c(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1c(%rax)
movw -0x14(%rbp), %ax
movw %ax, -0x10(%rbp)
jmp 0x42b44
leaq 0x76233a(%rip), %rax    # 0x7a4f50
movl (%rax), %eax
movw %ax, -0x10(%rbp)
movswl -0x10(%rbp), %eax
cmpl $0x0, %eax
jl 0x42d19
movswq -0x10(%rbp), %rcx
leaq 0xeac1b(%rip), %rax     # 0x12d850
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movswq -0x10(%rbp), %rcx
leaq 0xeac49(%rip), %rax     # 0x12d890
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movswq -0x10(%rbp), %rcx
leaq 0xeba87(%rip), %rax     # 0x12e6e0
movswl (%rax,%rcx,2), %eax
movq -0x88(%rbp), %rcx
movswq -0xc(%rbp), %rdx
movswl 0x9bc(%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jne 0x42cff
movl -0x3c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x44(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %edi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movl -0x34(%rbp), %ecx
movw -0x12(%rbp), %r8w
movswq -0x10(%rbp), %rax
leaq 0xeaba8(%rip), %r9      # 0x12d850
shlq $0x2, %rax
addq %rax, %r9
movswq -0x10(%rbp), %r10
leaq 0xeabd5(%rip), %rax     # 0x12d890
shlq $0x2, %r10
addq %r10, %rax
movswl %r8w, %r8d
movq %rax, (%rsp)
callq 0x70640
movswl -0x12(%rbp), %edx
movswq -0x10(%rbp), %rcx
leaq 0xeab51(%rip), %rax     # 0x12d830
movswl (%rax,%rcx,2), %eax
addl %edx, %eax
movw %ax, %dx
leaq 0xeab41(%rip), %rax     # 0x12d830
movw %dx, (%rax,%rcx,2)
movswq -0x10(%rbp), %rax
movw $0x1, -0x80(%rbp,%rax,2)
jmp 0x42d01
movswq -0x10(%rbp), %rcx
leaq 0x762253(%rip), %rax    # 0x7a4f60
movl (%rax,%rcx,4), %eax
movw %ax, -0x10(%rbp)
jmp 0x42c1c
jmp 0x42d1b
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x42b10
leaq 0x76221d(%rip), %rax    # 0x7a4f50
movl (%rax), %eax
movw %ax, -0x10(%rbp)
movswl -0x10(%rbp), %eax
cmpl $0x0, %eax
jl 0x42e22
movswq -0x10(%rbp), %rax
cmpw $0x0, -0x80(%rbp,%rax,2)
je 0x42d58
jmp 0x42e0a
movswq -0x10(%rbp), %rcx
leaq 0xeaaec(%rip), %rax     # 0x12d850
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movswq -0x10(%rbp), %rcx
leaq 0xeab1a(%rip), %rax     # 0x12d890
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x48(%rbp), %eax
jle 0x42e08
movl -0x30(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x42e08
movl -0x34(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jle 0x42e08
movl -0x34(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x42e08
movswq -0x10(%rbp), %rcx
leaq 0xeab64(%rip), %rax     # 0x12d910
cmpl $0x0, (%rax,%rcx,4)
jle 0x42e06
movswq -0x10(%rbp), %rcx
leaq 0xeab12(%rip), %rax     # 0x12d8d0
cmpl $0xffffcc00, (%rax,%rcx,4) # imm = 0xFFFFCC00
jle 0x42e06
movl $0xffffd8f1, %esi       # imm = 0xFFFFD8F1
movswl -0x10(%rbp), %edi
callq 0x9d40
movl $0xffffff9c, %esi       # imm = 0xFFFFFF9C
movswl -0x10(%rbp), %edi
callq 0x9f70
leaq 0x135536(%rip), %rax    # 0x178320
cmpl $0x0, (%rax)
je 0x42e04
movswq -0x10(%rbp), %rcx
leaq 0xeb915(%rip), %rax     # 0x12e710
movswl (%rax,%rcx,2), %edi
callq 0x14490
jmp 0x42e06
jmp 0x42e08
jmp 0x42e0a
movswq -0x10(%rbp), %rcx
leaq 0x76214a(%rip), %rax    # 0x7a4f60
movl (%rax,%rcx,4), %eax
movw %ax, -0x10(%rbp)
jmp 0x42d39
movq -0x88(%rbp), %rax
cmpl $-0x1, 0xa10(%rax)
je 0x42e58
movq -0x88(%rbp), %rax
movl 0xa10(%rax), %edi
movq -0x88(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x88(%rbp), %rax
movl 0x14(%rax), %edx
callq 0x271d0
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)