INT64 __fastcall MmChargeResources(UINT64 a1, CHAR a2){
int v2;
unsigned int v5;
v2 = 0;
if( (a2 & 2) != 0 )
{
if( !(unsigned int)MiChargeResident(&MiSystemPartition, a1, 0i64) )
return 0;
v2 = 2;
}
v5 = 1;
if( (a2 & 1) != 0 && !(unsigned int)MiChargeCommit((_MI_PARTITION *)&MiSystemPartition, a1, 1ui64) )
v5 = 0;
else
v2 = 0;
if( v2 )
MmReleaseResourceCharge(a1, v2, 0i64);
return v5;
}