// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: multiSelectOrderBy
static int multiSelectOrderBy(
  Parse *pParse,        /* Parsing context */
  Select *p,            /* The right-most of SELECTs to be coded */
  SelectDest *pDest     /* What to do with query results */
){
  int i, j;             /* Loop counters */
  Select *pPrior;       /* Another SELECT immediately to our left */
  Vdbe *v;              /* Generate code to this VDBE */
  SelectDest destA;     /* Destination for coroutine A */
  SelectDest destB;     /* Destination for coroutine B */
  int regAddrA;         /* Address register for select-A coroutine */
  int regAddrB;         /* Address register for select-B coroutine */
  int addrSelectA;      /* Address of the select-A coroutine */
  int addrSelectB;      /* Address of the select-B coroutine */
  int regOutA;          /* Address register for the output-A subroutine */
  int regOutB;          /* Address register for the output-B subroutine */
  int addrOutA;         /* Address of the output-A subroutine */
  int addrOutB = 0;     /* Address of the output-B subroutine */
  int addrEofA;         /* Address of the select-A-exhausted subroutine */
  int addrEofA_noB;     /* Alternate addrEofA if B is uninitialized */
  int addrEofB;         /* Address of the select-B-exhausted subroutine */
  int addrAltB;         /* Address of the A<B subroutine */
  int addrAeqB;         /* Address of the A==B subroutine */
  int addrAgtB;         /* Address of the A>B subroutine */
  int regLimitA;        /* Limit register for select-A */
  int regLimitB;        /* Limit register for select-A */
  int regPrev;          /* A range of registers to hold previous output */
  int savedLimit;       /* Saved value of p->iLimit */
  int savedOffset;      /* Saved value of p->iOffset */
  int labelCmpr;        /* Label for the start of the merge algorithm */
  int labelEnd;         /* Label for the end of the overall SELECT stmt */
  int addr1;            /* Jump instructions that get retargetted */
  int op;               /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
  KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
  KeyInfo *pKeyMerge;   /* Comparison information for merging rows */
  sqlite3 *db;          /* Database connection */
  ExprList *pOrderBy;   /* The ORDER BY clause */
  int nOrderBy;         /* Number of terms in the ORDER BY clause */
  u32 *aPermute;        /* Mapping from ORDER BY terms to result set columns */

  assert( p->pOrderBy!=0 );
  assert( pKeyDup==0 ); /* "Managed" code needs this.  Ticket #3382. */
  db = pParse->db;
  v = pParse->pVdbe;
  assert( v!=0 );       /* Already thrown the error if VDBE alloc failed */
  labelEnd = sqlite3VdbeMakeLabel(pParse);
  labelCmpr = sqlite3VdbeMakeLabel(pParse);


  /* Patch up the ORDER BY clause
  */
  op = p->op;
  pPrior = p->pPrior;
  assert( pPrior->pOrderBy==0 );
  pOrderBy = p->pOrderBy;
  assert( pOrderBy );
  nOrderBy = pOrderBy->nExpr;

  /* For operators other than UNION ALL we have to make sure that
  ** the ORDER BY clause covers every term of the result set.  Add
  ** terms to the ORDER BY clause as necessary.
  */
  if( op!=TK_ALL ){
    for(i=1; db->mallocFailed==0 && i<=p->pEList->nExpr; i++){
      struct ExprList_item *pItem;
      for(j=0, pItem=pOrderBy->a; j<nOrderBy; j++, pItem++){
        assert( pItem->u.x.iOrderByCol>0 );
        if( pItem->u.x.iOrderByCol==i ) break;
      }
      if( j==nOrderBy ){
        Expr *pNew = sqlite3Expr(db, TK_INTEGER, 0);
        if( pNew==0 ) return SQLITE_NOMEM_BKPT;
        pNew->flags |= EP_IntValue;
        pNew->u.iValue = i;
        p->pOrderBy = pOrderBy = sqlite3ExprListAppend(pParse, pOrderBy, pNew);
        if( pOrderBy ) pOrderBy->a[nOrderBy++].u.x.iOrderByCol = (u16)i;
      }
    }
  }

  /* Compute the comparison permutation and keyinfo that is used with
  ** the permutation used to determine if the next
  ** row of results comes from selectA or selectB.  Also add explicit
  ** collations to the ORDER BY clause terms so that when the subqueries
  ** to the right and the left are evaluated, they use the correct
  ** collation.
  */
  aPermute = sqlite3DbMallocRawNN(db, sizeof(u32)*(nOrderBy + 1));
  if( aPermute ){
    struct ExprList_item *pItem;
    aPermute[0] = nOrderBy;
    for(i=1, pItem=pOrderBy->a; i<=nOrderBy; i++, pItem++){
      assert( pItem->u.x.iOrderByCol>0 );
      assert( pItem->u.x.iOrderByCol<=p->pEList->nExpr );
      aPermute[i] = pItem->u.x.iOrderByCol - 1;
    }
    pKeyMerge = multiSelectOrderByKeyInfo(pParse, p, 1);
  }else{
    pKeyMerge = 0;
  }

  /* Reattach the ORDER BY clause to the query.
  */
  p->pOrderBy = pOrderBy;
  pPrior->pOrderBy = sqlite3ExprListDup(pParse->db, pOrderBy, 0);

  /* Allocate a range of temporary registers and the KeyInfo needed
  ** for the logic that removes duplicate result rows when the
  ** operator is UNION, EXCEPT, or INTERSECT (but not UNION ALL).
  */
  if( op==TK_ALL ){
    regPrev = 0;
  }else{
    int nExpr = p->pEList->nExpr;
    assert( nOrderBy>=nExpr || db->mallocFailed );
    regPrev = pParse->nMem+1;
    pParse->nMem += nExpr+1;
    sqlite3VdbeAddOp2(v, OP_Integer, 0, regPrev);
    pKeyDup = sqlite3KeyInfoAlloc(db, nExpr, 1);
    if( pKeyDup ){
      assert( sqlite3KeyInfoIsWriteable(pKeyDup) );
      for(i=0; i<nExpr; i++){
        pKeyDup->aColl[i] = multiSelectCollSeq(pParse, p, i);
        pKeyDup->aSortFlags[i] = 0;
      }
    }
  }

  /* Separate the left and the right query from one another
  */
  p->pPrior = 0;
  pPrior->pNext = 0;
  sqlite3ResolveOrderGroupBy(pParse, p, p->pOrderBy, "ORDER");
  if( pPrior->pPrior==0 ){
    sqlite3ResolveOrderGroupBy(pParse, pPrior, pPrior->pOrderBy, "ORDER");
  }

  /* Compute the limit registers */
  computeLimitRegisters(pParse, p, labelEnd);
  if( p->iLimit && op==TK_ALL ){
    regLimitA = ++pParse->nMem;
    regLimitB = ++pParse->nMem;
    sqlite3VdbeAddOp2(v, OP_Copy, p->iOffset ? p->iOffset+1 : p->iLimit,
                                  regLimitA);
    sqlite3VdbeAddOp2(v, OP_Copy, regLimitA, regLimitB);
  }else{
    regLimitA = regLimitB = 0;
  }
  sqlite3ExprDelete(db, p->pLimit);
  p->pLimit = 0;

  regAddrA = ++pParse->nMem;
  regAddrB = ++pParse->nMem;
  regOutA = ++pParse->nMem;
  regOutB = ++pParse->nMem;
  sqlite3SelectDestInit(&destA, SRT_Coroutine, regAddrA);
  sqlite3SelectDestInit(&destB, SRT_Coroutine, regAddrB);

  ExplainQueryPlan((pParse, 1, "MERGE (%s)", selectOpName(p->op)));

  /* Generate a coroutine to evaluate the SELECT statement to the
  ** left of the compound operator - the "A" select.
  */
  addrSelectA = sqlite3VdbeCurrentAddr(v) + 1;
  addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
  VdbeComment((v, "left SELECT"));
  pPrior->iLimit = regLimitA;
  ExplainQueryPlan((pParse, 1, "LEFT"));
  sqlite3Select(pParse, pPrior, &destA);
  sqlite3VdbeEndCoroutine(v, regAddrA);
  sqlite3VdbeJumpHere(v, addr1);

  /* Generate a coroutine to evaluate the SELECT statement on
  ** the right - the "B" select
  */
  addrSelectB = sqlite3VdbeCurrentAddr(v) + 1;
  addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
  VdbeComment((v, "right SELECT"));
  savedLimit = p->iLimit;
  savedOffset = p->iOffset;
  p->iLimit = regLimitB;
  p->iOffset = 0;
  ExplainQueryPlan((pParse, 1, "RIGHT"));
  sqlite3Select(pParse, p, &destB);
  p->iLimit = savedLimit;
  p->iOffset = savedOffset;
  sqlite3VdbeEndCoroutine(v, regAddrB);

  /* Generate a subroutine that outputs the current row of the A
  ** select as the next output row of the compound select.
  */
  VdbeNoopComment((v, "Output routine for A"));
  addrOutA = generateOutputSubroutine(pParse,
                 p, &destA, pDest, regOutA,
                 regPrev, pKeyDup, labelEnd);

  /* Generate a subroutine that outputs the current row of the B
  ** select as the next output row of the compound select.
  */
  if( op==TK_ALL || op==TK_UNION ){
    VdbeNoopComment((v, "Output routine for B"));
    addrOutB = generateOutputSubroutine(pParse,
                 p, &destB, pDest, regOutB,
                 regPrev, pKeyDup, labelEnd);
  }
  sqlite3KeyInfoUnref(pKeyDup);

  /* Generate a subroutine to run when the results from select A
  ** are exhausted and only data in select B remains.
  */
  if( op==TK_EXCEPT || op==TK_INTERSECT ){
    addrEofA_noB = addrEofA = labelEnd;
  }else{
    VdbeNoopComment((v, "eof-A subroutine"));
    addrEofA = sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
    addrEofA_noB = sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, labelEnd);
                                     VdbeCoverage(v);
    sqlite3VdbeGoto(v, addrEofA);
    p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);
  }

  /* Generate a subroutine to run when the results from select B
  ** are exhausted and only data in select A remains.
  */
  if( op==TK_INTERSECT ){
    addrEofB = addrEofA;
    if( p->nSelectRow > pPrior->nSelectRow ) p->nSelectRow = pPrior->nSelectRow;
  }else{
    VdbeNoopComment((v, "eof-B subroutine"));
    addrEofB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
    sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, labelEnd); VdbeCoverage(v);
    sqlite3VdbeGoto(v, addrEofB);
  }

  /* Generate code to handle the case of A<B
  */
  VdbeNoopComment((v, "A-lt-B subroutine"));
  addrAltB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
  sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA); VdbeCoverage(v);
  sqlite3VdbeGoto(v, labelCmpr);

  /* Generate code to handle the case of A==B
  */
  if( op==TK_ALL ){
    addrAeqB = addrAltB;
  }else if( op==TK_INTERSECT ){
    addrAeqB = addrAltB;
    addrAltB++;
  }else{
    VdbeNoopComment((v, "A-eq-B subroutine"));
    addrAeqB =
    sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA); VdbeCoverage(v);
    sqlite3VdbeGoto(v, labelCmpr);
  }

  /* Generate code to handle the case of A>B
  */
  VdbeNoopComment((v, "A-gt-B subroutine"));
  addrAgtB = sqlite3VdbeCurrentAddr(v);
  if( op==TK_ALL || op==TK_UNION ){
    sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
  }
  sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
  sqlite3VdbeGoto(v, labelCmpr);

  /* This code runs once to initialize everything.
  */
  sqlite3VdbeJumpHere(v, addr1);
  sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA_noB); VdbeCoverage(v);
  sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);

  /* Implement the main merge loop
  */
  sqlite3VdbeResolveLabel(v, labelCmpr);
  sqlite3VdbeAddOp4(v, OP_Permutation, 0, 0, 0, (char*)aPermute, P4_INTARRAY);
  sqlite3VdbeAddOp4(v, OP_Compare, destA.iSdst, destB.iSdst, nOrderBy,
                         (char*)pKeyMerge, P4_KEYINFO);
  sqlite3VdbeChangeP5(v, OPFLAG_PERMUTE);
  sqlite3VdbeAddOp3(v, OP_Jump, addrAltB, addrAeqB, addrAgtB); VdbeCoverage(v);

  /* Jump to the this point in order to terminate the query.
  */
  sqlite3VdbeResolveLabel(v, labelEnd);

  /* Reassembly the compound query so that it will be freed correctly
  ** by the calling function */
  if( p->pPrior ){
    sqlite3SelectDelete(db, p->pPrior);
  }
  p->pPrior = pPrior;
  pPrior->pNext = p;

  /*** TBD:  Insert subroutine calls to close cursors on incomplete
  **** subqueries ****/
  ExplainQueryPlanPop(pParse);
  return pParse->nErr!=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0xa8(%rbp)
movq $0x0, -0xf0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x42d540
movl %eax, -0xdc(%rbp)
movq -0x10(%rbp), %rdi
callq 0x42d540
movl %eax, -0xd8(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0xe4(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x10c(%rbp)
cmpl $0x85, -0xe4(%rbp)
je 0x44722c
movl $0x1, -0x24(%rbp)
movq -0x100(%rbp), %rax
movzbl 0x61(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x135(%rbp)
jne 0x4470f0
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpl (%rcx), %eax
setle %al
movb %al, -0x135(%rbp)
movb -0x135(%rbp), %al
testb $0x1, %al
jne 0x4470ff
jmp 0x44722a
movl $0x0, -0x28(%rbp)
movq -0x108(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x120(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x10c(%rbp), %eax
jge 0x447154
movq -0x120(%rbp), %rax
movzwl 0x14(%rax), %eax
cmpl -0x24(%rbp), %eax
jne 0x447135
jmp 0x447154
jmp 0x447137
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x120(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x120(%rbp)
jmp 0x447118
movl -0x28(%rbp), %eax
cmpl -0x10c(%rbp), %eax
jne 0x44721a
movq -0x100(%rbp), %rdi
movl $0x98, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x41d620
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
jne 0x447195
movl $0x7, -0x4(%rbp)
jmp 0x447b62
movq -0x128(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x400, %ecx            # imm = 0x400
movl %ecx, 0x4(%rax)
movl -0x24(%rbp), %ecx
movq -0x128(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x108(%rbp), %rsi
movq -0x128(%rbp), %rdx
callq 0x41d3c0
movq %rax, %rcx
movq %rcx, -0x108(%rbp)
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
cmpq $0x0, -0x108(%rbp)
je 0x447218
movl -0x24(%rbp), %eax
movw %ax, %cx
movq -0x108(%rbp), %rax
addq $0x8, %rax
movl -0x10c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x10c(%rbp)
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x14(%rax)
jmp 0x44721a
jmp 0x44721c
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4470c2
jmp 0x44722c
movq -0x100(%rbp), %rdi
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x2, %rsi
callq 0x3d62a0
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
je 0x4472e4
movl -0x10c(%rbp), %ecx
movq -0x118(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x24(%rbp)
movq -0x108(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x130(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10c(%rbp), %eax
jg 0x4472c9
movq -0x130(%rbp), %rax
movzwl 0x14(%rax), %edx
subl $0x1, %edx
movq -0x118(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x130(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x130(%rbp)
jmp 0x447285
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x447ce0
movq %rax, -0xf8(%rbp)
jmp 0x4472ef
movq $0x0, -0xf8(%rbp)
movq -0x108(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x108(%rbp), %rsi
xorl %edx, %edx
callq 0x432810
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x48(%rax)
cmpl $0x85, -0xe4(%rbp)
jne 0x447339
movl $0x0, -0xcc(%rbp)
jmp 0x447401
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl (%rax), %eax
movl %eax, -0x134(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
movl -0x134(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
addl 0x38(%rax), %ecx
movl %ecx, 0x38(%rax)
movq -0x38(%rbp), %rdi
movl -0xcc(%rbp), %ecx
movl $0x45, %esi
xorl %edx, %edx
callq 0x410100
movq -0x100(%rbp), %rdi
movl -0x134(%rbp), %esi
movl $0x1, %edx
callq 0x42a3a0
movq %rax, -0xf0(%rbp)
cmpq $0x0, -0xf0(%rbp)
je 0x4473ff
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x134(%rbp), %eax
jge 0x4473fd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x447c50
movq %rax, %rdx
movq -0xf0(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq %rdx, 0x20(%rax,%rcx,8)
movq -0xf0(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4473b1
jmp 0x4473ff
jmp 0x447401
movq -0x18(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x165d0d(%rip), %rcx    # 0x5ad13d
callq 0x43c0c0
movq -0x30(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x44745c
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x165ce6(%rip), %rcx    # 0x5ad13d
callq 0x43c0c0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xdc(%rbp), %edx
callq 0x441010
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x447520
cmpl $0x85, -0xe4(%rbp)
jne 0x447520
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0xc4(%rbp)
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0xc8(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x4474da
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
addl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0x4474e7
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x144(%rbp)
movq -0x140(%rbp), %rdi
movl -0x144(%rbp), %edx
movl -0xc4(%rbp), %ecx
movl $0x4d, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xc4(%rbp), %edx
movl -0xc8(%rbp), %ecx
movl $0x4d, %esi
callq 0x410100
jmp 0x447534
movl $0x0, -0xc8(%rbp)
movl $0x0, -0xc4(%rbp)
movq -0x100(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0x40c670
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0x8c(%rbp)
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0x90(%rbp)
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0x9c(%rbp)
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x38(%rcx)
movl %eax, -0xa0(%rbp)
movl -0x8c(%rbp), %edx
leaq -0x60(%rbp), %rdi
movl $0xd, %esi
callq 0x430c20
movl -0x90(%rbp), %edx
leaq -0x88(%rbp), %rdi
movl $0xd, %esi
callq 0x430c20
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %edi
callq 0x43c250
movq -0x150(%rbp), %rdi
movq %rax, %rcx
movl $0x1, %esi
leaq 0x166754(%rip), %rdx    # 0x5add4c
movb $0x0, %al
callq 0x430b00
movq -0x38(%rbp), %rdi
callq 0x430ae0
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movq -0x38(%rbp), %rdi
movl -0x8c(%rbp), %edx
movl -0x94(%rbp), %r8d
movl $0xd, %esi
xorl %ecx, %ecx
callq 0x410130
movl %eax, -0xe0(%rbp)
movl -0xc4(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x166706(%rip), %rdx    # 0x5add57
movb $0x0, %al
callq 0x430b00
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x41aee0
movq -0x38(%rbp), %rdi
movl -0x8c(%rbp), %esi
callq 0x434920
movq -0x38(%rbp), %rdi
movl -0xe0(%rbp), %esi
callq 0x429a70
movq -0x38(%rbp), %rdi
callq 0x430ae0
addl $0x1, %eax
movl %eax, -0x98(%rbp)
movq -0x38(%rbp), %rdi
movl -0x90(%rbp), %edx
movl -0x98(%rbp), %r8d
movl $0xd, %esi
xorl %ecx, %ecx
callq 0x410130
movl %eax, -0xe0(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xd0(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0xd4(%rbp)
movl -0xc8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x154eeb(%rip), %rdx    # 0x59c5e9
movb $0x0, %al
callq 0x430b00
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x41aee0
movl -0xd0(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0xd4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rdi
movl -0x90(%rbp), %esi
callq 0x434920
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl -0x9c(%rbp), %r8d
movl -0xcc(%rbp), %r9d
movq -0xf0(%rbp), %r10
movl -0xdc(%rbp), %eax
leaq -0x60(%rbp), %rdx
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x447e80
movl %eax, -0xa4(%rbp)
cmpl $0x85, -0xe4(%rbp)
je 0x447798
cmpl $0x84, -0xe4(%rbp)
jne 0x4477d9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl -0xa0(%rbp), %r8d
movl -0xcc(%rbp), %r9d
movq -0xf0(%rbp), %r10
movl -0xdc(%rbp), %eax
leaq -0x88(%rbp), %rdx
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x447e80
movl %eax, -0xa8(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x3eb5a0
cmpl $0x86, -0xe4(%rbp)
je 0x4477fd
cmpl $0x87, -0xe4(%rbp)
jne 0x447811
movl -0xdc(%rbp), %eax
movl %eax, -0xac(%rbp)
movl %eax, -0xb0(%rbp)
jmp 0x447883
movq -0x38(%rbp), %rdi
movl -0xa0(%rbp), %edx
movl -0xa8(%rbp), %ecx
movl $0xc, %esi
callq 0x410100
movl %eax, -0xac(%rbp)
movq -0x38(%rbp), %rdi
movl -0x90(%rbp), %edx
movl -0xdc(%rbp), %ecx
movl $0xe, %esi
callq 0x410100
movl %eax, -0xb0(%rbp)
movq -0x38(%rbp), %rdi
movl -0xac(%rbp), %esi
callq 0x429db0
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)
cmpl $0x87, -0xe4(%rbp)
jne 0x4478c1
movl -0xac(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0x18(%rbp), %rax
movswl 0x2(%rax), %eax
movq -0x30(%rbp), %rcx
movswl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jle 0x4478bf
movq -0x30(%rbp), %rax
movw 0x2(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2(%rax)
jmp 0x44790a
movq -0x38(%rbp), %rdi
movl -0x9c(%rbp), %edx
movl -0xa4(%rbp), %ecx
movl $0xc, %esi
callq 0x410100
movl %eax, -0xb4(%rbp)
movq -0x38(%rbp), %rdi
movl -0x8c(%rbp), %edx
movl -0xdc(%rbp), %ecx
movl $0xe, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xb4(%rbp), %esi
callq 0x429db0
movq -0x38(%rbp), %rdi
movl -0x9c(%rbp), %edx
movl -0xa4(%rbp), %ecx
movl $0xc, %esi
callq 0x410100
movl %eax, -0xb8(%rbp)
movq -0x38(%rbp), %rdi
movl -0x8c(%rbp), %edx
movl -0xac(%rbp), %ecx
movl $0xe, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xd8(%rbp), %esi
callq 0x429db0
cmpl $0x85, -0xe4(%rbp)
jne 0x44796d
movl -0xb8(%rbp), %eax
movl %eax, -0xbc(%rbp)
jmp 0x4479c7
cmpl $0x87, -0xe4(%rbp)
jne 0x447996
movl -0xb8(%rbp), %eax
movl %eax, -0xbc(%rbp)
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x4479c5
movq -0x38(%rbp), %rdi
movl -0x8c(%rbp), %edx
movl -0xac(%rbp), %ecx
movl $0xe, %esi
callq 0x410100
movl %eax, -0xbc(%rbp)
movq -0x38(%rbp), %rdi
movl -0xd8(%rbp), %esi
callq 0x429db0
jmp 0x4479c7
movq -0x38(%rbp), %rdi
callq 0x430ae0
movl %eax, -0xc0(%rbp)
cmpl $0x85, -0xe4(%rbp)
je 0x4479ee
cmpl $0x84, -0xe4(%rbp)
jne 0x447a08
movq -0x38(%rbp), %rdi
movl -0xa0(%rbp), %edx
movl -0xa8(%rbp), %ecx
movl $0xc, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0x90(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl $0xe, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xd8(%rbp), %esi
callq 0x429db0
movq -0x38(%rbp), %rdi
movl -0xe0(%rbp), %esi
callq 0x429a70
movq -0x38(%rbp), %rdi
movl -0x8c(%rbp), %edx
movl -0xb0(%rbp), %ecx
movl $0xe, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0x90(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl $0xe, %esi
callq 0x410100
movq -0x38(%rbp), %rdi
movl -0xd8(%rbp), %esi
callq 0x42dc90
movq -0x38(%rbp), %rdi
movq -0x118(%rbp), %r9
movl $0x55, %esi
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
movl $0xfffffff1, (%rsp)     # imm = 0xFFFFFFF1
callq 0x429aa0
movq -0x38(%rbp), %rdi
movl -0x54(%rbp), %edx
movl -0x7c(%rbp), %ecx
movl -0x10c(%rbp), %r8d
movq -0xf8(%rbp), %r9
movl $0x56, %esi
movl $0xfffffff7, (%rsp)     # imm = 0xFFFFFFF7
callq 0x429aa0
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x3cb9f0
movq -0x38(%rbp), %rdi
movl -0xb8(%rbp), %edx
movl -0xbc(%rbp), %ecx
movl -0xc0(%rbp), %r8d
movl $0x10, %esi
callq 0x410130
movq -0x38(%rbp), %rdi
movl -0xdc(%rbp), %esi
callq 0x42dc90
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x447b2e
movq -0x100(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x40c7e0
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rdi
callq 0x440a70
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nop