// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: whereLoopAddBtree
static int whereLoopAddBtree(
  WhereLoopBuilder *pBuilder, /* WHERE clause information */
  Bitmask mPrereq             /* Extra prerequesites for using this table */
){
  WhereInfo *pWInfo;          /* WHERE analysis context */
  Index *pProbe;              /* An index we are evaluating */
  Index sPk;                  /* A fake index object for the primary key */
  LogEst aiRowEstPk[2];       /* The aiRowLogEst[] value for the sPk index */
  i16 aiColumnPk = -1;        /* The aColumn[] value for the sPk index */
  SrcList *pTabList;          /* The FROM clause */
  struct SrcList_item *pSrc;  /* The FROM clause btree term to add */
  WhereLoop *pNew;            /* Template WhereLoop object */
  int rc = SQLITE_OK;         /* Return code */
  int iSortIdx = 1;           /* Index number */
  int b;                      /* A boolean value */
  LogEst rSize;               /* number of rows in the table */
  LogEst rLogSize;            /* Logarithm of the number of rows in the table */
  WhereClause *pWC;           /* The parsed WHERE clause */
  Table *pTab;                /* Table being queried */

  pNew = pBuilder->pNew;
  pWInfo = pBuilder->pWInfo;
  pTabList = pWInfo->pTabList;
  pSrc = pTabList->a + pNew->iTab;
  pTab = pSrc->pTab;
  pWC = pBuilder->pWC;
  assert( !IsVirtual(pSrc->pTab) );

  if( pSrc->pIBIndex ){
    /* An INDEXED BY clause specifies a particular index to use */
    pProbe = pSrc->pIBIndex;
  }else if( !HasRowid(pTab) ){
    pProbe = pTab->pIndex;
  }else{
    /* There is no INDEXED BY clause.  Create a fake Index object in local
    ** variable sPk to represent the rowid primary key index.  Make this
    ** fake index the first in a chain of Index objects with all of the real
    ** indices to follow */
    Index *pFirst;                  /* First of real indices on the table */
    memset(&sPk, 0, sizeof(Index));
    sPk.nKeyCol = 1;
    sPk.nColumn = 1;
    sPk.aiColumn = &aiColumnPk;
    sPk.aiRowLogEst = aiRowEstPk;
    sPk.onError = OE_Replace;
    sPk.pTable = pTab;
    sPk.szIdxRow = pTab->szTabRow;
    sPk.idxType = SQLITE_IDXTYPE_IPK;
    aiRowEstPk[0] = pTab->nRowLogEst;
    aiRowEstPk[1] = 0;
    pFirst = pSrc->pTab->pIndex;
    if( pSrc->fg.notIndexed==0 ){
      /* The real indices of the table are only considered if the
      ** NOT INDEXED qualifier is omitted from the FROM clause */
      sPk.pNext = pFirst;
    }
    pProbe = &sPk;
  }
  rSize = pTab->nRowLogEst;
  rLogSize = estLog(rSize);

#ifndef SQLITE_OMIT_AUTOMATIC_INDEX
  /* Automatic indexes */
  if( !pBuilder->pOrSet      /* Not part of an OR optimization */
   && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0
   && (pWInfo->pParse->db->flags & SQLITE_AutoIndex)!=0
   && pSrc->pIBIndex==0      /* Has no INDEXED BY clause */
   && !pSrc->fg.notIndexed   /* Has no NOT INDEXED clause */
   && HasRowid(pTab)         /* Not WITHOUT ROWID table. (FIXME: Why not?) */
   && !pSrc->fg.isCorrelated /* Not a correlated subquery */
   && !pSrc->fg.isRecursive  /* Not a recursive common table expression. */
  ){
    /* Generate auto-index WhereLoops */
    WhereTerm *pTerm;
    WhereTerm *pWCEnd = pWC->a + pWC->nTerm;
    for(pTerm=pWC->a; rc==SQLITE_OK && pTerm<pWCEnd; pTerm++){
      if( pTerm->prereqRight & pNew->maskSelf ) continue;
      if( termCanDriveIndex(pTerm, pSrc, 0) ){
        pNew->u.btree.nEq = 1;
        pNew->nSkip = 0;
        pNew->u.btree.pIndex = 0;
        pNew->nLTerm = 1;
        pNew->aLTerm[0] = pTerm;
        /* TUNING: One-time cost for computing the automatic index is
        ** estimated to be X*N*log2(N) where N is the number of rows in
        ** the table being indexed and where X is 7 (LogEst=28) for normal
        ** tables or 0.5 (LogEst=-10) for views and subqueries.  The value
        ** of X is smaller for views and subqueries so that the query planner
        ** will be more aggressive about generating automatic indexes for
        ** those objects, since there is no opportunity to add schema
        ** indexes on subqueries and views. */
        pNew->rSetup = rLogSize + rSize;
        if( pTab->pSelect==0 && (pTab->tabFlags & TF_Ephemeral)==0 ){
          pNew->rSetup += 28;
        }else{
          pNew->rSetup -= 10;
        }
        ApplyCostMultiplier(pNew->rSetup, pTab->costMult);
        if( pNew->rSetup<0 ) pNew->rSetup = 0;
        /* TUNING: Each index lookup yields 20 rows in the table.  This
        ** is more than the usual guess of 10 rows, since we have no way
        ** of knowing how selective the index will ultimately be.  It would
        ** not be unreasonable to make this value much larger. */
        pNew->nOut = 43;  assert( 43==sqlite3LogEst(20) );
        pNew->rRun = sqlite3LogEstAdd(rLogSize,pNew->nOut);
        pNew->wsFlags = WHERE_AUTO_INDEX;
        pNew->prereq = mPrereq | pTerm->prereqRight;
        rc = whereLoopInsert(pBuilder, pNew);
      }
    }
  }
#endif /* SQLITE_OMIT_AUTOMATIC_INDEX */

  /* Loop over all indices. If there was an INDEXED BY clause, then only
  ** consider index pProbe.  */
  for(; rc==SQLITE_OK && pProbe;
      pProbe=(pSrc->pIBIndex ? 0 : pProbe->pNext), iSortIdx++
  ){
    int isLeft = (pSrc->fg.jointype & JT_OUTER)!=0;
    if( pProbe->pPartIdxWhere!=0
     && !whereUsablePartialIndex(pSrc->iCursor, isLeft, pWC,
                                 pProbe->pPartIdxWhere)
    ){
      testcase( pNew->iTab!=pSrc->iCursor );  /* See ticket [98d973b8f5] */
      continue;  /* Partial index inappropriate for this query */
    }
    if( pProbe->bNoQuery ) continue;
    rSize = pProbe->aiRowLogEst[0];
    pNew->u.btree.nEq = 0;
    pNew->u.btree.nBtm = 0;
    pNew->u.btree.nTop = 0;
    pNew->nSkip = 0;
    pNew->nLTerm = 0;
    pNew->iSortIdx = 0;
    pNew->rSetup = 0;
    pNew->prereq = mPrereq;
    pNew->nOut = rSize;
    pNew->u.btree.pIndex = pProbe;
    b = indexMightHelpWithOrderBy(pBuilder, pProbe, pSrc->iCursor);

    /* The ONEPASS_DESIRED flags never occurs together with ORDER BY */
    assert( (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || b==0 );
    if( pProbe->idxType==SQLITE_IDXTYPE_IPK ){
      /* Integer primary key index */
      pNew->wsFlags = WHERE_IPK;

      /* Full table scan */
      pNew->iSortIdx = b ? iSortIdx : 0;
      /* TUNING: Cost of full table scan is (N*3.0). */
      pNew->rRun = rSize + 16;
      ApplyCostMultiplier(pNew->rRun, pTab->costMult);
      whereLoopOutputAdjust(pWC, pNew, rSize);
      rc = whereLoopInsert(pBuilder, pNew);
      pNew->nOut = rSize;
      if( rc ) break;
    }else{
      Bitmask m;
      if( pProbe->isCovering ){
        pNew->wsFlags = WHERE_IDX_ONLY | WHERE_INDEXED;
        m = 0;
      }else{
        m = pSrc->colUsed & pProbe->colNotIdxed;
        pNew->wsFlags = (m==0) ? (WHERE_IDX_ONLY|WHERE_INDEXED) : WHERE_INDEXED;
      }

      /* Full scan via index */
      if( b
       || !HasRowid(pTab)
       || pProbe->pPartIdxWhere!=0
       || pSrc->fg.isIndexedBy
       || ( m==0
         && pProbe->bUnordered==0
         && (pProbe->szIdxRow<pTab->szTabRow)
         && (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0
         && sqlite3GlobalConfig.bUseCis
         && OptimizationEnabled(pWInfo->pParse->db, SQLITE_CoverIdxScan)
          )
      ){
        pNew->iSortIdx = b ? iSortIdx : 0;

        /* The cost of visiting the index rows is N*K, where K is
        ** between 1.1 and 3.0, depending on the relative sizes of the
        ** index and table rows. */
        pNew->rRun = rSize + 1 + (15*pProbe->szIdxRow)/pTab->szTabRow;
        if( m!=0 ){
          /* If this is a non-covering index scan, add in the cost of
          ** doing table lookups.  The cost will be 3x the number of
          ** lookups.  Take into account WHERE clause terms that can be
          ** satisfied using just the index, and that do not require a
          ** table lookup. */
          LogEst nLookup = rSize + 16;  /* Base cost:  N*3 */
          int ii;
          int iCur = pSrc->iCursor;
          WhereClause *pWC2 = &pWInfo->sWC;
          for(ii=0; ii<pWC2->nTerm; ii++){
            WhereTerm *pTerm = &pWC2->a[ii];
            if( !sqlite3ExprCoveredByIndex(pTerm->pExpr, iCur, pProbe) ){
              break;
            }
            /* pTerm can be evaluated using just the index.  So reduce
            ** the expected number of table lookups accordingly */
            if( pTerm->truthProb<=0 ){
              nLookup += pTerm->truthProb;
            }else{
              nLookup--;
              if( pTerm->eOperator & (WO_EQ|WO_IS) ) nLookup -= 19;
            }
          }

          pNew->rRun = sqlite3LogEstAdd(pNew->rRun, nLookup);
        }
        ApplyCostMultiplier(pNew->rRun, pTab->costMult);
        whereLoopOutputAdjust(pWC, pNew, rSize);
        rc = whereLoopInsert(pBuilder, pNew);
        pNew->nOut = rSize;
        if( rc ) break;
      }
    }

    pBuilder->bldFlags1 = 0;
    rc = whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, 0);
    if( pBuilder->bldFlags1==SQLITE_BLDF1_INDEXED ){
      /* If a non-unique index is used, or if a prefix of the key for
      ** unique index is used (making the index functionally non-unique)
      ** then the sqlite_stat1 data becomes important for scoring the
      ** plan */
      pTab->tabFlags |= TF_StatsUsed;
    }
#ifdef SQLITE_ENABLE_STAT4
    sqlite3Stat4ProbeFree(pBuilder->pRec);
    pBuilder->nRecValid = 0;
    pBuilder->pRec = 0;
#endif
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw $0xffff, -0x96(%rbp)    # imm = 0xFFFF
movl $0x0, -0xb4(%rbp)
movl $0x1, -0xb8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
addq $0x8, %rax
movq -0xb0(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
movslq %ecx, %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0xa8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x451293
movq -0xa8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x45137e
movq -0xd0(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4512bb
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x45137c
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x19360
movw $0x1, -0x32(%rbp)
movw $0x1, -0x30(%rbp)
leaq -0x96(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x94(%rbp), %rax
movq %rax, -0x80(%rbp)
movb $0x5, -0x2e(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xd0(%rbp), %rax
movw 0x4c(%rax), %ax
movw %ax, -0x34(%rbp)
movw -0x2d(%rbp), %ax
andw $-0x4, %ax
orw $0x3, %ax
movw %ax, -0x2d(%rbp)
movq -0xd0(%rbp), %rax
movw 0x4a(%rax), %ax
movw %ax, -0x94(%rbp)
movw $0x0, -0x92(%rbp)
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0xa8(%rbp), %rax
movb 0x3d(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x451371
movq -0xd8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x45137e
movq -0xd0(%rbp), %rax
movw 0x4a(%rax), %ax
movw %ax, -0xbe(%rbp)
movswl -0xbe(%rbp), %edi
callq 0x4538e0
movw %ax, -0xc0(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x451663
movq -0x18(%rbp), %rax
movzwl 0x3c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x451663
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
andq $0x8000, %rax           # imm = 0x8000
cmpq $0x0, %rax
je 0x451663
movq -0xa8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x451663
movq -0xa8(%rbp), %rax
movb 0x3d(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x451663
movq -0xd0(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x451663
movq -0xa8(%rbp), %rax
movb 0x3d(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x451663
movq -0xa8(%rbp), %rax
movb 0x3d(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x451663
movq -0xc8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0xc8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0xe8(%rbp)
movq -0xc8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xe0(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xb4(%rbp)
movb %al, -0x119(%rbp)
jne 0x4514ba
movq -0xe0(%rbp), %rax
cmpq -0xe8(%rbp), %rax
setb %al
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x4514c9
jmp 0x451661
movq -0xe0(%rbp), %rax
movq 0x30(%rax), %rax
movq -0xb0(%rbp), %rcx
andq 0x8(%rcx), %rax
cmpq $0x0, %rax
je 0x4514ea
jmp 0x45164a
movq -0xe0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x453920
cmpl $0x0, %eax
je 0x451648
movq -0xb0(%rbp), %rax
movw $0x1, 0x18(%rax)
movq -0xb0(%rbp), %rax
movw $0x0, 0x2e(%rax)
movq -0xb0(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0xb0(%rbp), %rax
movw $0x1, 0x2c(%rax)
movq -0xe0(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq 0x38(%rax), %rax
movq %rcx, (%rax)
movswl -0xc0(%rbp), %eax
movswl -0xbe(%rbp), %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0xd0(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x4515a7
movq -0xd0(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4515a7
movq -0xb0(%rbp), %rax
movswl 0x12(%rax), %ecx
addl $0x1c, %ecx
movw %cx, 0x12(%rax)
jmp 0x4515b9
movq -0xb0(%rbp), %rax
movswl 0x12(%rax), %ecx
subl $0xa, %ecx
movw %cx, 0x12(%rax)
movq -0xb0(%rbp), %rax
movswl 0x12(%rax), %eax
cmpl $0x0, %eax
jge 0x4515d6
movq -0xb0(%rbp), %rax
movw $0x0, 0x12(%rax)
movq -0xb0(%rbp), %rax
movw $0x2b, 0x16(%rax)
movw -0xc0(%rbp), %cx
movq -0xb0(%rbp), %rax
movswl %cx, %edi
movswl 0x16(%rax), %esi
callq 0x447b70
movw %ax, %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0xb0(%rbp), %rax
movl $0x4000, 0x28(%rax)     # imm = 0x4000
movq -0x10(%rbp), %rcx
movq -0xe0(%rbp), %rax
orq 0x30(%rax), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x452f50
movl %eax, -0xb4(%rbp)
jmp 0x45164a
movq -0xe0(%rbp), %rax
addq $0x40, %rax
movq %rax, -0xe0(%rbp)
jmp 0x451492
jmp 0x451663
jmp 0x451665
xorl %eax, %eax
cmpl $0x0, -0xb4(%rbp)
movb %al, -0x11a(%rbp)
jne 0x451684
cmpq $0x0, -0x20(%rbp)
setne %al
movb %al, -0x11a(%rbp)
movb -0x11a(%rbp), %al
testb $0x1, %al
jne 0x451693
jmp 0x451c5d
movq -0xa8(%rbp), %rax
movzbl 0x3c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xec(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x4516eb
movq -0xa8(%rbp), %rax
movl 0x40(%rax), %edi
movl -0xec(%rbp), %esi
movq -0xc8(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rcx
callq 0x453a30
cmpl $0x0, %eax
jne 0x4516eb
jmp 0x451c16
movq -0x20(%rbp), %rax
movw 0x63(%rax), %ax
shrw $0x8, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x451708
jmp 0x451c16
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movw (%rax), %ax
movw %ax, -0xbe(%rbp)
movq -0xb0(%rbp), %rax
movw $0x0, 0x18(%rax)
movq -0xb0(%rbp), %rax
movw $0x0, 0x1a(%rax)
movq -0xb0(%rbp), %rax
movw $0x0, 0x1c(%rax)
movq -0xb0(%rbp), %rax
movw $0x0, 0x2e(%rax)
movq -0xb0(%rbp), %rax
movw $0x0, 0x2c(%rax)
movq -0xb0(%rbp), %rax
movb $0x0, 0x11(%rax)
movq -0xb0(%rbp), %rax
movw $0x0, 0x12(%rax)
movq -0x10(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, (%rax)
movw -0xbe(%rbp), %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x20(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0xa8(%rbp), %rax
movl 0x40(%rax), %edx
callq 0x453b60
movl %eax, -0xbc(%rbp)
movq -0x20(%rbp), %rax
movw 0x63(%rax), %ax
andw $0x3, %ax
movzwl %ax, %eax
cmpl $0x3, %eax
jne 0x451885
movq -0xb0(%rbp), %rax
movl $0x100, 0x28(%rax)      # imm = 0x100
cmpl $0x0, -0xbc(%rbp)
je 0x4517fc
movl -0xb8(%rbp), %eax
movl %eax, -0x120(%rbp)
jmp 0x451806
xorl %eax, %eax
movl %eax, -0x120(%rbp)
jmp 0x451806
movl -0x120(%rbp), %eax
movb %al, %cl
movq -0xb0(%rbp), %rax
movb %cl, 0x11(%rax)
movswl -0xbe(%rbp), %eax
addl $0x10, %eax
movw %ax, %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0xc8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movswl -0xbe(%rbp), %edx
callq 0x453d10
movq -0x8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x452f50
movl %eax, -0xb4(%rbp)
movw -0xbe(%rbp), %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x16(%rax)
cmpl $0x0, -0xb4(%rbp)
je 0x451880
jmp 0x451c5d
jmp 0x451bd0
movq -0x20(%rbp), %rax
movw 0x63(%rax), %ax
shrw $0x5, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x4518b8
movq -0xb0(%rbp), %rax
movl $0x240, 0x28(%rax)      # imm = 0x240
movq $0x0, -0xf8(%rbp)
jmp 0x4518f4
movq -0xa8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rcx
andq 0x68(%rcx), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdx
movl $0x200, %ecx            # imm = 0x200
movl $0x240, %eax            # imm = 0x240
cmpq $0x0, %rdx
cmovel %eax, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, 0x28(%rax)
cmpl $0x0, -0xbc(%rbp)
jne 0x4519c5
movq -0xd0(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x4519c5
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x4519c5
movq -0xa8(%rbp), %rax
movb 0x3d(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4519c5
cmpq $0x0, -0xf8(%rbp)
jne 0x451bce
movq -0x20(%rbp), %rax
movw 0x63(%rax), %ax
shrw $0x2, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x451bce
movq -0x20(%rbp), %rax
movswl 0x5c(%rax), %eax
movq -0xd0(%rbp), %rcx
movswl 0x4c(%rcx), %ecx
cmpl %ecx, %eax
jge 0x451bce
movq -0x18(%rbp), %rax
movzwl 0x3c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x451bce
movzbl 0x1edeb5(%rip), %eax    # 0x63f857
cmpl $0x0, %eax
je 0x451bce
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movzwl 0x5c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x451bce
cmpl $0x0, -0xbc(%rbp)
je 0x4519dc
movl -0xb8(%rbp), %eax
movl %eax, -0x124(%rbp)
jmp 0x4519e6
xorl %eax, %eax
movl %eax, -0x124(%rbp)
jmp 0x4519e6
movl -0x124(%rbp), %eax
movb %al, %cl
movq -0xb0(%rbp), %rax
movb %cl, 0x11(%rax)
movswl -0xbe(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
movq -0x20(%rbp), %rax
movswl 0x5c(%rax), %eax
imull $0xf, %eax, %eax
movq -0xd0(%rbp), %rcx
movswl 0x4c(%rcx), %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x128(%rbp), %eax
addl %ecx, %eax
movw %ax, %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x14(%rax)
cmpq $0x0, -0xf8(%rbp)
je 0x451b7c
movswl -0xbe(%rbp), %eax
addl $0x10, %eax
movw %ax, -0xfa(%rbp)
movq -0xa8(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x104(%rbp)
movq -0x18(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x110(%rbp)
movl $0x0, -0x100(%rbp)
movl -0x100(%rbp), %eax
movq -0x110(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x451b54
movq -0x110(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x100(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq (%rax), %rdi
movl -0x104(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x453f40
cmpl $0x0, %eax
jne 0x451ad7
jmp 0x451b54
movq -0x118(%rbp), %rax
movswl 0x10(%rax), %eax
cmpl $0x0, %eax
jg 0x451b04
movq -0x118(%rbp), %rax
movswl 0x10(%rax), %ecx
movswl -0xfa(%rbp), %eax
addl %ecx, %eax
movw %ax, -0xfa(%rbp)
jmp 0x451b3e
movw -0xfa(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0xfa(%rbp)
movq -0x118(%rbp), %rax
movzwl 0x14(%rax), %eax
andl $0x82, %eax
cmpl $0x0, %eax
je 0x451b3c
movswl -0xfa(%rbp), %eax
subl $0x13, %eax
movw %ax, -0xfa(%rbp)
jmp 0x451b3e
jmp 0x451b40
movl -0x100(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x100(%rbp)
jmp 0x451a81
movq -0xb0(%rbp), %rax
movw 0x14(%rax), %ax
movswl %ax, %edi
movswl -0xfa(%rbp), %esi
callq 0x447b70
movw %ax, %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0xc8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movswl -0xbe(%rbp), %edx
callq 0x453d10
movq -0x8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x452f50
movl %eax, -0xb4(%rbp)
movw -0xbe(%rbp), %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x16(%rax)
cmpl $0x0, -0xb4(%rbp)
je 0x451bcc
jmp 0x451c5d
jmp 0x451bce
jmp 0x451bd0
movq -0x8(%rbp), %rax
movb $0x0, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x453fb0
movl %eax, -0xb4(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x28(%rax), %eax
cmpl $0x1, %eax
jne 0x451c14
movq -0xd0(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x40(%rax)
jmp 0x451c16
movq -0xa8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x451c2f
xorl %eax, %eax
movq %rax, -0x130(%rbp)
jmp 0x451c3e
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x451665
movl -0xb4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax)