// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3WhereEnd
SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
  Parse *pParse = pWInfo->pParse;
  Vdbe *v = pParse->pVdbe;
  int i;
  WhereLevel *pLevel;
  WhereLoop *pLoop;
  SrcList *pTabList = pWInfo->pTabList;
  sqlite3 *db = pParse->db;

  /* Generate loop termination code.
  */
  VdbeModuleComment((v, "End WHERE-core"));
  for(i=pWInfo->nLevel-1; i>=0; i--){
    int addr;
    pLevel = &pWInfo->a[i];
    pLoop = pLevel->pWLoop;
    if( pLevel->op!=OP_Noop ){
#ifndef SQLITE_DISABLE_SKIPAHEAD_DISTINCT
      int addrSeek = 0;
      Index *pIdx;
      int n;
      if( pWInfo->eDistinct==WHERE_DISTINCT_ORDERED
       && i==pWInfo->nLevel-1  /* Ticket [ef9318757b152e3] 2017-10-21 */
       && (pLoop->wsFlags & WHERE_INDEXED)!=0
       && (pIdx = pLoop->u.btree.pIndex)->hasStat1
       && (n = pLoop->u.btree.nDistinctCol)>0
       && pIdx->aiRowLogEst[n]>=36
      ){
        int r1 = pParse->nMem+1;
        int j, op;
        for(j=0; j<n; j++){
          sqlite3VdbeAddOp3(v, OP_Column, pLevel->iIdxCur, j, r1+j);
        }
        pParse->nMem += n+1;
        op = pLevel->op==OP_Prev ? OP_SeekLT : OP_SeekGT;
        addrSeek = sqlite3VdbeAddOp4Int(v, op, pLevel->iIdxCur, 0, r1, n);
        VdbeCoverageIf(v, op==OP_SeekLT);
        VdbeCoverageIf(v, op==OP_SeekGT);
        sqlite3VdbeAddOp2(v, OP_Goto, 1, pLevel->p2);
      }
#endif /* SQLITE_DISABLE_SKIPAHEAD_DISTINCT */
      /* The common case: Advance to the next row */
      sqlite3VdbeResolveLabel(v, pLevel->addrCont);
      sqlite3VdbeAddOp3(v, pLevel->op, pLevel->p1, pLevel->p2, pLevel->p3);
      sqlite3VdbeChangeP5(v, pLevel->p5);
      VdbeCoverage(v);
      VdbeCoverageIf(v, pLevel->op==OP_Next);
      VdbeCoverageIf(v, pLevel->op==OP_Prev);
      VdbeCoverageIf(v, pLevel->op==OP_VNext);
      if( pLevel->regBignull ){
        sqlite3VdbeResolveLabel(v, pLevel->addrBignull);
        sqlite3VdbeAddOp2(v, OP_DecrJumpZero, pLevel->regBignull, pLevel->p2-1);
        VdbeCoverage(v);
      }
#ifndef SQLITE_DISABLE_SKIPAHEAD_DISTINCT
      if( addrSeek ) sqlite3VdbeJumpHere(v, addrSeek);
#endif
    }else{
      sqlite3VdbeResolveLabel(v, pLevel->addrCont);
    }
    if( pLoop->wsFlags & WHERE_IN_ABLE && pLevel->u.in.nIn>0 ){
      struct InLoop *pIn;
      int j;
      sqlite3VdbeResolveLabel(v, pLevel->addrNxt);
      for(j=pLevel->u.in.nIn, pIn=&pLevel->u.in.aInLoop[j-1]; j>0; j--, pIn--){
        sqlite3VdbeJumpHere(v, pIn->addrInTop+1);
        if( pIn->eEndLoopOp!=OP_Noop ){
          if( pIn->nPrefix ){
            assert( pLoop->wsFlags & WHERE_IN_EARLYOUT );
            if( pLevel->iLeftJoin ){
              /* For LEFT JOIN queries, cursor pIn->iCur may not have been
              ** opened yet. This occurs for WHERE clauses such as
              ** "a = ? AND b IN (...)", where the index is on (a, b). If
              ** the RHS of the (a=?) is NULL, then the "b IN (...)" may
              ** never have been coded, but the body of the loop run to
              ** return the null-row. So, if the cursor is not open yet,
              ** jump over the OP_Next or OP_Prev instruction about to
              ** be coded.  */
              sqlite3VdbeAddOp2(v, OP_IfNotOpen, pIn->iCur,
                  sqlite3VdbeCurrentAddr(v) + 2 +
                     ((pLoop->wsFlags & WHERE_VIRTUALTABLE)==0)
              );
              VdbeCoverage(v);
            }
            if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ){
              sqlite3VdbeAddOp4Int(v, OP_IfNoHope, pLevel->iIdxCur,
                  sqlite3VdbeCurrentAddr(v)+2,
                  pIn->iBase, pIn->nPrefix);
              VdbeCoverage(v);
            }
          }
          sqlite3VdbeAddOp2(v, pIn->eEndLoopOp, pIn->iCur, pIn->addrInTop);
          VdbeCoverage(v);
          VdbeCoverageIf(v, pIn->eEndLoopOp==OP_Prev);
          VdbeCoverageIf(v, pIn->eEndLoopOp==OP_Next);
        }
        sqlite3VdbeJumpHere(v, pIn->addrInTop-1);
      }
    }
    sqlite3VdbeResolveLabel(v, pLevel->addrBrk);
    if( pLevel->addrSkip ){
      sqlite3VdbeGoto(v, pLevel->addrSkip);
      VdbeComment((v, "next skip-scan on %s", pLoop->u.btree.pIndex->zName));
      sqlite3VdbeJumpHere(v, pLevel->addrSkip);
      sqlite3VdbeJumpHere(v, pLevel->addrSkip-2);
    }
#ifndef SQLITE_LIKE_DOESNT_MATCH_BLOBS
    if( pLevel->addrLikeRep ){
      sqlite3VdbeAddOp2(v, OP_DecrJumpZero, (int)(pLevel->iLikeRepCntr>>1),
                        pLevel->addrLikeRep);
      VdbeCoverage(v);
    }
#endif
    if( pLevel->iLeftJoin ){
      int ws = pLoop->wsFlags;
      addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v);
      assert( (ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0 );
      if( (ws & WHERE_IDX_ONLY)==0 ){
        assert( pLevel->iTabCur==pTabList->a[pLevel->iFrom].iCursor );
        sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iTabCur);
      }
      if( (ws & WHERE_INDEXED)
       || ((ws & WHERE_MULTI_OR) && pLevel->u.pCovidx)
      ){
        sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
      }
      if( pLevel->op==OP_Return ){
        sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
      }else{
        sqlite3VdbeGoto(v, pLevel->addrFirst);
      }
      sqlite3VdbeJumpHere(v, addr);
    }
    VdbeModuleComment((v, "End WHERE-loop%d: %s", i,
                     pWInfo->pTabList->a[pLevel->iFrom].pTab->zName));
  }

  /* The "break" point is here, just past the end of the outer loop.
  ** Set it.
  */
  sqlite3VdbeResolveLabel(v, pWInfo->iBreak);

  assert( pWInfo->nLevel<=pTabList->nSrc );
  for(i=0, pLevel=pWInfo->a; i<pWInfo->nLevel; i++, pLevel++){
    int k, last;
    VdbeOp *pOp;
    Index *pIdx = 0;
    struct SrcList_item *pTabItem = &pTabList->a[pLevel->iFrom];
    Table *pTab = pTabItem->pTab;
    assert( pTab!=0 );
    pLoop = pLevel->pWLoop;

    /* For a co-routine, change all OP_Column references to the table of
    ** the co-routine into OP_Copy of result contained in a register.
    ** OP_Rowid becomes OP_Null.
    */
    if( pTabItem->fg.viaCoroutine ){
      testcase( pParse->db->mallocFailed );
      translateColumnToCopy(pParse, pLevel->addrBody, pLevel->iTabCur,
                            pTabItem->regResult, 0);
      continue;
    }

#ifdef SQLITE_ENABLE_EARLY_CURSOR_CLOSE
    /* Close all of the cursors that were opened by sqlite3WhereBegin.
    ** Except, do not close cursors that will be reused by the OR optimization
    ** (WHERE_OR_SUBCLAUSE).  And do not close the OP_OpenWrite cursors
    ** created for the ONEPASS optimization.
    */
    if( (pTab->tabFlags & TF_Ephemeral)==0
     && pTab->pSelect==0
     && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0
    ){
      int ws = pLoop->wsFlags;
      if( pWInfo->eOnePass==ONEPASS_OFF && (ws & WHERE_IDX_ONLY)==0 ){
        sqlite3VdbeAddOp1(v, OP_Close, pTabItem->iCursor);
      }
      if( (ws & WHERE_INDEXED)!=0
       && (ws & (WHERE_IPK|WHERE_AUTO_INDEX))==0
       && pLevel->iIdxCur!=pWInfo->aiCurOnePass[1]
      ){
        sqlite3VdbeAddOp1(v, OP_Close, pLevel->iIdxCur);
      }
    }
#endif

    /* If this scan uses an index, make VDBE code substitutions to read data
    ** from the index instead of from the table where possible.  In some cases
    ** this optimization prevents the table from ever being read, which can
    ** yield a significant performance boost.
    **
    ** Calls to the code generator in between sqlite3WhereBegin and
    ** sqlite3WhereEnd will have created code that references the table
    ** directly.  This loop scans all that code looking for opcodes
    ** that reference the table and converts them into opcodes that
    ** reference the index.
    */
    if( pLoop->wsFlags & (WHERE_INDEXED|WHERE_IDX_ONLY) ){
      pIdx = pLoop->u.btree.pIndex;
    }else if( pLoop->wsFlags & WHERE_MULTI_OR ){
      pIdx = pLevel->u.pCovidx;
    }
    if( pIdx
     && (pWInfo->eOnePass==ONEPASS_OFF || !HasRowid(pIdx->pTable))
     && !db->mallocFailed
    ){
      last = sqlite3VdbeCurrentAddr(v);
      k = pLevel->addrBody;
#ifdef SQLITE_DEBUG
      if( db->flags & SQLITE_VdbeAddopTrace ){
        printf("TRANSLATE opcodes in range %d..%d\n", k, last-1);
      }
#endif
      pOp = sqlite3VdbeGetOp(v, k);
      for(; k<last; k++, pOp++){
        if( pOp->p1!=pLevel->iTabCur ) continue;
        if( pOp->opcode==OP_Column
#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC
         || pOp->opcode==OP_Offset
#endif
        ){
          int x = pOp->p2;
          assert( pIdx->pTable==pTab );
          if( !HasRowid(pTab) ){
            Index *pPk = sqlite3PrimaryKeyIndex(pTab);
            x = pPk->aiColumn[x];
            assert( x>=0 );
          }else{
            testcase( x!=sqlite3StorageColumnToTable(pTab,x) );
            x = sqlite3StorageColumnToTable(pTab,x);
          }
          x = sqlite3TableColumnToIndex(pIdx, x);
          if( x>=0 ){
            pOp->p2 = x;
            pOp->p1 = pLevel->iIdxCur;
            OpcodeRewriteTrace(db, k, pOp);
          }
          assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 || x>=0
              || pWInfo->eOnePass );
        }else if( pOp->opcode==OP_Rowid ){
          pOp->p1 = pLevel->iIdxCur;
          pOp->opcode = OP_IdxRowid;
          OpcodeRewriteTrace(db, k, pOp);
        }else if( pOp->opcode==OP_IfNullRow ){
          pOp->p1 = pLevel->iIdxCur;
          OpcodeRewriteTrace(db, k, pOp);
        }
      }
#ifdef SQLITE_DEBUG
      if( db->flags & SQLITE_VdbeAddopTrace ) printf("TRANSLATE complete\n");
#endif
    }
  }

  /* Undo all Expr node modifications */
  while( pWInfo->pExprMods ){
    WhereExprMod *p = pWInfo->pExprMods;
    pWInfo->pExprMods = p->pNext;
    memcpy(p->pExpr, &p->orig, sizeof(p->orig));
    sqlite3DbFree(db, p);
  }

  /* Final cleanup
  */
  pParse->nQueryLoop = pWInfo->savedNQueryLoop;
  whereInfoFree(db, pWInfo);
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x28(%rsp)
movq (%rax), %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x8(%rsp)
movq 0x10(%rax), %r12
movq %rdi, 0x10(%rsp)
movzbl 0x40(%rdi), %ecx
testq %rcx, %rcx
je 0x2daf25
movq 0x10(%rsp), %rax
addq $0x398, %rax            # imm = 0x398
movq %rax, 0x30(%rsp)
leaq 0x1ef42d(%rip), %rbx    # 0x4c9e88
leaq -0x1(%rcx), %rsi
leaq (%rsi,%rsi,2), %rax
shlq $0x5, %rax
movq 0x30(%rsp), %rdx
leaq (%rdx,%rax), %r14
movq 0x50(%rdx,%rax), %r15
cmpb $-0x53, 0x35(%rdx,%rax)
movq %r15, 0x18(%rsp)
movq %rcx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
jne 0x2daa9c
movl 0x18(%r14), %esi
movq %r12, %rdi
callq 0x2c91a7
jmp 0x2dac41
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
cmpb $0x2, 0x43(%rax)
jne 0x2dab8f
movzbl 0x40(%rax), %eax
cmpq %rax, %rcx
jne 0x2dab8f
testb $0x2, 0x29(%r15)
je 0x2dab8f
movq 0x20(%r15), %rax
testb $-0x80, 0x63(%rax)
je 0x2dab8f
movzwl 0x1e(%r15), %r15d
testl %r15d, %r15d
je 0x2dab8f
movq 0x10(%rax), %rax
movl %r15d, %ecx
cmpw $0x24, (%rax,%rcx,2)
jl 0x2dab8f
movq 0x8(%rsp), %rax
movl 0x38(%rax), %r13d
incl %r13d
xorl %ebp, %ebp
movl 0x8(%r14), %edx
leal (%r13,%rbp), %r8d
movq %r12, %rdi
movl $0x59, %esi
movl %ebp, %ecx
callq 0x2b200c
incl %ebp
cmpl %ebp, %r15d
jne 0x2dab01
movq 0x8(%rsp), %rcx
movl 0x38(%rcx), %eax
addl %r15d, %eax
incl %eax
movl %eax, 0x38(%rcx)
xorl %eax, %eax
cmpb $0x4, 0x35(%r14)
setne %al
leal (%rax,%rax,2), %esi
addl $0x16, %esi
movl 0x8(%r14), %edx
movq %r12, %rdi
xorl %ecx, %ecx
movl %r13d, %r8d
callq 0x2b200c
movl %eax, %ebp
movq (%r12), %rax
cmpb $0x0, 0x61(%rax)
jne 0x2dab76
movq 0x88(%r12), %rax
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
movb $-0x3, 0x1(%rax,%rcx,8)
movl %r15d, 0x10(%rax,%rcx,8)
movl 0x3c(%r14), %ecx
movq %r12, %rdi
movl $0xb, %esi
movl $0x1, %edx
xorl %r8d, %r8d
callq 0x2b200c
movl 0x18(%r14), %esi
movq %r12, %rdi
callq 0x2c91a7
movzbl 0x35(%r14), %esi
movl 0x38(%r14), %edx
movl 0x3c(%r14), %ecx
movzbl 0x36(%r14), %r8d
movq %r12, %rdi
callq 0x2b200c
movslq 0x90(%r12), %rax
testq %rax, %rax
jle 0x2dabd8
movzbl 0x37(%r14), %ecx
movq 0x88(%r12), %rdx
leaq (%rax,%rax,2), %rax
movw %cx, -0x16(%rdx,%rax,8)
cmpl $0x0, 0x24(%r14)
movq 0x18(%rsp), %r15
je 0x2dac0a
movl 0x28(%r14), %esi
movq %r12, %rdi
callq 0x2c91a7
movl 0x24(%r14), %edx
movl 0x3c(%r14), %ecx
decl %ecx
movq %r12, %rdi
movl $0x3b, %esi
xorl %r8d, %r8d
callq 0x2b200c
testl %ebp, %ebp
je 0x2dac41
movl 0x90(%r12), %eax
movq (%r12), %rcx
cmpb $0x0, 0x61(%rcx)
movq %rbx, %rcx
jne 0x2dac3e
leal -0x1(%rax), %ecx
testl %ebp, %ebp
cmovnsl %ebp, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%r12), %rcx
movl %eax, 0x8(%rcx)
testb $0x8, 0x29(%r15)
je 0x2dada2
cmpl $0x0, 0x40(%r14)
jle 0x2dada2
movl 0x10(%r14), %esi
movq %r12, %rdi
callq 0x2c91a7
movslq 0x40(%r14), %rax
testq %rax, %rax
jle 0x2dada2
movq 0x48(%r14), %rcx
leaq (%rax,%rax,4), %rdx
leaq (%rcx,%rdx,4), %rbp
addq $-0x4, %rbp
leal 0x1(%rax), %r15d
movl 0x90(%r12), %ecx
movq (%r12), %rax
cmpb $0x0, 0x61(%rax)
movq %rbx, %rax
jne 0x2dacbb
movl -0xc(%rbp), %eax
leal 0x1(%rax), %edx
leal -0x1(%rcx), %esi
cmpl $-0x1, %eax
cmovgel %edx, %esi
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x88(%r12), %rax
movl %ecx, 0x8(%rax)
cmpb $-0x53, (%rbp)
je 0x2dad5a
cmpl $0x0, -0x4(%rbp)
je 0x2dad45
cmpl $0x0, (%r14)
movq 0x18(%rsp), %r13
je 0x2dacf8
btl $0xa, 0x28(%r13)
movl -0x10(%rbp), %edx
sbbl $-0x1, %ecx
addl $0x2, %ecx
movq %r12, %rdi
movl $0x1a, %esi
xorl %r8d, %r8d
callq 0x2b200c
testb $0x4, 0x29(%r13)
jne 0x2dad45
movl 0x8(%r14), %edx
movl 0x90(%r12), %ecx
addl $0x2, %ecx
movl -0x8(%rbp), %r8d
movl -0x4(%rbp), %r13d
movq %r12, %rdi
movl $0x1b, %esi
callq 0x2b200c
movq (%r12), %rcx
cmpb $0x0, 0x61(%rcx)
jne 0x2dad45
movq 0x88(%r12), %rcx
cltq
leaq (%rax,%rax,2), %rax
movb $-0x3, 0x1(%rcx,%rax,8)
movl %r13d, 0x10(%rcx,%rax,8)
movzbl (%rbp), %esi
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x2b200c
movl 0x90(%r12), %eax
movq (%r12), %rcx
cmpb $0x0, 0x61(%rcx)
movq %rbx, %rcx
jne 0x2dad8e
movl -0xc(%rbp), %ecx
testl %ecx, %ecx
cmovlel %eax, %ecx
movq 0x88(%r12), %rdx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rcx
addq $-0x18, %rcx
movl %eax, 0x8(%rcx)
addq $-0x14, %rbp
decl %r15d
cmpl $0x1, %r15d
jg 0x2dac84
movl 0xc(%r14), %esi
movq %r12, %rdi
callq 0x2c91a7
movl 0x14(%r14), %ecx
testl %ecx, %ecx
je 0x2dae25
movq %r12, %rdi
movl $0xb, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x2b200c
movl 0x90(%r12), %eax
movq (%r12), %rcx
cmpb $0x0, 0x61(%rcx)
je 0x2dade5
movl %eax, 0x1ef0b0(%rip)    # 0x4c9e90
movq %rbx, %rcx
jmp 0x2dae22
movl 0x14(%r14), %ecx
leal -0x1(%rax), %edx
testl %ecx, %ecx
movl %ecx, %esi
cmovsl %edx, %esi
movq 0x88(%r12), %rdi
movslq %esi, %rsi
leaq (%rsi,%rsi,2), %rsi
movl %eax, 0x8(%rdi,%rsi,8)
leal -0x2(%rcx), %esi
cmpl $0x2, %ecx
cmovll %edx, %esi
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%r12), %rcx
movl %eax, 0x8(%rcx)
movl 0x30(%r14), %ecx
testl %ecx, %ecx
je 0x2dae43
movl 0x2c(%r14), %edx
shrl %edx
movq %r12, %rdi
movl $0x3b, %esi
xorl %r8d, %r8d
callq 0x2b200c
movl (%r14), %edx
testl %edx, %edx
movq 0x18(%rsp), %rax
je 0x2daf14
movl 0x28(%rax), %r15d
movq %r12, %rdi
movl $0x30, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl %eax, %ebp
testb $0x40, %r15b
jne 0x2dae87
movl 0x4(%r14), %edx
movq %r12, %rdi
movl $0x80, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
btl $0x9, %r15d
jb 0x2dae9c
btl $0xd, %r15d
jae 0x2daeb2
cmpq $0x0, 0x40(%r14)
je 0x2daeb2
movl 0x8(%r14), %edx
movq %r12, %rdi
movl $0x80, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
cmpb $0x41, 0x35(%r14)
jne 0x2daecb
movl 0x1c(%r14), %ecx
movl 0x38(%r14), %edx
movq %r12, %rdi
movl $0xc, %esi
jmp 0x2daed9
movl 0x1c(%r14), %ecx
movq %r12, %rdi
movl $0xb, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x2b200c
movl 0x90(%r12), %eax
movq (%r12), %rcx
cmpb $0x0, 0x61(%rcx)
movq %rbx, %rcx
jne 0x2daf11
leal -0x1(%rax), %ecx
testl %ebp, %ebp
cmovnsl %ebp, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%r12), %rcx
movl %eax, 0x8(%rcx)
cmpq $0x1, 0x40(%rsp)
movq 0x38(%rsp), %rcx
jg 0x2daa5b
movq 0x10(%rsp), %r13
movl 0x34(%r13), %esi
movq %r12, %rdi
callq 0x2c91a7
cmpb $0x0, 0x40(%r13)
movq 0x28(%rsp), %rdx
je 0x2db12c
leaq 0x398(%r13), %rbx
addq $0x8, %rdx
xorl %r14d, %r14d
movq %rdx, %r15
movzbl 0x34(%rbx), %eax
imulq $0x70, %rax, %rcx
testb $0x10, 0x3d(%rdx,%rcx)
jne 0x2daf7b
movq 0x50(%rbx), %rax
movl 0x28(%rax), %edx
testl $0x240, %edx            # imm = 0x240
je 0x2daf99
addq $0x20, %rax
jmp 0x2dafa7
addq %rdx, %rcx
movl 0x4(%rbx), %edx
movl 0x20(%rbx), %esi
movl 0x38(%rcx), %ecx
movq 0x8(%rsp), %rdi
xorl %r8d, %r8d
callq 0x2e6522
jmp 0x2db114
btl $0xd, %edx
jb 0x2dafa3
xorl %eax, %eax
jmp 0x2dafaa
leaq 0x40(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x2db114
movq 0x20(%r15,%rcx), %rcx
cmpb $0x0, 0x42(%r13)
je 0x2dafcd
movq 0x18(%rax), %rdx
testb $-0x80, 0x40(%rdx)
je 0x2db114
movq 0x20(%rsp), %rdx
cmpb $0x0, 0x61(%rdx)
jne 0x2db114
movl 0x90(%r12), %edx
movl 0x20(%rbx), %esi
movq (%r12), %rdi
cmpb $0x0, 0x61(%rdi)
leaq 0x1eee92(%rip), %rdi    # 0x4c9e88
jne 0x2db013
leal -0x1(%rdx), %edi
testl %esi, %esi
cmovnsl %esi, %edi
movslq %edi, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x3, %rdi
addq 0x88(%r12), %rdi
cmpl %edx, %esi
jge 0x2db114
movl 0x4(%rbx), %r8d
cmpl %r8d, 0x4(%rdi)
jne 0x2db106
movzbl (%rdi), %r9d
cmpl $0x15, %r9d
je 0x2db0fe
cmpl $0x7f, %r9d
je 0x2db08b
cmpl $0x59, %r9d
jne 0x2db106
movslq 0x8(%rdi), %r9
movl 0x40(%rcx), %r10d
testb %r10b, %r10b
js 0x2db098
testw %r9w, %r9w
js 0x2db0c0
andl $0x20, %r10d
je 0x2db0c0
movq 0x8(%rcx), %r10
addq $0x1c, %r10
movq $-0x1, %r11
btl $0x5, (%r10)
adcw $0x0, %r9w
movswq %r9w, %r13
incq %r11
addq $0x20, %r10
cmpq %r13, %r11
jl 0x2db06f
jmp 0x2db0c0
movl 0x8(%rbx), %r9d
movl %r9d, 0x4(%rdi)
movb $-0x7a, (%rdi)
jmp 0x2db106
movq 0x10(%rcx), %r10
testq %r10, %r10
je 0x2db0b7
movzwl 0x63(%r10), %r11d
andl $0x3, %r11d
cmpw $0x2, %r11w
je 0x2db0b7
movq 0x28(%r10), %r10
jmp 0x2db09c
movq 0x8(%r10), %r10
movzwl (%r10,%r9,2), %r9d
movzwl 0x60(%rax), %r11d
movw $0xffff, %r10w          # imm = 0xFFFF
testq %r11, %r11
je 0x2db0eb
movq 0x8(%rax), %rbp
xorl %r13d, %r13d
cmpw %r9w, (%rbp,%r13,2)
je 0x2db0e8
incq %r13
cmpq %r13, %r11
jne 0x2db0d6
jmp 0x2db0eb
movl %r13d, %r10d
testw %r10w, %r10w
movq 0x10(%rsp), %r13
js 0x2db106
movzwl %r10w, %r9d
movl %r9d, 0x8(%rdi)
movl 0x8(%rbx), %r9d
movl %r9d, 0x4(%rdi)
incl %esi
addq $0x18, %rdi
cmpl %edx, %esi
jne 0x2db01f
incl %r14d
addq $0x60, %rbx
movzbl 0x40(%r13), %eax
cmpl %eax, %r14d
movq %r15, %rdx
jb 0x2daf57
movq 0x58(%r13), %rax
testq %rax, %rax
movq 0x20(%rsp), %rbx
je 0x2db165
movq (%rax), %rcx
movq %rcx, 0x58(%r13)
movq 0x8(%rax), %rdi
leaq 0x10(%rax), %rsi
movl $0x9, %ecx
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x28c3e7
movq 0x58(%r13), %rax
testq %rax, %rax
jne 0x2db13a
movl 0x38(%r13), %eax
movq 0x8(%rsp), %rcx
movl %eax, 0xc4(%rcx)
movq %rbx, %rdi
movq %r13, %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e09eb