L L4D2node

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>>::RemoveRebalance

0x005acf50 · 5434 bytes · __thiscall

_ZN10CUtlRBTreeIN14AI_CriteriaSet11CritEntry_tEsPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_sEsEE15RemoveRebalanceEs

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> >::RemoveRebalance(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>>
::RemoveRebalance(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;
  int iVar3;
  undefined2 *puVar4;
  short sVar5;
  short *psVar6;
  int iVar7;
  bool bVar8;
  int local_28;
  int local_24;
  int local_20;
  
  local_20._0_2_ = param_1;
  sVar2 = *(short *)(this + 0x10);
  while ((short)local_20 != sVar2) {
    if ((Links(short)::s_Sentinel == '\0') &&
       (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
      Links(short)::s_Sentinel = -1;
      DAT_00f21a9a = -1;
      DAT_00f21a9c = -1;
      __cxa_guard_release(&Links(short)::s_Sentinel);
    }
    sVar2 = DAT_00f21a9e;
    if ((short)local_20 != -1) {
      sVar2 = *(short *)((short)local_20 * 0x50 + *(int *)(this + 4) + 6);
    }
    if (sVar2 != 1) break;
    if (Links(short)::s_Sentinel == '\0') {
      iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
      if (iVar7 != 0) {
        Links(short)::s_Sentinel = -1;
        DAT_00f21a9a = -1;
        DAT_00f21a9c = -1;
        __cxa_guard_release(&Links(short)::s_Sentinel);
      }
      if ((short)local_20 != -1) goto LAB_005ad03d;
LAB_005ad229:
      local_24 = (int)DAT_00f21a9c;
      sVar2 = DAT_00f21a9c;
      if (Links(short)::s_Sentinel != '\0') goto LAB_005ad05b;
LAB_005ad240:
      iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
      if (iVar7 != 0) {
        Links(short)::s_Sentinel = -1;
        DAT_00f21a9a = -1;
        DAT_00f21a9c = -1;
        __cxa_guard_release(&Links(short)::s_Sentinel);
      }
      if (sVar2 != -1) goto LAB_005ad065;
LAB_005ad265:
      if ((short)local_20 != Links(short)::s_Sentinel) goto LAB_005ad07e;
LAB_005ad280:
      if (Links(short)::s_Sentinel == '\0') {
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if (sVar2 != -1) goto LAB_005ad292;
LAB_005adb65:
        puVar4 = &Links(short)::s_Sentinel;
      }
      else {
        if (sVar2 == -1) goto LAB_005adb65;
LAB_005ad292:
        puVar4 = (undefined2 *)(local_24 * 0x50 + *(int *)(this + 4));
      }
      sVar5 = puVar4[1];
      if ((Links(short)::s_Sentinel == '\0') &&
         (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
        Links(short)::s_Sentinel = -1;
        DAT_00f21a9a = -1;
        DAT_00f21a9c = -1;
        __cxa_guard_release(&Links(short)::s_Sentinel);
        if (sVar5 != -1) goto LAB_005ad2b4;
LAB_005adb30:
        puVar4 = &Links(short)::s_Sentinel;
      }
      else {
        if (sVar5 == -1) goto LAB_005adb30;
LAB_005ad2b4:
        puVar4 = (undefined2 *)(sVar5 * 0x50 + *(int *)(this + 4));
      }
      if (puVar4[3] == 0) {
        *(undefined2 *)(sVar5 * 0x50 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(local_24 * 0x50 + *(int *)(this + 4) + 6) = 0;
        RotateLeft(this,(short)local_24);
        if (Links(short)::s_Sentinel == '\0') {
          iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
          if (iVar7 != 0) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
          }
          if ((short)local_20 != -1) goto LAB_005ada98;
LAB_005adf49:
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          if ((short)local_20 == -1) goto LAB_005adf49;
LAB_005ada98:
          puVar4 = (undefined2 *)((short)local_20 * 0x50 + *(int *)(this + 4));
        }
        sVar2 = puVar4[2];
        if (Links(short)::s_Sentinel == '\0') {
          iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
          if (iVar7 != 0) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
          }
          if (sVar2 != -1) goto LAB_005adaba;
LAB_005adf0d:
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          if (sVar2 == -1) goto LAB_005adf0d;
LAB_005adaba:
          puVar4 = (undefined2 *)(sVar2 * 0x50 + *(int *)(this + 4));
        }
        sVar5 = puVar4[1];
      }
      if (Links(short)::s_Sentinel == '\0') {
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          Links(short)::s_Sentinel = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
          goto LAB_005ad2da;
        }
        if (sVar5 != -1) goto LAB_005ad2e4;
LAB_005ada3b:
        psVar6 = &Links(short)::s_Sentinel;
      }
      else {
LAB_005ad2da:
        if (sVar5 == -1) goto LAB_005ada3b;
LAB_005ad2e4:
        psVar6 = (short *)(sVar5 * 0x50 + *(int *)(this + 4));
      }
      sVar1 = *psVar6;
      if (Links(short)::s_Sentinel == '\0') {
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
          goto LAB_005ad2fb;
        }
        if (sVar1 != -1) goto LAB_005ad305;
LAB_005ad81b:
        if (DAT_00f21a9e != 1) goto joined_r0x005ad87c;
LAB_005ad82b:
        if ((Links(short)::s_Sentinel == '\0') &&
           (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if (sVar5 == -1) {
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          puVar4 = (undefined2 *)(sVar5 * 0x50 + *(int *)(this + 4));
        }
        sVar1 = puVar4[1];
        if ((Links(short)::s_Sentinel == '\0') &&
           (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          DAT_00f21a9a = -1;
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if (sVar1 == -1) {
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          puVar4 = (undefined2 *)(sVar1 * 0x50 + *(int *)(this + 4));
        }
        if (puVar4[3] != 1) goto joined_r0x005ad87c;
LAB_005add10:
        local_20._0_2_ = sVar2;
        if (sVar5 == -1) {
          sVar2 = *(short *)(this + 0x10);
        }
        else {
          *(undefined2 *)(sVar5 * 0x50 + *(int *)(this + 4) + 6) = 0;
          sVar2 = *(short *)(this + 0x10);
        }
      }
      else {
LAB_005ad2fb:
        if (sVar1 == -1) goto LAB_005ad81b;
LAB_005ad305:
        if (*(short *)(sVar1 * 0x50 + *(int *)(this + 4) + 6) == 1) goto LAB_005ad82b;
joined_r0x005ad87c:
        if (Links(short)::s_Sentinel == '\0') {
          iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
          if (iVar7 != 0) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
            goto LAB_005ad321;
          }
          if (sVar5 != -1) goto LAB_005ad32b;
LAB_005ad8b3:
          local_28 = -0x50;
          iVar7 = (int)DAT_00f21a9a;
          if (Links(short)::s_Sentinel != '\0') goto LAB_005ad34a;
LAB_005ad8cb:
          iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
          if (iVar3 != 0) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
            goto LAB_005ad34a;
          }
          if ((short)iVar7 != -1) goto LAB_005ad354;
LAB_005ad8f6:
          if (DAT_00f21a9e != 1) goto LAB_005ad368;
LAB_005ad910:
          if ((Links(short)::s_Sentinel == '\0') &&
             (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
          }
          psVar6 = &Links(short)::s_Sentinel;
          if (sVar5 != -1) {
            psVar6 = (short *)(local_28 + *(int *)(this + 4));
          }
          *(undefined2 *)(*(int *)(this + 4) + 6 + *psVar6 * 0x50) = 1;
          *(undefined2 *)(*(int *)(this + 4) + 6 + local_28) = 0;
          RotateRight(this,sVar5);
          if ((Links(short)::s_Sentinel == '\0') &&
             (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
          }
          if ((short)local_20 == -1) {
            puVar4 = &Links(short)::s_Sentinel;
          }
          else {
            puVar4 = (undefined2 *)((short)local_20 * 0x50 + *(int *)(this + 4));
          }
          sVar2 = puVar4[2];
          if ((Links(short)::s_Sentinel == '\0') &&
             (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
          }
          if (sVar2 == -1) {
            local_20 = -0x50;
            puVar4 = &Links(short)::s_Sentinel;
            local_24._0_2_ = -1;
          }
          else {
            local_20 = sVar2 * 0x50;
            puVar4 = (undefined2 *)(local_20 + *(int *)(this + 4));
            local_24._0_2_ = sVar2;
          }
          sVar5 = puVar4[1];
          local_28 = sVar5 * 0x50;
          if (Links(short)::s_Sentinel == '\0') goto LAB_005ad9d0;
LAB_005ad380:
          iVar7 = *(int *)(this + 4);
          if (sVar2 != -1) goto LAB_005ad38d;
LAB_005ad9fe:
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
LAB_005ad321:
          if (sVar5 == -1) goto LAB_005ad8b3;
LAB_005ad32b:
          local_28 = sVar5 * 0x50;
          iVar7 = (int)*(short *)(local_28 + *(int *)(this + 4) + 2);
          if (Links(short)::s_Sentinel == '\0') goto LAB_005ad8cb;
LAB_005ad34a:
          if ((short)iVar7 == -1) goto LAB_005ad8f6;
LAB_005ad354:
          if (*(short *)(iVar7 * 0x50 + *(int *)(this + 4) + 6) == 1) goto LAB_005ad910;
LAB_005ad368:
          local_20 = sVar2 * 0x50;
          local_24._0_2_ = sVar2;
          if (Links(short)::s_Sentinel != '\0') goto LAB_005ad380;
LAB_005ad9d0:
          iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
          if (iVar7 != 0) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
            goto LAB_005ad380;
          }
          iVar7 = *(int *)(this + 4);
          if (sVar2 == -1) goto LAB_005ad9fe;
LAB_005ad38d:
          puVar4 = (undefined2 *)(local_20 + iVar7);
        }
        bVar8 = Links(short)::s_Sentinel == '\0';
        *(undefined2 *)(iVar7 + 6 + local_28) = puVar4[3];
        *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) = 1;
        if ((bVar8) && (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if (sVar5 == -1) {
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          puVar4 = (undefined2 *)(local_28 + *(int *)(this + 4));
        }
        *(undefined2 *)(*(int *)(this + 4) + 6 + (short)puVar4[1] * 0x50) = 1;
        RotateLeft(this,(short)local_24);
        sVar2 = *(short *)(this + 0x10);
        local_20._0_2_ = sVar2;
      }
    }
    else {
      if ((short)local_20 == -1) goto LAB_005ad229;
LAB_005ad03d:
      sVar2 = *(short *)((short)local_20 * 0x50 + *(int *)(this + 4) + 4);
      local_24 = (int)sVar2;
      if (Links(short)::s_Sentinel == '\0') goto LAB_005ad240;
LAB_005ad05b:
      if (sVar2 == -1) goto LAB_005ad265;
LAB_005ad065:
      if ((short)local_20 == *(short *)(local_24 * 0x50 + *(int *)(this + 4))) goto LAB_005ad280;
LAB_005ad07e:
      if (Links(short)::s_Sentinel == '\0') {
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if (sVar2 != -1) goto LAB_005ad090;
LAB_005ad775:
        psVar6 = &Links(short)::s_Sentinel;
      }
      else {
        if (sVar2 == -1) goto LAB_005ad775;
LAB_005ad090:
        psVar6 = (short *)(local_24 * 0x50 + *(int *)(this + 4));
      }
      sVar5 = *psVar6;
      if ((Links(short)::s_Sentinel == '\0') &&
         (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
        DAT_00f21a9a = -1;
        Links(short)::s_Sentinel = -1;
        DAT_00f21a9c = -1;
        __cxa_guard_release(&Links(short)::s_Sentinel);
        if (sVar5 != -1) goto LAB_005ad0b1;
LAB_005ad678:
        if (DAT_00f21a9e != 0) goto LAB_005ad0c8;
LAB_005ad690:
        *(undefined2 *)(sVar5 * 0x50 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(local_24 * 0x50 + *(int *)(this + 4) + 6) = 0;
        RotateRight(this,(short)local_24);
        if (Links(short)::s_Sentinel == '\0') {
          iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
          if (iVar7 != 0) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
          }
          if ((short)local_20 != -1) goto LAB_005ad6e0;
LAB_005adbc9:
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          if ((short)local_20 == -1) goto LAB_005adbc9;
LAB_005ad6e0:
          puVar4 = (undefined2 *)((short)local_20 * 0x50 + *(int *)(this + 4));
        }
        sVar2 = puVar4[2];
        if (Links(short)::s_Sentinel == '\0') {
          iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
          if (iVar7 != 0) {
            Links(short)::s_Sentinel = -1;
            DAT_00f21a9a = -1;
            DAT_00f21a9c = -1;
            __cxa_guard_release(&Links(short)::s_Sentinel);
          }
          if (sVar2 != -1) goto LAB_005ad702;
LAB_005adb95:
          psVar6 = &Links(short)::s_Sentinel;
        }
        else {
          if (sVar2 == -1) goto LAB_005adb95;
LAB_005ad702:
          psVar6 = (short *)(sVar2 * 0x50 + *(int *)(this + 4));
        }
        sVar5 = *psVar6;
        if (Links(short)::s_Sentinel != '\0') goto LAB_005ad0d7;
LAB_005ad719:
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
          goto LAB_005ad0d7;
        }
        if (sVar5 != -1) goto LAB_005ad0e1;
LAB_005ad744:
        puVar4 = &Links(short)::s_Sentinel;
      }
      else {
        if (sVar5 == -1) goto LAB_005ad678;
LAB_005ad0b1:
        if (*(short *)(sVar5 * 0x50 + *(int *)(this + 4) + 6) == 0) goto LAB_005ad690;
LAB_005ad0c8:
        if (Links(short)::s_Sentinel == '\0') goto LAB_005ad719;
LAB_005ad0d7:
        if (sVar5 == -1) goto LAB_005ad744;
LAB_005ad0e1:
        puVar4 = (undefined2 *)(sVar5 * 0x50 + *(int *)(this + 4));
      }
      sVar1 = puVar4[1];
      if (Links(short)::s_Sentinel == '\0') {
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9c = -1;
          DAT_00f21a9a = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
          goto LAB_005ad0f9;
        }
        if (sVar1 != -1) goto LAB_005ad103;
LAB_005ad42b:
        if (DAT_00f21a9e != 1) goto LAB_005ad117;
LAB_005ad440:
        if ((Links(short)::s_Sentinel == '\0') &&
           (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        sVar1 = Links(short)::s_Sentinel;
        if (sVar5 != -1) {
          sVar1 = *(short *)(sVar5 * 0x50 + *(int *)(this + 4));
        }
        if ((Links(short)::s_Sentinel == '\0') &&
           (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if (sVar1 == -1) {
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          puVar4 = (undefined2 *)(sVar1 * 0x50 + *(int *)(this + 4));
        }
        if (puVar4[3] == 1) goto LAB_005add10;
        if (Links(short)::s_Sentinel == '\0') goto LAB_005ad4a0;
LAB_005ad11f:
        if (sVar5 != -1) goto LAB_005ad129;
LAB_005ad4cb:
        local_28 = -0x50;
        iVar7 = (int)Links(short)::s_Sentinel;
        if (Links(short)::s_Sentinel == '\0') goto LAB_005ad4e8;
LAB_005ad147:
        if ((short)iVar7 != -1) goto LAB_005ad151;
LAB_005ad513:
        if (DAT_00f21a9e != 1) goto LAB_005ad165;
LAB_005ad528:
        if ((Links(short)::s_Sentinel == '\0') &&
           (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        puVar4 = &Links(short)::s_Sentinel;
        if (sVar5 != -1) {
          puVar4 = (undefined2 *)(local_28 + *(int *)(this + 4));
        }
        *(undefined2 *)(*(int *)(this + 4) + 6 + (short)puVar4[1] * 0x50) = 1;
        *(undefined2 *)(*(int *)(this + 4) + 6 + local_28) = 0;
        RotateLeft(this,sVar5);
        if ((Links(short)::s_Sentinel == '\0') &&
           (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if ((short)local_20 == -1) {
          puVar4 = &Links(short)::s_Sentinel;
        }
        else {
          puVar4 = (undefined2 *)((short)local_20 * 0x50 + *(int *)(this + 4));
        }
        sVar2 = puVar4[2];
        if ((Links(short)::s_Sentinel == '\0') &&
           (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
        }
        if (sVar2 == -1) {
          local_20 = -0x50;
          psVar6 = &Links(short)::s_Sentinel;
          local_24._0_2_ = -1;
        }
        else {
          local_20 = sVar2 * 0x50;
          psVar6 = (short *)(local_20 + *(int *)(this + 4));
          local_24._0_2_ = sVar2;
        }
        sVar5 = *psVar6;
        local_28 = sVar5 * 0x50;
        if (Links(short)::s_Sentinel != '\0') goto LAB_005ad17d;
LAB_005ad5e0:
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
          goto LAB_005ad17d;
        }
        if (sVar2 != -1) goto LAB_005ad187;
LAB_005ad60b:
        iVar7 = *(int *)(this + 4);
        puVar4 = &Links(short)::s_Sentinel;
      }
      else {
LAB_005ad0f9:
        if (sVar1 == -1) goto LAB_005ad42b;
LAB_005ad103:
        if (*(short *)(sVar1 * 0x50 + *(int *)(this + 4) + 6) == 1) goto LAB_005ad440;
LAB_005ad117:
        if (Links(short)::s_Sentinel != '\0') goto LAB_005ad11f;
LAB_005ad4a0:
        iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar7 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
          goto LAB_005ad11f;
        }
        if (sVar5 == -1) goto LAB_005ad4cb;
LAB_005ad129:
        local_28 = sVar5 * 0x50;
        iVar7 = (int)*(short *)(local_28 + *(int *)(this + 4));
        if (Links(short)::s_Sentinel != '\0') goto LAB_005ad147;
LAB_005ad4e8:
        iVar3 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
        if (iVar3 != 0) {
          Links(short)::s_Sentinel = -1;
          DAT_00f21a9a = -1;
          DAT_00f21a9c = -1;
          __cxa_guard_release(&Links(short)::s_Sentinel);
          goto LAB_005ad147;
        }
        if ((short)iVar7 == -1) goto LAB_005ad513;
LAB_005ad151:
        if (*(short *)(iVar7 * 0x50 + *(int *)(this + 4) + 6) == 1) goto LAB_005ad528;
LAB_005ad165:
        local_20 = sVar2 * 0x50;
        local_24._0_2_ = sVar2;
        if (Links(short)::s_Sentinel == '\0') goto LAB_005ad5e0;
LAB_005ad17d:
        if (sVar2 == -1) goto LAB_005ad60b;
LAB_005ad187:
        iVar7 = *(int *)(this + 4);
        puVar4 = (undefined2 *)(iVar7 + local_20);
      }
      bVar8 = Links(short)::s_Sentinel == '\0';
      *(undefined2 *)(iVar7 + 6 + local_28) = puVar4[3];
      *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) = 1;
      if ((bVar8) && (iVar7 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar7 != 0)) {
        Links(short)::s_Sentinel = -1;
        DAT_00f21a9a = -1;
        DAT_00f21a9c = -1;
        __cxa_guard_release(&Links(short)::s_Sentinel);
        iVar7 = *(int *)(this + 4);
        if (sVar5 != -1) goto LAB_005ad1c4;
LAB_005add00:
        psVar6 = &Links(short)::s_Sentinel;
      }
      else {
        iVar7 = *(int *)(this + 4);
        if (sVar5 == -1) goto LAB_005add00;
LAB_005ad1c4:
        psVar6 = (short *)(local_28 + iVar7);
      }
      *(undefined2 *)(iVar7 + 6 + *psVar6 * 0x50) = 1;
      RotateRight(this,(short)local_24);
      sVar2 = *(short *)(this + 0x10);
      local_20._0_2_ = sVar2;
    }
  }
  *(undefined2 *)((short)local_20 * 0x50 + *(int *)(this + 4) + 6) = 1;
  return;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)