// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3EndTable
SQLITE_PRIVATE void sqlite3EndTable(
  Parse *pParse,          /* Parse context */
  Token *pCons,           /* The ',' token after the last column defn. */
  Token *pEnd,            /* The ')' before options in the CREATE TABLE */
  u8 tabOpts,             /* Extra table options. Usually 0. */
  Select *pSelect         /* Select from a "CREATE ... AS SELECT" */
){
  Table *p;                 /* The new table */
  sqlite3 *db = pParse->db; /* The database connection */
  int iDb;                  /* Database in which the table lives */
  Index *pIdx;              /* An implied index of the table */

  if( pEnd==0 && pSelect==0 ){
    return;
  }
  assert( !db->mallocFailed );
  p = pParse->pNewTable;
  if( p==0 ) return;

  if( pSelect==0 && sqlite3ShadowTableName(db, p->zName) ){
    p->tabFlags |= TF_Shadow;
  }

  /* If the db->init.busy is 1 it means we are reading the SQL off the
  ** "sqlite_schema" or "sqlite_temp_schema" table on the disk.
  ** So do not write to the disk again.  Extract the root page number
  ** for the table from the db->init.newTnum field.  (The page number
  ** should have been put there by the sqliteOpenCb routine.)
  **
  ** If the root page number is 1, that means this is the sqlite_schema
  ** table itself.  So mark it read-only.
  */
  if( db->init.busy ){
    if( pSelect ){
      sqlite3ErrorMsg(pParse, "");
      return;
    }
    p->tnum = db->init.newTnum;
    if( p->tnum==1 ) p->tabFlags |= TF_Readonly;
  }

  assert( (p->tabFlags & TF_HasPrimaryKey)==0
       || p->iPKey>=0 || sqlite3PrimaryKeyIndex(p)!=0 );
  assert( (p->tabFlags & TF_HasPrimaryKey)!=0
       || (p->iPKey<0 && sqlite3PrimaryKeyIndex(p)==0) );

  /* Special processing for WITHOUT ROWID Tables */
  if( tabOpts & TF_WithoutRowid ){
    if( (p->tabFlags & TF_Autoincrement) ){
      sqlite3ErrorMsg(pParse,
          "AUTOINCREMENT not allowed on WITHOUT ROWID tables");
      return;
    }
    if( (p->tabFlags & TF_HasPrimaryKey)==0 ){
      sqlite3ErrorMsg(pParse, "PRIMARY KEY missing on table %s", p->zName);
      return;
    }
    p->tabFlags |= TF_WithoutRowid | TF_NoVisibleRowid;
    convertToWithoutRowidTable(pParse, p);
  }
  iDb = sqlite3SchemaToIndex(db, p->pSchema);

#ifndef SQLITE_OMIT_CHECK
  /* Resolve names in all CHECK constraint expressions.
  */
  if( p->pCheck ){
    sqlite3ResolveSelfReference(pParse, p, NC_IsCheck, 0, p->pCheck);
    if( pParse->nErr ){
      /* If errors are seen, delete the CHECK constraints now, else they might
      ** actually be used if PRAGMA writable_schema=ON is set. */
      sqlite3ExprListDelete(db, p->pCheck);
      p->pCheck = 0;
    }else{
      markExprListImmutable(p->pCheck);
    }
  }
#endif /* !defined(SQLITE_OMIT_CHECK) */
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
  if( p->tabFlags & TF_HasGenerated ){
    int ii, nNG = 0;
    testcase( p->tabFlags & TF_HasVirtual );
    testcase( p->tabFlags & TF_HasStored );
    for(ii=0; ii<p->nCol; ii++){
      u32 colFlags = p->aCol[ii].colFlags;
      if( (colFlags & COLFLAG_GENERATED)!=0 ){
        Expr *pX = p->aCol[ii].pDflt;
        testcase( colFlags & COLFLAG_VIRTUAL );
        testcase( colFlags & COLFLAG_STORED );
        if( sqlite3ResolveSelfReference(pParse, p, NC_GenCol, pX, 0) ){
          /* If there are errors in resolving the expression, change the
          ** expression to a NULL.  This prevents code generators that operate
          ** on the expression from inserting extra parts into the expression
          ** tree that have been allocated from lookaside memory, which is
          ** illegal in a schema and will lead to errors or heap corruption
          ** when the database connection closes. */
          sqlite3ExprDelete(db, pX);
          p->aCol[ii].pDflt = sqlite3ExprAlloc(db, TK_NULL, 0, 0);
        }
      }else{
        nNG++;
      }
    }
    if( nNG==0 ){
      sqlite3ErrorMsg(pParse, "must have at least one non-generated column");
      return;
    }
  }
#endif

  /* Estimate the average row size for the table and for all implied indices */
  estimateTableWidth(p);
  for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){
    estimateIndexWidth(pIdx);
  }

  /* If not initializing, then create a record for the new table
  ** in the schema table of the database.
  **
  ** If this is a TEMPORARY table, write the entry into the auxiliary
  ** file instead of into the main database file.
  */
  if( !db->init.busy ){
    int n;
    Vdbe *v;
    char *zType;    /* "view" or "table" */
    char *zType2;   /* "VIEW" or "TABLE" */
    char *zStmt;    /* Text of the CREATE TABLE or CREATE VIEW statement */

    v = sqlite3GetVdbe(pParse);
    if( NEVER(v==0) ) return;

    sqlite3VdbeAddOp1(v, OP_Close, 0);

    /*
    ** Initialize zType for the new view or table.
    */
    if( p->pSelect==0 ){
      /* A regular table */
      zType = "table";
      zType2 = "TABLE";
#ifndef SQLITE_OMIT_VIEW
    }else{
      /* A view */
      zType = "view";
      zType2 = "VIEW";
#endif
    }

    /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT
    ** statement to populate the new table. The root-page number for the
    ** new table is in register pParse->regRoot.
    **
    ** Once the SELECT has been coded by sqlite3Select(), it is in a
    ** suitable state to query for the column names and types to be used
    ** by the new table.
    **
    ** A shared-cache write-lock is not required to write to the new table,
    ** as a schema-lock must have already been obtained to create it. Since
    ** a schema-lock excludes all other database users, the write-lock would
    ** be redundant.
    */
    if( pSelect ){
      SelectDest dest;    /* Where the SELECT should store results */
      int regYield;       /* Register holding co-routine entry-point */
      int addrTop;        /* Top of the co-routine */
      int regRec;         /* A record to be insert into the new table */
      int regRowid;       /* Rowid of the next row to insert */
      int addrInsLoop;    /* Top of the loop for inserting rows */
      Table *pSelTab;     /* A table that describes the SELECT results */

      regYield = ++pParse->nMem;
      regRec = ++pParse->nMem;
      regRowid = ++pParse->nMem;
      assert(pParse->nTab==1);
      sqlite3MayAbort(pParse);
      sqlite3VdbeAddOp3(v, OP_OpenWrite, 1, pParse->regRoot, iDb);
      sqlite3VdbeChangeP5(v, OPFLAG_P2ISREG);
      pParse->nTab = 2;
      addrTop = sqlite3VdbeCurrentAddr(v) + 1;
      sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, addrTop);
      if( pParse->nErr ) return;
      pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect, SQLITE_AFF_BLOB);
      if( pSelTab==0 ) return;
      assert( p->aCol==0 );
      p->nCol = p->nNVCol = pSelTab->nCol;
      p->aCol = pSelTab->aCol;
      pSelTab->nCol = 0;
      pSelTab->aCol = 0;
      sqlite3DeleteTable(db, pSelTab);
      sqlite3SelectDestInit(&dest, SRT_Coroutine, regYield);
      sqlite3Select(pParse, pSelect, &dest);
      if( pParse->nErr ) return;
      sqlite3VdbeEndCoroutine(v, regYield);
      sqlite3VdbeJumpHere(v, addrTop - 1);
      addrInsLoop = sqlite3VdbeAddOp1(v, OP_Yield, dest.iSDParm);
      VdbeCoverage(v);
      sqlite3VdbeAddOp3(v, OP_MakeRecord, dest.iSdst, dest.nSdst, regRec);
      sqlite3TableAffinity(v, p, 0);
      sqlite3VdbeAddOp2(v, OP_NewRowid, 1, regRowid);
      sqlite3VdbeAddOp3(v, OP_Insert, 1, regRec, regRowid);
      sqlite3VdbeGoto(v, addrInsLoop);
      sqlite3VdbeJumpHere(v, addrInsLoop);
      sqlite3VdbeAddOp1(v, OP_Close, 1);
    }

    /* Compute the complete text of the CREATE statement */
    if( pSelect ){
      zStmt = createTableStmt(db, p);
    }else{
      Token *pEnd2 = tabOpts ? &pParse->sLastToken : pEnd;
      n = (int)(pEnd2->z - pParse->sNameToken.z);
      if( pEnd2->z[0]!=';' ) n += pEnd2->n;
      zStmt = sqlite3MPrintf(db,
          "CREATE %s %.*s", zType2, n, pParse->sNameToken.z
      );
    }

    /* A slot for the record has already been allocated in the
    ** schema table.  We just need to update that slot with all
    ** the information we've collected.
    */
    sqlite3NestedParse(pParse,
      "UPDATE %Q." DFLT_SCHEMA_TABLE
      " SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q"
      " WHERE rowid=#%d",
      db->aDb[iDb].zDbSName,
      zType,
      p->zName,
      p->zName,
      pParse->regRoot,
      zStmt,
      pParse->regRowid
    );
    sqlite3DbFree(db, zStmt);
    sqlite3ChangeCookie(pParse, iDb);

#ifndef SQLITE_OMIT_AUTOINCREMENT
    /* Check to see if we need to create an sqlite_sequence table for
    ** keeping track of autoincrement keys.
    */
    if( (p->tabFlags & TF_Autoincrement)!=0 ){
      Db *pDb = &db->aDb[iDb];
      assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
      if( pDb->pSchema->pSeqTab==0 ){
        sqlite3NestedParse(pParse,
          "CREATE TABLE %Q.sqlite_sequence(name,seq)",
          pDb->zDbSName
        );
      }
    }
#endif

    /* Reparse everything to update our internal data structures */
    sqlite3VdbeAddParseSchemaOp(v, iDb,
           sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName));
  }

  /* Add the table to the in-memory representation of the database.
  */
  if( db->init.busy ){
    Table *pOld;
    Schema *pSchema = p->pSchema;
    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
    pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName, p);
    if( pOld ){
      assert( p==pOld );  /* Malloc must have failed inside HashInsert() */
      sqlite3OomFault(db);
      return;
    }
    pParse->pNewTable = 0;
    db->mDbFlags |= DBFLAG_SchemaChange;

#ifndef SQLITE_OMIT_ALTERTABLE
    if( !p->pSelect ){
      const char *zName = (const char *)pParse->sNameToken.z;
      int nName;
      assert( !pSelect && pCons && pEnd );
      if( pCons->z==0 ){
        pCons = pEnd;
      }
      nName = (int)((const char *)pCons->z - zName);
      p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName);
    }
#endif
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rax
orq %r8, %rax
je 0x2b6aa7
movq %rdi, %r12
movq 0x148(%rdi), %r14
testq %r14, %r14
je 0x2b6aa7
movq %rdx, %rbx
movq %rsi, %r15
movq (%r12), %r13
testq %r8, %r8
jne 0x2b649c
movq (%r14), %rsi
movq %r13, %rdi
movq %r8, %rbp
movq %rbx, 0x10(%rsp)
movq %r12, %rbx
movq %r15, %r12
movl %ecx, %r15d
callq 0x2cd23a
movl %r15d, %ecx
movq %r12, %r15
movq %rbx, %r12
movq 0x10(%rsp), %rbx
movq %rbp, %r8
testl %eax, %eax
je 0x2b649c
orb $0x10, 0x41(%r14)
cmpb $0x0, 0xb5(%r13)
je 0x2b64cc
testq %r8, %r8
je 0x2b64b7
leaq 0x11d3de(%rip), %rsi    # 0x3d3890
jmp 0x2b66aa
movl 0xb0(%r13), %eax
movl %eax, 0x38(%r14)
cmpl $0x1, %eax
jne 0x2b64cc
orb $0x1, 0x40(%r14)
testb %cl, %cl
js 0x2b6504
movl %ecx, 0x28(%rsp)
movq 0x70(%r14), %rax
testq %rax, %rax
movq %r13, 0x8(%rsp)
movq %r8, 0x30(%rsp)
je 0x2b653a
movq 0x20(%r13), %rcx
addq $0x18, %rcx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
incl %ebp
leaq 0x20(%rcx), %rdx
cmpq %rax, (%rcx)
movq %rdx, %rcx
jne 0x2b64f4
jmp 0x2b653f
movl 0x40(%r14), %eax
testb $0x8, %al
jne 0x2b66a3
testb $0x4, %al
jne 0x2b6a30
movq (%r14), %rdx
leaq 0x12aa6a(%rip), %rsi    # 0x3e0f8c
movq %r12, %rdi
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x284eb8
movl $0xffff8000, %ebp       # imm = 0xFFFF8000
movq 0x30(%r14), %r8
testq %r8, %r8
je 0x2b657d
movq %r12, %rdi
movq %r14, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x2cd846
cmpl $0x0, 0x30(%r12)
je 0x2b657d
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x2b6575
movq 0x8(%rsp), %rdi
callq 0x2b0183
movq $0x0, 0x30(%r14)
testb $0x60, 0x40(%r14)
je 0x2b6673
cmpw $0x0, 0x46(%r14)
jle 0x2b669a
movq %r15, 0x20(%rsp)
movq %rbx, 0x10(%rsp)
movq %r12, 0x18(%rsp)
xorl %r15d, %r15d
movl $0x8, %ebx
xorl %r12d, %r12d
movq 0x8(%r14), %rax
testb $0x60, 0x14(%rax,%rbx)
je 0x2b6647
movq (%rax,%rbx), %r13
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x8, %edx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x2cd846
testl %eax, %eax
je 0x2b664a
movl %r12d, (%rsp)
movq %r14, %r12
testq %r13, %r13
movq 0x8(%rsp), %r14
je 0x2b65f9
movq %r14, %rdi
movq %r13, %rsi
callq 0x2afd54
movl $0x48, %esi
movq %r14, %rdi
callq 0x28c518
testq %rax, %rax
je 0x2b6635
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movq $0x0, 0x40(%rax)
movb $0x77, (%rax)
movw $0xffff, 0x32(%rax)     # imm = 0xFFFF
movl $0x1, 0x28(%rax)
movq %r12, %r14
movq 0x8(%r12), %rcx
movq %rax, (%rcx,%rbx)
movl (%rsp), %r12d
jmp 0x2b664a
incl %r12d
incq %r15
movswq 0x46(%r14), %rax
addq $0x20, %rbx
cmpq %rax, %r15
jl 0x2b65ae
testl %r12d, %r12d
movq 0x18(%rsp), %r12
movq 0x10(%rsp), %rbx
movq 0x20(%rsp), %r15
je 0x2b669a
movswl 0x46(%r14), %eax
testl %eax, %eax
jle 0x2b66c2
movq 0x8(%r14), %rdx
incl %eax
addq $0x1a, %rdx
xorl %ecx, %ecx
movzbl (%rdx), %esi
addl %esi, %ecx
decl %eax
addq $0x20, %rdx
cmpl $0x1, %eax
jg 0x2b6688
jmp 0x2b66c4
leaq 0x12a90b(%rip), %rsi    # 0x3e0fac
jmp 0x2b66aa
leaq 0x12a8b0(%rip), %rsi    # 0x3e0f5a
movq %r12, %rdi
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x284eb8
xorl %ecx, %ecx
movzwl 0x44(%r14), %edi
shrl $0xf, %edi
addl %ecx, %edi
shll $0x2, %edi
callq 0x2a680d
movw %ax, 0x4c(%r14)
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x2b66f2
movq %r13, %rdi
callq 0x2cd92e
movq 0x28(%r13), %r13
jmp 0x2b66df
movq 0x8(%rsp), %r13
cmpb $0x0, 0xb5(%r13)
je 0x2b6743
cmpb $0x0, 0xb5(%r13)
je 0x2b6aa7
movq (%r14), %rsi
movq 0x70(%r14), %rdi
addq $0x8, %rdi
movq %r14, %rdx
callq 0x2aed98
testq %rax, %rax
je 0x2b6a6b
movq 0x8(%rsp), %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2824bb
movq %r12, %rdi
callq 0x2c5ddf
testq %rax, %rax
je 0x2b6aa7
movq %rax, %rdi
movq %rax, (%rsp)
movl $0x74, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
cmpq $0x0, 0x18(%r14)
leaq 0x11aad9(%rip), %rax    # 0x3d1251
leaq 0x12a859(%rip), %rdx    # 0x3e0fd8
cmoveq %rax, %rdx
leaq 0x11b9c8(%rip), %rax    # 0x3d2152
leaq 0x12be52(%rip), %rsi    # 0x3e25e3
cmoveq %rax, %rsi
movq %rsi, 0x48(%rsp)
cmpq $0x0, 0x30(%rsp)
movq %r15, 0x20(%rsp)
je 0x2b6ab6
movl 0x38(%r12), %eax
leal 0x1(%rax), %r15d
movq %rax, 0x28(%rsp)
addl $0x3, %eax
movl %eax, 0x3c(%rsp)
movl %eax, 0x38(%r12)
movq 0xa0(%r12), %rax
testq %rax, %rax
cmoveq %r12, %rax
movb $0x1, 0x21(%rax)
movl 0x7c(%r12), %ecx
movq (%rsp), %r13
movq %r13, %rdi
movl $0x61, %esi
movl $0x1, %edx
movl %ebp, %r8d
callq 0x2b200c
movslq 0x90(%r13), %rdx
testq %rdx, %rdx
jle 0x2b6814
movq 0x88(%r13), %rax
leaq (%rdx,%rdx,2), %rcx
movw $0x10, -0x16(%rax,%rcx,8)
movl $0x2, 0x34(%r12)
movq %rdx, 0x40(%rsp)
leal 0x1(%rdx), %r8d
movq %r13, %rdi
movl $0xd, %esi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x2b200c
cmpl $0x0, 0x30(%r12)
jne 0x2b6aa7
movq %r12, %rdi
movq 0x30(%rsp), %rsi
movl $0x41, %edx
callq 0x2cd980
testq %rax, %rax
je 0x2b6aa7
movzwl 0x46(%rax), %ecx
movw %cx, 0x48(%r14)
movw %cx, 0x46(%r14)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movw $0x0, 0x46(%rax)
movq %rbx, 0x10(%rsp)
xorl %ebx, %ebx
movq %rbx, 0x8(%rax)
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x27bd74
leaq 0x50(%rsp), %rdx
movb $0xd, (%rdx)
movl %r15d, 0x4(%rdx)
movl $0x0, 0x8(%rdx)
movq %rbx, 0x18(%rdx)
movq %rbx, 0xc(%rdx)
movq %r12, %rdi
movq 0x30(%rsp), %rsi
callq 0x2b9266
cmpl $0x0, 0x30(%r12)
jne 0x2b6aa7
movq %r12, 0x18(%rsp)
movq 0x28(%rsp), %r13
addl $0x2, %r13d
movq (%rsp), %r12
movq %r12, %rdi
movl $0x42, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movq %r12, %rdx
movq 0x18(%r12), %rax
movb $0x0, 0x1f(%rax)
movl $0x0, 0x28(%rax)
movl 0x90(%r12), %eax
movq (%r12), %rcx
leaq 0x213574(%rip), %r12    # 0x4c9e88
cmpb $0x0, 0x61(%rcx)
movq %r12, %rcx
jne 0x2b693c
leal -0x1(%rax), %ecx
movq 0x40(%rsp), %rsi
testl %esi, %esi
cmovnsl %esi, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%rdx), %rcx
movl %eax, 0x8(%rcx)
movl 0x54(%rsp), %edx
movq (%rsp), %rdi
movl $0xe, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl %eax, %r15d
movl 0x5c(%rsp), %edx
movl 0x60(%rsp), %ecx
movq (%rsp), %rdi
movl $0x5b, %esi
movl %r13d, %r8d
callq 0x2b200c
movq (%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2cda4a
movq (%rsp), %rdi
movl $0x78, %esi
movl $0x1, %edx
movl 0x3c(%rsp), %ebx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movq (%rsp), %rdi
movl $0x79, %esi
movl $0x1, %edx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x2b200c
movq (%rsp), %rdi
movl $0xb, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movq (%rsp), %rdi
movl 0x90(%rdi), %eax
movq (%rdi), %rcx
cmpb $0x0, 0x61(%rcx)
jne 0x2b69fa
leal -0x1(%rax), %ecx
testl %r15d, %r15d
cmovnsl %r15d, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %r12
shlq $0x3, %r12
addq 0x88(%rdi), %r12
movl %eax, 0x8(%r12)
movl $0x74, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x2cdb39
movq %rax, %r15
movq 0x18(%rsp), %r12
jmp 0x2b6afd
orl $0x280, %eax            # imm = 0x280
movl %eax, 0x40(%r14)
movq %r12, %rdi
movq %r14, %rsi
movq %r8, %rbp
movq %rbx, 0x10(%rsp)
movq %r12, %rbx
movq %r15, %r12
movl %ecx, %r15d
callq 0x2cd33d
movl %r15d, %ecx
movq %r12, %r15
movq %rbx, %r12
movq 0x10(%rsp), %rbx
movq %rbp, %r8
jmp 0x2b64d0
movq $0x0, 0x148(%r12)
movq 0x8(%rsp), %rax
orb $0x1, 0x2c(%rax)
cmpq $0x0, 0x18(%r14)
jne 0x2b6aa7
movq 0xf8(%r12), %rdi
cmpq $0x0, (%r15)
cmovneq %r15, %rbx
movl (%rbx), %esi
subl %edi, %esi
callq 0x2b3103
addl $0xd, %eax
movl %eax, 0x50(%r14)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x108(%r12), %rax
cmpb $0x0, 0x28(%rsp)
cmoveq %rbx, %rax
movq (%rax), %rsi
movq 0xf8(%r12), %r8
movl %esi, %ecx
subl %r8d, %ecx
cmpb $0x3b, (%rsi)
movq %rbx, 0x10(%rsp)
je 0x2b6ae4
addl 0x8(%rax), %ecx
leaq 0x12a4f2(%rip), %rsi    # 0x3e0fdd
movq 0x8(%rsp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x284f95
movq %rax, %r15
movq 0x20(%r13), %rax
movslq %ebp, %rbx
shlq $0x5, %rbx
movq (%rax,%rbx), %rdx
movq (%r14), %r8
movl 0x78(%r12), %r10d
movl 0x7c(%r12), %r11d
subq $0x8, %rsp
leaq 0x12a4c8(%rip), %rsi    # 0x3e0fec
movq %r12, %rdi
movq 0x50(%rsp), %rcx
movq %r8, %r9
xorl %eax, %eax
pushq %r10
pushq %r15
pushq %r11
callq 0x2cdd65
addq $0x20, %rsp
testq %r15, %r15
je 0x2b6b50
movq %r13, %rdi
movq %r15, %rsi
callq 0x28c3e7
movq %r12, %rdi
movl %ebp, %esi
callq 0x2cdeb0
testb $0x8, 0x40(%r14)
je 0x2b6b8d
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax,%rbx), %rcx
cmpq $0x0, 0x68(%rcx)
jne 0x2b6b8d
addq %rbx, %rax
movq (%rax), %rdx
leaq 0x12a4cb(%rip), %rsi    # 0x3e104e
movq %r12, %rdi
xorl %eax, %eax
callq 0x2cdd65
movq (%r14), %rdx
leaq 0x12a4e1(%rip), %rsi    # 0x3e1078
movq 0x8(%rsp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x284f95
movq (%rsp), %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x2cdedf
movq 0x10(%rsp), %rbx
movq 0x20(%rsp), %r15
jmp 0x2b6701