CmpFullPromoteHiveRootFromKcbStack

__int64 __fastcall CmpFullPromoteHiveRootFromKcbStack(__int64 a1){
  _QWORD *KcbAtLayerHeight; 
  int started; 
  INT64 EntryAtLayerHeight; 
  INT64 v6[10]; 

  memset(v6, 0i64, sizeof(v6));
  CmpInitializeKeyNodeStack((INT64)v6);
  KcbAtLayerHeight = (_QWORD *)CmpGetKcbAtLayerHeight(a1, *(_WORD *)(a1 + 2));
  started = CmpStartKeyNodeStackFromKcbStack((INT64)v6, a1);
  if( started >= 0 )
  {
    started = CmpFullPromoteSingleKeyFromKeyNodeStacks(0i64, (INT16 *)v6);
    if( started >= 0 )
    {
      EntryAtLayerHeight = CmpKeyNodeStackGetEntryAtLayerHeight((INT64)v6, *(_WORD *)(a1 + 2));
      ++KcbAtLayerHeight[38];
      CmpRebuildKcbCacheFromNode(KcbAtLayerHeight, *(_QWORD *)(EntryAtLayerHeight + 16), 0i64, 0);
      started = 0;
    }
  }
  CmpCleanupKeyNodeStack((INT64)v6);
  return(unsigned int)started;
}

Referenced by:

CmpPromoteKey