// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereLoopAddBtreeIndex
static int whereLoopAddBtreeIndex(
  WhereLoopBuilder *pBuilder,     /* The WhereLoop factory */
  struct SrcList_item *pSrc,      /* FROM clause term being analyzed */
  Index *pProbe,                  /* An index on pSrc */
  WhereCost nInMul                /* log(Number of iterations due to IN) */
){
  WhereInfo *pWInfo = pBuilder->pWInfo;  /* WHERE analyse context */
  Parse *pParse = pWInfo->pParse;        /* Parsing context */
  sqlite3 *db = pParse->db;       /* Database connection malloc context */
  WhereLoop *pNew;                /* Template WhereLoop under construction */
  WhereTerm *pTerm;               /* A WhereTerm under consideration */
  int opMask;                     /* Valid operators for constraints */
  WhereScan scan;                 /* Iterator for WHERE terms */
  Bitmask saved_prereq;           /* Original value of pNew->prereq */
  u16 saved_nLTerm;               /* Original value of pNew->nLTerm */
  int saved_nEq;                  /* Original value of pNew->u.btree.nEq */
  u32 saved_wsFlags;              /* Original value of pNew->wsFlags */
  WhereCost saved_nOut;           /* Original value of pNew->nOut */
  int iCol;                       /* Index of the column in the table */
  int rc = SQLITE_OK;             /* Return code */
  WhereCost nRowEst;              /* Estimated index selectivity */
  WhereCost rLogSize;             /* Logarithm of table size */
  WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */

  pNew = pBuilder->pNew;
  if( db->mallocFailed ) return SQLITE_NOMEM;

  assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
  assert( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 );
  if( pNew->wsFlags & WHERE_BTM_LIMIT ){
    opMask = WO_LT|WO_LE;
  }else if( pProbe->tnum<=0 || (pSrc->jointype & JT_LEFT)!=0 ){
    opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE;
  }else{
    opMask = WO_EQ|WO_IN|WO_ISNULL|WO_GT|WO_GE|WO_LT|WO_LE;
  }
  if( pProbe->bUnordered ) opMask &= ~(WO_GT|WO_GE|WO_LT|WO_LE);

  assert( pNew->u.btree.nEq<=pProbe->nColumn );
  if( pNew->u.btree.nEq < pProbe->nColumn ){
    iCol = pProbe->aiColumn[pNew->u.btree.nEq];
    nRowEst = whereCost(pProbe->aiRowEst[pNew->u.btree.nEq+1]);
    if( nRowEst==0 && pProbe->onError==OE_None ) nRowEst = 1;
  }else{
    iCol = -1;
    nRowEst = 0;
  }
  pTerm = whereScanInit(&scan, pBuilder->pWC, pSrc->iCursor, iCol,
                        opMask, pProbe);
  saved_nEq = pNew->u.btree.nEq;
  saved_nLTerm = pNew->nLTerm;
  saved_wsFlags = pNew->wsFlags;
  saved_prereq = pNew->prereq;
  saved_nOut = pNew->nOut;
  pNew->rSetup = 0;
  rLogSize = estLog(whereCost(pProbe->aiRowEst[0]));
  for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
    int nIn = 0;
    if( pTerm->prereqRight & pNew->maskSelf ) continue;
    if( (pTerm->eOperator==WO_ISNULL || (pTerm->wtFlags&TERM_VNULL)!=0)
     && (iCol<0 || pSrc->pTab->aCol[iCol].notNull)
    ){
      continue; /* ignore IS [NOT] NULL constraints on NOT NULL columns */
    }
    pNew->wsFlags = saved_wsFlags;
    pNew->u.btree.nEq = saved_nEq;
    pNew->nLTerm = saved_nLTerm;
    if( whereLoopResize(db, pNew, pNew->nLTerm+1) ) break; /* OOM */
    pNew->aLTerm[pNew->nLTerm++] = pTerm;
    pNew->prereq = (saved_prereq | pTerm->prereqRight) & ~pNew->maskSelf;
    pNew->rRun = rLogSize; /* Baseline cost is log2(N).  Adjustments below */
    if( pTerm->eOperator & WO_IN ){
      Expr *pExpr = pTerm->pExpr;
      pNew->wsFlags |= WHERE_COLUMN_IN;
      if( ExprHasProperty(pExpr, EP_xIsSelect) ){
        /* "x IN (SELECT ...)":  TUNING: the SELECT returns 25 rows */
        nIn = 46;  assert( 46==whereCost(25) );
      }else if( ALWAYS(pExpr->x.pList && pExpr->x.pList->nExpr) ){
        /* "x IN (value, value, ...)" */
        nIn = whereCost(pExpr->x.pList->nExpr);
      }
      pNew->rRun += nIn;
      pNew->u.btree.nEq++;
      pNew->nOut = nRowEst + nInMul + nIn;
    }else if( pTerm->eOperator & (WO_EQ) ){
      assert( (pNew->wsFlags & (WHERE_COLUMN_NULL|WHERE_COLUMN_IN))!=0
                  || nInMul==0 );
      pNew->wsFlags |= WHERE_COLUMN_EQ;
      if( iCol<0  
       || (pProbe->onError!=OE_None && nInMul==0
           && pNew->u.btree.nEq==pProbe->nColumn-1)
      ){
        assert( (pNew->wsFlags & WHERE_COLUMN_IN)==0 || iCol<0 );
        pNew->wsFlags |= WHERE_ONEROW;
      }
      pNew->u.btree.nEq++;
      pNew->nOut = nRowEst + nInMul;
    }else if( pTerm->eOperator & (WO_ISNULL) ){
      pNew->wsFlags |= WHERE_COLUMN_NULL;
      pNew->u.btree.nEq++;
      /* TUNING: IS NULL selects 2 rows */
      nIn = 10;  assert( 10==whereCost(2) );
      pNew->nOut = nRowEst + nInMul + nIn;
    }else if( pTerm->eOperator & (WO_GT|WO_GE) ){
      testcase( pTerm->eOperator & WO_GT );
      testcase( pTerm->eOperator & WO_GE );
      pNew->wsFlags |= WHERE_COLUMN_RANGE|WHERE_BTM_LIMIT;
      pBtm = pTerm;
      pTop = 0;
    }else{
      assert( pTerm->eOperator & (WO_LT|WO_LE) );
      testcase( pTerm->eOperator & WO_LT );
      testcase( pTerm->eOperator & WO_LE );
      pNew->wsFlags |= WHERE_COLUMN_RANGE|WHERE_TOP_LIMIT;
      pTop = pTerm;
      pBtm = (pNew->wsFlags & WHERE_BTM_LIMIT)!=0 ?
                     pNew->aLTerm[pNew->nLTerm-2] : 0;
    }
    if( pNew->wsFlags & WHERE_COLUMN_RANGE ){
      /* Adjust nOut and rRun for STAT3 range values */
      WhereCost rDiv;
      whereRangeScanEst(pParse, pProbe, pNew->u.btree.nEq,
                        pBtm, pTop, &rDiv);
      pNew->nOut = saved_nOut>rDiv+10 ? saved_nOut - rDiv : 10;
    }
#ifdef SQLITE_ENABLE_STAT3
    if( pNew->u.btree.nEq==1 && pProbe->nSample
     &&  OptimizationEnabled(db, SQLITE_Stat3) ){
      tRowcnt nOut = 0;
      if( (pTerm->eOperator & (WO_EQ|WO_ISNULL))!=0 ){
        testcase( pTerm->eOperator & WO_EQ );
        testcase( pTerm->eOperator & WO_ISNULL );
        rc = whereEqualScanEst(pParse, pProbe, pTerm->pExpr->pRight, &nOut);
      }else if( (pTerm->eOperator & WO_IN)
             &&  !ExprHasProperty(pTerm->pExpr, EP_xIsSelect)  ){
        rc = whereInScanEst(pParse, pProbe, pTerm->pExpr->x.pList, &nOut);
      }
      assert( nOut==0 || rc==SQLITE_OK );
      if( nOut ) pNew->nOut = whereCost(nOut);
    }
#endif
    if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK))==0 ){
      /* Each row involves a step of the index, then a binary search of
      ** the main table */
      pNew->rRun =  whereCostAdd(pNew->rRun, rLogSize>27 ? rLogSize-17 : 10);
    }
    /* Step cost for each output row */
    pNew->rRun = whereCostAdd(pNew->rRun, pNew->nOut);
    /* TBD: Adjust nOut for additional constraints */
    rc = whereLoopInsert(pBuilder, pNew);
    if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0
     && pNew->u.btree.nEq<(pProbe->nColumn + (pProbe->zName!=0))
    ){
      whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn);
    }
  }
  pNew->prereq = saved_prereq;
  pNew->u.btree.nEq = saved_nEq;
  pNew->wsFlags = saved_wsFlags;
  pNew->nOut = saved_nOut;
  pNew->nLTerm = saved_nLTerm;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movw %cx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movw %ax, -0x22(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0xf8(%rbp)
movq $0x0, -0x108(%rbp)
movq $0x0, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0x79d11
movl $0x7, -0x4(%rbp)
jmp 0x7a410
movq -0x48(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x79d29
movl $0x18, -0x54(%rbp)
jmp 0x79d55
movq -0x20(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jle 0x79d43
movq -0x18(%rbp), %rax
movzbl 0x38(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x79d4c
movl $0x3f, -0x54(%rbp)
jmp 0x79d53
movl $0xbf, -0x54(%rbp)
jmp 0x79d55
movq -0x20(%rbp), %rax
movb 0x57(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x79d72
movl -0x54(%rbp), %eax
andl $-0x3d, %eax
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x20(%rbp), %rcx
movzwl 0x54(%rcx), %ecx
cmpl %ecx, %eax
jge 0x79de6
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movslq 0x18(%rcx), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xf4(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edi
callq 0x794f0
movw %ax, -0xfa(%rbp)
movzwl -0xfa(%rbp), %eax
cmpl $0x0, %eax
jne 0x79de4
movq -0x20(%rbp), %rax
movzbl 0x56(%rax), %eax
cmpl $0x0, %eax
jne 0x79de4
movw $0x1, -0xfa(%rbp)
jmp 0x79df9
movl $0xffffffff, -0xf4(%rbp) # imm = 0xFFFFFFFF
movw $0x0, -0xfa(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x3c(%rax), %edx
movl -0xf4(%rbp), %ecx
movl -0x54(%rbp), %r8d
movq -0x20(%rbp), %r9
leaq -0xd8(%rbp), %rdi
callq 0x77410
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0xe8(%rbp)
movq -0x48(%rbp), %rax
movw 0x2c(%rax), %ax
movw %ax, -0xe2(%rbp)
movq -0x48(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0xec(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x48(%rbp), %rax
movw 0x16(%rax), %ax
movw %ax, -0xee(%rbp)
movq -0x48(%rbp), %rax
movw $0x0, 0x12(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %edi
callq 0x794f0
movzwl %ax, %edi
callq 0x798f0
movw %ax, -0xfc(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xf8(%rbp)
movb %al, -0x123(%rbp)
jne 0x79eb3
cmpq $0x0, -0x50(%rbp)
setne %al
movb %al, -0x123(%rbp)
movb -0x123(%rbp), %al
testb $0x1, %al
jne 0x79ec2
jmp 0x7a3c1
movl $0x0, -0x114(%rbp)
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
andq 0x8(%rcx), %rax
cmpq $0x0, %rax
je 0x79ee7
jmp 0x7a3ac
movq -0x50(%rbp), %rax
movzwl 0x18(%rax), %eax
cmpl $0x80, %eax
je 0x79f06
movq -0x50(%rbp), %rax
movzbl 0x1a(%rax), %eax
andl $0x0, %eax
cmpl $0x0, %eax
je 0x79f37
cmpl $0x0, -0xf4(%rbp)
jl 0x79f32
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movslq -0xf4(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movzbl 0x28(%rax), %eax
cmpl $0x0, %eax
je 0x79f37
jmp 0x7a3ac
movl -0xec(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0xe8(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x18(%rax)
movw -0xe2(%rbp), %cx
movq -0x48(%rbp), %rax
movw %cx, 0x2c(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rax
movzwl 0x2c(%rax), %edx
addl $0x1, %edx
callq 0x78fd0
cmpl $0x0, %eax
je 0x79f82
jmp 0x7a3c1
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x48(%rbp), %rsi
movw 0x2c(%rsi), %cx
movw %cx, %di
addw $0x1, %di
movw %di, 0x2c(%rsi)
movzwl %cx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rcx
movq -0x50(%rbp), %rax
orq 0x28(%rax), %rcx
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
xorq $-0x1, %rax
andq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movw -0xfc(%rbp), %cx
movq -0x48(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x50(%rbp), %rax
movzwl 0x18(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7a0ad
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x120(%rbp)
movq -0x48(%rbp), %rax
movl 0x28(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x28(%rax)
movq -0x120(%rbp), %rax
movzwl 0x2(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x800, %eax            # imm = 0x800
jne 0x7a02e
movl $0x2e, -0x114(%rbp)
jmp 0x7a069
movq -0x120(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x7a067
movq -0x120(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x0, (%rax)
je 0x7a067
movq -0x120(%rbp), %rax
movq 0x20(%rax), %rax
movl (%rax), %edi
callq 0x794f0
movzwl %ax, %eax
movl %eax, -0x114(%rbp)
jmp 0x7a069
movl -0x114(%rbp), %edx
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x14(%rax)
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movzwl -0xfa(%rbp), %eax
movzwl -0x22(%rbp), %ecx
addl %ecx, %eax
addl -0x114(%rbp), %eax
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x16(%rax)
jmp 0x7a230
movq -0x50(%rbp), %rax
movzwl 0x18(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7a139
movq -0x48(%rbp), %rax
movl 0x28(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x28(%rax)
cmpl $0x0, -0xf4(%rbp)
jl 0x7a0ff
movq -0x20(%rbp), %rax
movzbl 0x56(%rax), %eax
cmpl $0x0, %eax
je 0x7a10f
movzwl -0x22(%rbp), %eax
cmpl $0x0, %eax
jne 0x7a10f
movq -0x48(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x20(%rbp), %rcx
movzwl 0x54(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x7a10f
movq -0x48(%rbp), %rax
movl 0x28(%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, 0x28(%rax)
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movzwl -0xfa(%rbp), %eax
movzwl -0x22(%rbp), %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x16(%rax)
jmp 0x7a22e
movq -0x50(%rbp), %rax
movzwl 0x18(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7a192
movq -0x48(%rbp), %rax
movl 0x28(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x28(%rax)
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movl $0xa, -0x114(%rbp)
movzwl -0xfa(%rbp), %eax
movzwl -0x22(%rbp), %ecx
addl %ecx, %eax
addl -0x114(%rbp), %eax
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x16(%rax)
jmp 0x7a22c
movq -0x50(%rbp), %rax
movzwl 0x18(%rax), %eax
andl $0x24, %eax
cmpl $0x0, %eax
je 0x7a1c7
movq -0x48(%rbp), %rax
movl 0x28(%rax), %ecx
orl $0x22, %ecx
movl %ecx, 0x28(%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x110(%rbp)
movq $0x0, -0x108(%rbp)
jmp 0x7a22a
movq -0x48(%rbp), %rax
movl 0x28(%rax), %ecx
orl $0x12, %ecx
movl %ecx, 0x28(%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x48(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x7a211
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x48(%rbp), %rcx
movzwl 0x2c(%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x130(%rbp)
jmp 0x7a21c
xorl %eax, %eax
movq %rax, -0x130(%rbp)
jmp 0x7a21c
movq -0x130(%rbp), %rax
movq %rax, -0x110(%rbp)
jmp 0x7a22c
jmp 0x7a22e
jmp 0x7a230
movq -0x48(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7a2b3
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rax
movl 0x18(%rax), %edx
movq -0x110(%rbp), %rcx
movq -0x108(%rbp), %r8
leaq -0x122(%rbp), %r9
callq 0x7a500
movzwl -0xee(%rbp), %eax
movzwl -0x122(%rbp), %ecx
addl $0xa, %ecx
cmpl %ecx, %eax
jle 0x7a295
movzwl -0xee(%rbp), %eax
movzwl -0x122(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x134(%rbp)
jmp 0x7a2a2
movl $0xa, %eax
movl %eax, -0x134(%rbp)
jmp 0x7a2a2
movl -0x134(%rbp), %eax
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x48(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x140, %eax            # imm = 0x140
cmpl $0x0, %eax
jne 0x7a321
movq -0x48(%rbp), %rax
movw 0x14(%rax), %ax
movw %ax, -0x136(%rbp)
movzwl -0xfc(%rbp), %eax
cmpl $0x1b, %eax
jle 0x7a2f1
movzwl -0xfc(%rbp), %eax
subl $0x11, %eax
movl %eax, -0x13c(%rbp)
jmp 0x7a2fe
movl $0xa, %eax
movl %eax, -0x13c(%rbp)
jmp 0x7a2fe
movw -0x136(%rbp), %cx
movl -0x13c(%rbp), %eax
movzwl %cx, %edi
movzwl %ax, %esi
callq 0x79a10
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x48(%rbp), %rax
movw 0x14(%rax), %cx
movq -0x48(%rbp), %rax
movzwl %cx, %edi
movzwl 0x16(%rax), %esi
callq 0x79a10
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x79260
movl %eax, -0xf8(%rbp)
movq -0x48(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x7a3aa
movq -0x48(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x20(%rbp), %rcx
movzwl 0x54(%rcx), %ecx
movq -0x20(%rbp), %rdx
cmpq $0x0, (%rdx)
setne %dl
andb $0x1, %dl
movzbl %dl, %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x7a3aa
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movzwl -0x22(%rbp), %eax
addl -0x114(%rbp), %eax
movzwl %ax, %ecx
callq 0x79c90
jmp 0x7a3ac
leaq -0xd8(%rbp), %rdi
callq 0x77540
movq %rax, -0x50(%rbp)
jmp 0x79e94
movq -0xe0(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movl -0xe8(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0xec(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x28(%rax)
movw -0xee(%rbp), %cx
movq -0x48(%rbp), %rax
movw %cx, 0x16(%rax)
movw -0xe2(%rbp), %cx
movq -0x48(%rbp), %rax
movw %cx, 0x2c(%rax)
movl -0xf8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax)