// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: multiSelect
static int multiSelect(
  Parse *pParse,        /* Parsing context */
  Select *p,            /* The right-most of SELECTs to be coded */
  SelectDest *pDest     /* What to do with query results */
){
  int rc = SQLITE_OK;   /* Success code from a subroutine */
  Select *pPrior;       /* Another SELECT immediately to our left */
  Vdbe *v;              /* Generate code to this VDBE */
  SelectDest dest;      /* Alternative data destination */
  Select *pDelete = 0;  /* Chain of simple selects to delete */
  sqlite3 *db;          /* Database connection */

  /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only
  ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.
  */
  assert( p && p->pPrior );  /* Calling function guarantees this much */
  assert( (p->selFlags & SF_Recursive)==0 || p->op==TK_ALL || p->op==TK_UNION );
  assert( p->selFlags & SF_Compound );
  db = pParse->db;
  pPrior = p->pPrior;
  dest = *pDest;
  if( pPrior->pOrderBy || pPrior->pLimit ){
    sqlite3ErrorMsg(pParse,"%s clause should come after %s not before",
      pPrior->pOrderBy!=0 ? "ORDER BY" : "LIMIT", selectOpName(p->op));
    rc = 1;
    goto multi_select_end;
  }

  v = sqlite3GetVdbe(pParse);
  assert( v!=0 );  /* The VDBE already created by calling function */

  /* Create the destination temporary table if necessary
  */
  if( dest.eDest==SRT_EphemTab ){
    assert( p->pEList );
    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, dest.iSDParm, p->pEList->nExpr);
    dest.eDest = SRT_Table;
  }

  /* Special handling for a compound-select that originates as a VALUES clause.
  */
  if( p->selFlags & SF_MultiValue ){
    rc = multiSelectValues(pParse, p, &dest);
    if( rc>=0 ) goto multi_select_end;
    rc = SQLITE_OK;
  }

  /* Make sure all SELECTs in the statement have the same number of elements
  ** in their result sets.
  */
  assert( p->pEList && pPrior->pEList );
  assert( p->pEList->nExpr==pPrior->pEList->nExpr );

#ifndef SQLITE_OMIT_CTE
  if( p->selFlags & SF_Recursive ){
    generateWithRecursiveQuery(pParse, p, &dest);
  }else
#endif

  /* Compound SELECTs that have an ORDER BY clause are handled separately.
  */
  if( p->pOrderBy ){
    return multiSelectOrderBy(pParse, p, pDest);
  }else{

#ifndef SQLITE_OMIT_EXPLAIN
    if( pPrior->pPrior==0 ){
      ExplainQueryPlan((pParse, 1, "COMPOUND QUERY"));
      ExplainQueryPlan((pParse, 1, "LEFT-MOST SUBQUERY"));
    }
#endif

    /* Generate code for the left and right SELECT statements.
    */
    switch( p->op ){
      case TK_ALL: {
        int addr = 0;
        int nLimit;
        assert( !pPrior->pLimit );
        pPrior->iLimit = p->iLimit;
        pPrior->iOffset = p->iOffset;
        pPrior->pLimit = p->pLimit;
        rc = sqlite3Select(pParse, pPrior, &dest);
        p->pLimit = 0;
        if( rc ){
          goto multi_select_end;
        }
        p->pPrior = 0;
        p->iLimit = pPrior->iLimit;
        p->iOffset = pPrior->iOffset;
        if( p->iLimit ){
          addr = sqlite3VdbeAddOp1(v, OP_IfNot, p->iLimit); VdbeCoverage(v);
          VdbeComment((v, "Jump ahead if LIMIT reached"));
          if( p->iOffset ){
            sqlite3VdbeAddOp3(v, OP_OffsetLimit,
                              p->iLimit, p->iOffset+1, p->iOffset);
          }
        }
        ExplainQueryPlan((pParse, 1, "UNION ALL"));
        rc = sqlite3Select(pParse, p, &dest);
        testcase( rc!=SQLITE_OK );
        pDelete = p->pPrior;
        p->pPrior = pPrior;
        p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);
        if( pPrior->pLimit
         && sqlite3ExprIsInteger(pPrior->pLimit->pLeft, &nLimit)
         && nLimit>0 && p->nSelectRow > sqlite3LogEst((u64)nLimit)
        ){
          p->nSelectRow = sqlite3LogEst((u64)nLimit);
        }
        if( addr ){
          sqlite3VdbeJumpHere(v, addr);
        }
        break;
      }
      case TK_EXCEPT:
      case TK_UNION: {
        int unionTab;    /* Cursor number of the temp table holding result */
        u8 op = 0;       /* One of the SRT_ operations to apply to self */
        int priorOp;     /* The SRT_ operation to apply to prior selects */
        Expr *pLimit;    /* Saved values of p->nLimit  */
        int addr;
        SelectDest uniondest;

        testcase( p->op==TK_EXCEPT );
        testcase( p->op==TK_UNION );
        priorOp = SRT_Union;
        if( dest.eDest==priorOp ){
          /* We can reuse a temporary table generated by a SELECT to our
          ** right.
          */
          assert( p->pLimit==0 );      /* Not allowed on leftward elements */
          unionTab = dest.iSDParm;
        }else{
          /* We will need to create our own temporary table to hold the
          ** intermediate results.
          */
          unionTab = pParse->nTab++;
          assert( p->pOrderBy==0 );
          addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, unionTab, 0);
          assert( p->addrOpenEphm[0] == -1 );
          p->addrOpenEphm[0] = addr;
          findRightmost(p)->selFlags |= SF_UsesEphemeral;
          assert( p->pEList );
        }

        /* Code the SELECT statements to our left
        */
        assert( !pPrior->pOrderBy );
        sqlite3SelectDestInit(&uniondest, priorOp, unionTab);
        rc = sqlite3Select(pParse, pPrior, &uniondest);
        if( rc ){
          goto multi_select_end;
        }

        /* Code the current SELECT statement
        */
        if( p->op==TK_EXCEPT ){
          op = SRT_Except;
        }else{
          assert( p->op==TK_UNION );
          op = SRT_Union;
        }
        p->pPrior = 0;
        pLimit = p->pLimit;
        p->pLimit = 0;
        uniondest.eDest = op;
        ExplainQueryPlan((pParse, 1, "%s USING TEMP B-TREE",
                          selectOpName(p->op)));
        rc = sqlite3Select(pParse, p, &uniondest);
        testcase( rc!=SQLITE_OK );
        assert( p->pOrderBy==0 );
        pDelete = p->pPrior;
        p->pPrior = pPrior;
        p->pOrderBy = 0;
        if( p->op==TK_UNION ){
          p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);
        }
        sqlite3ExprDelete(db, p->pLimit);
        p->pLimit = pLimit;
        p->iLimit = 0;
        p->iOffset = 0;

        /* Convert the data in the temporary table into whatever form
        ** it is that we currently need.
        */
        assert( unionTab==dest.iSDParm || dest.eDest!=priorOp );
        assert( p->pEList || db->mallocFailed );
        if( dest.eDest!=priorOp && db->mallocFailed==0 ){
          int iCont, iBreak, iStart;
          iBreak = sqlite3VdbeMakeLabel(pParse);
          iCont = sqlite3VdbeMakeLabel(pParse);
          computeLimitRegisters(pParse, p, iBreak);
          sqlite3VdbeAddOp2(v, OP_Rewind, unionTab, iBreak); VdbeCoverage(v);
          iStart = sqlite3VdbeCurrentAddr(v);
          selectInnerLoop(pParse, p, unionTab,
                          0, 0, &dest, iCont, iBreak);
          sqlite3VdbeResolveLabel(v, iCont);
          sqlite3VdbeAddOp2(v, OP_Next, unionTab, iStart); VdbeCoverage(v);
          sqlite3VdbeResolveLabel(v, iBreak);
          sqlite3VdbeAddOp2(v, OP_Close, unionTab, 0);
        }
        break;
      }
      default: assert( p->op==TK_INTERSECT ); {
        int tab1, tab2;
        int iCont, iBreak, iStart;
        Expr *pLimit;
        int addr;
        SelectDest intersectdest;
        int r1;

        /* INTERSECT is different from the others since it requires
        ** two temporary tables.  Hence it has its own case.  Begin
        ** by allocating the tables we will need.
        */
        tab1 = pParse->nTab++;
        tab2 = pParse->nTab++;
        assert( p->pOrderBy==0 );

        addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab1, 0);
        assert( p->addrOpenEphm[0] == -1 );
        p->addrOpenEphm[0] = addr;
        findRightmost(p)->selFlags |= SF_UsesEphemeral;
        assert( p->pEList );

        /* Code the SELECTs to our left into temporary table "tab1".
        */
        sqlite3SelectDestInit(&intersectdest, SRT_Union, tab1);
        rc = sqlite3Select(pParse, pPrior, &intersectdest);
        if( rc ){
          goto multi_select_end;
        }

        /* Code the current SELECT into temporary table "tab2"
        */
        addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab2, 0);
        assert( p->addrOpenEphm[1] == -1 );
        p->addrOpenEphm[1] = addr;
        p->pPrior = 0;
        pLimit = p->pLimit;
        p->pLimit = 0;
        intersectdest.iSDParm = tab2;
        ExplainQueryPlan((pParse, 1, "%s USING TEMP B-TREE",
                          selectOpName(p->op)));
        rc = sqlite3Select(pParse, p, &intersectdest);
        testcase( rc!=SQLITE_OK );
        pDelete = p->pPrior;
        p->pPrior = pPrior;
        if( p->nSelectRow>pPrior->nSelectRow ){
          p->nSelectRow = pPrior->nSelectRow;
        }
        sqlite3ExprDelete(db, p->pLimit);
        p->pLimit = pLimit;

        /* Generate code to take the intersection of the two temporary
        ** tables.
        */
        if( rc ) break;
        assert( p->pEList );
        iBreak = sqlite3VdbeMakeLabel(pParse);
        iCont = sqlite3VdbeMakeLabel(pParse);
        computeLimitRegisters(pParse, p, iBreak);
        sqlite3VdbeAddOp2(v, OP_Rewind, tab1, iBreak); VdbeCoverage(v);
        r1 = sqlite3GetTempReg(pParse);
        iStart = sqlite3VdbeAddOp2(v, OP_RowData, tab1, r1);
        sqlite3VdbeAddOp4Int(v, OP_NotFound, tab2, iCont, r1, 0);
        VdbeCoverage(v);
        sqlite3ReleaseTempReg(pParse, r1);
        selectInnerLoop(pParse, p, tab1,
                        0, 0, &dest, iCont, iBreak);
        sqlite3VdbeResolveLabel(v, iCont);
        sqlite3VdbeAddOp2(v, OP_Next, tab1, iStart); VdbeCoverage(v);
        sqlite3VdbeResolveLabel(v, iBreak);
        sqlite3VdbeAddOp2(v, OP_Close, tab2, 0);
        sqlite3VdbeAddOp2(v, OP_Close, tab1, 0);
        break;
      }
    }

  #ifndef SQLITE_OMIT_EXPLAIN
    if( p->pNext==0 ){
      ExplainQueryPlanPop(pParse);
    }
  #endif
  }
  if( pParse->nErr ) goto multi_select_end;

  /* Compute collating sequences used by
  ** temporary tables needed to implement the compound select.
  ** Attach the KeyInfo structure to all temporary tables.
  **
  ** This section is run by the right-most SELECT statement only.
  ** SELECT statements to the left always skip this part.  The right-most
  ** SELECT might also skip this part if it has no ORDER BY clause and
  ** no temp tables are required.
  */
  if( p->selFlags & SF_UsesEphemeral ){
    int i;                        /* Loop counter */
    KeyInfo *pKeyInfo;            /* Collating sequence for the result set */
    Select *pLoop;                /* For looping through SELECT statements */
    CollSeq **apColl;             /* For looping through pKeyInfo->aColl[] */
    int nCol;                     /* Number of columns in result set */

    assert( p->pNext==0 );
    nCol = p->pEList->nExpr;
    pKeyInfo = sqlite3KeyInfoAlloc(db, nCol, 1);
    if( !pKeyInfo ){
      rc = SQLITE_NOMEM_BKPT;
      goto multi_select_end;
    }
    for(i=0, apColl=pKeyInfo->aColl; i<nCol; i++, apColl++){
      *apColl = multiSelectCollSeq(pParse, p, i);
      if( 0==*apColl ){
        *apColl = db->pDfltColl;
      }
    }

    for(pLoop=p; pLoop; pLoop=pLoop->pPrior){
      for(i=0; i<2; i++){
        int addr = pLoop->addrOpenEphm[i];
        if( addr<0 ){
          /* If [0] is unused then [1] is also unused.  So we can
          ** always safely abort as soon as the first unused slot is found */
          assert( pLoop->addrOpenEphm[1]<0 );
          break;
        }
        sqlite3VdbeChangeP2(v, addr, nCol);
        sqlite3VdbeChangeP4(v, addr, (char*)sqlite3KeyInfoRef(pKeyInfo),
                            P4_KEYINFO);
        pLoop->addrOpenEphm[i] = -1;
      }
    }
    sqlite3KeyInfoUnref(pKeyInfo);
  }

multi_select_end:
  pDest->iSdst = dest.iSdst;
  pDest->nSdst = dest.nSdst;
  sqlite3SelectDelete(db, pDelete);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movl $0x28, %edx
callq 0x19610
movq -0x30(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x43ff35
movq -0x30(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x43ff9c
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x16dd39(%rip), %rax    # 0x5adc88
leaq 0x16dcdb(%rip), %rcx    # 0x5adc31
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x148(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %edi
callq 0x43c250
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rdx
movq %rax, %rcx
leaq 0x16dcd5(%rip), %rsi    # 0x5adc5e
movb $0x0, %al
callq 0x3cb660
movl $0x1, -0x24(%rbp)
jmp 0x440a31
movq -0x10(%rbp), %rdi
callq 0x4299d0
movq %rax, -0x38(%rbp)
movzbl -0x60(%rbp), %eax
cmpl $0xc, %eax
jne 0x43ffd1
movq -0x38(%rbp), %rdi
movl -0x5c(%rbp), %edx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl (%rax), %ecx
movl $0x64, %esi
callq 0x410100
movb $0xe, -0x60(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x440008
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x446a20
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x440001
jmp 0x440a31
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x44002f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x446b30
jmp 0x440849
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x440053
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x447010
movl %eax, -0x4(%rbp)
jmp 0x440a58
movq -0x30(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x44008c
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x16dc20(%rip), %rdx    # 0x5adc8e
movb $0x0, %al
callq 0x430b00
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x16dc18(%rip), %rdx    # 0x5adc9d
movb $0x0, %al
callq 0x430b00
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x154(%rbp)
subl $0x84, %eax
je 0x440289
jmp 0x4400a6
movl -0x154(%rbp), %eax
subl $0x85, %eax
je 0x4400cb
jmp 0x4400b5
movl -0x154(%rbp), %eax
subl $0x86, %eax
je 0x440289
jmp 0x440540
movl $0x0, -0x74(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x41aee0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
cmpl $0x0, -0x24(%rbp)
je 0x440129
jmp 0x440a31
movq -0x18(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x30(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x4401a6
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movl $0x14, %esi
callq 0x42ba70
movl %eax, -0x74(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x4401a4
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl 0xc(%rax), %r8d
movl $0x98, %esi
callq 0x410130
jmp 0x4401a6
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x16d30e(%rip), %rdx    # 0x5ad4c4
movb $0x0, %al
callq 0x430b00
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x41aee0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movw 0x2(%rax), %cx
movq -0x30(%rbp), %rax
movswl %cx, %edi
movswl 0x2(%rax), %esi
callq 0x447b70
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x440272
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rax
movq 0x10(%rax), %rdi
leaq -0x78(%rbp), %rsi
callq 0x43bf50
cmpl $0x0, %eax
je 0x440272
cmpl $0x0, -0x78(%rbp)
jle 0x440272
movq -0x18(%rbp), %rax
movswl 0x2(%rax), %eax
movl %eax, -0x158(%rbp)
movslq -0x78(%rbp), %rdi
callq 0x3fcec0
movw %ax, %cx
movl -0x158(%rbp), %eax
movswl %cx, %ecx
cmpl %ecx, %eax
jle 0x440272
movslq -0x78(%rbp), %rdi
callq 0x3fcec0
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2(%rax)
cmpl $0x0, -0x74(%rbp)
je 0x440284
movq -0x38(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x429a70
jmp 0x440831
movb $0x0, -0x7d(%rbp)
movl $0x1, -0x84(%rbp)
movzbl -0x60(%rbp), %eax
cmpl -0x84(%rbp), %eax
jne 0x4402ab
movl -0x5c(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x4402f5
movq -0x10(%rbp), %rcx
movl 0x34(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x34(%rcx)
movl %eax, -0x7c(%rbp)
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %edx
movl $0x64, %esi
xorl %ecx, %ecx
callq 0x410100
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rdi
callq 0x43bd70
movl 0x4(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x4(%rax)
movl -0x84(%rbp), %esi
movl -0x7c(%rbp), %edx
leaq -0xc0(%rbp), %rdi
callq 0x430c20
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x41aee0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x44032c
jmp 0x440a31
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x86, %eax
jne 0x440340
movb $0x2, -0x7d(%rbp)
jmp 0x440344
movb $0x1, -0x7d(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
movb -0x7d(%rbp), %al
movb %al, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %edi
callq 0x43c250
movq -0x160(%rbp), %rdi
movq %rax, %rcx
movl $0x1, %esi
leaq 0x16d90f(%rip), %rdx    # 0x5adcb0
movb $0x0, %al
callq 0x430b00
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x41aee0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x84, %eax
jne 0x440414
movq -0x18(%rbp), %rax
movw 0x2(%rax), %cx
movq -0x30(%rbp), %rax
movswl %cx, %edi
movswl 0x2(%rax), %esi
callq 0x447b70
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0x40c670
movq -0x90(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xc(%rax)
movzbl -0x60(%rbp), %eax
cmpl -0x84(%rbp), %eax
je 0x44053b
movq -0x70(%rbp), %rax
movzbl 0x61(%rax), %eax
cmpl $0x0, %eax
jne 0x44053b
movq -0x10(%rbp), %rdi
callq 0x42d540
movl %eax, -0xc8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x42d540
movl %eax, -0xc4(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xc8(%rbp), %edx
callq 0x441010
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %edx
movl -0xc8(%rbp), %ecx
movl $0x25, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
callq 0x430ae0
movl %eax, -0xcc(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x7c(%rbp), %edx
movl -0xc4(%rbp), %r10d
movl -0xc8(%rbp), %eax
xorl %ecx, %ecx
movl %ecx, %r8d
leaq -0x60(%rbp), %r9
movq %r8, %rcx
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x4435c0
movq -0x38(%rbp), %rdi
movl -0xc4(%rbp), %esi
callq 0x42dc90
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %edx
movl -0xcc(%rbp), %ecx
movl $0x5, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xc8(%rbp), %esi
callq 0x42dc90
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %edx
movl $0x74, %esi
xorl %ecx, %ecx
callq 0x410100
jmp 0x440831
movq -0x10(%rbp), %rcx
movl 0x34(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x34(%rcx)
movl %eax, -0xd0(%rbp)
movq -0x10(%rbp), %rcx
movl 0x34(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x34(%rcx)
movl %eax, -0xd4(%rbp)
movq -0x38(%rbp), %rdi
movl -0xd0(%rbp), %edx
movl $0x64, %esi
xorl %ecx, %ecx
callq 0x410100
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rdi
callq 0x43bd70
movl 0x4(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x4(%rax)
movl -0xd0(%rbp), %edx
leaq -0x118(%rbp), %rdi
movl $0x1, %esi
callq 0x430c20
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0x41aee0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x4405de
jmp 0x440a31
movq -0x38(%rbp), %rdi
movl -0xd4(%rbp), %edx
movl $0x64, %esi
xorl %ecx, %ecx
callq 0x410100
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
movl -0xd4(%rbp), %eax
movl %eax, -0x114(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %edi
callq 0x43c250
movq -0x168(%rbp), %rdi
movq %rax, %rcx
movl $0x1, %esi
leaq 0x16d649(%rip), %rdx    # 0x5adcb0
movb $0x0, %al
callq 0x430b00
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0x41aee0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movswl 0x2(%rax), %eax
movq -0x30(%rbp), %rcx
movswl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jle 0x4406c1
movq -0x30(%rbp), %rax
movw 0x2(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0x40c670
movq -0xe8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
cmpl $0x0, -0x24(%rbp)
je 0x4406ec
jmp 0x440831
movq -0x10(%rbp), %rdi
callq 0x42d540
movl %eax, -0xdc(%rbp)
movq -0x10(%rbp), %rdi
callq 0x42d540
movl %eax, -0xd8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xdc(%rbp), %edx
callq 0x441010
movq -0x38(%rbp), %rdi
movl -0xd0(%rbp), %edx
movl -0xdc(%rbp), %ecx
movl $0x25, %esi
callq 0x410100
movq -0x10(%rbp), %rdi
callq 0x42f190
movl %eax, -0x11c(%rbp)
movq -0x38(%rbp), %rdi
movl -0xd0(%rbp), %edx
movl -0x11c(%rbp), %ecx
movl $0x7e, %esi
callq 0x410100
movl %eax, -0xe0(%rbp)
movq -0x38(%rbp), %rdi
movl -0xd4(%rbp), %edx
movl -0xd8(%rbp), %ecx
movl -0x11c(%rbp), %r8d
movl $0x1d, %esi
xorl %r9d, %r9d
callq 0x3cb970
movq -0x10(%rbp), %rdi
movl -0x11c(%rbp), %esi
callq 0x42e560
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xd0(%rbp), %edx
movl -0xd8(%rbp), %r10d
movl -0xdc(%rbp), %eax
xorl %ecx, %ecx
movl %ecx, %r8d
leaq -0x60(%rbp), %r9
movq %r8, %rcx
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x4435c0
movq -0x38(%rbp), %rdi
movl -0xd8(%rbp), %esi
callq 0x42dc90
movq -0x38(%rbp), %rdi
movl -0xd0(%rbp), %edx
movl -0xe0(%rbp), %ecx
movl $0x5, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xdc(%rbp), %esi
callq 0x42dc90
movq -0x38(%rbp), %rdi
movl -0xd4(%rbp), %edx
movl $0x74, %esi
xorl %ecx, %ecx
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xd0(%rbp), %edx
movl $0x74, %esi
xorl %ecx, %ecx
callq 0x410100
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x440845
movq -0x10(%rbp), %rdi
callq 0x440a70
jmp 0x440847
jmp 0x440849
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x440858
jmp 0x440a31
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x440a2f
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl (%rax), %eax
movl %eax, -0x13c(%rbp)
movq -0x70(%rbp), %rdi
movl -0x13c(%rbp), %esi
movl $0x1, %edx
callq 0x42a3a0
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
jne 0x4408ac
movl $0x7, -0x24(%rbp)
jmp 0x440a31
movl $0x0, -0x120(%rbp)
movq -0x128(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x138(%rbp)
movl -0x120(%rbp), %eax
cmpl -0x13c(%rbp), %eax
jge 0x44093b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x120(%rbp), %edx
callq 0x447c50
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, (%rax)
movq -0x138(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x440916
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x138(%rbp), %rax
movq %rcx, (%rax)
jmp 0x440918
movl -0x120(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x120(%rbp)
movq -0x138(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x138(%rbp)
jmp 0x4408c8
movq -0x18(%rbp), %rax
movq %rax, -0x130(%rbp)
cmpq $0x0, -0x130(%rbp)
je 0x440a23
movl $0x0, -0x120(%rbp)
cmpl $0x2, -0x120(%rbp)
jge 0x440a0a
movq -0x130(%rbp), %rax
movslq -0x120(%rbp), %rcx
movl 0x14(%rax,%rcx,4), %eax
movl %eax, -0x140(%rbp)
cmpl $0x0, -0x140(%rbp)
jge 0x44098e
jmp 0x440a0a
movq -0x38(%rbp), %rdi
movl -0x140(%rbp), %esi
movl -0x13c(%rbp), %edx
callq 0x429de0
movq -0x38(%rbp), %rax
movq %rax, -0x178(%rbp)
movl -0x140(%rbp), %eax
movl %eax, -0x16c(%rbp)
movq -0x128(%rbp), %rdi
callq 0x43d960
movq -0x178(%rbp), %rdi
movl -0x16c(%rbp), %esi
movq %rax, %rdx
movl $0xfffffff7, %ecx       # imm = 0xFFFFFFF7
callq 0x3cbc30
movq -0x130(%rbp), %rax
movslq -0x120(%rbp), %rcx
movl $0xffffffff, 0x14(%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x120(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x120(%rbp)
jmp 0x44095e
jmp 0x440a0c
movq -0x130(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x130(%rbp)
jmp 0x440946
movq -0x128(%rbp), %rdi
callq 0x3eb5a0
jmp 0x440a31
movl -0x54(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x50(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x40c7e0
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
nopw %cs:(%rax,%rax)