CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>::InsertRebalance
0x005ac1b0 · 2768 bytes · __thiscall
_ZN10CUtlRBTreeIN14AI_CriteriaSet11CritEntry_tEsPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_sEsEE15InsertRebalanceEs
Decompiled
undefined (2 params)
/* CUtlRBTree<AI_CriteriaSet::CritEntry_t, short, bool (*)(AI_CriteriaSet::CritEntry_t const&,
AI_CriteriaSet::CritEntry_t const&), CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,
short>, short> >::InsertRebalance(short) */
void __thiscall
CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
::InsertRebalance(CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
*this,short param_1)
{
short sVar1;
short sVar2;
undefined2 *puVar3;
undefined2 *puVar4;
int iVar5;
short sVar6;
short *psVar7;
int iVar8;
short local_20;
do {
sVar1 = *(short *)(this + 0x10);
if (param_1 == sVar1) {
LAB_005ac218:
*(undefined2 *)(sVar1 * 0x50 + *(int *)(this + 4) + 6) = 1;
return;
}
if (Links(short)::s_Sentinel == '\0') {
iVar8 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar8 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (param_1 != -1) goto LAB_005ac1e2;
LAB_005ac595:
puVar3 = &Links(short)::s_Sentinel;
}
else {
if (param_1 == -1) goto LAB_005ac595;
LAB_005ac1e2:
puVar3 = (undefined2 *)(param_1 * 0x50 + *(int *)(this + 4));
}
sVar1 = puVar3[2];
if ((Links(short)::s_Sentinel == '\0') &&
(iVar8 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar8 != 0)) {
DAT_00f21a9a = -1;
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
if (sVar1 != -1) goto LAB_005ac204;
LAB_005ac560:
puVar3 = &Links(short)::s_Sentinel;
}
else {
if (sVar1 == -1) goto LAB_005ac560;
LAB_005ac204:
puVar3 = (undefined2 *)(sVar1 * 0x50 + *(int *)(this + 4));
}
if (puVar3[3] != 0) {
sVar1 = *(short *)(this + 0x10);
goto LAB_005ac218;
}
if (Links(short)::s_Sentinel == '\0') {
iVar8 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar8 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (param_1 != -1) goto LAB_005ac251;
LAB_005ac505:
puVar3 = &Links(short)::s_Sentinel;
}
else {
if (param_1 == -1) goto LAB_005ac505;
LAB_005ac251:
puVar3 = (undefined2 *)(param_1 * 0x50 + *(int *)(this + 4));
}
sVar1 = puVar3[2];
iVar8 = (int)sVar1;
if (Links(short)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 != 0) {
DAT_00f21a9a = -1;
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (sVar1 != -1) goto LAB_005ac278;
LAB_005ac4d6:
puVar3 = &Links(short)::s_Sentinel;
}
else {
if (sVar1 == -1) goto LAB_005ac4d6;
LAB_005ac278:
puVar3 = (undefined2 *)(iVar8 * 0x50 + *(int *)(this + 4));
}
local_20 = puVar3[2];
if (Links(short)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (sVar1 != -1) goto LAB_005ac29c;
LAB_005ac49e:
puVar3 = &Links(short)::s_Sentinel;
}
else {
if (sVar1 == -1) goto LAB_005ac49e;
LAB_005ac29c:
puVar3 = (undefined2 *)(iVar8 * 0x50 + *(int *)(this + 4));
}
sVar6 = puVar3[2];
if (Links(short)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
goto LAB_005ac2b1;
}
if (sVar6 != -1) goto LAB_005ac2bb;
LAB_005ac46b:
psVar7 = &Links(short)::s_Sentinel;
}
else {
LAB_005ac2b1:
if (sVar6 == -1) goto LAB_005ac46b;
LAB_005ac2bb:
psVar7 = (short *)(sVar6 * 0x50 + *(int *)(this + 4));
}
if (sVar1 == *psVar7) {
if (Links(short)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (local_20 != -1) goto LAB_005ac2ea;
LAB_005ac6c9:
puVar3 = &Links(short)::s_Sentinel;
}
else {
if (local_20 == -1) goto LAB_005ac6c9;
LAB_005ac2ea:
puVar3 = (undefined2 *)(local_20 * 0x50 + *(int *)(this + 4));
}
sVar6 = puVar3[1];
if ((Links(short)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar5 != 0)) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
sVar2 = DAT_00f21a9e;
if (sVar6 != -1) {
sVar2 = *(short *)(sVar6 * 0x50 + *(int *)(this + 4) + 6);
}
if (sVar2 == 0) {
LAB_005ac323:
*(undefined2 *)(iVar8 * 0x50 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(sVar6 * 0x50 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(local_20 * 0x50 + *(int *)(this + 4) + 6) = 0;
param_1 = local_20;
}
else {
if (Links(short)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (param_1 != -1) goto LAB_005ac629;
LAB_005aca05:
sVar6 = DAT_00f21a9c;
if (Links(short)::s_Sentinel != '\0') goto LAB_005ac641;
LAB_005aca20:
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 == 0) goto LAB_005ac641;
DAT_00f21a9c = -1;
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
if (sVar6 != -1) goto LAB_005ac64b;
LAB_005aca80:
if (param_1 != DAT_00f21a9a) goto LAB_005ac661;
LAB_005aca90:
RotateLeft(this,sVar1);
if ((Links(short)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar5 != 0)) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (sVar1 == -1) {
puVar3 = &Links(short)::s_Sentinel;
}
else {
puVar3 = (undefined2 *)(iVar8 * 0x50 + *(int *)(this + 4));
}
sVar6 = puVar3[2];
if ((Links(short)::s_Sentinel == '\0') &&
(iVar8 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar8 != 0)) {
DAT_00f21a9a = -1;
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (sVar6 == -1) {
puVar3 = &Links(short)::s_Sentinel;
puVar4 = (undefined2 *)(*(int *)(this + 4) + -0x50);
}
else {
puVar4 = (undefined2 *)(sVar6 * 0x50 + *(int *)(this + 4));
puVar3 = puVar4;
}
local_20 = puVar3[2];
param_1 = sVar1;
}
else {
if (param_1 == -1) goto LAB_005aca05;
LAB_005ac629:
sVar6 = *(short *)(param_1 * 0x50 + *(int *)(this + 4) + 4);
if (Links(short)::s_Sentinel == '\0') goto LAB_005aca20;
LAB_005ac641:
if (sVar6 == -1) goto LAB_005aca80;
LAB_005ac64b:
if (param_1 == *(short *)(sVar6 * 0x50 + *(int *)(this + 4) + 2)) goto LAB_005aca90;
LAB_005ac661:
puVar4 = (undefined2 *)(iVar8 * 0x50 + *(int *)(this + 4));
}
puVar4[3] = 1;
*(undefined2 *)(local_20 * 0x50 + *(int *)(this + 4) + 6) = 0;
RotateRight(this,local_20);
}
}
else {
if (Links(short)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (local_20 != -1) goto LAB_005ac37e;
LAB_005ac769:
psVar7 = &Links(short)::s_Sentinel;
}
else {
if (local_20 == -1) goto LAB_005ac769;
LAB_005ac37e:
psVar7 = (short *)(local_20 * 0x50 + *(int *)(this + 4));
}
sVar6 = *psVar7;
if ((Links(short)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar5 != 0)) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
if (sVar6 != -1) goto LAB_005ac39f;
LAB_005ac730:
puVar3 = &Links(short)::s_Sentinel;
}
else {
if (sVar6 == -1) goto LAB_005ac730;
LAB_005ac39f:
puVar3 = (undefined2 *)(sVar6 * 0x50 + *(int *)(this + 4));
}
if (puVar3[3] == 0) goto LAB_005ac323;
if (Links(short)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 != 0) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (param_1 != -1) goto LAB_005ac3cf;
LAB_005ac95d:
sVar6 = DAT_00f21a9c;
if (Links(short)::s_Sentinel != '\0') goto LAB_005ac3e7;
LAB_005ac970:
iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
if (iVar5 == 0) goto LAB_005ac3e7;
DAT_00f21a9c = -1;
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
if (sVar6 != -1) goto LAB_005ac3f1;
LAB_005ac9d0:
psVar7 = &Links(short)::s_Sentinel;
}
else {
if (param_1 == -1) goto LAB_005ac95d;
LAB_005ac3cf:
sVar6 = *(short *)(param_1 * 0x50 + *(int *)(this + 4) + 4);
if (Links(short)::s_Sentinel == '\0') goto LAB_005ac970;
LAB_005ac3e7:
if (sVar6 == -1) goto LAB_005ac9d0;
LAB_005ac3f1:
psVar7 = (short *)(sVar6 * 0x50 + *(int *)(this + 4));
}
if (param_1 == *psVar7) {
RotateRight(this,sVar1);
if ((Links(short)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar5 != 0)) {
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9a = -1;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (sVar1 == -1) {
puVar3 = &Links(short)::s_Sentinel;
}
else {
puVar3 = (undefined2 *)(iVar8 * 0x50 + *(int *)(this + 4));
}
sVar6 = puVar3[2];
if ((Links(short)::s_Sentinel == '\0') &&
(iVar8 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar8 != 0)) {
DAT_00f21a9a = -1;
Links(short)::s_Sentinel = 0xffff;
DAT_00f21a9c = -1;
__cxa_guard_release(&Links(short)::s_Sentinel);
}
if (sVar6 == -1) {
puVar3 = &Links(short)::s_Sentinel;
puVar4 = (undefined2 *)(*(int *)(this + 4) + -0x50);
}
else {
puVar4 = (undefined2 *)(sVar6 * 0x50 + *(int *)(this + 4));
puVar3 = puVar4;
}
local_20 = puVar3[2];
param_1 = sVar1;
}
else {
puVar4 = (undefined2 *)(iVar8 * 0x50 + *(int *)(this + 4));
}
puVar4[3] = 1;
*(undefined2 *)(local_20 * 0x50 + *(int *)(this + 4) + 6) = 0;
RotateLeft(this,local_20);
}
} while( true );
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.