ST_STORE::StDmEtwPageRundown

__int64 __fastcall ST_STORE::StDmEtwPageRundown(__int64 *a1){
  unsigned int v2; 
  UINT64 *v3; 
  unsigned __int64 v4; 
  __int64 v5; 
  __int64 v6; 
  struct B_TREE_NODE_HDR *LeafSibling; 
  __int64 v8; 
  __int16 v9; 
  UINT64 v10; 
  UINT64 StoreId; 
  __int128 v13; 
  v13 = 0i64;
  v2 = 0;
  v3 = SmEtwEnabled(3i64);
  if( v3 )
  {
    if( B_TREE<_SM_PAGE_KEY,ST_STORE::_ST_PAGE_ENTRY,4096,NP_CONTEXT,B_TREE_KEY_COMPARATOR<_SM_PAGE_KEY>>::BTreeIteratorAttachEx(
           (__int64)&v13,
           a1) == (struct B_TREE_NODE_HDR *)-1i64 )
    {
LABEL_18:
      v2 = -1073741818;
      goto LABEL_19;
    }
    v4 = *((_QWORD *)&v13 + 1);
    v5 = v13;
    while( 1 )
    {
      if( !v5 )
        goto LABEL_19;
      v4 += 8i64;
      v6 = (unsigned __int16)*(_DWORD *)v5 + 2i64;
      *((_QWORD *)&v13 + 1) = v4;
      if( v4 >= v5 + 8 * v6 )
      {
        if( **(_DWORD **)((unsigned __int64)(a1 + 2) & -(__int64)(a1 != 0i64)) == -1 )
        {
          LeafSibling = *(struct B_TREE_NODE_HDR **)(v5 + 8);
        }
        else
        {
          LeafSibling = B_TREE<_SM_PAGE_KEY,ST_STORE::_ST_PAGE_ENTRY,4096,NP_CONTEXT,B_TREE_KEY_COMPARATOR<_SM_PAGE_KEY>>::BTreeFindLeafSibling(
                          (__int64)a1,
                          v5);
          if( LeafSibling == (struct B_TREE_NODE_HDR *)-1i64 )
          {
            v8 = -1i64;
            goto LABEL_15;
          }
        }
        if( !LeafSibling )
        {
          v8 = 0i64;
          goto LABEL_15;
        }
        v4 = (unsigned __int64)LeafSibling + 16;
        *(_QWORD *)&v13 = LeafSibling;
        *((_QWORD *)&v13 + 1) = (char *)LeafSibling + 16;
        v5 = (__int64)LeafSibling;
      }
      v8 = v4;
LABEL_15:
      if( !v8 )
        goto LABEL_19;
      if( v8 == -1 )
        goto LABEL_18;
      v9 = *((_WORD *)ST_STORE::ST_PAGE_RECORD_GET(a1, v8) + 2);
      LODWORD(StoreId) = *ST_STORE::ST_PAGE_RECORD_GET(a1, v8);
      SmEtwLogStoreOp(v3, 2ui64, (PVOID)v8, v10, StoreId, (UINT16)a1, v9 & 0xFFF, 0);
    }
  }
  v2 = -1073741637;
LABEL_19:
  B_TREE<_SM_PAGE_KEY,ST_STORE::_ST_PAGE_ENTRY,4096,NP_CONTEXT,B_TREE_KEY_COMPARATOR<_SM_PAGE_KEY>>::BTreeIteratorCleanup(
    (__int64 *)&v13,
    a1);
  return v2;
}

Referenced by:

No references.