// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: xferOptimization
static int xferOptimization(
  Parse *pParse,        /* Parser context */
  Table *pDest,         /* The table we are inserting into */
  Select *pSelect,      /* A SELECT statement to use as the data source */
  int onError,          /* How to handle constraint errors */
  int iDbDest           /* The database of pDest */
){
  ExprList *pEList;                /* The result set of the SELECT */
  Table *pSrc;                     /* The table in the FROM clause of SELECT */
  Index *pSrcIdx, *pDestIdx;       /* Source and destination indices */
  struct SrcList_item *pItem;      /* An element of pSelect->pSrc */
  int i;                           /* Loop counter */
  int iDbSrc;                      /* The database of pSrc */
  int iSrc, iDest;                 /* Cursors from source and destination */
  int addr1, addr2;                /* Loop addresses */
  int emptyDestTest;               /* Address of test for empty pDest */
  int emptySrcTest;                /* Address of test for empty pSrc */
  Vdbe *v;                         /* The VDBE we are building */
  KeyInfo *pKey;                   /* Key information for an index */
  int regAutoinc;                  /* Memory register used by AUTOINC */
  int destHasUniqueIdx = 0;        /* True if pDest has a UNIQUE index */
  int regData, regRowid;           /* Registers holding data and rowid */

  if( pSelect==0 ){
    return 0;   /* Must be of the form  INSERT INTO ... SELECT ... */
  }
  if( sqlite3TriggerList(pParse, pDest) ){
    return 0;   /* tab1 must not have triggers */
  }
#ifndef SQLITE_OMIT_VIRTUALTABLE
  if( pDest->tabFlags & TF_Virtual ){
    return 0;   /* tab1 must not be a virtual table */
  }
#endif
  if( onError==OE_Default ){
    if( pDest->iPKey>=0 ) onError = pDest->keyConf;
    if( onError==OE_Default ) onError = OE_Abort;
  }
  assert(pSelect->pSrc);   /* allocated even if there is no FROM clause */
  if( pSelect->pSrc->nSrc!=1 ){
    return 0;   /* FROM clause must have exactly one term */
  }
  if( pSelect->pSrc->a[0].pSelect ){
    return 0;   /* FROM clause cannot contain a subquery */
  }
  if( pSelect->pWhere ){
    return 0;   /* SELECT may not have a WHERE clause */
  }
  if( pSelect->pOrderBy ){
    return 0;   /* SELECT may not have an ORDER BY clause */
  }
  /* Do not need to test for a HAVING clause.  If HAVING is present but
  ** there is no ORDER BY, we will get an error. */
  if( pSelect->pGroupBy ){
    return 0;   /* SELECT may not have a GROUP BY clause */
  }
  if( pSelect->pLimit ){
    return 0;   /* SELECT may not have a LIMIT clause */
  }
  assert( pSelect->pOffset==0 );  /* Must be so if pLimit==0 */
  if( pSelect->pPrior ){
    return 0;   /* SELECT may not be a compound query */
  }
  if( pSelect->selFlags & SF_Distinct ){
    return 0;   /* SELECT may not be DISTINCT */
  }
  pEList = pSelect->pEList;
  assert( pEList!=0 );
  if( pEList->nExpr!=1 ){
    return 0;   /* The result set must have exactly one column */
  }
  assert( pEList->a[0].pExpr );
  if( pEList->a[0].pExpr->op!=TK_ALL ){
    return 0;   /* The result set must be the special operator "*" */
  }

  /* At this point we have established that the statement is of the
  ** correct syntactic form to participate in this optimization.  Now
  ** we have to check the semantics.
  */
  pItem = pSelect->pSrc->a;
  pSrc = sqlite3LocateTableItem(pParse, 0, pItem);
  if( pSrc==0 ){
    return 0;   /* FROM clause does not contain a real table */
  }
  if( pSrc==pDest ){
    return 0;   /* tab1 and tab2 may not be the same table */
  }
#ifndef SQLITE_OMIT_VIRTUALTABLE
  if( pSrc->tabFlags & TF_Virtual ){
    return 0;   /* tab2 must not be a virtual table */
  }
#endif
  if( pSrc->pSelect ){
    return 0;   /* tab2 may not be a view */
  }
  if( pDest->nCol!=pSrc->nCol ){
    return 0;   /* Number of columns must be the same in tab1 and tab2 */
  }
  if( pDest->iPKey!=pSrc->iPKey ){
    return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */
  }
  for(i=0; i<pDest->nCol; i++){
    if( pDest->aCol[i].affinity!=pSrc->aCol[i].affinity ){
      return 0;    /* Affinity must be the same on all columns */
    }
    if( !xferCompatibleCollation(pDest->aCol[i].zColl, pSrc->aCol[i].zColl) ){
      return 0;    /* Collating sequence must be the same on all columns */
    }
    if( pDest->aCol[i].notNull && !pSrc->aCol[i].notNull ){
      return 0;    /* tab2 must be NOT NULL if tab1 is */
    }
  }
  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
    if( pDestIdx->onError!=OE_None ){
      destHasUniqueIdx = 1;
    }
    for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){
      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
    }
    if( pSrcIdx==0 ){
      return 0;    /* pDestIdx has no corresponding index in pSrc */
    }
  }
#ifndef SQLITE_OMIT_CHECK
  if( pDest->pCheck && sqlite3ExprListCompare(pSrc->pCheck,pDest->pCheck,-1) ){
    return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */
  }
#endif
#ifndef SQLITE_OMIT_FOREIGN_KEY
  /* Disallow the transfer optimization if the destination table constains
  ** any foreign key constraints.  This is more restrictive than necessary.
  ** But the main beneficiary of the transfer optimization is the VACUUM 
  ** command, and the VACUUM command disables foreign key constraints.  So
  ** the extra complication to make this rule less restrictive is probably
  ** not worth the effort.  Ticket [6284df89debdfa61db8073e062908af0c9b6118e]
  */
  if( (pParse->db->flags & SQLITE_ForeignKeys)!=0 && pDest->pFKey!=0 ){
    return 0;
  }
#endif
  if( (pParse->db->flags & SQLITE_CountRows)!=0 ){
    return 0;  /* xfer opt does not play well with PRAGMA count_changes */
  }

  /* If we get this far, it means that the xfer optimization is at
  ** least a possibility, though it might only work if the destination
  ** table (tab1) is initially empty.
  */
#ifdef SQLITE_TEST
  sqlite3_xferopt_count++;
#endif
  iDbSrc = sqlite3SchemaToIndex(pParse->db, pSrc->pSchema);
  v = sqlite3GetVdbe(pParse);
  sqlite3CodeVerifySchema(pParse, iDbSrc);
  iSrc = pParse->nTab++;
  iDest = pParse->nTab++;
  regAutoinc = autoIncBegin(pParse, iDbDest, pDest);
  sqlite3OpenTable(pParse, iDest, iDbDest, pDest, OP_OpenWrite);
  if( (pDest->iPKey<0 && pDest->pIndex!=0)          /* (1) */
   || destHasUniqueIdx                              /* (2) */
   || (onError!=OE_Abort && onError!=OE_Rollback)   /* (3) */
  ){
    /* In some circumstances, we are able to run the xfer optimization
    ** only if the destination table is initially empty.  This code makes
    ** that determination.  Conditions under which the destination must
    ** be empty:
    **
    ** (1) There is no INTEGER PRIMARY KEY but there are indices.
    **     (If the destination is not initially empty, the rowid fields
    **     of index entries might need to change.)
    **
    ** (2) The destination has a unique index.  (The xfer optimization 
    **     is unable to test uniqueness.)
    **
    ** (3) onError is something other than OE_Abort and OE_Rollback.
    */
    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iDest, 0);
    emptyDestTest = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0);
    sqlite3VdbeJumpHere(v, addr1);
  }else{
    emptyDestTest = 0;
  }
  sqlite3OpenTable(pParse, iSrc, iDbSrc, pSrc, OP_OpenRead);
  emptySrcTest = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0);
  regData = sqlite3GetTempReg(pParse);
  regRowid = sqlite3GetTempReg(pParse);
  if( pDest->iPKey>=0 ){
    addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
    addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
    sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_PRIMARYKEY,
        onError, "PRIMARY KEY must be unique", P4_STATIC);
    sqlite3VdbeJumpHere(v, addr2);
    autoIncStep(pParse, regAutoinc, regRowid);
  }else if( pDest->pIndex==0 ){
    addr1 = sqlite3VdbeAddOp2(v, OP_NewRowid, iDest, regRowid);
  }else{
    addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
    assert( (pDest->tabFlags & TF_Autoincrement)==0 );
  }
  sqlite3VdbeAddOp2(v, OP_RowData, iSrc, regData);
  sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid);
  sqlite3VdbeChangeP5(v, OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND);
  sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
  sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1);
  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
    for(pSrcIdx=pSrc->pIndex; ALWAYS(pSrcIdx); pSrcIdx=pSrcIdx->pNext){
      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
    }
    assert( pSrcIdx );
    sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
    pKey = sqlite3IndexKeyinfo(pParse, pSrcIdx);
    sqlite3VdbeAddOp4(v, OP_OpenRead, iSrc, pSrcIdx->tnum, iDbSrc,
                      (char*)pKey, P4_KEYINFO_HANDOFF);
    VdbeComment((v, "%s", pSrcIdx->zName));
    pKey = sqlite3IndexKeyinfo(pParse, pDestIdx);
    sqlite3VdbeAddOp4(v, OP_OpenWrite, iDest, pDestIdx->tnum, iDbDest,
                      (char*)pKey, P4_KEYINFO_HANDOFF);
    VdbeComment((v, "%s", pDestIdx->zName));
    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0);
    sqlite3VdbeAddOp2(v, OP_RowKey, iSrc, regData);
    sqlite3VdbeAddOp3(v, OP_IdxInsert, iDest, regData, 1);
    sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1);
    sqlite3VdbeJumpHere(v, addr1);
  }
  sqlite3VdbeJumpHere(v, emptySrcTest);
  sqlite3ReleaseTempReg(pParse, regRowid);
  sqlite3ReleaseTempReg(pParse, regData);
  sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
  sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
  if( emptyDestTest ){
    sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, 0);
    sqlite3VdbeJumpHere(v, emptyDestTest);
    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
    return 0;
  }else{
    return 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl $0x0, -0x88(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x80bfb
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6bb50
cmpq $0x0, %rax
je 0x80c1a
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x18(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x80c36
movl $0x0, -0x4(%rbp)
jmp 0x81485
cmpl $0x63, -0x24(%rbp)
jne 0x80c63
movq -0x18(%rbp), %rax
movswl 0x40(%rax), %eax
cmpl $0x0, %eax
jl 0x80c54
movq -0x18(%rbp), %rax
movzbl 0x47(%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x63, -0x24(%rbp)
jne 0x80c61
movl $0x2, -0x24(%rbp)
jmp 0x80c63
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x80c7f
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x30(%rax)
je 0x80c9a
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x80cb1
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x80cc8
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x80cdf
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x80cf6
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x80d0d
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x80d29
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
je 0x80d49
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0x71, %eax
je 0x80d68
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x64100
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x80d9e
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x80db4
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x38(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x80dd0
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x38(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x80de7
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x18(%rbp), %rax
movswl 0x42(%rax), %eax
movq -0x38(%rbp), %rcx
movswl 0x42(%rcx), %ecx
cmpl %ecx, %eax
je 0x80e07
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x18(%rbp), %rax
movswl 0x40(%rax), %eax
movq -0x38(%rbp), %rcx
movswl 0x40(%rcx), %ecx
cmpl %ecx, %eax
je 0x80e27
movl $0x0, -0x4(%rbp)
jmp 0x81485
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x42(%rcx), %ecx
cmpl %ecx, %eax
jge 0x80f14
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movsbl 0x29(%rax), %eax
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x54(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movsbl 0x29(%rcx), %ecx
cmpl %ecx, %eax
je 0x80e7f
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rsi
callq 0x81940
cmpl $0x0, %eax
jne 0x80ec3
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movzbl 0x28(%rax), %eax
cmpl $0x0, %eax
je 0x80f04
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0x28(%rax)
jne 0x80f04
movl $0x0, -0x4(%rbp)
jmp 0x81485
jmp 0x80f06
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x80e2e
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x80f98
movq -0x48(%rbp), %rax
movzbl 0x56(%rax), %eax
cmpl $0x0, %eax
je 0x80f3e
movl $0x1, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x80f75
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x819a0
cmpl $0x0, %eax
je 0x80f65
jmp 0x80f75
jmp 0x80f67
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x80f4a
cmpq $0x0, -0x40(%rbp)
jne 0x80f88
movl $0x0, -0x4(%rbp)
jmp 0x81485
jmp 0x80f8a
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x80f20
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x80fce
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x66650
cmpl $0x0, %eax
je 0x80fce
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x2c(%rax), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
je 0x80ff9
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x80ff9
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x2c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x81019
movl $0x0, -0x4(%rbp)
jmp 0x81485
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x13940
movl %eax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5e000
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movl -0x58(%rbp), %esi
callq 0x5eb40
movq -0x10(%rbp), %rcx
movl 0x54(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x54(%rcx)
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rcx
movl 0x54(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x54(%rcx)
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x814a0
movl %eax, -0x84(%rbp)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
movl -0x28(%rbp), %edx
movq -0x18(%rbp), %rcx
movl $0x31, %r8d
callq 0x5e480
movq -0x18(%rbp), %rax
movswl 0x40(%rax), %eax
cmpl $0x0, %eax
jge 0x810b4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x810c9
cmpl $0x0, -0x88(%rbp)
jne 0x810c9
cmpl $0x2, -0x24(%rbp)
je 0x81102
cmpl $0x1, -0x24(%rbp)
je 0x81102
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl $0x65, %esi
xorl %ecx, %ecx
callq 0x5e0c0
movl %eax, -0x64(%rbp)
movq -0x78(%rbp), %rdi
movl $0xe, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x5e0c0
movl %eax, -0x6c(%rbp)
movq -0x78(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x5e090
jmp 0x81109
movl $0x0, -0x6c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x5c(%rbp), %esi
movl -0x58(%rbp), %edx
movq -0x38(%rbp), %rcx
movl $0x30, %r8d
callq 0x5e480
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl $0x65, %esi
xorl %ecx, %ecx
callq 0x5e0c0
movl %eax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0x66a70
movl %eax, -0x8c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x66a70
movl %eax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movswl 0x40(%rax), %eax
cmpl $0x0, %eax
jl 0x811db
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl -0x90(%rbp), %ecx
movl $0x60, %esi
callq 0x5e0c0
movl %eax, -0x64(%rbp)
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl -0x90(%rbp), %r8d
movl $0x3f, %esi
xorl %ecx, %ecx
callq 0x5e0f0
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %edx
movl $0x613, %esi            # imm = 0x613
leaq 0x2f774(%rip), %rcx     # 0xb0921
movl $0xfffffffe, %r8d       # imm = 0xFFFFFFFE
callq 0x67830
movq -0x78(%rbp), %rdi
movl -0x68(%rbp), %esi
callq 0x5e090
movq -0x10(%rbp), %rdi
movl -0x84(%rbp), %esi
movl -0x90(%rbp), %edx
callq 0x81900
jmp 0x8121e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x81202
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl -0x90(%rbp), %ecx
movl $0x41, %esi
callq 0x5e0c0
movl %eax, -0x64(%rbp)
jmp 0x8121c
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl -0x90(%rbp), %ecx
movl $0x60, %esi
callq 0x5e0c0
movl %eax, -0x64(%rbp)
jmp 0x8121e
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl $0x5f, %esi
callq 0x5e0c0
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl -0x90(%rbp), %r8d
movl $0x42, %esi
callq 0x5e0f0
movq -0x78(%rbp), %rdi
movl $0xb, %esi
callq 0x5e540
movq -0x78(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x13c20
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl -0x64(%rbp), %ecx
movl $0x7, %esi
callq 0x5e0c0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x813ee
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x812da
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x819a0
cmpl $0x0, %eax
je 0x812ca
jmp 0x812da
jmp 0x812cc
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x812af
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl $0x36, %esi
xorl %ecx, %ecx
callq 0x5e0c0
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl $0x36, %esi
xorl %ecx, %ecx
callq 0x5e0c0
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x67540
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movq -0x40(%rbp), %rax
movl 0x50(%rax), %ecx
movl -0x58(%rbp), %r8d
movq -0x80(%rbp), %r9
movl $0x30, %esi
movl $0xfffffff0, (%rsp)     # imm = 0xFFFFFFF0
callq 0x5e1b0
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x67540
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movq -0x48(%rbp), %rax
movl 0x50(%rax), %ecx
movl -0x28(%rbp), %r8d
movq -0x80(%rbp), %r9
movl $0x31, %esi
movl $0xfffffff0, (%rsp)     # imm = 0xFFFFFFF0
callq 0x5e1b0
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl $0x65, %esi
xorl %ecx, %ecx
callq 0x5e0c0
movl %eax, -0x64(%rbp)
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl $0x5c, %esi
callq 0x5e0c0
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl $0x67, %esi
movl $0x1, %r8d
callq 0x5e0f0
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl -0x64(%rbp), %ecx
addl $0x1, %ecx
movl $0x7, %esi
callq 0x5e0c0
movq -0x78(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x5e090
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x81298
movq -0x78(%rbp), %rdi
movl -0x70(%rbp), %esi
callq 0x5e090
movq -0x10(%rbp), %rdi
movl -0x90(%rbp), %esi
callq 0x66ac0
movq -0x10(%rbp), %rdi
movl -0x8c(%rbp), %esi
callq 0x66ac0
movq -0x78(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl $0x36, %esi
xorl %ecx, %ecx
callq 0x5e0c0
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl $0x36, %esi
xorl %ecx, %ecx
callq 0x5e0c0
cmpl $0x0, -0x6c(%rbp)
je 0x8147e
movq -0x78(%rbp), %rdi
movl $0x14, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x5e0c0
movq -0x78(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq 0x5e090
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %edx
movl $0x36, %esi
xorl %ecx, %ecx
callq 0x5e0c0
movl $0x0, -0x4(%rbp)
jmp 0x81485
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)