TtmpFindPowerRequestEntryById
BOOL __fastcall TtmpFindPowerRequestEntryById(INT64 a1, INT64 a2, INT64 *a3){
INT64 v3;
INT64 v4;
INT64 v5;
__int64 v8;
__int64 v9;
int v10;
BOOL result;
__int64 v12;
v3 = 0i64;
v4 = (int)a2;
v5 = 0i64;
while( 1 )
{
v8 = -1i64 << (*(_BYTE *)(a1 + 276) & 0x1F);
v9 = v8 & v4;
if( v5 )
goto LABEL_5;
v10 = *(_DWORD *)(a1 + 276) >> 5;
if( !v10 )
break;
v12 = v8 & v4;
v5 = *(_QWORD *)(a1 + 280)
+ 8i64
* ((37
* (BYTE6(v12)
+ 37
* (BYTE5(v12)
+ 37
* (BYTE4(v12)
+ 37 * (BYTE3(v12) + 37 * (BYTE2(v12) + 37 * (BYTE1(v12) + 37 * ((unsigned __int8)v9 + 11623883)))))))
+ HIBYTE(v12)) & (unsigned int)(v10 - 1));
LABEL_5:
while( 1 )
{
v5 = *(_QWORD *)v5;
if( (v5 & 1) != 0 )
break;
if( v9 == (v8 & *(_QWORD *)(v5 + 8)) )
goto LABEL_9;
}
v5 = 0i64;
LABEL_9:
if( !v5 )
goto LABEL_14;
result = TtmpPowerRequestEntryComparator(v5, v4);
if( result )
goto LABEL_13;
}
v5 = 0i64;
LABEL_13:
if( !v5 )
{
LABEL_14:
TtmiLogError((PSTR)"TtmpFindPowerRequestEntryById", 401i64, 3221226021i64, 0xFFFFFFFFi64);
goto LABEL_16;
}
v3 = v5;
LABEL_16:
if( a3 )
*a3 = v3;
LOBYTE(result) = v3 != 0;
return result;
}Referenced by:
TtmiSetDisplayPowerRequest
TtmpSetDisplayRequestEnded
TtmpUpdateDisplayRequiredPowerRequest
TtmpUpdatePowerRequestAttribute