// File: /workspace/github_c_makefile_star2_O3/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 0x5a362
movq %r9, %r14
cmpq $0x0, 0x48(%r13)
je 0x5a35b
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x51729
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 0x5a623
jmp 0x5a362
movl $0x0, (%r14)
testl %r15d, %r15d
je 0x5a373
movl $0x5e, %eax
testb $0x8, 0x63(%r13)
jne 0x5a378
movl $0x60, %eax
movq 0x10(%rbp), %r14
movzwl (%r13,%rax), %edx
movl 0x44(%rbx), %eax
subl %edx, %eax
jge 0x5a396
movl 0x54(%rbx), %eax
leal 0x1(%rax), %esi
addl %edx, %eax
movl %eax, 0x54(%rbx)
jmp 0x5a3a2
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 0x5a3bb
cmpl 0x18(%rbp), %esi
jne 0x5a3bb
cmpq $0x0, 0x48(%r14)
je 0x5a3be
xorl %r14d, %r14d
movq %rdx, -0x58(%rbp)
testl %edx, %edx
je 0x5a462
movl -0x50(%rbp), %r12d
movl -0x58(%rbp), %r15d
xorl %ebx, %ebx
movq 0x8(%r13), %rax
testq %r14, %r14
je 0x5a3fc
movq 0x8(%r14), %rcx
movzwl (%rcx,%rbx,2), %ecx
movzwl (%rax,%rbx,2), %eax
cmpw %ax, %cx
sete %dl
cmpw $-0x2, %cx
setne %cl
testb %dl, %cl
je 0x5a400
jmp 0x5a456
movzwl (%rax,%rbx,2), %eax
leaq (%rbx,%r12), %r8
cmpw $-0x2, %ax
jne 0x5a431
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 0x5a672
jmp 0x5a448
movswl %ax, %ecx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%r13), %rsi
movl -0x2c(%rbp), %edx
callq 0x52c52
movq -0x40(%rbp), %rdi
movl $0x28, %esi
callq 0x4f693
incq %rbx
cmpq %r15, %rbx
jne 0x5a3d4
movl -0x44(%rbp), %r8d
testl %r8d, %r8d
movq -0x58(%rbp), %r14
movq -0x50(%rbp), %r15
je 0x5a487
movq -0x40(%rbp), %rdi
movl $0x32, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x3ea9f
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x51780
cmpl %r14d, 0x44(%rbx)
jge 0x5a4a7
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