// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tektag.c
// Function: operatesector
void
operatesector(short dasector)
{     //Door code
     int i, j, datag;
     int dax2, day2, centx, centy;
     short startwall, endwall, wallfind[2];

     datag = sector[dasector].lotag;

     // lights out / on
     if( datag == 33 ) {
          if( sectptr[dasector]->visibility >= 212 ) {
               sectptr[dasector]->visibility=0;
          }
          else {
               sectptr[dasector]->visibility=212;
          }
          return;
     }

     startwall = sector[dasector].wallptr;
     endwall = startwall + sector[dasector].wallnum - 1;
     centx = 0L, centy = 0L;
     for(i=startwall;i<=endwall;i++)
     {
          centx += wall[i].x;
          centy += wall[i].y;
     }
     centx /= (endwall-startwall+1);
     centy /= (endwall-startwall+1);

     // kens swinging door
     if( datag == 13 ) {
          for( i=0; i<swingcnt; i++ ) {
               if( swingsector[i] == dasector ) {
                    if( swinganginc[i] == 0 ) {
                         if( swingang[i] == swingangclosed[i] ) {
                              swinganginc[i] = swingangopendir[i];
                         }
                         else {
                              swinganginc[i] = -swingangopendir[i];
                         }
                    }
                    else {
                         swinganginc[i] = -swinganginc[i];
                    }
               }
          }
     }

     // kens true sideways double-sliding door
     if( datag == 16 ) {
          // get 2 closest line segments to center (dax, day)
          wallfind[0] = -1;
          wallfind[1] = -1;
          for( i=startwall;i<=endwall;i++ )
               if (wall[i].lotag == 6)
               {
                    if (wallfind[0] == -1)
                         wallfind[0] = i;
                    else
                         wallfind[1] = i;
               }

          for(j=0;j<2;j++)
          {
               if ((((wall[wallfind[j]].x+wall[wall[wallfind[j]].point2].x)>>1) == centx) && (((wall[wallfind[j]].y+wall[wall[wallfind[j]].point2].y)>>1) == centy))
               {     //door was closed
                         //find what direction door should open
                    i = wallfind[j]-1; if (i < startwall) i = endwall;
                    dax2 = wall[i].x-wall[wallfind[j]].x;
                    day2 = wall[i].y-wall[wallfind[j]].y;
                    if (dax2 != 0)
                    {
                         dax2 = wall[wall[wall[wall[wallfind[j]].point2].point2].point2].x;
                         dax2 -= wall[wall[wall[wallfind[j]].point2].point2].x;
                         setanimation(&wall[wallfind[j]].x,wall[wallfind[j]].x+dax2,4L,0L);
                         setanimation(&wall[i].x,wall[i].x+dax2,4L,0L);
                         setanimation(&wall[wall[wallfind[j]].point2].x,wall[wall[wallfind[j]].point2].x+dax2,4L,0L);
                         setanimation(&wall[wall[wall[wallfind[j]].point2].point2].x,wall[wall[wall[wallfind[j]].point2].point2].x+dax2,4L,0L);
                    }
                    else if (day2 != 0)
                    {
                         day2 = wall[wall[wall[wall[wallfind[j]].point2].point2].point2].y;
                         day2 -= wall[wall[wall[wallfind[j]].point2].point2].y;
                         setanimation(&wall[wallfind[j]].y,wall[wallfind[j]].y+day2,4L,0L);
                         setanimation(&wall[i].y,wall[i].y+day2,4L,0L);
                         setanimation(&wall[wall[wallfind[j]].point2].y,wall[wall[wallfind[j]].point2].y+day2,4L,0L);
                         setanimation(&wall[wall[wall[wallfind[j]].point2].point2].y,wall[wall[wall[wallfind[j]].point2].point2].y+day2,4L,0L);
                    }
               }
               else
               {    //door was not closed
                    i = wallfind[j]-1; if (i < startwall) i = endwall;
                    dax2 = wall[i].x-wall[wallfind[j]].x;
                    day2 = wall[i].y-wall[wallfind[j]].y;
                    if (dax2 != 0)
                    {
                         setanimation(&wall[wallfind[j]].x,centx,4L,0L);
                         setanimation(&wall[i].x,centx+dax2,4L,0L);
                         setanimation(&wall[wall[wallfind[j]].point2].x,centx,4L,0L);
                         setanimation(&wall[wall[wall[wallfind[j]].point2].point2].x,centx+dax2,4L,0L);
                    }
                    else if (day2 != 0)
                    {
                         setanimation(&wall[wallfind[j]].y,centy,4L,0L);
                         setanimation(&wall[i].y,centy+day2,4L,0L);
                         setanimation(&wall[wall[wallfind[j]].point2].y,centy,4L,0L);
                         setanimation(&wall[wall[wall[wallfind[j]].point2].point2].y,centy+day2,4L,0L);
                    }
               }
          }
     }

     tekoperatesector(dasector);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movswq -0x2(%rbp), %rcx
leaq 0x403a55(%rip), %rax    # 0x43d890
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x22(%rax), %eax
movl %eax, -0x10(%rbp)
cmpl $0x21, -0x10(%rbp)
jne 0x39e99
movswq -0x2(%rbp), %rcx
leaq 0x208385(%rip), %rax    # 0x2421e0
movq (%rax,%rcx,8), %rax
movzbl 0x20(%rax), %eax
cmpl $0xd4, %eax
jl 0x39e80
movswq -0x2(%rbp), %rcx
leaq 0x20836a(%rip), %rax    # 0x2421e0
movq (%rax,%rcx,8), %rax
movb $0x0, 0x20(%rax)
jmp 0x39e94
movswq -0x2(%rbp), %rcx
leaq 0x208354(%rip), %rax    # 0x2421e0
movq (%rax,%rcx,8), %rax
movb $-0x2c, 0x20(%rax)
jmp 0x3a8be
movswq -0x2(%rbp), %rcx
leaq 0x4039eb(%rip), %rax    # 0x43d890
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
movw %ax, -0x22(%rbp)
movswl -0x22(%rbp), %eax
movswq -0x2(%rbp), %rdx
leaq 0x4039cd(%rip), %rcx    # 0x43d890
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, -0x24(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movswl -0x22(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movswl -0x24(%rbp), %ecx
cmpl %ecx, %eax
jg 0x39f37
movslq -0x8(%rbp), %rcx
leaq 0x37897e(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x378964(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x39eec
movswl -0x24(%rbp), %ecx
movswl -0x22(%rbp), %eax
subl %eax, %ecx
addl $0x1, %ecx
movl -0x1c(%rbp), %eax
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movswl -0x24(%rbp), %ecx
movswl -0x22(%rbp), %eax
subl %eax, %ecx
addl $0x1, %ecx
movl -0x20(%rbp), %eax
cltd
idivl %ecx
movl %eax, -0x20(%rbp)
cmpl $0xd, -0x10(%rbp)
jne 0x3a05a
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0x13cff2(%rip), %rcx    # 0x176f70
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x3a058
movslq -0x8(%rbp), %rcx
leaq 0x13d12c(%rip), %rax    # 0x1770c0
movswl (%rax,%rcx,2), %eax
movswl -0x2(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3a048
movslq -0x8(%rbp), %rcx
leaq 0x13d251(%rip), %rax    # 0x177200
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jne 0x3a021
movslq -0x8(%rbp), %rcx
leaq 0x13d1fd(%rip), %rax    # 0x1771c0
movswl (%rax,%rcx,2), %eax
movslq -0x8(%rbp), %rdx
leaq 0x13d16e(%rip), %rcx    # 0x177140
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jne 0x39ffa
movslq -0x8(%rbp), %rcx
leaq 0x13d19b(%rip), %rax    # 0x177180
movw (%rax,%rcx,2), %dx
movslq -0x8(%rbp), %rcx
leaq 0x13d20c(%rip), %rax    # 0x177200
movw %dx, (%rax,%rcx,2)
jmp 0x3a01f
movslq -0x8(%rbp), %rcx
leaq 0x13d17b(%rip), %rax    # 0x177180
movswl (%rax,%rcx,2), %ecx
xorl %eax, %eax
subl %ecx, %eax
movw %ax, %dx
movslq -0x8(%rbp), %rcx
leaq 0x13d1e5(%rip), %rax    # 0x177200
movw %dx, (%rax,%rcx,2)
jmp 0x3a046
movslq -0x8(%rbp), %rcx
leaq 0x13d1d4(%rip), %rax    # 0x177200
movswl (%rax,%rcx,2), %ecx
xorl %eax, %eax
subl %ecx, %eax
movw %ax, %dx
movslq -0x8(%rbp), %rcx
leaq 0x13d1be(%rip), %rax    # 0x177200
movw %dx, (%rax,%rcx,2)
jmp 0x3a048
jmp 0x3a04a
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x39f74
jmp 0x3a05a
cmpl $0x10, -0x10(%rbp)
jne 0x3a8b5
movw $0xffff, -0x28(%rbp)    # imm = 0xFFFF
movw $0xffff, -0x26(%rbp)    # imm = 0xFFFF
movswl -0x22(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movswl -0x24(%rbp), %ecx
cmpl %ecx, %eax
jg 0x3a0c5
movslq -0x8(%rbp), %rcx
leaq 0x3787f3(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x1a(%rax), %eax
cmpl $0x6, %eax
jne 0x3a0b8
movswl -0x28(%rbp), %eax
cmpl $-0x1, %eax
jne 0x3a0af
movl -0x8(%rbp), %eax
movw %ax, -0x28(%rbp)
jmp 0x3a0b6
movl -0x8(%rbp), %eax
movw %ax, -0x26(%rbp)
jmp 0x3a0b8
jmp 0x3a0ba
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3a077
movl $0x0, -0xc(%rbp)
cmpl $0x2, -0xc(%rbp)
jge 0x3a8b3
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378799(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movslq -0xc(%rbp), %rcx
movswq -0x28(%rbp,%rcx,2), %rdx
leaq 0x37877f(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
movswq 0x8(%rcx), %rdx
leaq 0x37876c(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
addl (%rcx), %eax
sarl %eax
cmpl -0x1c(%rbp), %eax
jne 0x3a647
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378747(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movslq -0xc(%rbp), %rcx
movswq -0x28(%rbp,%rcx,2), %rdx
leaq 0x37872c(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
movswq 0x8(%rcx), %rdx
leaq 0x378719(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
addl 0x4(%rcx), %eax
sarl %eax
cmpl -0x20(%rbp), %eax
jne 0x3a647
movslq -0xc(%rbp), %rax
movswl -0x28(%rbp,%rax,2), %eax
subl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movswl -0x22(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3a19d
movswl -0x24(%rbp), %eax
movl %eax, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x3786d8(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movslq -0xc(%rbp), %rcx
movswq -0x28(%rbp,%rcx,2), %rdx
leaq 0x3786be(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movl %eax, -0x14(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x3786a7(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movslq -0xc(%rbp), %rcx
movswq -0x28(%rbp,%rcx,2), %rdx
leaq 0x37868c(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x3a418
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378664(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378651(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x37863e(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x37862b(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x37860e(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x3785fb(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x3785e8(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rax
leaq 0x3785c6(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x3785ae(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %esi
addl -0x14(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0x8(%rbp), %rax
leaq 0x37858b(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movslq -0x8(%rbp), %rcx
leaq 0x378579(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %esi
addl -0x14(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378550(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x37853d(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378525(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378512(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %esi
addl -0x14(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x3784e9(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x3784d6(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x3784c3(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x3784ab(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378498(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378485(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %esi
addl -0x14(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
jmp 0x3a642
cmpl $0x0, -0x18(%rbp)
je 0x3a640
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x37844d(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x37843a(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378427(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378414(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x3783f6(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x3783e3(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x3783d0(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rax
leaq 0x3783ad(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378391(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
addl -0x18(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0x8(%rbp), %rax
leaq 0x37836d(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movslq -0x8(%rbp), %rcx
leaq 0x378357(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
addl -0x18(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x37832d(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x37831a(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x3782fe(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x3782eb(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
addl -0x18(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x3782c1(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x3782ae(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x37829b(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x37827f(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x37826c(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378259(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
addl -0x18(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
jmp 0x3a642
jmp 0x3a8a3
movslq -0xc(%rbp), %rax
movswl -0x28(%rbp,%rax,2), %eax
subl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movswl -0x22(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3a668
movswl -0x24(%rbp), %eax
movl %eax, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x37820d(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movslq -0xc(%rbp), %rcx
movswq -0x28(%rbp,%rcx,2), %rdx
leaq 0x3781f3(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movl %eax, -0x14(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x3781dc(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movslq -0xc(%rbp), %rcx
movswq -0x28(%rbp,%rcx,2), %rdx
leaq 0x3781c1(%rip), %rcx    # 0x3b2880
shlq $0x5, %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x3a7b0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rax
leaq 0x378199(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movl -0x1c(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0x8(%rbp), %rax
leaq 0x378178(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movl -0x1c(%rbp), %esi
addl -0x14(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x37814e(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x37813b(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movl -0x1c(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378114(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378101(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x3780ee(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
movl -0x1c(%rbp), %esi
addl -0x14(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
jmp 0x3a8a1
cmpl $0x0, -0x18(%rbp)
je 0x3a89f
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rax
leaq 0x3780b5(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movl -0x20(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0x8(%rbp), %rax
leaq 0x378090(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movl -0x20(%rbp), %esi
addl -0x18(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378062(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x37804f(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movl -0x20(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
movslq -0xc(%rbp), %rax
movswq -0x28(%rbp,%rax,2), %rcx
leaq 0x378024(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x378011(%rip), %rax    # 0x3b2880
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rax
leaq 0x377ffe(%rip), %rdi    # 0x3b2880
shlq $0x5, %rax
addq %rax, %rdi
addq $0x4, %rdi
movl -0x20(%rbp), %esi
addl -0x18(%rbp), %esi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x107e0
jmp 0x3a8a1
jmp 0x3a8a3
jmp 0x3a8a5
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3a0cc
jmp 0x3a8b5
movswl -0x2(%rbp), %edi
callq 0x3a8d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)