// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3GenerateIndexKey
SQLITE_PRIVATE int sqlite3GenerateIndexKey(
  Parse *pParse,       /* Parsing context */
  Index *pIdx,         /* The index for which to generate a key */
  int iDataCur,        /* Cursor number from which to take column data */
  int regOut,          /* Put the new key into this register if not 0 */
  int prefixOnly,      /* Compute only a unique prefix of the key */
  int *piPartIdxLabel, /* OUT: Jump to this label to skip partial index */
  Index *pPrior,       /* Previously generated index key */
  int regPrior         /* Register holding previous generated key */
){
  Vdbe *v = pParse->pVdbe;
  int j;
  int regBase;
  int nCol;

  if( piPartIdxLabel ){
    if( pIdx->pPartIdxWhere ){
      *piPartIdxLabel = sqlite3VdbeMakeLabel(v);
      pParse->iSelfTab = iDataCur;
      sqlite3ExprCachePush(pParse);
      sqlite3ExprIfFalseDup(pParse, pIdx->pPartIdxWhere, *piPartIdxLabel, 
                            SQLITE_JUMPIFNULL);
    }else{
      *piPartIdxLabel = 0;
    }
  }
  nCol = (prefixOnly && pIdx->uniqNotNull) ? pIdx->nKeyCol : pIdx->nColumn;
  regBase = sqlite3GetTempRange(pParse, nCol);
  if( pPrior && (regBase!=regPrior || pPrior->pPartIdxWhere) ) pPrior = 0;
  for(j=0; j<nCol; j++){
    if( pPrior
     && pPrior->aiColumn[j]==pIdx->aiColumn[j]
     && pPrior->aiColumn[j]!=XN_EXPR
    ){
      /* This column was already computed by the previous index */
      continue;
    }
    sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iDataCur, j, regBase+j);
    /* If the column affinity is REAL but the number is an integer, then it
    ** might be stored in the table as an integer (using a compact
    ** representation) then converted to REAL by an OP_RealAffinity opcode.
    ** But we are getting ready to store this value back into an index, where
    ** it should be converted by to INTEGER again.  So omit the OP_RealAffinity
    ** opcode if it is present */
    sqlite3VdbeDeletePriorOpcode(v, OP_RealAffinity);
  }
  if( regOut ){
    sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regOut);
  }
  sqlite3ReleaseTempRange(pParse, regBase, nCol);
  return regBase;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r15d
movl %ecx, %ebx
movl %edx, -0x2c(%rbp)
movq %rsi, %r13
movq %rdi, -0x38(%rbp)
movq 0x10(%rdi), %rax
movq %rax, -0x48(%rbp)
testq %r9, %r9
je 0x5316b
movq %r9, %r14
cmpq $0x0, 0x48(%r13)
je 0x53167
movq -0x48(%rbp), %rdi
callq 0x4b9c2
movl %eax, (%r14)
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, 0x70(%rdi)
incl 0x74(%rdi)
movq 0x48(%r13), %rsi
movl (%r14), %edx
callq 0x533b3
jmp 0x5316b
andl $0x0, (%r14)
movq 0x10(%rbp), %r12
testl %r15d, %r15d
je 0x5317b
testb $0x8, 0x63(%r13)
jne 0x5317f
pushq $0x60
jmp 0x53181
pushq $0x5e
popq %rax
movzwl (%r13,%rax), %r14d
movq -0x38(%rbp), %rdi
movl %r14d, %esi
callq 0x4bc61
movl %eax, %eax
testq %r12, %r12
movl %ebx, -0x50(%rbp)
movq %rax, -0x40(%rbp)
je 0x531af
cmpl 0x18(%rbp), %eax
jne 0x531af
cmpq $0x0, 0x48(%r12)
je 0x531b2
xorl %r12d, %r12d
movl %r14d, -0x4c(%rbp)
movl %r14d, %r15d
xorl %r14d, %r14d
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x5324f
movq 0x8(%r13), %rax
testq %r12, %r12
je 0x531ea
movq 0x8(%r12), %rcx
movzwl (%rcx,%rbx,2), %ecx
movzwl (%rax,%rbx,2), %eax
cmpw $-0x2, %cx
je 0x531ee
cmpw %ax, %cx
je 0x53243
jmp 0x531ee
movzwl (%rax,%rbx,2), %eax
cmpw $-0x2, %ax
jne 0x53218
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, 0x70(%rdi)
movq 0x50(%r13), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14), %rsi
movq -0x40(%rbp), %rax
leal (%rax,%rbx), %edx
callq 0x533fe
jmp 0x53237
movswl %ax, %ecx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%r13), %rsi
movq -0x40(%rbp), %rax
leal (%rax,%rbx), %r8d
movl -0x2c(%rbp), %edx
callq 0x4c8f3
movq -0x48(%rbp), %rdi
pushq $0x28
popq %rsi
callq 0x49fe1
incq %rbx
addq $0x20, %r14
jmp 0x531be
movl -0x50(%rbp), %r8d
testl %r8d, %r8d
movl -0x4c(%rbp), %ebx
movq -0x40(%rbp), %r14
je 0x53270
pushq $0x32
popq %rsi
movq -0x48(%rbp), %rdi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x385b6
movq -0x38(%rbp), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x4bdbc
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq