struct KPRCB *__fastcall HalpApicSetPriority(INT64 a1, UINT64 a2){
unsigned __int64 v2;
struct KPRCB *result;
v2 = (unsigned int)a2;
((void(__fastcall *)(__int64, _QWORD))HalpApicWrite)(128i64, (unsigned int)(16 * a2));
((void(__fastcall *)(__int64))HalpApicRead)(128i64);
result = (struct KPRCB *)KeGetCurrentPrcb();
if( *((_BYTE *)result + 141) == 1 )
__writecr8(v2);
return result;
}