// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movl %r8d, %r15d
movl %ecx, -0x44(%rbp)
movl %edx, -0x2c(%rbp)
movq %rsi, %r13
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq %rax, -0x40(%rbp)
testq %r9, %r9
je 0x5b826
movq %r9, %r14
cmpq $0x0, 0x48(%r13)
je 0x5b81f
movq -0x40(%rbp), %rdi
callq 0x528c8
movl %eax, (%r14)
movl -0x2c(%rbp), %eax
movl %eax, 0x70(%rbx)
incl 0x74(%rbx)
movq 0x48(%r13), %rsi
movl (%r14), %edx
movq %rbx, %rdi
callq 0x5bad8
jmp 0x5b826
movl $0x0, (%r14)
testl %r15d, %r15d
je 0x5b837
movl $0x5e, %eax
testb $0x8, 0x63(%r13)
jne 0x5b83c
movl $0x60, %eax
movq 0x10(%rbp), %r14
movzwl (%r13,%rax), %edx
movl 0x44(%rbx), %eax
subl %edx, %eax
jge 0x5b85a
movl 0x54(%rbx), %eax
leal 0x1(%rax), %esi
addl %edx, %eax
movl %eax, 0x54(%rbx)
jmp 0x5b866
movl 0x48(%rbx), %esi
leal (%rsi,%rdx), %ecx
movl %ecx, 0x48(%rbx)
movl %eax, 0x44(%rbx)
testq %r14, %r14
movq %rbx, -0x38(%rbp)
movq %rsi, -0x50(%rbp)
je 0x5b87f
cmpl 0x18(%rbp), %esi
jne 0x5b87f
cmpq $0x0, 0x48(%r14)
je 0x5b882
xorl %r14d, %r14d
movq %rdx, -0x58(%rbp)
testl %edx, %edx
je 0x5b917
movl -0x50(%rbp), %r12d
movl -0x58(%rbp), %r15d
xorl %ebx, %ebx
testq %r14, %r14
je 0x5b8b5
movq 0x8(%r14), %rax
movzwl (%rax,%rbx,2), %eax
cmpw $-0x2, %ax
je 0x5b8b5
movq 0x8(%r13), %rcx
cmpw (%rcx,%rbx,2), %ax
je 0x5b90f
leaq (%rbx,%r12), %r8
movq 0x8(%r13), %rax
movswl (%rax,%rbx,2), %ecx
cmpl $-0x2, %ecx
jne 0x5b8ed
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, 0x70(%rdi)
movq 0x50(%r13), %rax
movq 0x8(%rax), %rax
movq %rbx, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movl %r8d, %edx
callq 0x5bb27
jmp 0x5b901
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%r13), %rsi
movl -0x2c(%rbp), %edx
callq 0x53de0
movq -0x40(%rbp), %rdi
movl $0x28, %esi
callq 0x50817
incq %rbx
cmpq %r15, %rbx
jne 0x5b898
movl -0x44(%rbp), %r8d
testl %r8d, %r8d
movq -0x58(%rbp), %r14
movq -0x50(%rbp), %r15
je 0x5b93c
movq -0x40(%rbp), %rdi
movl $0x32, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x3fa9e
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x5291f
cmpl %r14d, 0x44(%rbx)
jge 0x5b95c
movl %r14d, 0x44(%rbx)
movl %r15d, 0x48(%rbx)
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq