// File: /workspace/github_c_makefile_star2_O3/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 0x2acfd4
movq %rdi, %r12
movq 0x148(%rdi), %r14
testq %r14, %r14
je 0x2acfd4
movq %rdx, %rbx
movq %rsi, %r15
movq (%r12), %r13
testq %r8, %r8
movq %r8, 0x18(%rsp)
je 0x2ac89f
cmpb $0x0, 0xb5(%r13)
je 0x2ac8df
leaq 0x11d8d6(%rip), %rsi    # 0x3ca170
jmp 0x2acac7
movl %ecx, %ebp
movq (%r14), %rsi
movq %r13, %rdi
callq 0x2c3b30
testl %eax, %eax
je 0x2ac8b5
orb $0x10, 0x41(%r14)
leaq 0xb5(%r13), %rdx
cmpb $0x0, 0xb5(%r13)
movl %ebp, %ecx
je 0x2ac8e6
movl 0xb0(%r13), %eax
movl %eax, 0x38(%r14)
cmpl $0x1, %eax
jne 0x2ac8e6
orb $0x1, 0x40(%r14)
jmp 0x2ac8e6
leaq 0xb5(%r13), %rdx
testb %cl, %cl
js 0x2ac91e
movq %rdx, 0x10(%rsp)
movl %ecx, 0x40(%rsp)
movq 0x70(%r14), %rax
testq %rax, %rax
movq %r13, 0x8(%rsp)
je 0x2ac954
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 0x2ac90e
jmp 0x2ac959
movl 0x40(%r14), %eax
testb $0x8, %al
jne 0x2acac0
testb $0x4, %al
jne 0x2ace78
movq (%r14), %rdx
leaq 0x12aefb(%rip), %rsi    # 0x3d7837
movq %r12, %rdi
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27b48d
movl $0xffff8000, %ebp       # imm = 0xFFFF8000
movq 0x30(%r14), %r8
testq %r8, %r8
je 0x2ac997
movq %r12, %rdi
movq %r14, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x2c4108
cmpl $0x0, 0x30(%r12)
je 0x2ac997
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x2ac98f
movq 0x8(%rsp), %rdi
callq 0x2a65a3
movq $0x0, 0x30(%r14)
testb $0x60, 0x40(%r14)
movzwl 0x46(%r14), %eax
je 0x2aca91
testw %ax, %ax
jle 0x2acab7
movq %r15, 0x38(%rsp)
movq %rbx, 0x20(%rsp)
movq %r12, 0x28(%rsp)
xorl %r15d, %r15d
movl $0x8, %ebx
xorl %r12d, %r12d
movq 0x8(%r14), %rax
testb $0x60, 0x14(%rax,%rbx)
je 0x2aca65
movq (%rax,%rbx), %r13
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x8, %edx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x2c4108
testl %eax, %eax
je 0x2aca68
movl %r12d, 0x30(%rsp)
movq %r14, %r12
testq %r13, %r13
movq 0x8(%rsp), %r14
je 0x2aca16
movq %r14, %rdi
movq %r13, %rsi
callq 0x2a6164
movl $0x48, %esi
movq %r14, %rdi
callq 0x282a35
testq %rax, %rax
je 0x2aca52
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 0x30(%rsp), %r12d
jmp 0x2aca68
incl %r12d
incq %r15
movswq 0x46(%r14), %rax
addq $0x20, %rbx
cmpq %rax, %r15
jl 0x2ac9ca
testl %r12d, %r12d
movq 0x28(%rsp), %r12
movq 0x20(%rsp), %rbx
movq 0x38(%rsp), %r15
je 0x2acab7
testw %ax, %ax
jle 0x2acadf
movq 0x8(%r14), %rcx
movzwl %ax, %edx
incl %edx
addq $0x1a, %rcx
xorl %eax, %eax
movzbl (%rcx), %esi
addl %esi, %eax
decl %edx
addq $0x20, %rcx
cmpl $0x1, %edx
ja 0x2acaa5
jmp 0x2acae1
leaq 0x12ad99(%rip), %rsi    # 0x3d7857
jmp 0x2acac7
leaq 0x12ad3e(%rip), %rsi    # 0x3d7805
movq %r12, %rdi
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27b48d
xorl %eax, %eax
movzwl 0x44(%r14), %edi
shrl $0xf, %edi
addl %eax, %edi
shll $0x2, %edi
callq 0x29d44f
movw %ax, 0x4c(%r14)
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x2acb0f
movq %r13, %rdi
callq 0x2c41e2
movq 0x28(%r13), %r13
jmp 0x2acafc
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x2acb4d
movq (%r14), %rsi
movq 0x70(%r14), %rdi
addq $0x8, %rdi
movq %r14, %rdx
callq 0x2a5210
testq %rax, %rax
je 0x2ace33
movq 0x8(%rsp), %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x278b1c
movq %r12, %rdi
callq 0x2bc630
testq %rax, %rax
je 0x2acfd4
movq %rax, %r13
movq %rax, %rdi
movl $0x74, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
cmpq $0x0, 0x18(%r14)
leaq 0x11afa8(%rip), %rax    # 0x3c7b29
leaq 0x12acfb(%rip), %rdx    # 0x3d7883
cmoveq %rax, %rdx
leaq 0x11be97(%rip), %rax    # 0x3c8a2a
leaq 0x12c2f4(%rip), %rcx    # 0x3d8e8e
cmoveq %rax, %rcx
movq %rcx, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
movq %r15, 0x38(%rsp)
movq %r13, 0x30(%rsp)
je 0x2ace9f
movl 0x38(%r12), %eax
leal 0x1(%rax), %r15d
movq %rax, 0x40(%rsp)
addl $0x3, %eax
movl %eax, 0x4c(%rsp)
movl %eax, 0x38(%r12)
movq 0xa0(%r12), %rax
testq %rax, %rax
cmoveq %r12, %rax
movb $0x1, 0x21(%rax)
movl 0x7c(%r12), %ecx
movq %r13, %rdi
movl $0x61, %esi
movl $0x1, %edx
movl %ebp, %r8d
callq 0x2a83e1
movq %r13, %rdi
movslq 0x90(%r13), %r13
testq %r13, %r13
jle 0x2acc28
movq 0x88(%rdi), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
movw $0x10, -0x16(%rax,%rcx,8)
movl $0x2, 0x34(%r12)
leal 0x1(%r13), %r8d
movl $0xd, %esi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x2a83e1
cmpl $0x0, 0x30(%r12)
jne 0x2acfd4
movq %r12, %rdi
movq 0x18(%rsp), %rsi
movl $0x41, %edx
callq 0x2c4234
testq %rax, %rax
je 0x2acfd4
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, 0x20(%rsp)
xorl %ebx, %ebx
movq %rbx, 0x8(%rax)
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x272447
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 0x18(%rsp), %rsi
callq 0x2af648
cmpl $0x0, 0x30(%r12)
jne 0x2acfd4
movq %r12, 0x28(%rsp)
movq 0x40(%rsp), %r12
addl $0x2, %r12d
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x42, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq 0x18(%rbx), %rax
movb $0x0, 0x1f(%rax)
movl $0x0, 0x28(%rax)
movl 0x90(%rbx), %eax
movq (%rbx), %rcx
leaq 0x21216e(%rip), %r15    # 0x4bee88
cmpb $0x0, 0x61(%rcx)
movq %r15, %rcx
jne 0x2acd3f
leal -0x1(%rax), %ecx
testl %r13d, %r13d
cmovnsl %r13d, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%rbx), %rcx
movl %eax, 0x8(%rcx)
movl 0x54(%rsp), %edx
movq %rbx, %rdi
movl $0xe, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl %eax, 0x18(%rsp)
movl 0x5c(%rsp), %edx
movl 0x60(%rsp), %ecx
movq %rbx, %rdi
movl $0x5b, %esi
movl %r12d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2c42fe
movq %rbx, %rdi
movl $0x78, %esi
movl $0x1, %edx
movl 0x4c(%rsp), %r13d
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0x79, %esi
movl $0x1, %edx
movl %r12d, %ecx
movl 0x18(%rsp), %r12d
movl %r13d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0xb, %esi
xorl %edx, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl 0x90(%rbx), %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
jne 0x2acdfb
leal -0x1(%rax), %ecx
testl %r12d, %r12d
cmovnsl %r12d, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %r15
shlq $0x3, %r15
addq 0x88(%rbx), %r15
movl %eax, 0x8(%r15)
movq %rbx, %rdi
movl $0x74, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x2c43f6
movq %rax, %r15
movq 0x28(%rsp), %r12
jmp 0x2acee6
movq $0x0, 0x148(%r12)
movq 0x8(%rsp), %rax
orb $0x1, 0x2c(%rax)
cmpq $0x0, 0x18(%r14)
jne 0x2acfd4
movq 0xf8(%r12), %rdi
cmpq $0x0, (%r15)
cmovneq %r15, %rbx
movl (%rbx), %esi
subl %edi, %esi
callq 0x2a94d7
addl $0xd, %eax
movl %eax, 0x50(%r14)
jmp 0x2acfd4
orl $0x280, %eax            # imm = 0x280
movl %eax, 0x40(%r14)
movq %r12, %rdi
movq %r14, %rsi
movl %ecx, %ebp
movq %rdx, 0x10(%rsp)
callq 0x2c3c33
movq 0x10(%rsp), %rdx
movl %ebp, %ecx
jmp 0x2ac8ea
leaq 0x108(%r12), %rax
cmpb $0x0, 0x40(%rsp)
cmoveq %rbx, %rax
movq (%rax), %rsi
movq 0xf8(%r12), %r8
movl %esi, %ecx
subl %r8d, %ecx
cmpb $0x3b, (%rsi)
movq %rbx, 0x20(%rsp)
je 0x2acecd
addl 0x8(%rax), %ecx
leaq 0x12a9b4(%rip), %rsi    # 0x3d7888
movq 0x8(%rsp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x27b56a
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 0x12a98a(%rip), %rsi    # 0x3d7897
movq %r12, %rdi
movq 0x18(%rsp), %rcx
movq %r8, %r9
xorl %eax, %eax
pushq %r10
pushq %r15
pushq %r11
callq 0x2c461b
addq $0x20, %rsp
testq %r15, %r15
je 0x2acf39
movq %r13, %rdi
movq %r15, %rsi
callq 0x282904
movq (%r12), %rax
movq 0x10(%r12), %rdi
movq 0x20(%rax), %rax
movq 0x18(%rax,%rbx), %rax
movl (%rax), %r8d
incl %r8d
movl $0x5e, %esi
movl %ebp, %edx
movl $0x1, %ecx
callq 0x2a83e1
testb $0x8, 0x40(%r14)
je 0x2acf95
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax,%rbx), %rcx
cmpq $0x0, 0x68(%rcx)
jne 0x2acf95
addq %rbx, %rax
movq (%rax), %rdx
leaq 0x12a96e(%rip), %rsi    # 0x3d78f9
movq %r12, %rdi
xorl %eax, %eax
callq 0x2c461b
movq (%r14), %rdx
leaq 0x12a984(%rip), %rsi    # 0x3d7923
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x27b56a
movq 0x30(%rsp), %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x2c4766
cmpb $0x0, 0xb5(%rbx)
movq 0x20(%rsp), %rbx
movq 0x38(%rsp), %r15
jne 0x2acb19
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq