SMKM_STORE_MGR::SmIoCtxWorkItemComplete
__int64 __fastcall SMKM_STORE_MGR::SmIoCtxWorkItemComplete(__int64 a1, __int64 a2, _DWORD *a3, int a4){
__int64 *v4;
unsigned int v7;
__int64 v8;
int v9;
__int64 v10;
int v11;
__int64 v12;
unsigned int v13;
int v14;
int v16;
int v17;
int v18;
int v19;
int v20;
UINT64 BugCheckOnFailure;
UINT64 Priority;
v4 = *(__int64 **)(a1 + 32);
v7 = 1;
if( (unsigned __int64)v4 <= 1 )
v8 = 0i64;
else
v8 = *v4;
v9 = *(_DWORD *)a1;
v10 = *(_DWORD *)a1 & 7;
v11 = a3[1504] & 0x3FF;
if( (v10 & 0xFFFFFFFD) != 0 )
{
v12 = 0i64;
v13 = 0;
}
else
{
v12 = *(_QWORD *)(a1 + 16);
v13 = *(_DWORD *)(v12 + 40) >> 12;
if( (_DWORD)v10 == 2 )
{
v4[1] = 0i64;
v9 = *(_DWORD *)a1;
}
}
v14 = v9 & 7;
if( v14 )
{
v16 = v14 - 1;
if( v16 )
{
v17 = v16 - 1;
if( !v17 )
{
v18 = *(_DWORD *)(a1 + 8);
v10 = *(_QWORD *)(a1 + 32);
if( (_BYTE)v18 )
{
*(_WORD *)(v10 + 8) = (unsigned __int8)v18;
if( (dword_140D230F0 & 8) != 0 )
a4 = 0;
}
*(_DWORD *)v10 = a4;
if( (dword_140D230F0 & 0x10) != 0 )
SmAcquireReleaseResAvailForRead(v4, v13, 1ui64);
goto LABEL_8;
}
v19 = v17 - 1;
if( !v19 )
{
*(_DWORD *)v4 = a4;
v4[1] = *(unsigned int *)(a1 + 12);
goto LABEL_8;
}
v20 = v19 - 1;
if( v20 )
{
if( v20 != 1 )
goto LABEL_8;
LABEL_29:
*(_DWORD *)v4 = a4;
v4[1] = 0i64;
goto LABEL_8;
}
if( (*(_DWORD *)(a1 + 8) & 7) != 0 )
goto LABEL_29;
}
else if( (*(_DWORD *)(a1 + 16) & 1) == 0 )
{
SMKM_STORE_MGR::SmFeEvictComplete(
(__int64)&SmGlobals,
(unsigned int *)(a1 + 8),
*(_DWORD *)(a1 + 12),
v11);
*(_DWORD *)v4 = 0;
goto LABEL_8;
}
return 0;
}
SMKM_STORE_MGR::SmProcessAddCompletion((int)&SmGlobals, a1, v13, a3, a4);
LABEL_8:
if( v12 )
{
if( (*(_BYTE *)(v12 + 10) & 5) == 0 )
{
LODWORD(Priority) = 1073741840;
LODWORD(BugCheckOnFailure) = 0;
MmMapLockedPagesSpecifyCache((_MDL *)v12, 0, MmCached, 0i64, BugCheckOnFailure, Priority);
}
if( (dword_140D230F0 & 2) != 0 )
SmFpFree(&dword_140D22FC0, SmFpResourceMapping, v4, (VOID *)v12);
}
if( v8 )
SmIoRequestComplete(v10, (_DWORD *)a1, v8, (__int64)v4);
return v7;
}
Referenced by:
No references.