// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x41787e
cmpq $0x0, -0x28(%rbp)
jne 0x41787e
jmp 0x4180b1
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x417899
jmp 0x4180b1
cmpq $0x0, -0x28(%rbp)
jne 0x4178c5
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0x433d80
cmpl $0x0, %eax
je 0x4178c5
movq -0x30(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, 0x40(%rax)
movq -0x38(%rbp), %rax
cmpb $0x0, 0xb5(%rax)
je 0x41791a
cmpq $0x0, -0x28(%rbp)
je 0x4178f0
movq -0x8(%rbp), %rdi
leaq 0x185d44(%rip), %rsi    # 0x59d628
movb $0x0, %al
callq 0x3cb660
jmp 0x4180b1
movq -0x38(%rbp), %rax
movl 0xb0(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x30(%rbp), %rax
cmpl $0x1, 0x38(%rax)
jne 0x417918
movq -0x30(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x40(%rax)
jmp 0x41791a
movzbl -0x19(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x417998
movq -0x30(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x41794e
movq -0x8(%rbp), %rdi
leaq 0x19535d(%rip), %rsi    # 0x5acc9f
movb $0x0, %al
callq 0x3cb660
jmp 0x4180b1
movq -0x30(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x41797b
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
leaq 0x195362(%rip), %rsi    # 0x5accd1
movb $0x0, %al
callq 0x3cb660
jmp 0x4180b1
movq -0x30(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x280, %ecx            # imm = 0x280
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x433f30
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x70(%rax), %rsi
callq 0x3cb770
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x417a02
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %r8
movl $0x4, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x434550
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x4179fe
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x40c6a0
movq -0x30(%rbp), %rax
movq $0x0, 0x30(%rax)
jmp 0x417a00
jmp 0x417a00
jmp 0x417a02
movq -0x30(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x60, %eax
cmpl $0x0, %eax
je 0x417b0b
movl $0x0, -0x50(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x30(%rbp), %rcx
movswl 0x46(%rcx), %ecx
cmpl %ecx, %eax
jge 0x417aec
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzwl 0x1c(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
andl $0x60, %eax
cmpl $0x0, %eax
je 0x417ad3
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x60(%rbp), %rcx
movl $0x8, %edx
xorl %eax, %eax
movl %eax, %r8d
callq 0x434550
cmpl $0x0, %eax
je 0x417ad1
movq -0x38(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x40c670
movq -0x38(%rbp), %rdi
movl $0x77, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x41d660
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x417adc
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x417ade
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x417a23
cmpl $0x0, -0x50(%rbp)
jne 0x417b09
movq -0x8(%rbp), %rdi
leaq 0x1951f4(%rip), %rsi    # 0x5accf1
movb $0x0, %al
callq 0x3cb660
jmp 0x4180b1
jmp 0x417b0b
movq -0x30(%rbp), %rdi
callq 0x434670
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x417b3e
movq -0x48(%rbp), %rdi
callq 0x434700
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x417b20
movq -0x38(%rbp), %rax
cmpb $0x0, 0xb5(%rax)
jne 0x417fd5
movq -0x8(%rbp), %rdi
callq 0x4299d0
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x417b68
jmp 0x4180b1
movq -0x70(%rbp), %rdi
movl $0x74, %esi
xorl %edx, %edx
callq 0x42ba70
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x417b9b
leaq 0x184418(%rip), %rax    # 0x59bfa2
movq %rax, -0x78(%rbp)
leaq 0x18350c(%rip), %rax    # 0x59b0a1
movq %rax, -0x80(%rbp)
jmp 0x417bb1
leaq 0x196786(%rip), %rax    # 0x5ae328
movq %rax, -0x78(%rbp)
leaq 0x195170(%rip), %rax    # 0x5acd1d
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x417e04
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0xb4(%rbp)
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0xbc(%rbp)
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0xc0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x42e470
movq -0x70(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x7c(%rax), %ecx
movl -0x3c(%rbp), %r8d
movl $0x61, %esi
movl $0x1, %edx
callq 0x410130
movq -0x70(%rbp), %rdi
movl $0x10, %esi
callq 0x3cb9f0
movq -0x8(%rbp), %rax
movl $0x2, 0x34(%rax)
movq -0x70(%rbp), %rdi
callq 0x430ae0
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
movq -0x70(%rbp), %rdi
movl -0xb4(%rbp), %edx
movl -0xb8(%rbp), %r8d
movl $0xd, %esi
xorl %ecx, %ecx
callq 0x410130
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x417c73
jmp 0x4180b1
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x41, %edx
callq 0x4347c0
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xd0(%rbp)
jne 0x417c9b
jmp 0x4180b1
movq -0xd0(%rbp), %rax
movw 0x46(%rax), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x48(%rax)
movq -0x30(%rbp), %rax
movw %cx, 0x46(%rax)
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0xd0(%rbp), %rax
movw $0x0, 0x46(%rax)
movq -0xd0(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x38(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0x3bff20
movl -0xb4(%rbp), %edx
leaq -0xb0(%rbp), %rdi
movl $0xd, %esi
callq 0x430c20
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x41aee0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x417d2f
jmp 0x4180b1
movq -0x70(%rbp), %rdi
movl -0xb4(%rbp), %esi
callq 0x434920
movq -0x70(%rbp), %rdi
movl -0xb8(%rbp), %esi
subl $0x1, %esi
callq 0x429a70
movq -0x70(%rbp), %rdi
movl -0xac(%rbp), %edx
movl $0xe, %esi
callq 0x42ba70
movl %eax, -0xc4(%rbp)
movq -0x70(%rbp), %rdi
movl -0xa4(%rbp), %edx
movl -0xa0(%rbp), %ecx
movl -0xbc(%rbp), %r8d
movl $0x5b, %esi
callq 0x410130
movq -0x70(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x434970
movq -0x70(%rbp), %rdi
movl -0xc0(%rbp), %ecx
movl $0x78, %esi
movl $0x1, %edx
callq 0x410100
movq -0x70(%rbp), %rdi
movl -0xbc(%rbp), %ecx
movl -0xc0(%rbp), %r8d
movl $0x79, %esi
movl $0x1, %edx
callq 0x410130
movq -0x70(%rbp), %rdi
movl -0xc4(%rbp), %esi
callq 0x429db0
movq -0x70(%rbp), %rdi
movl -0xc4(%rbp), %esi
callq 0x429a70
movq -0x70(%rbp), %rdi
movl $0x74, %esi
movl $0x1, %edx
callq 0x42ba70
cmpq $0x0, -0x28(%rbp)
je 0x417e24
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x434b00
movq %rax, -0x88(%rbp)
jmp 0x417ec1
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
je 0x417e40
movq -0x8(%rbp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x108(%rbp)
jmp 0x417e4b
movq -0x18(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xf8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x64(%rbp)
movq -0xd8(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
je 0x417e96
movq -0xd8(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x38(%rbp), %rdi
movq -0x80(%rbp), %rdx
movl -0x64(%rbp), %ecx
movq -0x8(%rbp), %rax
movq 0xf8(%rax), %r8
leaq 0x194e6f(%rip), %rsi    # 0x5acd22
movb $0x0, %al
callq 0x3cb7d0
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x78(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rax), %r8
movq -0x30(%rbp), %rax
movq (%rax), %r9
movq -0x8(%rbp), %rax
movl 0x7c(%rax), %r11d
movq -0x88(%rbp), %r10
movq -0x8(%rbp), %rax
movl 0x78(%rax), %eax
leaq 0x194e27(%rip), %rsi    # 0x5acd31
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x434d60
movq -0x38(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x3c00a0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x434f00
movq -0x30(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x417f93
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x68(%rax)
jne 0x417f91
movq -0x8(%rbp), %rdi
movq -0xe0(%rbp), %rax
movq (%rax), %rdx
leaq 0x194e09(%rip), %rsi    # 0x5acd93
movb $0x0, %al
callq 0x434d60
jmp 0x417f93
movq -0x70(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x10c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
leaq 0x194e04(%rip), %rsi    # 0x5acdbd
movb $0x0, %al
callq 0x3cb7d0
movq -0x118(%rbp), %rdi
movl -0x10c(%rbp), %esi
movq %rax, %rdx
callq 0x434f60
movq -0x38(%rbp), %rax
cmpb $0x0, 0xb5(%rax)
je 0x4180b1
movq -0x30(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x40ada0
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
je 0x41802f
movq -0x38(%rbp), %rdi
callq 0x3c8ba0
jmp 0x4180b1
movq -0x8(%rbp), %rax
movq $0x0, 0x148(%rax)
movq -0x38(%rbp), %rax
movl 0x2c(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x4180af
movq -0x8(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x41807a
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0xf8(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0xfc(%rbp)
movq -0xf8(%rbp), %rdi
movl -0xfc(%rbp), %esi
callq 0x412190
movl %eax, %ecx
addl $0xd, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x4180b1
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw (%rax,%rax)