// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edi, %r12d
movslq %edi, %rax
leaq 0x2f4ded(%rip), %rcx    # 0x3223c0
movq (%rcx,%rax,8), %r13
movl 0xa10(%r13), %edi
cmpl $-0x1, %edi
jne 0x2d6b8
xorl %r14d, %r14d
leaq 0xa501f(%rip), %r15     # 0xd2610
leaq 0xb8218(%rip), %rbx     # 0xe5810
movq (%r15,%r14,8), %rsi
movq %rbx, %rdi
callq 0x8bc0
testl %eax, %eax
je 0x2d616
incq %r14
cmpq $0x20, %r14
jne 0x2d5f8
movw $0x20, %r14w
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmpl $0x1, %r12d
je 0x2d650
testl %r12d, %r12d
jne 0x2d6b8
movzwl %r14w, %ecx
movl $0x51, %eax
cmpl $0x10, %ecx
jle 0x2d66c
addl $-0x11, %ecx
cmpl $0x9, %ecx
ja 0x2d6b8
leaq 0x63549(%rip), %rdx     # 0x90b90
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpw $0x4, %r14w
je 0x2d689
movzwl %r14w, %eax
cmpl $0x1a, %eax
je 0x2d682
cmpl $0xb, %eax
jne 0x2d6b8
movl $0x52, %eax
jmp 0x2d695
cmpl $0x4, %ecx
je 0x2d695
cmpl $0x8, %ecx
je 0x2d690
cmpl $0xb, %ecx
jne 0x2d6b8
movl $0x54, %eax
jmp 0x2d695
movl $0x53, %eax
jmp 0x2d695
movl $0x51, %eax
jmp 0x2d695
movl $0x4e, %eax
movl 0x10(%r13), %esi
movl 0x14(%r13), %edx
movl %eax, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x1c370
movl %eax, %edi
movl %eax, 0xa10(%r13)
movl 0x9fc(%r13), %eax
testl %eax, %eax
jle 0x2d6f1
addl $-0x3, %eax
movl %eax, 0x9fc(%r13)
cmpl $-0x1, %edi
je 0x2de02
movl 0x10(%r13), %esi
movl 0x14(%r13), %edx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c624
movzwl 0x7ec(%r13), %ebx
movl 0x9b4(%r13), %r8d
movl 0x9b8(%r13), %r14d
movswq %bx, %rax
movq %rax, 0x28(%rsp)
cmpb $0x0, 0x980(%r13,%rax)
je 0x2d741
leal (%r14,%r8), %eax
movl %eax, 0x14(%rsp)
leal (%r14,%r8), %eax
decl %eax
cmpl $0x1ffe, %eax           # imm = 0x1FFE
ja 0x2d741
movw $0x2, 0x2(%r13)
movw $0x2, %ax
movw $0x20, %cx
jmp 0x2d75d
movw $0x8, %ax
cmpw $0x8, 0x2(%r13)
je 0x2d762
movw $0x8, 0x2(%r13)
movzwl 0x8(%r13), %ecx
movw $0x8, %ax
movw %cx, 0x6(%r13)
movl 0x10(%r13), %ebp
movl 0x14(%r13), %r15d
movl %r8d, %ecx
orl %r14d, %ecx
jne 0x2d861
movw %bx, 0x18(%rsp)
movl %r12d, 0x24(%rsp)
movl %r15d, 0x1c(%rsp)
movswq 0xa04(%r13), %rax
cmpb $0x0, 0x980(%r13,%rax)
je 0x2d7f8
movzwl 0x9f8(%r13), %eax
testw %ax, %ax
jle 0x2d7de
xorl %ebx, %ebx
leaq 0x1cba82(%rip), %r14    # 0x1f9230
movswq 0x9bc(%r13,%rbx,2), %rcx
movq (%r14,%rcx,8), %rdx
cmpw $0x0, 0x22(%rdx)
je 0x2d7d2
movswl %cx, %edi
callq 0x27c8c
movzwl 0x9f8(%r13), %eax
incq %rbx
movswq %ax, %rcx
cmpq %rcx, %rbx
jl 0x2d7ae
movl 0xa00(%r13), %eax
movl %eax, 0x9fc(%r13)
xorl %eax, %eax
movw %ax, (%r13)
movw %ax, 0x4(%r13)
movq 0x28(%rsp), %rax
movl 0x7f0(%r13,%rax,4), %r15d
movl 0x8b8(%r13,%rax,4), %r12d
subl %ebp, %r15d
movl 0x1c(%rsp), %ebx
subl %ebx, %r12d
movl %r15d, %edi
movl %r12d, %esi
callq 0x48943
movw %ax, 0xc(%r13)
movl %r15d, %r8d
negl %r8d
cmovsl %r15d, %r8d
movw $0x8, 0x2(%r13)
movl %r8d, 0x9b4(%r13)
movl %r12d, %r14d
negl %r14d
cmovsl %r12d, %r14d
movl %ebx, %r15d
movl %r14d, 0x9b8(%r13)
movw $0x8, %ax
movl 0x24(%rsp), %r12d
movzwl 0x18(%rsp), %ebx
movzwl (%r13), %ecx
cmpw %ax, %cx
jge 0x2d876
addl $0x3, %ecx
cmpw %ax, %cx
cmovgel %eax, %ecx
jmp 0x2d881
jbe 0x2d886
addl $-0x3, %ecx
cmpw %ax, %cx
cmovbel %eax, %ecx
movw %cx, (%r13)
movzwl 0x4(%r13), %eax
movzwl 0x6(%r13), %edx
cmpw %dx, %ax
jle 0x2d89f
subl %ecx, %eax
cmpw %dx, %ax
cmovlel %edx, %eax
jmp 0x2d8a9
jge 0x2d8ae
addl %ecx, %eax
cmpw %dx, %ax
cmovgel %edx, %eax
movw %ax, 0x4(%r13)
movzwl 0xa(%r13), %esi
movzwl 0xc(%r13), %ecx
movl %esi, %edx
movl %esi, 0x40(%rsp)
cmpw %cx, %si
je 0x2d8ca
movw %cx, 0xa(%r13)
movl %ecx, %edx
movl %edx, 0x30(%rsp)
cwtl
leal (%rax,%rax,2), %eax
movzwl %dx, %ecx
leal 0x200(%rcx), %edx
movl $0x7ff, %esi            # imm = 0x7FF
andl %esi, %edx
leaq 0x5522e7(%rip), %rdi    # 0x57fbd0
movswl (%rdi,%rdx,2), %edx
imull %eax, %edx
sarl $0x10, %edx
andl %esi, %ecx
movswl (%rdi,%rcx,2), %ecx
imull %eax, %ecx
sarl $0x10, %ecx
movl %ecx, 0x18(%rsp)
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
subl %eax, %r8d
js 0x2d915
movl %edx, 0x1c(%rsp)
jmp 0x2d94d
movl %r8d, %eax
negl %eax
testl %edx, %edx
cmovnsl %r8d, %eax
addl %eax, %edx
movl %edx, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movl 0x7f0(%r13,%rax,4), %edi
movl 0x8b8(%r13,%rax,4), %esi
subl %ebp, %edi
subl %r15d, %esi
callq 0x48943
movw %ax, 0xc(%r13)
xorl %r8d, %r8d
movl 0x18(%rsp), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
subl %eax, %r14d
jns 0x2d99b
movl %r14d, %eax
negl %eax
testl %ecx, %ecx
cmovnsl %r14d, %eax
addl %eax, %ecx
movl %ecx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movl 0x7f0(%r13,%rax,4), %edi
movl 0x8b8(%r13,%rax,4), %esi
subl %ebp, %edi
subl %r15d, %esi
movq %r8, %r14
callq 0x48943
movq %r14, %r8
movw %ax, 0xc(%r13)
xorl %r14d, %r14d
movl %r14d, %eax
orl %r8d, %eax
jne 0x2da19
movswl %bx, %eax
movw %bx, 0xa04(%r13)
incl %eax
movswl 0x7ee(%r13), %ecx
cltd
idivl %ecx
movw %dx, 0x7ec(%r13)
testl %r12d, %r12d
jne 0x2da19
leaq 0xb7e41(%rip), %rdi     # 0xe5810
leaq 0x632f2(%rip), %rsi     # 0x90cc8
movq %r8, %rbx
callq 0x8bc0
testl %eax, %eax
je 0x2d9fc
leaq 0xb7e27(%rip), %rdi     # 0xe5810
leaq 0x632e2(%rip), %rsi     # 0x90cd2
callq 0x8bc0
movq %rbx, %r8
testl %eax, %eax
jne 0x2da19
movl 0x10(%r13), %esi
movl 0x14(%r13), %edx
movl $0x50, %edi
xorl %ecx, %ecx
movl $0x60, %r8d
callq 0x1c370
movq %rbx, %r8
movl %r8d, 0x9b4(%r13)
movl %r14d, 0x9b8(%r13)
addl 0x1c(%rsp), %ebp
addl 0x18(%rsp), %r15d
movswq 0x18(%r13), %r14
testq %r14, %r14
movq %r13, %rbx
jle 0x2daa5
xorl %r13d, %r13d
movswl 0x30(%rsp), %eax
movl %eax, 0x28(%rsp)
movswl 0x1a(%rbx,%r13,2), %r12d
movl 0x1ac(%rbx,%r13,4), %eax
movl %eax, 0x14(%rsp)
movl 0x4cc(%rbx,%r13,4), %esi
movl %esi, 0x20(%rsp)
movl %ebp, %edx
subl %eax, %edx
movl %r15d, %ecx
subl %esi, %ecx
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl %ebp, %edi
movl %r15d, %esi
movl 0x28(%rsp), %r8d
leaq 0x14(%rsp), %r9
callq 0x4d172
movl 0x14(%rsp), %esi
movl 0x20(%rsp), %edx
movl %r12d, %edi
callq 0x4ab97
incq %r13
cmpq %r13, %r14
jne 0x2da49
movl %ebp, 0x24(%rsp)
movl %ebp, 0x10(%rbx)
movl %r15d, 0x14(%rbx)
movl 0x30(%rsp), %r9d
subl 0x40(%rsp), %r9d
movzwl 0x9f8(%rbx), %eax
movq %rax, 0x40(%rsp)
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movl $0x80000001, %r11d      # imm = 0x80000001
xorl %eax, %eax
leaq 0x1d3755(%rip), %rcx    # 0x201230
movl $0x80000001, %ebp       # imm = 0x80000001
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq %rbx, %r13
movl %r15d, %r12d
movl %ebp, %edx
movl %r11d, %esi
movswq 0xa06(%r13,%rax,2), %rdi
movq (%rcx,%rdi,8), %rdi
movl (%rdi), %r8d
cmpl %ebp, %r8d
cmovgl %r8d, %ebp
cmpl %r14d, %r8d
cmovll %r8d, %r14d
cmovll %edx, %ebp
movl 0x4(%rdi), %edx
cmpl %r11d, %edx
cmovgl %edx, %r11d
cmpl %r10d, %edx
cmovll %edx, %r10d
cmovll %esi, %r11d
incq %rax
cmpq $0x4, %rax
jne 0x2daec
movl %r14d, 0x4c(%rsp)
movl %ebp, 0x48(%rsp)
movl %r11d, 0x38(%rsp)
movl %r10d, 0x3c(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
cmpw $0x0, 0x40(%rsp)
movq %r13, 0x30(%rsp)
jle 0x2dce3
andl $0x7ff, %r9d            # imm = 0x7FF
xorl %edi, %edi
leaq 0x53982f(%rip), %r8     # 0x5673a0
leaq 0x1036b8(%rip), %rdx    # 0x131230
movzwl %r9w, %r14d
movl 0x18(%rsp), %ebp
movq %rdi, 0x28(%rsp)
movswq 0x9bc(%r13,%rdi,2), %rax
leaq 0x52f7fb(%rip), %rcx    # 0x55d390
movzwl (%rcx,%rax,2), %ebx
testw %bx, %bx
movl %r12d, %r15d
movl 0x24(%rsp), %r12d
js 0x2dbfa
movzwl %bx, %r13d
movzwl (%r8,%r13,2), %ebx
movq (%rdx,%r13,8), %r9
leaq 0x4(%r9), %rax
movl (%r9), %edx
addl 0x1c(%rsp), %edx
movl 0x4(%r9), %ecx
addl %ebp, %ecx
movl %edx, 0x14(%rsp)
movl %ecx, 0x20(%rsp)
movq %rax, (%rsp)
movl %r12d, %edi
movl %r15d, %esi
movl %r14d, %r8d
callq 0x4d172
leaq 0x10364b(%rip), %rdx    # 0x131230
leaq 0x5397b4(%rip), %r8     # 0x5673a0
movq (%rdx,%r13,8), %rax
addw %r14w, 0x1c(%rax)
testw %bx, %bx
jns 0x2dba6
leaq 0x777f2f(%rip), %rax    # 0x7a5b30
movl (%rax), %ebx
testw %bx, %bx
movq 0x30(%rsp), %r13
movl %r15d, %r12d
movl 0x1c(%rsp), %r15d
movq 0x28(%rsp), %rdi
leaq 0xb68b1(%rip), %r9      # 0xe44d0
leaq 0xb68ea(%rip), %r10     # 0xe4510
js 0x2dcce
andl $0x7fff, %ebx           # imm = 0x7FFF
movl %ebx, %eax
shll $0x2, %eax
movl (%r9,%rax), %edx
movl %edx, 0x14(%rsp)
movl (%r10,%rax), %ecx
movl %ecx, 0x20(%rsp)
leaq 0xb7ad2(%rip), %rsi     # 0xe5720
movzwl (%rsi,%rbx,2), %esi
cmpw 0x9bc(%r13,%rdi,2), %si
jne 0x2dcbb
leaq 0xb686c(%rip), %rsi     # 0xe44d0
leaq (%rsi,%rax), %r9
addq %r10, %rax
addl %r15d, %edx
movl %edx, 0x14(%rsp)
addl %ebp, %ecx
movl %ecx, 0x20(%rsp)
movq %rax, (%rsp)
movl 0x24(%rsp), %edi
movl %r12d, %esi
movl %r14d, %r8d
callq 0x4d172
leaq 0xb687e(%rip), %r10     # 0xe4510
leaq 0xb6837(%rip), %r9      # 0xe44d0
leaq 0x539700(%rip), %r8     # 0x5673a0
movq 0x28(%rsp), %rdi
leal (%rbx,%rbx), %eax
leaq 0xb6801(%rip), %rcx     # 0xe44b0
addw %r14w, (%rcx,%rax)
movw $0x1, 0x50(%rsp,%rax)
leaq 0x777e7e(%rip), %rax    # 0x7a5b40
movl (%rax,%rbx,4), %ebx
testw %bx, %bx
jns 0x2dc2c
incq %rdi
cmpq 0x40(%rsp), %rdi
leaq 0x103553(%rip), %rdx    # 0x131230
jne 0x2db80
leaq 0x777e46(%rip), %rax    # 0x7a5b30
movl (%rax), %eax
testw %ax, %ax
movl 0x3c(%rsp), %ebx
movl 0x38(%rsp), %ebp
js 0x2dde7
leaq 0xb67cc(%rip), %rdi     # 0xe44d0
leaq 0xb6805(%rip), %r8      # 0xe4510
leaq 0xb687e(%rip), %rsi     # 0xe4590
leaq 0x777e27(%rip), %r13    # 0x7a5b40
movl %eax, %r12d
andl $0x7fff, %r12d          # imm = 0x7FFF
cmpw $0x0, 0x50(%rsp,%r12,2)
je 0x2dd3b
movl (%r13,%r12,4), %eax
testw %ax, %ax
jns 0x2dd19
jmp 0x2dde7
leal (,%r12,4), %ecx
movl (%rdi,%rcx), %edx
movl %edx, 0x14(%rsp)
movl (%r8,%rcx), %ecx
movl %ecx, 0x20(%rsp)
cmpl 0x4c(%rsp), %edx
jle 0x2dd2c
cmpl 0x48(%rsp), %edx
jge 0x2dd2c
cmpl %ebx, %ecx
jle 0x2dd2c
cmpl %ebp, %ecx
jge 0x2dd2c
cmpl $0x0, (%rsi,%r12,4)
jle 0x2dd2c
leaq 0xb67dc(%rip), %rcx     # 0xe4550
cmpl $0xffffcc01, (%rcx,%r12,4) # imm = 0xFFFFCC01
jl 0x2dd2c
movswl %ax, %ebp
movl %ebp, %edi
movq %rsi, %r14
movl $0xffffd8f1, %esi       # imm = 0xFFFFD8F1
movq %r8, %r15
callq 0xa5e8
movl %ebp, %edi
movl 0x38(%rsp), %ebp
movl 0x3c(%rsp), %ebx
movl $0xffffff9c, %esi       # imm = 0xFFFFFF9C
callq 0xa723
movq %r15, %r8
leaq 0xb671f(%rip), %rdi     # 0xe44d0
movq %r14, %rsi
leaq 0x1015a5(%rip), %rax    # 0x12f360
cmpl $0x0, (%rax)
je 0x2dd2c
leaq 0xb7985(%rip), %rax     # 0xe5750
movswl (%rax,%r12,2), %edi
callq 0x108e2
movq %r15, %r8
leaq 0xb66f1(%rip), %rdi     # 0xe44d0
movq %r14, %rsi
jmp 0x2dd2c
movq 0x30(%rsp), %rax
movl 0xa10(%rax), %edi
cmpl $-0x1, %edi
je 0x2de02
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
callq 0x1c624
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq