// File: /workspace/github_c_makefile_star2_O1/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 0x2f3095(%rip), %rcx    # 0x31f3a0
movq (%rcx,%rax,8), %r13
cmpl $-0x1, 0xa10(%r13)
jne 0x2c3e5
xorl %r14d, %r14d
leaq 0xa32e9(%rip), %r15     # 0xcf610
leaq 0xb64e2(%rip), %rbx     # 0xe2810
movq (%r15,%r14,8), %rsi
movq %rbx, %rdi
callq 0x8bc0
testl %eax, %eax
je 0x2c34c
incq %r14
cmpq $0x20, %r14
jne 0x2c32e
movw $0x20, %r14w
cmpl $0x1, %r12d
je 0x2c381
testl %r12d, %r12d
jne 0x2c3e5
movzwl %r14w, %eax
movl $0x51, %edi
cmpl $0x10, %eax
jle 0x2c39d
addl $-0x11, %eax
cmpl $0x9, %eax
ja 0x2c3e5
leaq 0x61648(%rip), %rcx     # 0x8d9c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpw $0x4, %r14w
je 0x2c3ba
movzwl %r14w, %eax
cmpl $0x1a, %eax
je 0x2c3b3
cmpl $0xb, %eax
jne 0x2c3e5
movl $0x52, %edi
jmp 0x2c3c6
cmpl $0x4, %eax
je 0x2c3c6
cmpl $0x8, %eax
je 0x2c3c1
cmpl $0xb, %eax
jne 0x2c3e5
movl $0x54, %edi
jmp 0x2c3c6
movl $0x53, %edi
jmp 0x2c3c6
movl $0x51, %edi
jmp 0x2c3c6
movl $0x4e, %edi
movl 0x10(%r13), %esi
movl 0x14(%r13), %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x80, %r8d
callq 0x1c1f1
movl %eax, 0xa10(%r13)
movl 0x9fc(%r13), %eax
testl %eax, %eax
jle 0x2c425
addl $-0x3, %eax
movl %eax, 0x9fc(%r13)
movl 0xa10(%r13), %edi
cmpl $-0x1, %edi
je 0x2cb2b
movl 0x10(%r13), %esi
movl 0x14(%r13), %edx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c4c0
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 0x2c471
leal (%r14,%r8), %eax
movl %eax, 0x14(%rsp)
leal (%r14,%r8), %eax
decl %eax
cmpl $0x1ffe, %eax           # imm = 0x1FFE
ja 0x2c471
movw $0x2, 0x2(%r13)
movw $0x20, %ax
jmp 0x2c485
cmpw $0x8, 0x2(%r13)
je 0x2c48a
movw $0x8, 0x2(%r13)
movzwl 0x8(%r13), %eax
movw %ax, 0x6(%r13)
movl 0x10(%r13), %ebp
movl 0x14(%r13), %r15d
movl %r8d, %eax
orl %r14d, %eax
jne 0x2c57f
movw %bx, 0x18(%rsp)
movl %r12d, 0x24(%rsp)
movl %r15d, 0x1c(%rsp)
movswq 0xa04(%r13), %rax
cmpb $0x0, 0x980(%r13,%rax)
je 0x2c51a
cmpw $0x0, 0x9f8(%r13)
jle 0x2c500
xorl %ebx, %ebx
leaq 0x1c9d3c(%rip), %r14    # 0x1f6210
movswq 0x9bc(%r13,%rbx,2), %rax
movq (%r14,%rax,8), %rcx
cmpw $0x0, 0x22(%rcx)
je 0x2c4f0
movswl %ax, %edi
callq 0x276ec
incq %rbx
movswq 0x9f8(%r13), %rax
cmpq %rax, %rbx
jl 0x2c4d4
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 0x469df
movw %ax, 0xc(%r13)
movw $0x8, 0x2(%r13)
movl %r15d, %r8d
negl %r8d
cmovsl %r15d, %r8d
movl %r8d, 0x9b4(%r13)
movl %r12d, %r14d
negl %r14d
cmovsl %r12d, %r14d
movl %ebx, %r15d
movl %r14d, 0x9b8(%r13)
movl 0x24(%rsp), %r12d
movzwl 0x18(%rsp), %ebx
movzwl (%r13), %eax
movzwl 0x2(%r13), %ecx
cmpw %cx, %ax
jge 0x2c599
addl $0x3, %eax
cmpw %cx, %ax
cmovgel %ecx, %eax
jmp 0x2c5a4
jle 0x2c5a9
addl $-0x3, %eax
cmpw %cx, %ax
cmovlel %ecx, %eax
movw %ax, (%r13)
movzwl 0x4(%r13), %ecx
movzwl 0x6(%r13), %edx
cmpw %dx, %cx
jle 0x2c5c2
subl %eax, %ecx
cmpw %dx, %cx
cmovlel %edx, %ecx
jmp 0x2c5cc
jge 0x2c5d1
addl %eax, %ecx
cmpw %dx, %cx
cmovgel %edx, %ecx
movw %cx, 0x4(%r13)
movzwl 0xa(%r13), %esi
movzwl 0xc(%r13), %eax
movl %esi, %edx
movl %esi, 0x40(%rsp)
cmpw %ax, %si
je 0x2c5ed
movw %ax, 0xa(%r13)
movl %eax, %edx
movl %edx, 0x30(%rsp)
movswl %cx, %eax
leal (%rax,%rax,2), %eax
movzwl %dx, %ecx
leal 0x200(%rcx), %edx
movl $0x7ff, %esi            # imm = 0x7FF
andl %esi, %edx
leaq 0x5505a2(%rip), %rdi    # 0x57cbb0
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 0x2c63a
movl %edx, 0x1c(%rsp)
jmp 0x2c672
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 0x469df
movw %ax, 0xc(%r13)
xorl %r8d, %r8d
movl 0x18(%rsp), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
subl %eax, %r14d
jns 0x2c6c0
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 0x469df
movq %r14, %r8
movw %ax, 0xc(%r13)
xorl %r14d, %r14d
movl %r14d, %eax
orl %r8d, %eax
jne 0x2c73e
movswl %bx, %eax
movw %bx, 0xa04(%r13)
incl %eax
movswl 0x7ee(%r13), %ecx
cltd
idivl %ecx
movw %dx, 0x7ec(%r13)
testl %r12d, %r12d
jne 0x2c73e
leaq 0xb611c(%rip), %rdi     # 0xe2810
leaq 0x61415(%rip), %rsi     # 0x8db10
movq %r8, %rbx
callq 0x8bc0
testl %eax, %eax
je 0x2c721
leaq 0xb6102(%rip), %rdi     # 0xe2810
leaq 0x61405(%rip), %rsi     # 0x8db1a
callq 0x8bc0
movq %rbx, %r8
testl %eax, %eax
jne 0x2c73e
movl 0x10(%r13), %esi
movl 0x14(%r13), %edx
movl $0x50, %edi
xorl %ecx, %ecx
movl $0x60, %r8d
callq 0x1c1f1
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 0x2c7ca
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 0x4b146
movl 0x14(%rsp), %esi
movl 0x20(%rsp), %edx
movl %r12d, %edi
callq 0x48e56
incq %r13
cmpq %r13, %r14
jne 0x2c76e
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 0x1d1a10(%rip), %rcx    # 0x1fe210
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 0x2c811
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 0x2ca0c
andl $0x7ff, %r9d            # imm = 0x7FF
xorl %edi, %edi
leaq 0x537aea(%rip), %r8     # 0x564380
leaq 0x101973(%rip), %rdx    # 0x12e210
movzwl %r9w, %r14d
movl 0x18(%rsp), %ebp
movq %rdi, 0x28(%rsp)
movswq 0x9bc(%r13,%rdi,2), %rax
leaq 0x52dab6(%rip), %rcx    # 0x55a370
movzwl (%rcx,%rax,2), %ebx
testw %bx, %bx
movl %r12d, %r15d
movl 0x24(%rsp), %r12d
js 0x2c923
movzwl %bx, %r13d
movzwl (%r8,%r13,2), %ebx
movq (%rdx,%r13,8), %r9
movl (%r9), %edx
movl %edx, 0x14(%rsp)
leaq 0x4(%r9), %rax
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 0x4b146
leaq 0x101902(%rip), %rdx    # 0x12e210
leaq 0x537a6b(%rip), %r8     # 0x564380
movq (%rdx,%r13,8), %rax
addw %r14w, 0x1c(%rax)
testw %bx, %bx
jns 0x2c8cb
leaq 0x7761e6(%rip), %rax    # 0x7a2b10
movl (%rax), %ebx
testw %bx, %bx
movq 0x30(%rsp), %r13
movl %r15d, %r12d
movl 0x1c(%rsp), %r15d
movq 0x28(%rsp), %rdi
leaq 0xb4b88(%rip), %r9      # 0xe14d0
leaq 0xb4bc1(%rip), %r10     # 0xe1510
js 0x2c9f7
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 0xb5da9(%rip), %rsi     # 0xe2720
movzwl (%rsi,%rbx,2), %esi
cmpw 0x9bc(%r13,%rdi,2), %si
jne 0x2c9e4
leaq 0xb4b43(%rip), %rsi     # 0xe14d0
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 0x4b146
leaq 0xb4b55(%rip), %r10     # 0xe1510
leaq 0xb4b0e(%rip), %r9      # 0xe14d0
leaq 0x5379b7(%rip), %r8     # 0x564380
movq 0x28(%rsp), %rdi
leal (%rbx,%rbx), %eax
leaq 0xb4ad8(%rip), %rcx     # 0xe14b0
addw %r14w, (%rcx,%rax)
movw $0x1, 0x50(%rsp,%rax)
leaq 0x776135(%rip), %rax    # 0x7a2b20
movl (%rax,%rbx,4), %ebx
testw %bx, %bx
jns 0x2c955
incq %rdi
cmpq 0x40(%rsp), %rdi
leaq 0x10180a(%rip), %rdx    # 0x12e210
jne 0x2c8a5
leaq 0x7760fd(%rip), %rax    # 0x7a2b10
movl (%rax), %eax
testw %ax, %ax
movl 0x3c(%rsp), %ebx
movl 0x38(%rsp), %ebp
js 0x2cb10
leaq 0xb4aa3(%rip), %rdi     # 0xe14d0
leaq 0xb4adc(%rip), %r8      # 0xe1510
leaq 0xb4b55(%rip), %rsi     # 0xe1590
leaq 0x7760de(%rip), %r13    # 0x7a2b20
movl %eax, %r12d
andl $0x7fff, %r12d          # imm = 0x7FFF
cmpw $0x0, 0x50(%rsp,%r12,2)
je 0x2ca64
movl (%r13,%r12,4), %eax
testw %ax, %ax
jns 0x2ca42
jmp 0x2cb10
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 0x2ca55
cmpl 0x48(%rsp), %edx
jge 0x2ca55
cmpl %ebx, %ecx
jle 0x2ca55
cmpl %ebp, %ecx
jge 0x2ca55
cmpl $0x0, (%rsi,%r12,4)
jle 0x2ca55
leaq 0xb4ab3(%rip), %rcx     # 0xe1550
cmpl $0xffffcc01, (%rcx,%r12,4) # imm = 0xFFFFCC01
jl 0x2ca55
movswl %ax, %ebp
movl %ebp, %edi
movq %rsi, %r14
movl $0xffffd8f1, %esi       # imm = 0xFFFFD8F1
movq %r8, %r15
callq 0xa5d8
movl %ebp, %edi
movl 0x38(%rsp), %ebp
movl 0x3c(%rsp), %ebx
movl $0xffffff9c, %esi       # imm = 0xFFFFFF9C
callq 0xa70f
movq %r15, %r8
leaq 0xb49f6(%rip), %rdi     # 0xe14d0
movq %r14, %rsi
leaq 0xff87c(%rip), %rax     # 0x12c360
cmpl $0x0, (%rax)
je 0x2ca55
leaq 0xb5c5c(%rip), %rax     # 0xe2750
movswl (%rax,%r12,2), %edi
callq 0x1088a
movq %r15, %r8
leaq 0xb49c8(%rip), %rdi     # 0xe14d0
movq %r14, %rsi
jmp 0x2ca55
movq 0x30(%rsp), %rax
movl 0xa10(%rax), %edi
cmpl $-0x1, %edi
je 0x2cb2b
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
callq 0x1c4c0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq