// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: multiSelect
static int multiSelect(
  Parse *pParse,        /* Parsing context */
  Select *p,            /* The right-most of SELECTs to be coded */
  SelectDest *pDest     /* What to do with query results */
){
  int rc = SQLITE_OK;   /* Success code from a subroutine */
  Select *pPrior;       /* Another SELECT immediately to our left */
  Vdbe *v;              /* Generate code to this VDBE */
  SelectDest dest;      /* Alternative data destination */
  Select *pDelete = 0;  /* Chain of simple selects to delete */
  sqlite3 *db;          /* Database connection */
#ifndef SQLITE_OMIT_EXPLAIN
  int iSub1;            /* EQP id of left-hand query */
  int iSub2;            /* EQP id of right-hand query */
#endif

  /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only
  ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.
  */
  assert( p && p->pPrior );  /* Calling function guarantees this much */
  db = pParse->db;
  pPrior = p->pPrior;
  assert( pPrior->pRightmost!=pPrior );
  assert( pPrior->pRightmost==p->pRightmost );
  dest = *pDest;
  if( pPrior->pOrderBy ){
    sqlite3ErrorMsg(pParse,"ORDER BY clause should come after %s not before",
      selectOpName(p->op));
    rc = 1;
    goto multi_select_end;
  }
  if( pPrior->pLimit ){
    sqlite3ErrorMsg(pParse,"LIMIT clause should come after %s not before",
      selectOpName(p->op));
    rc = 1;
    goto multi_select_end;
  }

  v = sqlite3GetVdbe(pParse);
  assert( v!=0 );  /* The VDBE already created by calling function */

  /* Create the destination temporary table if necessary
  */
  if( dest.eDest==SRT_EphemTab ){
    assert( p->pEList );
    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, dest.iSDParm, p->pEList->nExpr);
    sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
    dest.eDest = SRT_Table;
  }

  /* Make sure all SELECTs in the statement have the same number of elements
  ** in their result sets.
  */
  assert( p->pEList && pPrior->pEList );
  if( p->pEList->nExpr!=pPrior->pEList->nExpr ){
    if( p->selFlags & SF_Values ){
      sqlite3ErrorMsg(pParse, "all VALUES must have the same number of terms");
    }else{
      sqlite3ErrorMsg(pParse, "SELECTs to the left and right of %s"
        " do not have the same number of result columns", selectOpName(p->op));
    }
    rc = 1;
    goto multi_select_end;
  }

  /* Compound SELECTs that have an ORDER BY clause are handled separately.
  */
  if( p->pOrderBy ){
    return multiSelectOrderBy(pParse, p, pDest);
  }

  /* Generate code for the left and right SELECT statements.
  */
  switch( p->op ){
    case TK_ALL: {
      int addr = 0;
      int nLimit;
      assert( !pPrior->pLimit );
      pPrior->iLimit = p->iLimit;
      pPrior->iOffset = p->iOffset;
      pPrior->pLimit = p->pLimit;
      pPrior->pOffset = p->pOffset;
      explainSetInteger(iSub1, pParse->iNextSelectId);
      rc = sqlite3Select(pParse, pPrior, &dest);
      p->pLimit = 0;
      p->pOffset = 0;
      if( rc ){
        goto multi_select_end;
      }
      p->pPrior = 0;
      p->iLimit = pPrior->iLimit;
      p->iOffset = pPrior->iOffset;
      if( p->iLimit ){
        addr = sqlite3VdbeAddOp1(v, OP_IfZero, p->iLimit);
        VdbeComment((v, "Jump ahead if LIMIT reached"));
      }
      explainSetInteger(iSub2, pParse->iNextSelectId);
      rc = sqlite3Select(pParse, p, &dest);
      testcase( rc!=SQLITE_OK );
      pDelete = p->pPrior;
      p->pPrior = pPrior;
      p->nSelectRow += pPrior->nSelectRow;
      if( pPrior->pLimit
       && sqlite3ExprIsInteger(pPrior->pLimit, &nLimit)
       && nLimit>0 && p->nSelectRow > (u64)nLimit 
      ){
        p->nSelectRow = nLimit;
      }
      if( addr ){
        sqlite3VdbeJumpHere(v, addr);
      }
      break;
    }
    case TK_EXCEPT:
    case TK_UNION: {
      int unionTab;    /* Cursor number of the temporary table holding result */
      u8 op = 0;       /* One of the SRT_ operations to apply to self */
      int priorOp;     /* The SRT_ operation to apply to prior selects */
      Expr *pLimit, *pOffset; /* Saved values of p->nLimit and p->nOffset */
      int addr;
      SelectDest uniondest;

      testcase( p->op==TK_EXCEPT );
      testcase( p->op==TK_UNION );
      priorOp = SRT_Union;
      if( dest.eDest==priorOp && ALWAYS(!p->pLimit &&!p->pOffset) ){
        /* We can reuse a temporary table generated by a SELECT to our
        ** right.
        */
        assert( p->pRightmost!=p );  /* Can only happen for leftward elements
                                     ** of a 3-way or more compound */
        assert( p->pLimit==0 );      /* Not allowed on leftward elements */
        assert( p->pOffset==0 );     /* Not allowed on leftward elements */
        unionTab = dest.iSDParm;
      }else{
        /* We will need to create our own temporary table to hold the
        ** intermediate results.
        */
        unionTab = pParse->nTab++;
        assert( p->pOrderBy==0 );
        addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, unionTab, 0);
        assert( p->addrOpenEphm[0] == -1 );
        p->addrOpenEphm[0] = addr;
        p->pRightmost->selFlags |= SF_UsesEphemeral;
        assert( p->pEList );
      }

      /* Code the SELECT statements to our left
      */
      assert( !pPrior->pOrderBy );
      sqlite3SelectDestInit(&uniondest, priorOp, unionTab);
      explainSetInteger(iSub1, pParse->iNextSelectId);
      rc = sqlite3Select(pParse, pPrior, &uniondest);
      if( rc ){
        goto multi_select_end;
      }

      /* Code the current SELECT statement
      */
      if( p->op==TK_EXCEPT ){
        op = SRT_Except;
      }else{
        assert( p->op==TK_UNION );
        op = SRT_Union;
      }
      p->pPrior = 0;
      pLimit = p->pLimit;
      p->pLimit = 0;
      pOffset = p->pOffset;
      p->pOffset = 0;
      uniondest.eDest = op;
      explainSetInteger(iSub2, pParse->iNextSelectId);
      rc = sqlite3Select(pParse, p, &uniondest);
      testcase( rc!=SQLITE_OK );
      /* Query flattening in sqlite3Select() might refill p->pOrderBy.
      ** Be sure to delete p->pOrderBy, therefore, to avoid a memory leak. */
      sqlite3ExprListDelete(db, p->pOrderBy);
      pDelete = p->pPrior;
      p->pPrior = pPrior;
      p->pOrderBy = 0;
      if( p->op==TK_UNION ) p->nSelectRow += pPrior->nSelectRow;
      sqlite3ExprDelete(db, p->pLimit);
      p->pLimit = pLimit;
      p->pOffset = pOffset;
      p->iLimit = 0;
      p->iOffset = 0;

      /* Convert the data in the temporary table into whatever form
      ** it is that we currently need.
      */
      assert( unionTab==dest.iSDParm || dest.eDest!=priorOp );
      if( dest.eDest!=priorOp ){
        int iCont, iBreak, iStart;
        assert( p->pEList );
        if( dest.eDest==SRT_Output ){
          Select *pFirst = p;
          while( pFirst->pPrior ) pFirst = pFirst->pPrior;
          generateColumnNames(pParse, 0, pFirst->pEList);
        }
        iBreak = sqlite3VdbeMakeLabel(v);
        iCont = sqlite3VdbeMakeLabel(v);
        computeLimitRegisters(pParse, p, iBreak);
        sqlite3VdbeAddOp2(v, OP_Rewind, unionTab, iBreak);
        iStart = sqlite3VdbeCurrentAddr(v);
        selectInnerLoop(pParse, p, p->pEList, unionTab, p->pEList->nExpr,
                        0, 0, &dest, iCont, iBreak);
        sqlite3VdbeResolveLabel(v, iCont);
        sqlite3VdbeAddOp2(v, OP_Next, unionTab, iStart);
        sqlite3VdbeResolveLabel(v, iBreak);
        sqlite3VdbeAddOp2(v, OP_Close, unionTab, 0);
      }
      break;
    }
    default: assert( p->op==TK_INTERSECT ); {
      int tab1, tab2;
      int iCont, iBreak, iStart;
      Expr *pLimit, *pOffset;
      int addr;
      SelectDest intersectdest;
      int r1;

      /* INTERSECT is different from the others since it requires
      ** two temporary tables.  Hence it has its own case.  Begin
      ** by allocating the tables we will need.
      */
      tab1 = pParse->nTab++;
      tab2 = pParse->nTab++;
      assert( p->pOrderBy==0 );

      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab1, 0);
      assert( p->addrOpenEphm[0] == -1 );
      p->addrOpenEphm[0] = addr;
      p->pRightmost->selFlags |= SF_UsesEphemeral;
      assert( p->pEList );

      /* Code the SELECTs to our left into temporary table "tab1".
      */
      sqlite3SelectDestInit(&intersectdest, SRT_Union, tab1);
      explainSetInteger(iSub1, pParse->iNextSelectId);
      rc = sqlite3Select(pParse, pPrior, &intersectdest);
      if( rc ){
        goto multi_select_end;
      }

      /* Code the current SELECT into temporary table "tab2"
      */
      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab2, 0);
      assert( p->addrOpenEphm[1] == -1 );
      p->addrOpenEphm[1] = addr;
      p->pPrior = 0;
      pLimit = p->pLimit;
      p->pLimit = 0;
      pOffset = p->pOffset;
      p->pOffset = 0;
      intersectdest.iSDParm = tab2;
      explainSetInteger(iSub2, pParse->iNextSelectId);
      rc = sqlite3Select(pParse, p, &intersectdest);
      testcase( rc!=SQLITE_OK );
      pDelete = p->pPrior;
      p->pPrior = pPrior;
      if( p->nSelectRow>pPrior->nSelectRow ) p->nSelectRow = pPrior->nSelectRow;
      sqlite3ExprDelete(db, p->pLimit);
      p->pLimit = pLimit;
      p->pOffset = pOffset;

      /* Generate code to take the intersection of the two temporary
      ** tables.
      */
      assert( p->pEList );
      if( dest.eDest==SRT_Output ){
        Select *pFirst = p;
        while( pFirst->pPrior ) pFirst = pFirst->pPrior;
        generateColumnNames(pParse, 0, pFirst->pEList);
      }
      iBreak = sqlite3VdbeMakeLabel(v);
      iCont = sqlite3VdbeMakeLabel(v);
      computeLimitRegisters(pParse, p, iBreak);
      sqlite3VdbeAddOp2(v, OP_Rewind, tab1, iBreak);
      r1 = sqlite3GetTempReg(pParse);
      iStart = sqlite3VdbeAddOp2(v, OP_RowKey, tab1, r1);
      sqlite3VdbeAddOp4Int(v, OP_NotFound, tab2, iCont, r1, 0);
      sqlite3ReleaseTempReg(pParse, r1);
      selectInnerLoop(pParse, p, p->pEList, tab1, p->pEList->nExpr,
                      0, 0, &dest, iCont, iBreak);
      sqlite3VdbeResolveLabel(v, iCont);
      sqlite3VdbeAddOp2(v, OP_Next, tab1, iStart);
      sqlite3VdbeResolveLabel(v, iBreak);
      sqlite3VdbeAddOp2(v, OP_Close, tab2, 0);
      sqlite3VdbeAddOp2(v, OP_Close, tab1, 0);
      break;
    }
  }

  explainComposite(pParse, p->op, iSub1, iSub2, p->op!=TK_ALL);

  /* Compute collating sequences used by 
  ** temporary tables needed to implement the compound select.
  ** Attach the KeyInfo structure to all temporary tables.
  **
  ** This section is run by the right-most SELECT statement only.
  ** SELECT statements to the left always skip this part.  The right-most
  ** SELECT might also skip this part if it has no ORDER BY clause and
  ** no temp tables are required.
  */
  if( p->selFlags & SF_UsesEphemeral ){
    int i;                        /* Loop counter */
    KeyInfo *pKeyInfo;            /* Collating sequence for the result set */
    Select *pLoop;                /* For looping through SELECT statements */
    CollSeq **apColl;             /* For looping through pKeyInfo->aColl[] */
    int nCol;                     /* Number of columns in result set */

    assert( p->pRightmost==p );
    nCol = p->pEList->nExpr;
    pKeyInfo = sqlite3KeyInfoAlloc(db, nCol);
    if( !pKeyInfo ){
      rc = SQLITE_NOMEM;
      goto multi_select_end;
    }
    for(i=0, apColl=pKeyInfo->aColl; i<nCol; i++, apColl++){
      *apColl = multiSelectCollSeq(pParse, p, i);
      if( 0==*apColl ){
        *apColl = db->pDfltColl;
      }
    }

    for(pLoop=p; pLoop; pLoop=pLoop->pPrior){
      for(i=0; i<2; i++){
        int addr = pLoop->addrOpenEphm[i];
        if( addr<0 ){
          /* If [0] is unused then [1] is also unused.  So we can
          ** always safely abort as soon as the first unused slot is found */
          assert( pLoop->addrOpenEphm[1]<0 );
          break;
        }
        sqlite3VdbeChangeP2(v, addr, nCol);
        sqlite3VdbeChangeP4(v, addr, (char*)pKeyInfo, P4_KEYINFO);
        pLoop->addrOpenEphm[i] = -1;
      }
    }
    sqlite3DbFree(db, pKeyInfo);
  }

multi_select_end:
  pDest->iSdst = dest.iSdst;
  pDest->nSdst = dest.nSdst;
  sqlite3SelectDelete(db, pDelete);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r15
movq (%rdi), %r13
movq 0x50(%rsi), %r14
movups (%rdx), %xmm0
movaps %xmm0, -0xd0(%rbp)
cmpq $0x0, 0x48(%r14)
je 0x5075f
movb 0x8(%rsi), %al
addb $-0x71, %al
cmpb $0x2, %al
ja 0x50786
movzbl %al, %eax
leaq 0x4319f(%rip), %rcx     # 0x938f8
movq (%rcx,%rax,8), %rdx
jmp 0x5078d
cmpq $0x0, 0x68(%r14)
je 0x50799
movb 0x8(%rsi), %al
addb $-0x71, %al
cmpb $0x2, %al
ja 0x509b5
movzbl %al, %eax
leaq 0x4317b(%rip), %rcx     # 0x938f8
movq (%rcx,%rax,8), %rdx
jmp 0x509bc
leaq 0x2b2cf(%rip), %rdx     # 0x7ba5c
leaq 0x2b1d0(%rip), %rsi     # 0x7b964
jmp 0x509c3
movq %rdi, -0x40(%rbp)
movq %rsi, -0x30(%rbp)
callq 0x45ece
movq -0x30(%rbp), %rbx
movb -0xd0(%rbp), %sil
cmpb $0x9, %sil
movq %rax, -0x38(%rbp)
jne 0x507ff
movl -0xcc(%rbp), %edx
movq (%rbx), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rdi
movl $0x33, %esi
xorl %r8d, %r8d
callq 0x45f15
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x507f1
movslq 0x34(%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x8, -0x15(%rdx,%rcx,8)
movb $0x8, -0xd0(%rbp)
movb $0x8, %sil
movq -0x30(%rbp), %rbx
movq (%rbx), %rcx
movl (%rcx), %ecx
movq (%r14), %rdx
cmpl (%rdx), %ecx
jne 0x50a05
cmpq $0x0, 0x48(%rbx)
je 0x50a46
movq -0x40(%rbp), %r13
movq (%r13), %rbx
movq 0x10(%r13), %r14
movq %r14, -0x50(%rbp)
movq %r14, %rdi
callq 0x4c5eb
movq %rax, -0x78(%rbp)
movq %r14, %rdi
callq 0x4c5eb
movq -0x30(%rbp), %rsi
movl %eax, -0xb0(%rbp)
movb 0x8(%rsi), %cl
movq 0x50(%rsi), %rax
movq %rax, -0x58(%rbp)
movq 0x48(%rsi), %rax
movl (%rax), %r14d
movb %cl, -0x70(%rbp)
cmpb $0x71, %cl
movq %r15, -0xa8(%rbp)
je 0x50873
cmpb $0x0, 0x50(%rbx)
je 0x50bca
movq %rax, -0x38(%rbp)
leal (,%r14,4), %esi
movq %rbx, %rdi
callq 0x11721
movq %rax, -0x88(%rbp)
testq %rax, %rax
movq %rbx, -0xb8(%rbp)
movq %r14, -0x118(%rbp)
je 0x50b07
testl %r14d, %r14d
movq %r14, %rsi
movq -0x38(%rbp), %rax
jle 0x50baa
movq 0x8(%rax), %rax
movl %esi, %r12d
shlq $0x2, %r12
xorl %ecx, %ecx
movq -0x50(%rbp), %r14
movq -0x88(%rbp), %r13
movzwl 0x1a(%rax,%rcx,8), %edx
decl %edx
movl %edx, (%r13,%rcx)
addq $0x4, %rcx
cmpq %rcx, %r12
jne 0x508cd
movq %rbx, %rdi
callq 0x366de
movq %rax, -0x98(%rbp)
testq %rax, %rax
je 0x50d07
xorl %r15d, %r15d
xorl %ebx, %ebx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rsi
movq %r12, -0x60(%rbp)
movq 0x8(%rsi), %rax
movq (%rax,%r15,8), %r14
testb $0x1, 0x3(%r14)
jne 0x50965
movl (%r13,%r15), %edx
movq -0x40(%rbp), %r13
movq %r13, %rdi
movq %rcx, %rsi
callq 0x56487
movq %rax, %r12
testq %rax, %rax
jne 0x50941
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %r12
movq (%r12), %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x48450
movq -0x38(%rbp), %rsi
movq 0x8(%rsi), %rcx
movq %rax, (%rcx,%r15,8)
movq -0x88(%rbp), %r13
jmp 0x50978
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x4b225
movq %rax, %r12
movq -0x38(%rbp), %rsi
movq -0x98(%rbp), %rcx
movq %r12, 0x18(%rcx,%r15,2)
movq 0x8(%rsi), %rax
movb 0x18(%rax,%r15,8), %al
movq 0x10(%rcx), %rcx
movb %al, (%rcx,%rbx)
incq %rbx
addq $0x4, %r15
movq -0x60(%rbp), %r12
cmpq %r15, %r12
movq -0x30(%rbp), %rcx
jne 0x5090b
movq -0x40(%rbp), %r13
jmp 0x50bc1
leaq 0x2b0a0(%rip), %rdx     # 0x7ba5c
leaq 0x2afd1(%rip), %rsi     # 0x7b994
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x11842
movl $0x1, %ebx
movl -0xc8(%rbp), %eax
movl %eax, 0x8(%r15)
movl -0xc4(%rbp), %eax
movl %eax, 0xc(%r15)
movq %r13, %rdi
movq %r12, %rsi
callq 0x34827
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $-0x80, 0xa(%rbx)
jne 0x50a2f
movb 0x8(%rbx), %al
addb $-0x71, %al
cmpb $0x2, %al
movq -0x40(%rbp), %rdi
ja 0x50af4
movzbl %al, %eax
leaq 0x42ed2(%rip), %rcx     # 0x938f8
movq (%rcx,%rax,8), %rdx
jmp 0x50afb
leaq 0x2af8b(%rip), %rsi     # 0x7b9c1
xorl %r12d, %r12d
movq -0x40(%rbp), %rdi
xorl %eax, %eax
callq 0x11842
jmp 0x509cd
movzbl 0x8(%rbx), %ecx
cmpl $0x70, %ecx
je 0x50b1f
cmpl $0x72, %ecx
je 0x50b1f
cmpl $0x71, %ecx
jne 0x50c8e
movl 0xc(%rbx), %eax
movl %eax, 0xc(%r14)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movq 0x68(%rbx), %rax
movq %rax, 0x68(%r14)
movq 0x70(%rbx), %rax
movq %rax, 0x70(%r14)
movq -0x40(%rbp), %rdi
movl 0x214(%rdi), %r12d
leaq -0xd0(%rbp), %rdx
movq %r14, %rsi
callq 0x3bffc
movq -0x30(%rbp), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rsi)
testl %eax, %eax
jne 0x50ba0
movl %r12d, -0x98(%rbp)
movq $0x0, 0x50(%rsi)
movl 0xc(%r14), %edx
movl %edx, 0xc(%rsi)
movl 0x10(%r14), %eax
movl %eax, 0x10(%rsi)
testl %edx, %edx
je 0x518f5
movq -0x38(%rbp), %rdi
movl $0x80, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x30(%rbp), %rsi
movl %eax, %r12d
jmp 0x518f8
leaq 0x2af61(%rip), %rdx     # 0x7ba5c
leaq 0x2aeed(%rip), %rsi     # 0x7b9ef
jmp 0x509c3
movq $0x0, -0x98(%rbp)
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %r14
jmp 0x50d1a
cmpb $0x1, %sil
jne 0x50b37
cmpq $0x0, 0x68(%rbx)
jne 0x50b37
cmpq $0x0, 0x70(%rbx)
je 0x518e9
movq -0x40(%rbp), %rdx
movl 0x54(%rdx), %r12d
leal 0x1(%r12), %ecx
movl %ecx, 0x54(%rdx)
movq %rax, %rdi
movl $0x33, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, 0x14(%rbx)
movq 0x60(%rbx), %rax
orw $0x8, 0xa(%rax)
leaq -0xe8(%rbp), %rdx
movw $0x1, (%rdx)
movl %r12d, 0x4(%rdx)
movq $0x0, 0x8(%rdx)
movq -0x40(%rbp), %rdi
movl 0x214(%rdi), %eax
movl %eax, -0x98(%rbp)
movq %r14, %rsi
callq 0x3bffc
testl %eax, %eax
je 0x515c3
movl %eax, %ebx
xorl %r12d, %r12d
jmp 0x509d2
movq %rbx, %rdi
callq 0x366de
movq -0x38(%rbp), %rsi
movq %rax, -0x98(%rbp)
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %r14
jmp 0x50d1e
movl $0x1, %r12d
movq (%rsi), %rcx
cmpl (%rcx), %r12d
jg 0x50873
testl %r14d, %r14d
jle 0x50c00
movq 0x8(%rax), %rcx
addq $0x1a, %rcx
xorl %edi, %edi
movzwl (%rcx), %edx
cmpl %edx, %r12d
je 0x50c02
incl %edi
addq $0x20, %rcx
cmpl %edi, %r14d
jne 0x50beb
jmp 0x50c07
xorl %edi, %edi
cmpl %r14d, %edi
jne 0x50c7c
movq %rbx, %rdi
movq %rax, %rbx
movq $0x0, -0xe8(%rbp)
movl $0x0, -0xe0(%rbp)
movq %rdi, %r15
movl $0x81, %esi
leaq -0xe8(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4aaef
testq %rax, %rax
je 0x518df
orb $0x4, 0x3(%rax)
movl %r12d, 0x8(%rax)
movq (%r13), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3d962
testq %rax, %rax
je 0x50c73
movq 0x8(%rax), %rdx
movslq %r14d, %rcx
incl %r14d
shlq $0x5, %rcx
movw %r12w, 0x1a(%rdx,%rcx)
jmp 0x50c75
xorl %eax, %eax
movq -0x30(%rbp), %rsi
movq %r15, %rbx
incl %r12d
cmpb $0x0, 0x50(%rbx)
je 0x50bd0
jmp 0x50873
movq -0x40(%rbp), %r12
movl 0x54(%r12), %edx
movq %rdx, -0x58(%rbp)
leal 0x2(%rdx), %ecx
movl %ecx, 0x54(%r12)
movq %rax, %rdi
movl $0x33, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, 0x14(%rbx)
movq 0x60(%rbx), %rax
orw $0x8, 0xa(%rax)
leaq -0xe8(%rbp), %rdx
movw $0x1, (%rdx)
movq -0x58(%rbp), %rax
movl %eax, 0x4(%rdx)
movq $0x0, 0x8(%rdx)
movl 0x214(%r12), %eax
movl %eax, -0x98(%rbp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x3bffc
testl %eax, %eax
je 0x5179e
xorl %r12d, %r12d
movl %eax, %ebx
jmp 0x509d2
movq $0x0, -0x98(%rbp)
movq -0x40(%rbp), %r13
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rsi
movq %rsi, 0x48(%rcx)
movq (%r13), %rdi
xorl %edx, %edx
movq %rcx, %rbx
callq 0x4887b
movq -0x58(%rbp), %rcx
movq %rax, 0x48(%rcx)
cmpb $0x71, -0x70(%rbp)
jne 0x50d54
movq $0x0, -0xd8(%rbp)
xorl %r14d, %r14d
movq %rbx, %rsi
jmp 0x50dd7
movq (%rbx), %rax
movl (%rax), %ebx
movl 0x58(%r13), %eax
leal (%rax,%rbx), %ecx
incl %ecx
movl %eax, %r12d
incl %r12d
movl %ecx, 0x58(%r13)
movq %r14, %rdi
movl $0x15, %esi
xorl %edx, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0xb8(%rbp), %rdi
movl %ebx, %esi
callq 0x366de
testq %rax, %rax
movq %r12, -0xd8(%rbp)
je 0x50dd0
movq %rax, %r14
testl %ebx, %ebx
jle 0x50dd3
xorl %r12d, %r12d
movq -0x30(%rbp), %rsi
movq %r13, %rdi
movl %r12d, %edx
callq 0x56487
movq -0x30(%rbp), %rsi
movq %rax, 0x18(%r14,%r12,8)
movq 0x10(%r14), %rax
movb $0x0, (%rax,%r12)
incq %r12
cmpq %r12, %rbx
jne 0x50da9
jmp 0x50dd7
xorl %r14d, %r14d
movq -0x30(%rbp), %rsi
movq $0x0, 0x50(%rsi)
movq 0x48(%rsi), %rdx
leaq 0x2a2de(%rip), %rcx     # 0x7b0c8
movq %r13, %rdi
movq %rsi, %r12
callq 0x4b972
movq -0x58(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x50e17
movq -0x58(%rbp), %rsi
movq 0x48(%rsi), %rdx
leaq 0x2a2b9(%rip), %rcx     # 0x7b0c8
movq %r13, %rdi
callq 0x4b972
movq %r14, -0x90(%rbp)
cmpb $0x71, -0x70(%rbp)
setne %r15b
movq %r13, %rdi
movq %r12, %rsi
movq -0x78(%rbp), %rdx
callq 0x51caa
movl 0xc(%r12), %eax
testl %eax, %eax
sete %cl
xorl %ebx, %ebx
orb %r15b, %cl
movl $0x0, %r14d
jne 0x50e98
movl 0x58(%r13), %ebx
leal 0x1(%rbx), %r14d
addl $0x2, %ebx
movl %ebx, 0x58(%r13)
movl 0x10(%r12), %ecx
leal 0x1(%rcx), %edx
testl %ecx, %ecx
cmovel %eax, %edx
movq -0x50(%rbp), %r15
movq %r15, %rdi
movl $0x1c, %esi
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r15, %rdi
movl $0x1c, %esi
movl %r14d, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x30(%rbp), %r12
movl %r14d, -0x7c(%rbp)
movq %rbx, -0xf8(%rbp)
movq 0x68(%r12), %rsi
movq -0xb8(%rbp), %r15
movq %r15, %rdi
callq 0x3479d
xorl %ebx, %ebx
movq %rbx, 0x68(%r12)
movq 0x70(%r12), %rsi
movq %r15, %rdi
callq 0x3479d
movq %rbx, 0x70(%r12)
movl 0x58(%r13), %r14d
leal 0x1(%r14), %r15d
leal 0x2(%r14), %eax
movl %eax, -0x38(%rbp)
leal 0x3(%r14), %ecx
movl %ecx, -0x60(%rbp)
leal 0x4(%r14), %eax
movl %eax, -0x9c(%rbp)
leal 0x5(%r14), %eax
movl %eax, -0x64(%rbp)
addl $0x6, %r14d
movl %r14d, 0x58(%r13)
movw $0xa, %ax
leaq -0xe8(%rbp), %rdx
movw %ax, (%rdx)
movl %r15d, 0x4(%rdx)
movq %rbx, 0x8(%rdx)
leaq -0x128(%rbp), %rdx
movw %ax, (%rdx)
movl %ecx, 0x4(%rdx)
movq %rbx, 0x8(%rdx)
movq %r13, %rbx
movq -0x50(%rbp), %r13
movq %r13, %rdi
movl $0xe, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, -0xec(%rbp)
movl 0x34(%r13), %eax
movl %eax, -0xf0(%rbp)
movq -0x58(%rbp), %rsi
movl -0x7c(%rbp), %eax
movl %eax, 0xc(%rsi)
movl 0x214(%rbx), %eax
movl %eax, -0x100(%rbp)
movq %rbx, %rdi
leaq -0xe8(%rbp), %rdx
callq 0x3bffc
movq %r13, %rdi
movl $0x15, %esi
movl $0x1, %edx
movl -0x38(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r13, %rdi
movl $0x11, %esi
movl %r15d, -0x7c(%rbp)
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl 0x34(%r13), %eax
movl %eax, -0xfc(%rbp)
movq 0xc(%r12), %r15
movq -0xf8(%rbp), %rax
movl %eax, 0xc(%r12)
movl $0x0, 0x10(%r12)
movl 0x214(%rbx), %eax
movl %eax, -0xf8(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
leaq -0x128(%rbp), %rdx
callq 0x3bffc
movq %r15, 0xc(%r12)
movq %r13, %rdi
movl $0x15, %esi
movl $0x1, %edx
movl -0x9c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r13, %rdi
movl $0x11, %esi
movl -0x60(%rbp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
subq $0x8, %rsp
movq %rbx, %rdi
movq %r12, %rsi
leaq -0xe8(%rbp), %rdx
movq -0xa8(%rbp), %r15
movq %r15, %rcx
movl -0x64(%rbp), %r8d
movq -0xd8(%rbp), %r13
movl %r13d, %r9d
pushq -0x78(%rbp)
pushq $-0x10
pushq -0x90(%rbp)
callq 0x564e9
addq $0x20, %rsp
movb -0x70(%rbp), %dl
movl %edx, %ecx
andb $-0x2, %cl
cmpb $0x70, %cl
movq %r14, -0x110(%rbp)
movb %cl, -0x41(%rbp)
movl %eax, -0x80(%rbp)
jne 0x510aa
subq $0x8, %rsp
leaq -0x128(%rbp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
movl %r14d, %r8d
movl %r13d, %r9d
pushq -0x78(%rbp)
pushq $-0x11
pushq -0x90(%rbp)
callq 0x564e9
addq $0x20, %rsp
movl %eax, %r13d
xorl %ebx, %ebx
jmp 0x510ef
cmpb $0x73, %dl
sete %bl
cmpb $0x72, %cl
movl $0x0, %r13d
jne 0x510ef
xorl %r13d, %r13d
movq -0x50(%rbp), %rdi
movl $0xe, %esi
xorl %edx, %edx
movq -0x78(%rbp), %rcx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, %r14d
cmpb $0x73, -0x70(%rbp)
jne 0x51191
movq -0x30(%rbp), %rdx
movq 0x20(%rdx), %rax
xorl %r13d, %r13d
jmp 0x51168
movq -0x50(%rbp), %r12
movq %r12, %rdi
movl $0x27, %esi
movl -0x9c(%rbp), %edx
movq -0x78(%rbp), %rcx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xf, %esi
movl %r14d, %edx
movl %eax, %r14d
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x11, %esi
movl -0x60(%rbp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x30(%rbp), %rdx
movq 0x20(%rdx), %rax
movq -0x58(%rbp), %rcx
addq 0x20(%rcx), %rax
movq %rax, 0x20(%rdx)
testb %bl, %bl
je 0x51191
movq %r13, -0x108(%rbp)
movq -0x58(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq %rcx, %rax
jbe 0x5121b
movb $0x1, %al
movl %eax, -0xbc(%rbp)
movq %rcx, 0x20(%rdx)
jmp 0x51223
movq %r13, -0x108(%rbp)
movl $0x0, -0xbc(%rbp)
movq -0x50(%rbp), %r12
movq %r12, %rdi
movl $0x27, %esi
movl -0x38(%rbp), %edx
movq -0x78(%rbp), %rcx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, -0x90(%rbp)
movq %r12, %rdi
movl $0xf, %esi
movl -0x64(%rbp), %ebx
movl %ebx, %edx
movl -0x80(%rbp), %r13d
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x11, %esi
movl -0x7c(%rbp), %r15d
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl -0x90(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %r13d, %ecx
movl -0x38(%rbp), %r13d
movl %ebx, %edx
jmp 0x5123c
movb $0x1, %al
movl %eax, -0xbc(%rbp)
movl %r14d, -0x90(%rbp)
movq -0x50(%rbp), %r12
movl -0x38(%rbp), %r13d
movl -0x7c(%rbp), %r15d
movl -0x64(%rbp), %edx
movl -0x80(%rbp), %ecx
movq %r12, %rdi
movl $0xf, %esi
xorl %r8d, %r8d
callq 0x45f15
movl %eax, %ebx
movq %r12, %rdi
movl $0x11, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x27, %esi
movl %r13d, %edx
movl %r14d, -0xd8(%rbp)
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl -0xb0(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
cmpb $0x71, -0x70(%rbp)
movl %ebx, -0x64(%rbp)
jne 0x512cc
movl 0x34(%r12), %eax
movl %eax, -0x80(%rbp)
movl %ebx, -0x70(%rbp)
movl -0xf0(%rbp), %r14d
movl -0xec(%rbp), %r13d
movl -0x9c(%rbp), %r15d
movl -0x90(%rbp), %ebx
jmp 0x5135d
cmpb $0x0, -0xbc(%rbp)
movl -0xf0(%rbp), %r14d
movl -0xec(%rbp), %r13d
movl -0x9c(%rbp), %r15d
je 0x512fb
movl -0x64(%rbp), %eax
movl %eax, -0x70(%rbp)
incl %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %r12
jmp 0x51348
movq -0x50(%rbp), %r12
movq %r12, %rdi
movl $0x11, %esi
movl -0x7c(%rbp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, -0x70(%rbp)
movq %r12, %rdi
movl $0x27, %esi
movl -0x38(%rbp), %edx
movl -0xd8(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl -0xb0(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movb -0x41(%rbp), %al
movl -0x90(%rbp), %ebx
movl 0x34(%r12), %ecx
movl %ecx, -0x80(%rbp)
cmpb $0x70, %al
jne 0x5137b
movq %r12, %rdi
movl $0xf, %esi
movq -0x110(%rbp), %rdx
movq -0x108(%rbp), %rcx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x11, %esi
movl -0x60(%rbp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x27, %esi
movl %r15d, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl -0xb0(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
testl %r13d, %r13d
js 0x513dc
movl 0x34(%r12), %eax
cmpl %r13d, %eax
jbe 0x513dc
movq 0x8(%r12), %rcx
movl %r13d, %edx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
movq %r12, %rdi
movl $0x15, %esi
xorl %edx, %edx
movl -0x38(%rbp), %r13d
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x15, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xf, %esi
movl -0x7c(%rbp), %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0xf, %esi
movl -0x60(%rbp), %edx
movl -0xfc(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x27, %esi
movl %r13d, %edx
movl -0xd8(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x27, %esi
movl %r15d, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45f15
cmpl $0x0, -0xb0(%rbp)
jns 0x5148c
movq 0x40(%r12), %rax
testq %rax, %rax
je 0x5148c
movl -0xb0(%rbp), %edx
notl %edx
movl 0x34(%r12), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
movq %r12, %rdi
movl $0x23, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl %eax, %esi
movq -0x88(%rbp), %rdx
movl $0xfffffff1, %ecx       # imm = 0xFFFFFFF1
callq 0x11a9f
movl -0xe0(%rbp), %edx
movl -0x120(%rbp), %ecx
movq %r12, %rdi
movl $0x24, %esi
movq -0x118(%rbp), %r8
callq 0x45f15
movq %r12, %rdi
movl %eax, %esi
movq -0x98(%rbp), %rdx
movl $0xfffffff0, %ecx       # imm = 0xFFFFFFF0
callq 0x11a9f
movq 0x8(%r12), %rax
testq %rax, %rax
movq -0x78(%rbp), %rbx
movq -0xa8(%rbp), %r14
movl -0x64(%rbp), %edx
movq -0x40(%rbp), %r15
je 0x51516
movslq 0x34(%r12), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, -0x15(%rax,%rcx,8)
movq %r12, %rdi
movl $0x25, %esi
movl -0x70(%rbp), %ecx
movl -0x80(%rbp), %r8d
callq 0x45f15
testl %ebx, %ebx
jns 0x51544
movq 0x40(%r12), %rax
testq %rax, %rax
je 0x51544
notl %ebx
movl 0x34(%r12), %ecx
movl %ebx, %edx
movl %ecx, (%rax,%rdx,4)
cmpb $0x5, (%r14)
movq -0x30(%rbp), %rax
jne 0x5156f
movq -0x58(%rbp), %rcx
movq %rcx, %rax
movq 0x50(%rcx), %rcx
testq %rcx, %rcx
jne 0x51552
movq (%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x55e3e
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x51599
movq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x348c2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9ca4
movq -0x30(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, 0x50(%rax)
movzbl 0x8(%rax), %esi
xorl %ebx, %ebx
movq %r15, %rdi
movl -0x100(%rbp), %edx
movl -0xf8(%rbp), %ecx
xorl %r8d, %r8d
callq 0x563f0
jmp 0x509f1
movq %r12, -0x58(%rbp)
movq %r15, -0xa8(%rbp)
movq -0x30(%rbp), %rbx
cmpb $0x72, 0x8(%rbx)
sete %al
incb %al
xorl %ecx, %ecx
movq %rcx, 0x50(%rbx)
movq 0x68(%rbx), %rcx
movq %rcx, -0x60(%rbp)
xorps %xmm0, %xmm0
movq 0x70(%rbx), %r15
movups %xmm0, 0x68(%rbx)
leaq -0xe8(%rbp), %rdx
movb %al, (%rdx)
movq -0x40(%rbp), %rdi
movl 0x214(%rdi), %eax
movl %eax, -0x50(%rbp)
movq %rbx, %rsi
callq 0x3bffc
movl %eax, -0x88(%rbp)
movq 0x48(%rbx), %rsi
movq %r13, %rdi
callq 0x3484e
movq 0x50(%rbx), %r12
movq %r14, 0x50(%rbx)
xorl %eax, %eax
movq %rax, 0x48(%rbx)
cmpb $0x70, 0x8(%rbx)
jne 0x51640
movq 0x20(%r14), %rax
addq %rax, 0x20(%rbx)
movq 0x68(%rbx), %rsi
movq %r13, %rdi
callq 0x3479d
movq -0x30(%rbp), %rsi
movq -0x60(%rbp), %rax
movq %rax, 0x68(%rsi)
movq %r15, 0x70(%rsi)
movq $0x0, 0xc(%rsi)
movzbl -0xd0(%rbp), %eax
cmpl $0x1, %eax
movq -0xa8(%rbp), %r15
movl -0x88(%rbp), %ebx
je 0x51990
cmpl $0x5, %eax
jne 0x516a4
movq -0x30(%rbp), %rcx
movq %rcx, %rax
movq 0x50(%rcx), %rcx
testq %rcx, %rcx
jne 0x5168a
movq (%rax), %rdx
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x55e3e
movq %r12, -0x60(%rbp)
movq -0x38(%rbp), %rdi
callq 0x4c5eb
movl %eax, %r14d
movq -0x38(%rbp), %rdi
callq 0x4c5eb
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %r12
movq %r12, %rsi
movl %r14d, %edx
callq 0x51caa
movq -0x38(%rbp), %rdi
movl $0x65, %esi
movq -0x58(%rbp), %rbx
movl %ebx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x38(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x78(%rbp)
movq (%r12), %rdx
movl (%rdx), %r8d
leaq -0xd0(%rbp), %rax
movq -0x40(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %ecx
xorl %r9d, %r9d
pushq %r14
movq -0x70(%rbp), %r12
pushq %r12
pushq %rax
pushq $0x0
callq 0x54618
movq %r12, %rdx
movq -0x38(%rbp), %rcx
addq $0x20, %rsp
testl %edx, %edx
jns 0x51744
movq 0x40(%rcx), %rax
testq %rax, %rax
je 0x51744
notl %edx
movl 0x34(%rcx), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
movq -0x38(%rbp), %rdi
movl $0x7, %esi
movl %ebx, %edx
movl -0x78(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x38(%rbp), %rdi
testl %r14d, %r14d
movl -0x88(%rbp), %ebx
movq -0x60(%rbp), %r12
jns 0x51782
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x51782
notl %r14d
movl 0x34(%rdi), %ecx
movl %r14d, %edx
movl %ecx, (%rax,%rdx,4)
movl $0x36, %esi
movq -0x58(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x30(%rbp), %rsi
jmp 0x51990
movq %r15, -0xa8(%rbp)
movq -0x58(%rbp), %rax
leal 0x1(%rax), %r12d
movq -0x38(%rbp), %rdi
movl $0x33, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, 0x18(%rbx)
movq $0x0, 0x50(%rbx)
movq 0x68(%rbx), %rax
movq %rax, -0x78(%rbp)
movq 0x70(%rbx), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rbx)
leaq -0xe8(%rbp), %rdx
movl %r12d, -0xb8(%rbp)
movl %r12d, 0x4(%rdx)
movq -0x40(%rbp), %rdi
movl 0x214(%rdi), %eax
movl %eax, -0x50(%rbp)
movq %rbx, %rsi
callq 0x3bffc
movl %eax, -0x88(%rbp)
movq 0x20(%rbx), %rcx
movq 0x50(%rbx), %rax
movq %rax, -0x60(%rbp)
movq %r14, 0x50(%rbx)
movq 0x20(%r14), %rax
cmpq %rax, %rcx
movq %rbx, %r12
jbe 0x5182f
movq %rax, 0x20(%r12)
movq 0x68(%r12), %rsi
movq %r13, %rdi
callq 0x3479d
movq -0x78(%rbp), %rax
movq %rax, 0x68(%r12)
movq %r15, 0x70(%r12)
cmpb $0x5, -0xd0(%rbp)
movq -0xa8(%rbp), %r15
jne 0x51879
movq %r12, %rax
movq 0x50(%r12), %r12
testq %r12, %r12
jne 0x5185a
movq (%rax), %rdx
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x55e3e
movq -0x30(%rbp), %r12
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x4c5eb
movl %eax, %r14d
movq %rbx, %rdi
callq 0x4c5eb
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x51caa
movq -0x38(%rbp), %rdi
movl $0x65, %esi
movq -0x58(%rbp), %rdx
movq %r14, -0x78(%rbp)
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movb 0x1f(%rbx), %al
testb %al, %al
je 0x51999
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0x28(%rbx,%rax,4), %r12d
jmp 0x519a4
movl $0x7, %ebx
jmp 0x509f1
movl -0xcc(%rbp), %r12d
jmp 0x50b68
xorl %r12d, %r12d
movq -0x40(%rbp), %rdi
movl 0x214(%rdi), %eax
movl %eax, -0x50(%rbp)
leaq -0xd0(%rbp), %rdx
callq 0x3bffc
movq -0x30(%rbp), %rsi
movq 0x50(%rsi), %rcx
movq %rcx, -0x60(%rbp)
movq %r14, 0x50(%rsi)
movq 0x20(%r14), %rcx
addq %rcx, 0x20(%rsi)
movl %eax, %ebx
movq 0x68(%r14), %rdi
testq %rdi, %rdi
je 0x5196c
movl %ebx, %r14d
leaq -0xe8(%rbp), %rbx
movq %rbx, %rsi
callq 0x4ac9f
movq -0x30(%rbp), %rsi
testl %eax, %eax
setne %cl
movl (%rbx), %eax
movl %r14d, %ebx
testl %eax, %eax
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x5196c
movl %eax, %eax
cmpq %rax, 0x20(%rsi)
jbe 0x5196c
movq %rax, 0x20(%rsi)
testl %r12d, %r12d
movq -0x38(%rbp), %rcx
jle 0x5198c
movl 0x34(%rcx), %eax
cmpl %r12d, %eax
jbe 0x5198c
movq 0x8(%rcx), %rcx
movl %r12d, %edx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
movq -0x60(%rbp), %r12
movl -0x50(%rbp), %r14d
jmp 0x51af2
movl 0x58(%rbx), %r12d
incl %r12d
movl %r12d, 0x58(%rbx)
movl -0x50(%rbp), %r14d
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movl $0x5c, %esi
movq -0x58(%rbp), %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, -0x50(%rbp)
movq %rbx, %rdi
movl $0x3c, %esi
movl -0xb8(%rbp), %edx
movq -0x70(%rbp), %rcx
movl %r12d, %r8d
xorl %r9d, %r9d
callq 0x4f411
testl %r12d, %r12d
movq -0x30(%rbp), %rsi
je 0x51a30
movq -0x40(%rbp), %rax
movzbl 0x1f(%rax), %eax
cmpq $0x7, %rax
ja 0x51a30
xorl %ecx, %ecx
movq -0x40(%rbp), %rdx
cmpl %r12d, 0x84(%rdx,%rcx)
je 0x51a27
addq $0x18, %rcx
cmpl $0xf0, %ecx
jne 0x51a00
leal 0x1(%rax), %ecx
movq -0x40(%rbp), %rdx
movb %cl, 0x1f(%rdx)
movl %r12d, 0x28(%rdx,%rax,4)
jmp 0x51a30
movq -0x40(%rbp), %rax
movb $0x1, 0x7c(%rax,%rcx)
movq (%rsi), %rdx
movl (%rdx), %r8d
leaq -0xd0(%rbp), %rax
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rbx
movl %ebx, %ecx
xorl %r9d, %r9d
pushq -0x78(%rbp)
movq -0x70(%rbp), %r12
pushq %r12
pushq %rax
pushq $0x0
callq 0x54618
addq $0x20, %rsp
testl %r12d, %r12d
movq -0x38(%rbp), %rcx
jns 0x51a7f
movq 0x40(%rcx), %rax
testq %rax, %rax
je 0x51a7f
movq -0x70(%rbp), %rdx
notl %edx
movl 0x34(%rcx), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
movq -0x38(%rbp), %rdi
movl $0x7, %esi
movl %ebx, %edx
movl -0x50(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x38(%rbp), %rbx
cmpl $0x0, -0x78(%rbp)
movq -0x60(%rbp), %r12
jns 0x51aba
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x51aba
movq -0x78(%rbp), %rdx
notl %edx
movl 0x34(%rbx), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
movq %rbx, %rdi
movl $0x36, %esi
movl -0xb8(%rbp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl $0x36, %esi
movq -0x58(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x30(%rbp), %rsi
movl -0x88(%rbp), %ebx
movzbl 0x8(%rsi), %esi
xorl %r8d, %r8d
cmpl $0x71, %esi
setne %r8b
movq -0x40(%rbp), %rdi
movl -0x98(%rbp), %edx
movl %r14d, %ecx
callq 0x563f0
movq -0x30(%rbp), %rax
testb $0x8, 0xa(%rax)
je 0x509d2
movq %r12, -0x60(%rbp)
movq (%rax), %rax
movl (%rax), %r14d
movq %r13, %rdi
movl %r14d, %esi
callq 0x366de
testq %rax, %rax
je 0x51b8b
movq %rax, %r12
movl %ebx, -0x88(%rbp)
testl %r14d, %r14d
movq %r15, -0xa8(%rbp)
movq %r13, -0xb0(%rbp)
jle 0x51b95
xorl %ebx, %ebx
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x56487
movq %rax, 0x18(%r12,%rbx,8)
testq %rax, %rax
jne 0x51b7d
movq 0x10(%r13), %rax
movq %rax, 0x18(%r12,%rbx,8)
incq %rbx
cmpl %ebx, %r14d
movq -0x30(%rbp), %rax
jne 0x51b5c
jmp 0x51b9b
movl $0x7, %ebx
jmp 0x51c16
movq -0x30(%rbp), %rax
jmp 0x51ba0
testq %rax, %rax
je 0x51bf7
movb $0x1, %bl
xorl %r15d, %r15d
movslq 0x14(%rax,%r15,4), %rsi
testq %rsi, %rsi
js 0x51bf1
movq %rax, %r13
movq -0x38(%rbp), %rdi
cmpl %esi, 0x34(%rdi)
jbe 0x51bc8
movq 0x8(%rdi), %rax
leaq (%rsi,%rsi,2), %rcx
movl %r14d, 0x8(%rax,%rcx,8)
movq %r12, %rdx
movl $0xfffffffa, %ecx       # imm = 0xFFFFFFFA
callq 0x11a9f
movq %r13, %rax
movl $0xffffffff, 0x14(%r13,%r15,4) # imm = 0xFFFFFFFF
movl $0x1, %r15d
testb $0x1, %bl
movl $0x0, %ebx
jne 0x51ba5
movq 0x50(%rax), %rax
jmp 0x51b9b
movq -0xb0(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x9ca4
movq -0xa8(%rbp), %r15
movl -0x88(%rbp), %ebx
movq -0x60(%rbp), %r12
jmp 0x509d2