L L4D2node

CUtlRBTree<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::RemoveRebalance

0x0006d3f0 · 5434 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIyitE6Node_tEtNS1_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS2_tEtEE15RemoveRebalanceEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<unsigned long long, int, unsigned short>::Node_t, unsigned short,
   CUtlMap<unsigned long long, int, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned long long, int, unsigned short>::Node_t, unsigned
   short>, unsigned short> >::RemoveRebalance(unsigned short) */

void __thiscall
CUtlRBTree<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::RemoveRebalance(CUtlRBTree<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_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_000d283c = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_000d283a = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    sVar1 = DAT_000d283e;
    if (param_1 != 0xffff) {
      sVar1 = *(short *)(*(int *)(this + 4) + (uint)param_1 * 0x14 + 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_000d283a = 0xffff;
        DAT_000d283c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (param_1 != 0xffff) goto LAB_0006d4dd;
LAB_0006d6c9:
      local_24 = (uint)DAT_000d283c;
      uVar2 = DAT_000d283c;
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0006d4fb;
LAB_0006d6e0:
      iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar4 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_000d283a = 0xffff;
        DAT_000d283c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar2 != 0xffff) goto LAB_0006d505;
LAB_0006d705:
      if (param_1 != Links(unsigned_short)::s_Sentinel) goto LAB_0006d51e;
LAB_0006d720:
      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_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 != 0xffff) goto LAB_0006d732;
LAB_0006dffd:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar2 == 0xffff) goto LAB_0006dffd;
LAB_0006d732:
        puVar8 = (undefined2 *)(*(int *)(this + 4) + local_24 * 0x14);
      }
      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_000d283a = 0xffff;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_000d283c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar6 != 0xffff) goto LAB_0006d754;
LAB_0006dfc8:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar6 == 0xffff) goto LAB_0006dfc8;
LAB_0006d754:
        puVar8 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
      }
      if (puVar8[3] == 0) {
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + local_24 * 0x14 + 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_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (param_1 != 0xffff) goto LAB_0006df38;
LAB_0006e3e9:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (param_1 == 0xffff) goto LAB_0006e3e9;
LAB_0006df38:
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x14);
        }
        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_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 != 0xffff) goto LAB_0006df5a;
LAB_0006e3ad:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (uVar2 == 0xffff) goto LAB_0006e3ad;
LAB_0006df5a:
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar2 * 0x14);
        }
        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_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0006d77a;
        }
        if (uVar6 != 0xffff) goto LAB_0006d784;
LAB_0006dedb:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
LAB_0006d77a:
        if (uVar6 == 0xffff) goto LAB_0006dedb;
LAB_0006d784:
        puVar3 = (ushort *)(*(int *)(this + 4) + uVar7 * 0x14);
      }
      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_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0006d79b;
        }
        if (uVar5 != 0xffff) goto LAB_0006d7a5;
LAB_0006dcbb:
        if (DAT_000d283e != 1) goto joined_r0x0006dd1c;
LAB_0006dccb:
        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_000d283a = 0xffff;
          DAT_000d283c = 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 * 0x14);
        }
        uVar5 = puVar8[1];
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          DAT_000d283a = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d283c = 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 * 0x14);
        }
        if (puVar8[3] != 1) goto joined_r0x0006dd1c;
LAB_0006e1b0:
        param_1 = uVar2;
        if ((short)uVar7 == -1) {
          uVar2 = *(ushort *)(this + 0x10);
        }
        else {
          *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) = 0;
          uVar2 = *(ushort *)(this + 0x10);
        }
      }
      else {
LAB_0006d79b:
        if (uVar5 == 0xffff) goto LAB_0006dcbb;
LAB_0006d7a5:
        if (*(short *)(*(int *)(this + 4) + (uint)uVar5 * 0x14 + 6) == 1) goto LAB_0006dccb;
joined_r0x0006dd1c:
        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_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            goto LAB_0006d7c1;
          }
          if (uVar6 != 0xffff) goto LAB_0006d7cb;
LAB_0006dd53:
          local_28 = 0x13ffec;
          uVar7 = (uint)DAT_000d283a;
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0006d7ec;
LAB_0006dd6b:
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            goto LAB_0006d7ec;
          }
          if ((short)uVar7 != -1) goto LAB_0006d7f6;
LAB_0006dd96:
          if (DAT_000d283e != 1) goto LAB_0006d80a;
LAB_0006ddb0:
          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_000d283a = 0xffff;
            DAT_000d283c = 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 * 0x14) = 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_000d283a = 0xffff;
            DAT_000d283c = 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 * 0x14);
          }
          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_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 == 0xffff) {
            local_20 = 0x13ffec;
            puVar8 = &Links(unsigned_short)::s_Sentinel;
            local_24._0_2_ = 0xffff;
          }
          else {
            local_20 = (uint)uVar2 * 0x14;
            puVar8 = (undefined2 *)(*(int *)(this + 4) + local_20);
            local_24._0_2_ = uVar2;
          }
          uVar6 = puVar8[1];
          local_28 = (uint)uVar6 * 0x14;
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0006de70;
LAB_0006d825:
          iVar4 = *(int *)(this + 4);
          if (uVar2 != 0xffff) goto LAB_0006d832;
LAB_0006de9e:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
LAB_0006d7c1:
          if (uVar6 == 0xffff) goto LAB_0006dd53;
LAB_0006d7cb:
          local_28 = uVar7 * 0x14;
          uVar7 = (uint)*(ushort *)(*(int *)(this + 4) + local_28 + 2);
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0006dd6b;
LAB_0006d7ec:
          if ((short)uVar7 == -1) goto LAB_0006dd96;
LAB_0006d7f6:
          if (*(short *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) == 1) goto LAB_0006ddb0;
LAB_0006d80a:
          local_20 = (uint)uVar2 * 0x14;
          local_24._0_2_ = uVar2;
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0006d825;
LAB_0006de70:
          iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar4 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            goto LAB_0006d825;
          }
          iVar4 = *(int *)(this + 4);
          if (uVar2 == 0xffff) goto LAB_0006de9e;
LAB_0006d832:
          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_000d283a = 0xffff;
          DAT_000d283c = 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] * 0x14) = 1;
        RotateLeft(this,(ushort)local_24);
        uVar2 = *(ushort *)(this + 0x10);
        param_1 = uVar2;
      }
    }
    else {
      if (param_1 == 0xffff) goto LAB_0006d6c9;
LAB_0006d4dd:
      uVar2 = *(ushort *)(*(int *)(this + 4) + (uint)param_1 * 0x14 + 4);
      local_24 = (uint)uVar2;
      if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0006d6e0;
LAB_0006d4fb:
      if (uVar2 == 0xffff) goto LAB_0006d705;
LAB_0006d505:
      if (param_1 == *(ushort *)(*(int *)(this + 4) + local_24 * 0x14)) goto LAB_0006d720;
LAB_0006d51e:
      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_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 != 0xffff) goto LAB_0006d530;
LAB_0006dc15:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar2 == 0xffff) goto LAB_0006dc15;
LAB_0006d530:
        puVar3 = (ushort *)(*(int *)(this + 4) + local_24 * 0x14);
      }
      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_000d283a = 0xffff;
        DAT_000d283c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar6 != 0xffff) goto LAB_0006d551;
LAB_0006db20:
        if (DAT_000d283e != 0) goto LAB_0006d568;
LAB_0006db30:
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + local_24 * 0x14 + 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_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (param_1 != 0xffff) goto LAB_0006db80;
LAB_0006e069:
          puVar8 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (param_1 == 0xffff) goto LAB_0006e069;
LAB_0006db80:
          puVar8 = (undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x14);
        }
        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_000d283a = 0xffff;
            DAT_000d283c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 != 0xffff) goto LAB_0006dba2;
LAB_0006e035:
          puVar3 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (uVar2 == 0xffff) goto LAB_0006e035;
LAB_0006dba2:
          puVar3 = (ushort *)(*(int *)(this + 4) + (uint)uVar2 * 0x14);
        }
        uVar7 = (uint)*puVar3;
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0006d577;
LAB_0006dbb9:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0006d577;
        }
        if ((short)uVar7 != -1) goto LAB_0006d581;
LAB_0006dbe4:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar6 == 0xffff) goto LAB_0006db20;
LAB_0006d551:
        if (*(short *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) == 0) goto LAB_0006db30;
LAB_0006d568:
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0006dbb9;
LAB_0006d577:
        if ((short)uVar7 == -1) goto LAB_0006dbe4;
LAB_0006d581:
        puVar8 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
      }
      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_000d283c = 0xffff;
          DAT_000d283a = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0006d599;
        }
        if (uVar6 != 0xffff) goto LAB_0006d5a3;
LAB_0006d8cb:
        if (DAT_000d283e != 1) goto LAB_0006d5b7;
LAB_0006d8e0:
        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_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        uVar6 = Links(unsigned_short)::s_Sentinel;
        if (uVar5 != 0xffff) {
          uVar6 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0x14);
        }
        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_000d283a = 0xffff;
          DAT_000d283c = 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 * 0x14);
        }
        if (puVar8[3] == 1) goto LAB_0006e1b0;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0006d940;
LAB_0006d5bf:
        if (uVar5 != 0xffff) goto LAB_0006d5c9;
LAB_0006d96b:
        local_28 = 0x13ffec;
        uVar7 = (uint)Links(unsigned_short)::s_Sentinel;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0006d988;
LAB_0006d5e9:
        if ((short)uVar7 != -1) goto LAB_0006d5f3;
LAB_0006d9b3:
        if (DAT_000d283e != 1) goto LAB_0006d607;
LAB_0006d9c8:
        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_000d283a = 0xffff;
          DAT_000d283c = 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] * 0x14) = 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_000d283a = 0xffff;
          DAT_000d283c = 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 * 0x14);
        }
        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_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 == 0xffff) {
          local_20 = 0x13ffec;
          puVar3 = &Links(unsigned_short)::s_Sentinel;
          local_24._0_2_ = 0xffff;
        }
        else {
          local_20 = (uint)uVar2 * 0x14;
          puVar3 = (ushort *)(*(int *)(this + 4) + local_20);
          local_24._0_2_ = uVar2;
        }
        uVar5 = *puVar3;
        local_28 = (uint)uVar5 * 0x14;
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0006d622;
LAB_0006da88:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0006d622;
        }
        iVar4 = *(int *)(this + 4);
        if (uVar2 != 0xffff) goto LAB_0006d62f;
LAB_0006dab6:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
LAB_0006d599:
        if (uVar6 == 0xffff) goto LAB_0006d8cb;
LAB_0006d5a3:
        if (*(short *)(*(int *)(this + 4) + (uint)uVar6 * 0x14 + 6) == 1) goto LAB_0006d8e0;
LAB_0006d5b7:
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0006d5bf;
LAB_0006d940:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0006d5bf;
        }
        if (uVar5 == 0xffff) goto LAB_0006d96b;
LAB_0006d5c9:
        local_28 = uVar7 * 0x14;
        uVar7 = (uint)*(ushort *)(*(int *)(this + 4) + local_28);
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0006d5e9;
LAB_0006d988:
        iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar4 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d283a = 0xffff;
          DAT_000d283c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_0006d5e9;
        }
        if ((short)uVar7 == -1) goto LAB_0006d9b3;
LAB_0006d5f3:
        if (*(short *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) == 1) goto LAB_0006d9c8;
LAB_0006d607:
        local_20 = (uint)uVar2 * 0x14;
        local_24._0_2_ = uVar2;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0006da88;
LAB_0006d622:
        iVar4 = *(int *)(this + 4);
        if (uVar2 == 0xffff) goto LAB_0006dab6;
LAB_0006d62f:
        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_000d283a = 0xffff;
        DAT_000d283c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        iVar4 = *(int *)(this + 4);
        if (uVar5 != 0xffff) goto LAB_0006d665;
LAB_0006e1a0:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        iVar4 = *(int *)(this + 4);
        if (uVar5 == 0xffff) goto LAB_0006e1a0;
LAB_0006d665:
        puVar3 = (ushort *)(local_28 + iVar4);
      }
      *(undefined2 *)(iVar4 + 6 + (uint)*puVar3 * 0x14) = 1;
      RotateRight(this,(ushort)local_24);
      uVar2 = *(ushort *)(this + 0x10);
      param_1 = uVar2;
    }
  }
  *(undefined2 *)(*(int *)(this + 4) + (uint)param_1 * 0x14 + 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)