// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/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) || db->mallocFailed ){
    return;
  }
  p = pParse->pNewTable;
  if( p==0 ) return;

  assert( !db->init.busy || !pSelect );

  /* If the db->init.busy is 1 it means we are reading the SQL off the
  ** "sqlite_master" or "sqlite_temp_master" 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( db->init.busy ){
    p->tnum = db->init.newTnum;
  }

  /* 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);
    }else{
      p->tabFlags |= TF_WithoutRowid;
      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);
  }
#endif /* !defined(SQLITE_OMIT_CHECK) */

  /* 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 SQLITE_MASTER 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;
      Table *pSelTab;

      assert(pParse->nTab==1);
      sqlite3VdbeAddOp3(v, OP_OpenWrite, 1, pParse->regRoot, iDb);
      sqlite3VdbeChangeP5(v, OPFLAG_P2ISREG);
      pParse->nTab = 2;
      sqlite3SelectDestInit(&dest, SRT_Table, 1);
      sqlite3Select(pParse, pSelect, &dest);
      sqlite3VdbeAddOp1(v, OP_Close, 1);
      if( pParse->nErr==0 ){
        pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect);
        if( pSelTab==0 ) return;
        assert( p->aCol==0 );
        p->nCol = pSelTab->nCol;
        p->aCol = pSelTab->aCol;
        pSelTab->nCol = 0;
        pSelTab->aCol = 0;
        sqlite3DeleteTable(db, pSelTab);
      }
    }

    /* 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 
    ** SQLITE_MASTER table.  We just need to update that slot with all
    ** the information we've collected.
    */
    sqlite3NestedParse(pParse,
      "UPDATE %Q.%s "
         "SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q "
       "WHERE rowid=#%d",
      db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
      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 ){
      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->zName
        );
      }
    }
#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,
                             sqlite3Strlen30(p->zName),p);
    if( pOld ){
      assert( p==pOld );  /* Malloc must have failed inside HashInsert() */
      db->mallocFailed = 1;
      return;
    }
    pParse->pNewTable = 0;
    db->flags |= SQLITE_InternChanges;

#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 0x373f6
movq (%rdi), %rbp
cmpb $0x0, 0x50(%rbp)
je 0x37405
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x240(%rdi), %r9
testq %r9, %r9
je 0x373f6
movq %r8, 0x30(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdi, 0x20(%rsp)
movq %rdx, 0x48(%rsp)
cmpb $0x0, 0x99(%rbp)
je 0x37438
movl 0x94(%rbp), %eax
movl %eax, 0x3c(%r9)
movq %r9, 0x10(%rsp)
movl %ecx, 0x44(%rsp)
testb $0x20, %cl
jne 0x3751e
movq 0x10(%rsp), %r12
movq 0x70(%r12), %rsi
movq %rbp, %rdi
callq 0x10cd8
movl %eax, %r14d
movq 0x30(%r12), %r8
testq %r8, %r8
movq 0x20(%rsp), %r13
je 0x3747e
pushq $0x4
popq %rdx
movq %r13, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x483a4
movswl 0x42(%r12), %eax
movq 0x8(%r12), %rcx
addq $0x2a, %rcx
xorl %edi, %edi
testl %eax, %eax
jle 0x374a0
movzbl (%rcx), %edx
addl %edx, %edi
decl %eax
addq $0x30, %rcx
jmp 0x3748f
movzwl 0x40(%r12), %eax
shrl $0xf, %eax
addl %eax, %edi
shll $0x2, %edi
callq 0x30110
movw %ax, 0x46(%r12)
leaq 0x10(%r12), %rbx
movl 0x44(%rsp), %r15d
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x374d9
movq %rbx, %rdi
callq 0x48461
addq $0x28, %rbx
jmp 0x374c3
cmpb $0x0, 0x99(%rbp)
movq 0x30(%rsp), %rbx
je 0x37556
movq (%r12), %rbx
movq 0x70(%r12), %r14
addq $0x8, %r14
movq %rbx, %rdi
callq 0x90a2
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movq %r12, %rcx
callq 0x30165
testq %rax, %rax
je 0x376c2
movb $0x1, 0x50(%rbp)
jmp 0x373f6
movq 0x10(%rsp), %r14
movzbl 0x48(%r14), %eax
testb $0x8, %al
jne 0x376a1
testb $0x4, %al
movq 0x20(%rsp), %r15
jne 0x37709
movq (%r14), %rdx
leaq 0x2d85e(%rip), %rsi     # 0x64da5
movq %r15, %rdi
xorl %eax, %eax
callq 0x10b53
jmp 0x3744a
movq %r13, %rdi
callq 0x43f1b
testq %rax, %rax
je 0x373f6
movl %r14d, 0xc(%rsp)
pushq $0x38
popq %rsi
movq %rax, %rdi
movq %rax, %r14
xorl %edx, %edx
callq 0x457e7
cmpq $0x0, 0x18(%r12)
leaq 0x2d83c(%rip), %rax     # 0x64dc5
leaq 0x2d83b(%rip), %rdx     # 0x64dcb
cmoveq %rax, %rdx
leaq 0x2e0ee(%rip), %rax     # 0x65689
leaq 0x2f69c(%rip), %rcx     # 0x66c3e
cmoveq %rax, %rcx
movq %rcx, 0x60(%rsp)
testq %rbx, %rbx
movq %r14, 0x68(%rsp)
je 0x3794d
movl 0x1b0(%r13), %ecx
pushq $0x33
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
movl 0xc(%rsp), %r8d
callq 0x43f69
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x375e9
movslq 0x34(%r14), %rcx
imulq $0x18, %rcx, %rcx
movb $0x2, -0x15(%rax,%rcx)
movl $0x2, 0x54(%r13)
leaq 0x50(%rsp), %rdx
movw $0x8, (%rdx)
movl $0x1, 0x4(%rdx)
andq $0x0, 0x8(%rdx)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x39547
pushq $0x38
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x457e7
cmpl $0x0, 0x50(%r13)
jne 0x37663
movq %r13, %rdi
movq %rbx, %rsi
callq 0x484ae
testq %rax, %rax
je 0x373f6
movzwl 0x42(%rax), %ecx
movw %cx, 0x42(%r12)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r12)
andw $0x0, 0x42(%rax)
andq $0x0, 0x8(%rax)
movq %rbp, %rdi
movq %rax, %rsi
callq 0x9565
movq 0x8(%r12), %r14
movswl 0x42(%r12), %ebx
xorl %r15d, %r15d
testl %ebx, %ebx
movl $0x0, %eax
cmovgl %ebx, %eax
imulq $0x30, %rax, %r13
xorl %r12d, %r12d
cmpl %r15d, %r13d
je 0x377ee
movq (%r14,%r15), %rdi
callq 0x4bc12
addl %eax, %r12d
addl $0x5, %r12d
addq $0x30, %r15
jmp 0x37682
leaq 0x2d6cb(%rip), %rsi     # 0x64d73
movq 0x20(%rsp), %rdi
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b53
andq $0x0, 0x240(%r13)
orb $0x2, 0x2c(%rbp)
cmpq $0x0, 0x18(%r12)
movq 0x70(%rsp), %rax
jne 0x373f6
movq 0x258(%r13), %rdi
cmpq $0x0, (%rax)
movq 0x48(%rsp), %rcx
cmovneq %rax, %rcx
movl (%rcx), %esi
subl %edi, %esi
callq 0x32d3f
addl $0xd, %eax
movl %eax, 0x4c(%r12)
jmp 0x373f6
orb $0x20, %al
movb %al, 0x48(%r14)
movq 0x10(%r15), %rbx
movl 0x1f0(%r15), %esi
testl %esi, %esi
je 0x37729
movq %rbx, %rdi
callq 0x48744
movb $0x70, (%rax)
movl 0x1f4(%r15), %esi
testl %esi, %esi
je 0x3773f
movq %rbx, %rdi
callq 0x48744
movb $0x10, (%rax)
cmpw $0x0, 0x40(%r14)
js 0x379bc
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3ca7d
testq %rax, %rax
je 0x3744a
movq %rax, %rbx
movq 0x20(%rsp), %r15
movq (%r15), %rdi
movq 0x10(%rsp), %r14
movq 0x8(%r14), %rax
movswq 0x40(%r14), %rcx
imulq $0x30, %rcx, %rcx
movq (%rax,%rcx), %rsi
callq 0xf7f4
movq 0x8(%rbx), %rcx
movq %rax, 0x8(%rcx)
movb 0x210(%r15), %al
movb %al, 0x18(%rcx)
movzbl 0x49(%r14), %r9d
subq $0x20, %rsp
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
andl $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x38077
addq $0x20, %rsp
testq %rax, %rax
je 0x3744a
movq %rax, %r13
movb 0x63(%rax), %al
andb $-0x4, %al
orb $0x2, %al
movb %al, 0x63(%r13)
movq 0x10(%rsp), %r14
orw $-0x1, 0x40(%r14)
jmp 0x379c7
movq %rbp, 0x18(%rsp)
movq 0x10(%rsp), %rbp
movq (%rbp), %rdi
callq 0x4bc12
movl %eax, %r14d
addl %r12d, %r14d
cmpl $0x32, %r14d
leaq 0x2db15(%rip), %rax     # 0x65327
leaq 0x2db10(%rip), %rcx     # 0x65329
cmovlq %rax, %rcx
movq %rcx, 0x28(%rsp)
leaq 0x2db06(%rip), %rax     # 0x6532f
leaq 0x2dafe(%rip), %r15     # 0x6532e
cmovlq %rax, %r15
imull $0x6, %ebx, %eax
leal (%rax,%r14), %r12d
addl $0x23, %r12d
movl %r12d, %edi
callq 0xa047
movq %rax, %rbx
testq %rax, %rax
je 0x37b7b
movq %r15, 0x30(%rsp)
cmpl $0x32, %r14d
leaq 0x2e7a1(%rip), %rax     # 0x66004
leaq 0x2dac0(%rip), %r13     # 0x6532a
cmovlq %rax, %r13
leaq 0x2dabc(%rip), %rdx     # 0x65331
movl %r12d, 0x38(%rsp)
movl %r12d, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb40d
movq %rbx, %rdi
callq 0x90a2
leaq 0x50(%rsp), %r14
movl %eax, (%r14)
movq (%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4bc2f
movslq (%r14), %rax
leal 0x1(%rax), %r12d
movb $0x28, (%rbx,%rax)
movq 0x8(%rbp), %r15
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movswl 0x42(%rax), %eax
movl 0x38(%rsp), %edi
subl %r12d, %edi
movslq %r12d, %r14
addq %rbx, %r14
cmpl %eax, %ebp
jge 0x37992
movq %r14, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0xb40d
movq %r14, %rdi
callq 0x90a2
addl %r12d, %eax
movl %eax, 0x50(%rsp)
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
callq 0x4bc2f
movsbq 0x29(%r15), %rax
leaq 0x47be3(%rip), %rcx     # 0x7f4f0
movq -0x308(%rcx,%rax,8), %r14
movq %r14, %rdi
callq 0x90a2
movl %eax, %r12d
movslq 0x50(%rsp), %r13
movq %r13, %rdi
addq %rbx, %rdi
movl %eax, %edx
movq %r14, %rsi
callq 0x7240
addl %r13d, %r12d
movl %r12d, 0x50(%rsp)
incl %ebp
addq $0x30, %r15
movq 0x28(%rsp), %r13
jmp 0x378b7
leaq 0x268(%r13), %rax
testb %r15b, %r15b
cmoveq 0x48(%rsp), %rax
movq (%rax), %rsi
movq 0x258(%r13), %r8
movl %esi, %ecx
subl %r8d, %ecx
cmpb $0x3b, (%rsi)
je 0x37974
addl 0x8(%rax), %ecx
movl 0xc(%rsp), %r14d
leaq 0x2d450(%rip), %rsi     # 0x64dd0
movq %rbp, %rdi
xorl %eax, %eax
callq 0x10c1b
movq %rax, %rbx
jmp 0x37b94
leaq 0x2bad3(%rip), %rdx     # 0x6346c
movq %r14, %rsi
movq 0x30(%rsp), %rcx
xorl %eax, %eax
callq 0xb40d
movq 0x10(%rsp), %r12
movq 0x20(%rsp), %r13
movq 0x18(%rsp), %rbp
jmp 0x37b8f
movq %r14, %rdi
callq 0x30033
movq %rax, %r13
orb $0x20, 0x63(%r13)
movzwl 0x5e(%r13), %ebx
xorl %eax, %eax
cmpq %rax, %rbx
je 0x379f3
movq 0x8(%r14), %rcx
movq 0x8(%r13), %rdx
movswq (%rdx,%rax,2), %rdx
imulq $0x30, %rdx, %rdx
movb $0x1, 0x28(%rcx,%rdx)
incq %rax
jmp 0x379d3
movq %rbp, 0x18(%rsp)
orb $0x8, 0x63(%r13)
movl 0x3c(%r14), %eax
movl %eax, 0x58(%r13)
leaq 0x10(%r14), %r12
movq %r13, 0x38(%rsp)
movq (%r12), %r12
testq %r12, %r12
je 0x37b07
movb 0x63(%r12), %al
andb $0x3, %al
cmpb $0x2, %al
je 0x37afe
movzwl 0x5e(%r12), %eax
movw %ax, 0x28(%rsp)
movzwl %ax, %r15d
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpq %rbp, %rbx
je 0x37a63
movq 0x8(%r12), %rdi
movq 0x8(%r13), %rax
movswl (%rax,%rbp,2), %edx
movl %r15d, %esi
callq 0x4876a
xorl $0x1, %eax
addl %eax, %r14d
incq %rbp
jmp 0x37a3e
testl %r14d, %r14d
je 0x37af3
addl %r15d, %r14d
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x48782
testl %eax, %eax
jne 0x3744a
movzwl 0x5e(%r12), %eax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
cmpq %rbp, %rbx
je 0x37afe
movq %rbx, %r15
movq 0x8(%r12), %r14
movzwl 0x5e(%r12), %esi
movq 0x8(%r13), %rax
movzwl (%rax,%rbp,2), %ebx
movswl %bx, %edx
movq %r14, %rdi
callq 0x4876a
testl %eax, %eax
jne 0x37ae6
movq 0x28(%rsp), %rdx
movslq %edx, %rdx
movw %bx, (%r14,%rdx,2)
movq 0x40(%r13), %rax
movq (%rax,%rbp,8), %rax
movq 0x40(%r12), %rcx
movq %rax, (%rcx,%rdx,8)
incl %edx
movq %rdx, 0x28(%rsp)
incq %rbp
movq %r15, %rbx
movq 0x38(%rsp), %r13
jmp 0x37a97
movzwl 0x28(%rsp), %eax
movw %ax, 0x60(%r12)
addq $0x28, %r12
jmp 0x37a0e
movq 0x10(%rsp), %rax
movzwl 0x42(%rax), %eax
movswl %ax, %edx
cmpl %edx, %ebx
jge 0x37c6a
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x48782
testl %eax, %eax
jne 0x3744a
xorl %r12d, %r12d
leaq 0x2bfc1(%rip), %r15     # 0x63afe
movq 0x10(%rsp), %rax
movswl 0x42(%rax), %eax
cmpl %eax, %r12d
jge 0x3744a
movq 0x8(%r13), %r14
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x4876a
testl %eax, %eax
jne 0x37b76
movslq %ebx, %rax
movw %r12w, (%r14,%rax,2)
movq 0x40(%r13), %rcx
movq %r15, (%rcx,%rax,8)
incl %ebx
incl %r12d
jmp 0x37b3d
movq 0x18(%rsp), %rax
movb $0x1, 0x50(%rax)
movq %rbp, %r12
movq %rax, %rbp
movq 0x20(%rsp), %r13
movl 0xc(%rsp), %r14d
movq 0x20(%rbp), %rax
movslq %r14d, %r15
shlq $0x5, %r15
cmpl $0x1, %r14d
leaq 0x2c144(%rip), %rdx     # 0x63cee
leaq 0x2c150(%rip), %rcx     # 0x63d01
cmoveq %rdx, %rcx
movq (%rax,%r15), %rdx
movq (%r12), %r9
movl 0x1ac(%r13), %r10d
movl 0x1b0(%r13), %r11d
leaq 0x2d20d(%rip), %rsi     # 0x64ddf
movq %r13, %rdi
movq 0x60(%rsp), %r8
xorl %eax, %eax
pushq %r10
pushq %rbx
pushq %r11
pushq %r9
callq 0x48567
addq $0x20, %rsp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x9805
movq %r13, %rdi
movl %r14d, %ebx
movl %r14d, %esi
callq 0x48697
testb $0x8, 0x48(%r12)
je 0x37c34
movq 0x20(%rbp), %rax
movq 0x18(%rax,%r15), %rcx
cmpq $0x0, 0x68(%rcx)
jne 0x37c34
addq %r15, %rax
movq (%rax), %rdx
leaq 0x2d20c(%rip), %rsi     # 0x64e36
movq %r13, %rdi
xorl %eax, %eax
callq 0x48567
movq (%r12), %rdx
leaq 0x2d221(%rip), %rsi     # 0x64e60
movq %rbp, %rdi
xorl %eax, %eax
callq 0x10c1b
movq 0x68(%rsp), %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x486fe
cmpb $0x0, 0x99(%rbp)
jne 0x374e7
jmp 0x373f6
movw %ax, 0x60(%r13)
movq 0x18(%rsp), %rbp
jmp 0x3744a