HalpDpPostReplace
VOID __fastcall HalpDpPostReplace(INT64 a1, INT64 a2, INT64 a3){
INT64 v3;
__int16 v4;
__int64 v5;
__int64 v6;
__int64 v7;
int v8;
__int16 v9;
__int16 v10;
v3 = a1;
v9 = 0;
if( *(_BYTE *)(a1 + 45) )
{
if( *(_DWORD *)a1 )
{
v5 = *(_QWORD *)(a1 + 72);
if( v5 )
{
v6 = 1000i64 * *(_QWORD *)(a1 + 80) / v5;
v7 = 1000i64 * *(_QWORD *)(a1 + 96);
*(_DWORD *)(a1 + 88) = v6;
v8 = v7 / v5;
*(_DWORD *)(v3 + 120) = 1000i64 * *(_QWORD *)(v3 + 112) / v5 - v8;
*(_DWORD *)(v3 + 104) = v8 - v6;
}
}
}
else
{
if( (HalpPlatformFlags & 4) != 0 )
HalpSetClockAfterSleep(a1, a2, a3);
LOBYTE(a1) = 1;
(*(void(__fastcall **)(INT64, INT64, INT64, INT64))(PmAcpiDispatchTable + 8))(a1, a2, a3, v3);
if( (int)HalpAcpiPmRegisterAvailable(0) >= 0 )
{
HalpAcpiPmRegisterRead(0, (unsigned __int8)byte_140C49DD8 >> 1, (__int64)&v9, 2u, 0i64);
v4 = v9;
v10 = v9;
if( (int)HalpAcpiPmRegisterAvailable(3) >= 0 )
{
HalpAcpiPmRegisterRead(3, (unsigned __int8)byte_140C49DD8 >> 1, (__int64)&v9, 2u, 0i64);
v4 = v9 | v10;
}
v10 = v4 | 0x20;
HalpAcpiPmRegisterWrite(0, (unsigned __int8)byte_140C49DD8 >> 1, (__int64)&v10, 2u, 0i64);
if( (int)HalpAcpiPmRegisterAvailable(3) >= 0 )
HalpAcpiPmRegisterWrite(3, (unsigned __int8)byte_140C49DD8 >> 1, (__int64)&v10, 2u, 0i64);
}
}
}Referenced by:
HalpDpReplaceControl