L L4D2node

CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>::RemoveRebalance

0x00400e00 · 5434 bytes · __thiscall

_ZN10CUtlRBTreeIN19CCombatCharVisCache15VisCacheEntry_tEtNS0_18CVisCacheEntryLessE10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE15RemoveRebalanceEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t, unsigned short,
   CCombatCharVisCache::CVisCacheEntryLess,
   CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t, unsigned short>, unsigned short>
   >::RemoveRebalance(unsigned short) */

void __thiscall
CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>
::RemoveRebalance(CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>
                  *this,ushort param_1)

{
  short sVar1;
  ushort uVar2;
  ushort *puVar3;
  int iVar4;
  ushort uVar5;
  ushort uVar6;
  uint uVar7;
  undefined2 *puVar8;
  bool bVar9;
  int local_28;
  uint local_24;
  int local_20;
  
  uVar2 = *(ushort *)(this + 0x10);
  while (param_1 != uVar2) {
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
      DAT_00f13994 = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f13992 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    sVar1 = DAT_00f13996;
    if (param_1 != 0xffff) {
      sVar1 = *(short *)(*(int *)(this + 4) + (uint)param_1 * 0x18 + 6);
    }
    if (sVar1 != 1) break;
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar4 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (param_1 != 0xffff) goto LAB_00400eed;
LAB_004010d9:
      local_24 = (uint)DAT_00f13994;
      uVar2 = DAT_00f13994;
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00400f0b;
LAB_004010f0:
      iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar4 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar2 != 0xffff) goto LAB_00400f15;
LAB_00401115:
      if (param_1 != Links(unsigned_short)::s_Sentinel) goto LAB_00400f2e;
LAB_00401130:
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 != 0xffff) goto LAB_00401142;
LAB_00401a0d:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar2 == 0xffff) goto LAB_00401a0d;
LAB_00401142:
        puVar8 = (undefined2 *)(*(int *)(this + 4) + local_24 * 0x18);
      }
      uVar6 = puVar8[1];
      uVar7 = (uint)uVar6;
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
        DAT_00f13992 = 0xffff;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar6 != 0xffff) goto LAB_00401164;
LAB_004019d8:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar6 == 0xffff) goto LAB_004019d8;
LAB_00401164:
        puVar8 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
      }
      if (puVar8[3] == 0) {
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + local_24 * 0x18 + 6) = 0;
        RotateLeft(this,(ushort)local_24);
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (param_1 != 0xffff) goto LAB_00401948;
LAB_00401df9:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (param_1 == 0xffff) goto LAB_00401df9;
LAB_00401948:
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x18);
        }
        uVar2 = puVar8[2];
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 != 0xffff) goto LAB_0040196a;
LAB_00401dbd:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (uVar2 == 0xffff) goto LAB_00401dbd;
LAB_0040196a:
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar2 * 0x18);
        }
        uVar7 = (uint)(ushort)puVar8[1];
      }
      uVar6 = (ushort)uVar7;
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0040118a;
        }
        if (uVar6 != 0xffff) goto LAB_00401194;
LAB_004018eb:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
LAB_0040118a:
        if (uVar6 == 0xffff) goto LAB_004018eb;
LAB_00401194:
        puVar3 = (ushort *)(*(int *)(this + 4) + uVar7 * 0x18);
      }
      uVar5 = *puVar3;
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_004011ab;
        }
        if (uVar5 != 0xffff) goto LAB_004011b5;
LAB_004016cb:
        if (DAT_00f13996 != 1) goto joined_r0x0040172c;
LAB_004016db:
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar6 == 0xffff) {
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          puVar8 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
        }
        uVar5 = puVar8[1];
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          DAT_00f13992 = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar5 == 0xffff) {
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar5 * 0x18);
        }
        if (puVar8[3] != 1) goto joined_r0x0040172c;
LAB_00401bc0:
        param_1 = uVar2;
        if ((short)uVar7 == -1) {
          uVar2 = *(ushort *)(this + 0x10);
        }
        else {
          *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 0;
          uVar2 = *(ushort *)(this + 0x10);
        }
      }
      else {
LAB_004011ab:
        if (uVar5 == 0xffff) goto LAB_004016cb;
LAB_004011b5:
        if (*(short *)(*(int *)(this + 4) + (uint)uVar5 * 0x18 + 6) == 1) goto LAB_004016db;
joined_r0x0040172c:
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            goto LAB_004011d1;
          }
          if (uVar6 != 0xffff) goto LAB_004011db;
LAB_00401763:
          local_28 = 0x17ffe8;
          uVar7 = (uint)DAT_00f13992;
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004011fc;
LAB_0040177b:
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            goto LAB_004011fc;
          }
          if ((short)uVar7 != -1) goto LAB_00401206;
LAB_004017a6:
          if (DAT_00f13996 != 1) goto LAB_0040121a;
LAB_004017c0:
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          puVar3 = &Links(unsigned_short)::s_Sentinel;
          if (uVar6 != 0xffff) {
            puVar3 = (ushort *)(local_28 + *(int *)(this + 4));
          }
          *(undefined2 *)(*(int *)(this + 4) + 6 + (uint)*puVar3 * 0x18) = 1;
          *(undefined2 *)(*(int *)(this + 4) + 6 + local_28) = 0;
          RotateRight(this,uVar6);
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (param_1 == 0xffff) {
            puVar8 = &Links(unsigned_short)::s_Sentinel;
          }
          else {
            puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x18);
          }
          uVar2 = puVar8[2];
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 == 0xffff) {
            local_20 = 0x17ffe8;
            puVar8 = &Links(unsigned_short)::s_Sentinel;
            local_24._0_2_ = 0xffff;
          }
          else {
            local_20 = (uint)uVar2 * 0x18;
            puVar8 = (undefined2 *)(*(int *)(this + 4) + local_20);
            local_24._0_2_ = uVar2;
          }
          uVar6 = puVar8[1];
          local_28 = (uint)uVar6 * 0x18;
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00401880;
LAB_00401235:
          iVar4 = *(int *)(this + 4);
          if (uVar2 != 0xffff) goto LAB_00401242;
LAB_004018ae:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
LAB_004011d1:
          if (uVar6 == 0xffff) goto LAB_00401763;
LAB_004011db:
          local_28 = uVar7 * 0x18;
          uVar7 = (uint)*(ushort *)(*(int *)(this + 4) + local_28 + 2);
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0040177b;
LAB_004011fc:
          if ((short)uVar7 == -1) goto LAB_004017a6;
LAB_00401206:
          if (*(short *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) == 1) goto LAB_004017c0;
LAB_0040121a:
          local_20 = (uint)uVar2 * 0x18;
          local_24._0_2_ = uVar2;
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00401235;
LAB_00401880:
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            goto LAB_00401235;
          }
          iVar4 = *(int *)(this + 4);
          if (uVar2 == 0xffff) goto LAB_004018ae;
LAB_00401242:
          puVar8 = (undefined2 *)(local_20 + iVar4);
        }
        bVar9 = Links(unsigned_short)::s_Sentinel == '\0';
        *(undefined2 *)(iVar4 + 6 + local_28) = puVar8[3];
        *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) = 1;
        if ((bVar9) && (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)
           ) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar6 == 0xffff) {
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          puVar8 = (undefined2 *)(local_28 + *(int *)(this + 4));
        }
        *(undefined2 *)(*(int *)(this + 4) + 6 + (uint)(ushort)puVar8[1] * 0x18) = 1;
        RotateLeft(this,(ushort)local_24);
        uVar2 = *(ushort *)(this + 0x10);
        param_1 = uVar2;
      }
    }
    else {
      if (param_1 == 0xffff) goto LAB_004010d9;
LAB_00400eed:
      uVar2 = *(ushort *)(*(int *)(this + 4) + (uint)param_1 * 0x18 + 4);
      local_24 = (uint)uVar2;
      if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004010f0;
LAB_00400f0b:
      if (uVar2 == 0xffff) goto LAB_00401115;
LAB_00400f15:
      if (param_1 == *(ushort *)(*(int *)(this + 4) + local_24 * 0x18)) goto LAB_00401130;
LAB_00400f2e:
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 != 0xffff) goto LAB_00400f40;
LAB_00401625:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar2 == 0xffff) goto LAB_00401625;
LAB_00400f40:
        puVar3 = (ushort *)(*(int *)(this + 4) + local_24 * 0x18);
      }
      uVar6 = *puVar3;
      uVar7 = (uint)uVar6;
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar6 != 0xffff) goto LAB_00400f61;
LAB_00401530:
        if (DAT_00f13996 != 0) goto LAB_00400f78;
LAB_00401540:
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + local_24 * 0x18 + 6) = 0;
        RotateRight(this,(ushort)local_24);
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (param_1 != 0xffff) goto LAB_00401590;
LAB_00401a79:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (param_1 == 0xffff) goto LAB_00401a79;
LAB_00401590:
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x18);
        }
        uVar2 = puVar8[2];
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 != 0xffff) goto LAB_004015b2;
LAB_00401a45:
          puVar3 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (uVar2 == 0xffff) goto LAB_00401a45;
LAB_004015b2:
          puVar3 = (ushort *)(*(int *)(this + 4) + (uint)uVar2 * 0x18);
        }
        uVar7 = (uint)*puVar3;
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00400f87;
LAB_004015c9:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00400f87;
        }
        if ((short)uVar7 != -1) goto LAB_00400f91;
LAB_004015f4:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar6 == 0xffff) goto LAB_00401530;
LAB_00400f61:
        if (*(short *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) == 0) goto LAB_00401540;
LAB_00400f78:
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004015c9;
LAB_00400f87:
        if ((short)uVar7 == -1) goto LAB_004015f4;
LAB_00400f91:
        puVar8 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
      }
      uVar6 = puVar8[1];
      uVar5 = (ushort)uVar7;
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13994 = 0xffff;
          DAT_00f13992 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00400fa9;
        }
        if (uVar6 != 0xffff) goto LAB_00400fb3;
LAB_004012db:
        if (DAT_00f13996 != 1) goto LAB_00400fc7;
LAB_004012f0:
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        uVar6 = Links(unsigned_short)::s_Sentinel;
        if (uVar5 != 0xffff) {
          uVar6 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0x18);
        }
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar6 == 0xffff) {
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar6 * 0x18);
        }
        if (puVar8[3] == 1) goto LAB_00401bc0;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00401350;
LAB_00400fcf:
        if (uVar5 != 0xffff) goto LAB_00400fd9;
LAB_0040137b:
        local_28 = 0x17ffe8;
        uVar7 = (uint)Links(unsigned_short)::s_Sentinel;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00401398;
LAB_00400ff9:
        if ((short)uVar7 != -1) goto LAB_00401003;
LAB_004013c3:
        if (DAT_00f13996 != 1) goto LAB_00401017;
LAB_004013d8:
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        puVar8 = &Links(unsigned_short)::s_Sentinel;
        if (uVar5 != 0xffff) {
          puVar8 = (undefined2 *)(local_28 + *(int *)(this + 4));
        }
        *(undefined2 *)(*(int *)(this + 4) + 6 + (uint)(ushort)puVar8[1] * 0x18) = 1;
        *(undefined2 *)(*(int *)(this + 4) + 6 + local_28) = 0;
        RotateLeft(this,uVar5);
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (param_1 == 0xffff) {
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x18);
        }
        uVar2 = puVar8[2];
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 == 0xffff) {
          local_20 = 0x17ffe8;
          puVar3 = &Links(unsigned_short)::s_Sentinel;
          local_24._0_2_ = 0xffff;
        }
        else {
          local_20 = (uint)uVar2 * 0x18;
          puVar3 = (ushort *)(*(int *)(this + 4) + local_20);
          local_24._0_2_ = uVar2;
        }
        uVar5 = *puVar3;
        local_28 = (uint)uVar5 * 0x18;
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00401032;
LAB_00401498:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00401032;
        }
        iVar4 = *(int *)(this + 4);
        if (uVar2 != 0xffff) goto LAB_0040103f;
LAB_004014c6:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
LAB_00400fa9:
        if (uVar6 == 0xffff) goto LAB_004012db;
LAB_00400fb3:
        if (*(short *)(*(int *)(this + 4) + (uint)uVar6 * 0x18 + 6) == 1) goto LAB_004012f0;
LAB_00400fc7:
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00400fcf;
LAB_00401350:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00400fcf;
        }
        if (uVar5 == 0xffff) goto LAB_0040137b;
LAB_00400fd9:
        local_28 = uVar7 * 0x18;
        uVar7 = (uint)*(ushort *)(*(int *)(this + 4) + local_28);
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00400ff9;
LAB_00401398:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00400ff9;
        }
        if ((short)uVar7 == -1) goto LAB_004013c3;
LAB_00401003:
        if (*(short *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) == 1) goto LAB_004013d8;
LAB_00401017:
        local_20 = (uint)uVar2 * 0x18;
        local_24._0_2_ = uVar2;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00401498;
LAB_00401032:
        iVar4 = *(int *)(this + 4);
        if (uVar2 == 0xffff) goto LAB_004014c6;
LAB_0040103f:
        puVar8 = (undefined2 *)(local_20 + iVar4);
      }
      bVar9 = Links(unsigned_short)::s_Sentinel == '\0';
      *(undefined2 *)(iVar4 + 6 + local_28) = puVar8[3];
      *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) = 1;
      if ((bVar9) && (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0))
      {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        iVar4 = *(int *)(this + 4);
        if (uVar5 != 0xffff) goto LAB_00401075;
LAB_00401bb0:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        iVar4 = *(int *)(this + 4);
        if (uVar5 == 0xffff) goto LAB_00401bb0;
LAB_00401075:
        puVar3 = (ushort *)(local_28 + iVar4);
      }
      *(undefined2 *)(iVar4 + 6 + (uint)*puVar3 * 0x18) = 1;
      RotateRight(this,(ushort)local_24);
      uVar2 = *(ushort *)(this + 0x10);
      param_1 = uVar2;
    }
  }
  *(undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x18 + 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)