// File: /workspace/github_c_makefile_star2_O0/yui0[P]img2vec/./potracelib.h
// Function: calc_lon
static int calc_lon(privpath_t *pp) {
  point_t *pt = pp->pt;
  int n = pp->len;
  int i, j, k, k1;
  int ct[4], dir;
  point_t constraint[2];
  point_t cur;
  point_t off;
  int *pivk = NULL;  /* pivk[n] */
  int *nc = NULL;    /* nc[n]: next corner */
  point_t dk;  /* direction of k-k1 */
  int a, b, c, d;
  SAFE_CALLOC(pivk, n, int);
  SAFE_CALLOC(nc, n, int);
  /* initialize the nc data structure. Point from each point to the
     furthest future point to which it is connected by a vertical or
     horizontal segment. We take advantage of the fact that there is
     always a direction change at 0 (due to the path decomposition
     algorithm). But even if this were not so, there is no harm, as
     in practice, correctness does not depend on the word "furthest"
     above.  */
  k = 0;
  for (i=n-1; i>=0; i--) {
    if (pt[i].x != pt[k].x && pt[i].y != pt[k].y) {
      k = i+1;  /* necessarily i<n-1 in this case */
    }
    nc[i] = k;
  }
  SAFE_CALLOC(pp->lon, n, int);
  /* determine pivot points: for each i, let pivk[i] be the furthest k
     such that all j with i<j<k lie on a line connecting i,k. */
  
  for (i=n-1; i>=0; i--) {
    ct[0] = ct[1] = ct[2] = ct[3] = 0;
    /* keep track of "directions" that have occurred */
    dir = (3+3*(pt[mod(i+1,n)].x-pt[i].x)+(pt[mod(i+1,n)].y-pt[i].y))/2;
    ct[dir]++;
    constraint[0].x = 0;
    constraint[0].y = 0;
    constraint[1].x = 0;
    constraint[1].y = 0;
    /* find the next k such that no straight line from i to k */
    k = nc[i];
    k1 = i;
    while (1) {
      
      dir = (3+3*sign(pt[k].x-pt[k1].x)+sign(pt[k].y-pt[k1].y))/2;
      ct[dir]++;
      /* if all four "directions" have occurred, cut this path */
      if (ct[0] && ct[1] && ct[2] && ct[3]) {
	pivk[i] = k1;
	goto foundk;
      }
      cur.x = pt[k].x - pt[i].x;
      cur.y = pt[k].y - pt[i].y;
      /* see if current constraint is violated */
      if (xprod(constraint[0], cur) < 0 || xprod(constraint[1], cur) > 0) {
	goto constraint_viol;
      }
      /* else, update constraint */
      if (abs(cur.x) <= 1 && abs(cur.y) <= 1) {
	/* no constraint */
      } else {
	off.x = cur.x + ((cur.y>=0 && (cur.y>0 || cur.x<0)) ? 1 : -1);
	off.y = cur.y + ((cur.x<=0 && (cur.x<0 || cur.y<0)) ? 1 : -1);
	if (xprod(constraint[0], off) >= 0) {
	  constraint[0] = off;
	}
	off.x = cur.x + ((cur.y<=0 && (cur.y<0 || cur.x<0)) ? 1 : -1);
	off.y = cur.y + ((cur.x>=0 && (cur.x>0 || cur.y<0)) ? 1 : -1);
	if (xprod(constraint[1], off) <= 0) {
	  constraint[1] = off;
	}
      }	
      k1 = k;
      k = nc[k1];
      if (!cyclic(k,i,k1)) {
	break;
      }
    }
  constraint_viol:
    /* k1 was the last "corner" satisfying the current constraint, and
       k is the first one violating it. We now need to find the last
       point along k1..k which satisfied the constraint. */
    dk.x = sign(pt[k].x-pt[k1].x);
    dk.y = sign(pt[k].y-pt[k1].y);
    cur.x = pt[k1].x - pt[i].x;
    cur.y = pt[k1].y - pt[i].y;
    /* find largest integer j such that xprod(constraint[0], cur+j*dk)
       >= 0 and xprod(constraint[1], cur+j*dk) <= 0. Use bilinearity
       of xprod. */
    a = xprod(constraint[0], cur);
    b = xprod(constraint[0], dk);
    c = xprod(constraint[1], cur);
    d = xprod(constraint[1], dk);
    /* find largest integer j such that a+j*b>=0 and c+j*d<=0. This
       can be solved with integer arithmetic. */
    j = INFTY;
    if (b<0) {
      j = floordiv(a,-b);
    }
    if (d>0) {
      j = min(j, floordiv(-c,d));
    }
    pivk[i] = mod(k1+j,n);
  foundk:
    ;
  } /* for i */
  /* clean up: for each i, let lon[i] be the largest k such that for
     all i' with i<=i'<k, i'<k<=pivk[i']. */
  j=pivk[n-1];
  pp->lon[n-1]=j;
  for (i=n-2; i>=0; i--) {
    if (cyclic(i+1,pivk[i],j)) {
      j=pivk[i];
    }
    pp->lon[i]=j;
  }
  for (i=n-1; cyclic(mod(i+1,n),j,pp->lon[i]); i--) {
    pp->lon[i] = j;
  }
  free(pivk);
  free(nc);
  return 0;
 calloc_error:
  free(pivk);
  free(nc);
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq $0x0, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movslq -0x1c(%rbp), %rdi
movl $0x4, %esi
callq 0x1120
movq %rax, -0x98(%rbp)
cmpq $0x0, %rax
jne 0x8e9a
jmp 0x9890
movslq -0x1c(%rbp), %rdi
movl $0x4, %esi
callq 0x1120
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
jne 0x8eba
jmp 0x9890
movl $0x0, -0x28(%rbp)
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x8f43
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
je 0x8f27
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
je 0x8f27
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edx
movq -0xa0(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8eca
movslq -0x1c(%rbp), %rdi
movl $0x4, %esi
callq 0x1120
movq -0x10(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x8f64
jmp 0x9890
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x9792
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0x20(%rbp), %edi
addl $0x1, %edi
movl -0x1c(%rbp), %esi
callq 0x2ca20
movl %eax, %ecx
movq -0xd8(%rbp), %rax
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq (%rcx), %rax
imulq $0x3, %rax, %rax
addq $0x3, %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0x20(%rbp), %edi
addl $0x1, %edi
movl -0x1c(%rbp), %esi
callq 0x2ca20
movq -0xd0(%rbp), %rcx
movl %eax, %edx
movq -0xc8(%rbp), %rax
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movq -0x18(%rbp), %rdx
movslq -0x20(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rdx
subq 0x8(%rdx), %rcx
addq %rcx, %rax
movl $0x2, %ecx
cqto
idivq %rcx
movl %eax, -0x44(%rbp)
movslq -0x44(%rbp), %rax
movl -0x40(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x40(%rbp,%rax,4)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq -0xa0(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq (%rcx), %rax
cmpq $0x0, %rax
jle 0x90ba
movl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x90f2
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subq (%rax), %rdx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %ecx, %eax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
imull $0x3, %eax, %eax
addl $0x3, %eax
movl %eax, -0xe0(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq 0x8(%rcx), %rax
cmpq $0x0, %rax
jle 0x913d
movl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x9177
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subq 0x8(%rax), %rdx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %ecx, %eax
movl %eax, -0xe4(%rbp)
movl -0xe0(%rbp), %eax
movl -0xe4(%rbp), %ecx
addl %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x44(%rbp)
movslq -0x44(%rbp), %rax
movl -0x40(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x40(%rbp,%rax,4)
cmpl $0x0, -0x40(%rbp)
je 0x91cd
cmpl $0x0, -0x3c(%rbp)
je 0x91cd
cmpl $0x0, -0x38(%rbp)
je 0x91cd
cmpl $0x0, -0x34(%rbp)
je 0x91cd
movl -0x2c(%rbp), %edx
movq -0x98(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x9782
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq (%rcx), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x78(%rbp), %rcx
callq 0x2ca80
cmpl $0x0, %eax
jl 0x9253
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x78(%rbp), %rcx
callq 0x2ca80
cmpl $0x0, %eax
jle 0x9258
jmp 0x9516
cmpq $0x0, -0x80(%rbp)
jle 0x926c
movq -0x80(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x9279
xorl %eax, %eax
subq -0x80(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
cmpq $0x1, %rax
jg 0x92b9
cmpq $0x0, -0x78(%rbp)
jle 0x929a
movq -0x78(%rbp), %rax
movq %rax, -0xf8(%rbp)
jmp 0x92a7
xorl %eax, %eax
subq -0x78(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
cmpq $0x1, %rax
jg 0x92b9
jmp 0x94e3
movq -0x80(%rbp), %rax
movq %rax, -0x108(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x78(%rbp)
movb %al, -0xf9(%rbp)
jl 0x92fc
movb $0x1, %al
cmpq $0x0, -0x78(%rbp)
movb %al, -0x109(%rbp)
jg 0x92f0
cmpq $0x0, -0x80(%rbp)
setl %al
movb %al, -0x109(%rbp)
movb -0x109(%rbp), %al
movb %al, -0xf9(%rbp)
movq -0x108(%rbp), %rax
movb -0xf9(%rbp), %sil
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x118(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x80(%rbp)
movb %al, -0x10a(%rbp)
jg 0x936b
movb $0x1, %al
cmpq $0x0, -0x80(%rbp)
movb %al, -0x119(%rbp)
jl 0x935f
cmpq $0x0, -0x78(%rbp)
setl %al
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
movb %al, -0x10a(%rbp)
movq -0x118(%rbp), %rax
movb -0x10a(%rbp), %sil
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq -0x88(%rbp), %rcx
callq 0x2ca80
cmpl $0x0, %eax
jl 0x93cd
movq -0x90(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x128(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x78(%rbp)
movb %al, -0x11a(%rbp)
jg 0x9410
movb $0x1, %al
cmpq $0x0, -0x78(%rbp)
movb %al, -0x129(%rbp)
jl 0x9404
cmpq $0x0, -0x80(%rbp)
setl %al
movb %al, -0x129(%rbp)
movb -0x129(%rbp), %al
movb %al, -0x11a(%rbp)
movq -0x128(%rbp), %rax
movb -0x11a(%rbp), %sil
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x138(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x80(%rbp)
movb %al, -0x12a(%rbp)
jl 0x947f
movb $0x1, %al
cmpq $0x0, -0x80(%rbp)
movb %al, -0x139(%rbp)
jg 0x9473
cmpq $0x0, -0x78(%rbp)
setl %al
movb %al, -0x139(%rbp)
movb -0x139(%rbp), %al
movb %al, -0x12a(%rbp)
movq -0x138(%rbp), %rax
movb -0x12a(%rbp), %sil
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq -0x88(%rbp), %rcx
callq 0x2ca80
cmpl $0x0, %eax
jg 0x94e1
movq -0x90(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x94e3
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0xa0(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
movl -0x20(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x2cab0
cmpl $0x0, %eax
jne 0x950f
jmp 0x9514
jmp 0x9083
jmp 0x9516
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq (%rcx), %rax
cmpq $0x0, %rax
jle 0x954d
movl $0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0x9585
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subq (%rax), %rdx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %ecx, %eax
movl %eax, -0x140(%rbp)
movl -0x140(%rbp), %eax
cltq
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq 0x8(%rcx), %rax
cmpq $0x0, %rax
jle 0x95cd
movl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0x9607
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subq 0x8(%rax), %rdx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %ecx, %eax
movl %eax, -0x144(%rbp)
movl -0x144(%rbp), %eax
cltq
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq (%rcx), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x78(%rbp), %rcx
callq 0x2ca80
movl %eax, -0xb4(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movq -0xa8(%rbp), %rcx
callq 0x2ca80
movl %eax, -0xb8(%rbp)
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x78(%rbp), %rcx
callq 0x2ca80
movl %eax, -0xbc(%rbp)
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movq -0xa8(%rbp), %rcx
callq 0x2ca80
movl %eax, -0xc0(%rbp)
movl $0x989680, -0x24(%rbp)  # imm = 0x989680
cmpl $0x0, -0xb8(%rbp)
jge 0x9706
movl -0xb4(%rbp), %edi
xorl %esi, %esi
subl -0xb8(%rbp), %esi
callq 0x2cb20
movl %eax, -0x24(%rbp)
cmpl $0x0, -0xc0(%rbp)
jle 0x9764
movl -0x24(%rbp), %eax
movl %eax, -0x148(%rbp)
xorl %edi, %edi
subl -0xbc(%rbp), %edi
movl -0xc0(%rbp), %esi
callq 0x2cb20
movl %eax, %ecx
movl -0x148(%rbp), %eax
cmpl %ecx, %eax
jge 0x9742
movl -0x24(%rbp), %eax
movl %eax, -0x14c(%rbp)
jmp 0x975b
xorl %edi, %edi
subl -0xbc(%rbp), %edi
movl -0xc0(%rbp), %esi
callq 0x2cb20
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %edi
addl -0x24(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x2ca20
movl %eax, %edx
movq -0x98(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x9784
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8f6d
movq -0x98(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x981d
movl -0x20(%rbp), %edi
addl $0x1, %edi
movq -0x98(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0x24(%rbp), %edx
callq 0x2cab0
cmpl $0x0, %eax
je 0x9800
movq -0x98(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x97c8
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
addl $0x1, %edi
movl -0x1c(%rbp), %esi
callq 0x2ca20
movl %eax, %edi
movl -0x24(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %edx
callq 0x2cab0
cmpl $0x0, %eax
je 0x986f
movl -0x24(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9826
movq -0x98(%rbp), %rdi
callq 0x1030
movq -0xa0(%rbp), %rdi
callq 0x1030
movl $0x0, -0x4(%rbp)
jmp 0x98af
movq -0x98(%rbp), %rdi
callq 0x1030
movq -0xa0(%rbp), %rdi
callq 0x1030
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax,%rax)