ViDeadlockRemoveNode
VOID __fastcall ViDeadlockRemoveNode(_VI_DEADLOCK_NODE *Node, UINT64 DisableConsistencyChecks){
_VI_DEADLOCK_NODE *v2;
_QWORD *v3;
__int64 v4;
_QWORD *v5;
__int64 *v6;
__int64 *v7;
__int64 v8;
__int64 *v9;
__int64 *v10;
__int64 **v11;
__int64 v12;
__int64 **v13;
__int64 v14;
_VI_DEADLOCK_NODE **v15;
__int64 v16;
__int64 *v17;
__int64 *v18;
__int64 *v19;
v2 = Node;
if( !(_DWORD)DisableConsistencyChecks )
{
v6 = (__int64 *)((char *)Node + 8);
v7 = (__int64 *)*((_QWORD *)Node + 1);
if( *(_QWORD *)v2 )
{
while( v7 != v6 )
{
v8 = *v7;
v9 = v7 - 3;
v10 = v7;
v7 = (__int64 *)v8;
if( *(__int64 **)(v8 + 8) != v10 )
goto LABEL_20;
v11 = (__int64 **)v10[1];
if( *v11 != v10 )
goto LABEL_20;
*v11 = (__int64 *)v8;
*(_QWORD *)(v8 + 8) = v11;
*((_DWORD *)v2 + 19) += -1 - *((_DWORD *)v9 + 19);
*v9 = *(_QWORD *)v2;
v12 = *(_QWORD *)v2 + 8i64;
v13 = *(__int64 ***)(*(_QWORD *)v2 + 16i64);
if( *v13 != (__int64 *)v12 )
goto LABEL_20;
*v10 = v12;
v10[1] = (__int64)v13;
*v13 = v10;
*(_QWORD *)(v12 + 8) = v10;
}
v14 = *((_QWORD *)v2 + 3);
if( *(_VI_DEADLOCK_NODE **)(v14 + 8) != (_VI_DEADLOCK_NODE *)((char *)v2 + 24)
|| (v15 = (_VI_DEADLOCK_NODE **)*((_QWORD *)v2 + 4), *v15 != (_VI_DEADLOCK_NODE *)((char *)v2 + 24)) )
{
LABEL_20:
__fastfail(3u);
}
*v15 = (_VI_DEADLOCK_NODE *)v14;
*(_QWORD *)(v14 + 8) = v15;
ViDeadlockUpdateChildrenCount(*(_VI_DEADLOCK_NODE **)v2, 0xFFFFFFFFi64);
}
else
{
while( v7 != v6 )
{
v16 = *v7;
v17 = v7 - 3;
v18 = v7;
v7 = (__int64 *)v16;
if( *(__int64 **)(v16 + 8) != v18 )
goto LABEL_20;
v19 = (__int64 *)v18[1];
if( (__int64 *)*v19 != v18 )
goto LABEL_20;
*v19 = v16;
*(_QWORD *)(v16 + 8) = v19;
*((_DWORD *)v2 + 19) += -1 - *((_DWORD *)v17 + 19);
*v17 = 0i64;
*v18 = 0i64;
v17[4] = 0i64;
}
}
--*(_WORD *)(*((_QWORD *)v2 + 7) + 4i64);
}
v3 = (_QWORD *)((char *)v2 + 40);
v4 = *v3;
if( *(_QWORD **)(*v3 + 8i64) != v3 )
goto LABEL_20;
v5 = (_QWORD *)v3[1];
if( (_QWORD *)*v5 != v3 )
goto LABEL_20;
*v5 = v4;
*(_QWORD *)(v4 + 8) = v5;
}Referenced by:
ViDeadlockForgetResourceHistory
ViDeadlockRemoveResource