L L4D2node

CUtlRBTree<CUtlMap<unsigned_int,float,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,float,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,float,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::RemoveRebalance

0x004bac70 · 4043 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIjftE6Node_tEtNS1_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS2_tEtEE15RemoveRebalanceEt

Decompiled

undefined (2 params)

/* WARNING: Type propagation algorithm not settling */
/* CUtlRBTree<CUtlMap<unsigned int, float, unsigned short>::Node_t, unsigned short, CUtlMap<unsigned
   int, float, unsigned short>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int, float,
   unsigned short>::Node_t, unsigned short>, unsigned short> >::RemoveRebalance(unsigned short) */

void __thiscall
CUtlRBTree<CUtlMap<unsigned_int,float,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,float,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,float,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::RemoveRebalance(CUtlRBTree<CUtlMap<unsigned_int,float,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,float,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,float,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *this,ushort param_1)

{
  short sVar1;
  ushort uVar2;
  undefined2 *puVar3;
  ushort *puVar4;
  int iVar5;
  uint uVar6;
  short sVar7;
  ushort uVar8;
  uint uVar9;
  bool bVar10;
  ushort uVar11;
  int local_2c;
  uint local_28;
  uint local_24;
  int local_20;
  
  uVar2 = *(ushort *)(this + 0x10);
LAB_004bac88:
  do {
    if (param_1 == uVar2) {
      local_28 = (uint)param_1;
LAB_004bac93:
      *(undefined2 *)(local_28 * 0x10 + *(int *)(this + 4) + 6) = 1;
      return;
    }
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f19322 = 0xffff;
      DAT_00f19324 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (param_1 == 0xffff) goto LAB_004bb400;
LAB_004bacc7:
      local_28 = (uint)param_1;
      puVar3 = (undefined2 *)(local_28 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (param_1 != 0xffff) goto LAB_004bacc7;
LAB_004bb400:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
      local_28 = 0xffff;
    }
    if (puVar3[3] != 1) goto LAB_004bac93;
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar5 != 0) {
        DAT_00f19322 = 0xffff;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (param_1 == 0xffff) goto LAB_004bb05d;
LAB_004bacf3:
      puVar3 = (undefined2 *)(local_28 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (param_1 != 0xffff) goto LAB_004bacf3;
LAB_004bb05d:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    uVar2 = puVar3[2];
    uVar6 = (uint)uVar2;
    if (Links(unsigned_short)::s_Sentinel != '\0') {
      if (uVar2 != 0xffff) goto LAB_004bad1d;
LAB_004baec6:
      if (param_1 == Links(unsigned_short)::s_Sentinel) goto LAB_004baed8;
LAB_004bad2f:
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f19322 = 0xffff;
          DAT_00f19324 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 == 0xffff) goto LAB_004bb2b6;
LAB_004bad42:
        uVar9 = (uint)*(ushort *)(uVar6 * 0x10 + *(int *)(this + 4));
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004bad56;
LAB_004bb2d0:
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 == 0) goto LAB_004bad56;
        DAT_00f19322 = 0xffff;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        sVar7 = (short)uVar9;
      }
      else {
        if (uVar2 != 0xffff) goto LAB_004bad42;
LAB_004bb2b6:
        uVar9 = (uint)Links(unsigned_short)::s_Sentinel;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004bb2d0;
LAB_004bad56:
        sVar7 = (short)uVar9;
      }
      sVar1 = DAT_00f19326;
      if (sVar7 != -1) {
        sVar1 = *(short *)(uVar9 * 0x10 + *(int *)(this + 4) + 6);
      }
      if (sVar1 == 0) {
        *(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar6 * 0x10 + *(int *)(this + 4) + 6) = 0;
        RotateRight(this,uVar2);
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar5 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f19322 = 0xffff;
            DAT_00f19324 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (param_1 == 0xffff) goto LAB_004bb75d;
LAB_004bb375:
          puVar3 = (undefined2 *)(local_28 * 0x10 + *(int *)(this + 4));
        }
        else {
          if (param_1 != 0xffff) goto LAB_004bb375;
LAB_004bb75d:
          puVar3 = &Links(unsigned_short)::s_Sentinel;
        }
        uVar2 = puVar3[2];
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar5 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f19322 = 0xffff;
            DAT_00f19324 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 == 0xffff) goto LAB_004bb729;
LAB_004bb39c:
          puVar4 = (ushort *)((uint)uVar2 * 0x10 + *(int *)(this + 4));
        }
        else {
          if (uVar2 != 0xffff) goto LAB_004bb39c;
LAB_004bb729:
          puVar4 = &Links(unsigned_short)::s_Sentinel;
        }
        uVar9 = (uint)*puVar4;
      }
      param_1 = uVar2;
      uVar2 = (ushort)uVar9;
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 != 0) {
          DAT_00f19322 = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f19324 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 == 0xffff) goto LAB_004bb285;
LAB_004bad8d:
        puVar3 = (undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4));
      }
      else {
        if (uVar2 != 0xffff) goto LAB_004bad8d;
LAB_004bb285:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      uVar8 = puVar3[1];
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19322 = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      sVar7 = DAT_00f19326;
      if (uVar8 != 0xffff) {
        sVar7 = *(short *)((uint)uVar8 * 0x10 + *(int *)(this + 4) + 6);
      }
      if (sVar7 == 1) {
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar5 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f19322 = 0xffff;
            DAT_00f19324 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar2 == 0xffff) goto LAB_004bb865;
LAB_004bb0ba:
          puVar4 = (ushort *)(uVar9 * 0x10 + *(int *)(this + 4));
        }
        else {
          if (uVar2 != 0xffff) goto LAB_004bb0ba;
LAB_004bb865:
          puVar4 = &Links(unsigned_short)::s_Sentinel;
        }
        uVar8 = *puVar4;
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
          DAT_00f19322 = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f19324 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar8 == 0xffff) {
          puVar3 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          puVar3 = (undefined2 *)((uint)uVar8 * 0x10 + *(int *)(this + 4));
        }
        if (puVar3[3] == 1) {
          if (uVar2 == 0xffff) {
LAB_004bbca2:
            uVar2 = *(ushort *)(this + 0x10);
          }
          else {
            *(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 0;
            uVar2 = *(ushort *)(this + 0x10);
          }
          goto LAB_004bac88;
        }
      }
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f19322 = 0xffff;
          DAT_00f19324 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 == 0xffff) goto LAB_004bb125;
LAB_004badcf:
        local_2c = uVar9 * 0x10;
        uVar6 = (uint)*(ushort *)(local_2c + *(int *)(this + 4));
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004bb140;
LAB_004badea:
        if ((short)uVar6 == -1) goto LAB_004bb190;
LAB_004badf4:
        if (*(short *)(uVar6 * 0x10 + *(int *)(this + 4) + 6) != 1) goto LAB_004bae05;
LAB_004bb1a0:
        iVar5 = Links(this,uVar2);
        *(undefined2 *)((uint)*(ushort *)(iVar5 + 2) * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + 6 + local_2c) = 0;
        RotateLeft(this,uVar2);
        iVar5 = Links(this,(ushort)local_28);
        param_1 = *(ushort *)(iVar5 + 4);
        local_24 = (uint)param_1;
        puVar4 = (ushort *)Links(this,param_1);
        uVar9 = (uint)*puVar4;
        local_2c = uVar9 << 4;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004bb220;
LAB_004bae1b:
        sVar7 = (short)uVar9;
        if (param_1 != 0xffff) goto LAB_004bae26;
LAB_004bb246:
        iVar5 = *(int *)(this + 4);
        local_20 = 0xffff0;
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar2 != 0xffff) goto LAB_004badcf;
LAB_004bb125:
        local_2c = 0xffff0;
        uVar6 = (uint)Links(unsigned_short)::s_Sentinel;
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004badea;
LAB_004bb140:
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 == 0) goto LAB_004badea;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19322 = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if ((short)uVar6 != -1) goto LAB_004badf4;
LAB_004bb190:
        if (DAT_00f19326 == 1) goto LAB_004bb1a0;
LAB_004bae05:
        local_24 = (uint)param_1;
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004bae1b;
LAB_004bb220:
        sVar7 = (short)uVar9;
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 != 0) {
          DAT_00f19322 = 0xffff;
          DAT_00f19324 = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (param_1 == 0xffff) goto LAB_004bb246;
LAB_004bae26:
        iVar5 = *(int *)(this + 4);
        local_20 = local_24 * 0x10;
        puVar3 = (undefined2 *)(iVar5 + local_20);
      }
      bVar10 = Links(unsigned_short)::s_Sentinel == '\0';
      *(undefined2 *)(iVar5 + 6 + local_2c) = puVar3[3];
      *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) = 1;
      if ((bVar10) && (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0))
      {
        DAT_00f19322 = 0xffff;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      puVar4 = &Links(unsigned_short)::s_Sentinel;
      if (sVar7 != -1) {
        puVar4 = (ushort *)(local_2c + *(int *)(this + 4));
      }
      *(undefined2 *)(*(int *)(this + 4) + 6 + (uint)*puVar4 * 0x10) = 1;
      RotateRight(this,(ushort)local_24);
      param_1 = *(ushort *)(this + 0x10);
      uVar2 = param_1;
      goto LAB_004bac88;
    }
    iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar5 != 0) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f19322 = 0xffff;
      DAT_00f19324 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    if (uVar2 == 0xffff) goto LAB_004baec6;
LAB_004bad1d:
    if (param_1 != *(ushort *)(uVar6 * 0x10 + *(int *)(this + 4))) goto LAB_004bad2f;
LAB_004baed8:
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar5 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19322 = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar2 == 0xffff) goto LAB_004bb686;
LAB_004baeeb:
      puVar3 = (undefined2 *)(uVar6 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (uVar2 != 0xffff) goto LAB_004baeeb;
LAB_004bb686:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    uVar8 = puVar3[1];
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
      DAT_00f19322 = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f19324 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (uVar8 == 0xffff) goto LAB_004bb650;
LAB_004baf0a:
      uVar9 = (uint)uVar8;
      puVar3 = (undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (uVar8 != 0xffff) goto LAB_004baf0a;
LAB_004bb650:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
      uVar9 = 0xffff;
    }
    if (puVar3[3] == 0) {
      *(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 1;
      *(undefined2 *)(uVar6 * 0x10 + *(int *)(this + 4) + 6) = 0;
      RotateLeft(this,uVar2);
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 != 0) {
          DAT_00f19322 = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f19324 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (param_1 == 0xffff) goto LAB_004bb8f5;
LAB_004bb5bd:
        uVar2 = *(ushort *)(local_28 * 0x10 + *(int *)(this + 4) + 4);
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004bb5d6;
LAB_004bb90a:
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f19322 = 0xffff;
          DAT_00f19324 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar2 == 0xffff) goto LAB_004bb933;
LAB_004bb5e4:
        puVar3 = (undefined2 *)((uint)uVar2 * 0x10 + *(int *)(this + 4));
      }
      else {
        if (param_1 != 0xffff) goto LAB_004bb5bd;
LAB_004bb8f5:
        uVar2 = DAT_00f19324;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004bb90a;
LAB_004bb5d6:
        if (uVar2 != 0xffff) goto LAB_004bb5e4;
LAB_004bb933:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      uVar8 = puVar3[1];
      uVar9 = (uint)uVar8;
    }
    param_1 = uVar2;
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar5 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19322 = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        goto LAB_004baf2f;
      }
      if (uVar8 == 0xffff) goto LAB_004bb56b;
LAB_004baf39:
      puVar4 = (ushort *)(uVar9 * 0x10 + *(int *)(this + 4));
    }
    else {
LAB_004baf2f:
      if (uVar8 != 0xffff) goto LAB_004baf39;
LAB_004bb56b:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    uVar2 = *puVar4;
    uVar11 = (ushort)uVar9;
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
      DAT_00f19322 = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f19324 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    sVar7 = DAT_00f19326;
    if (uVar2 != 0xffff) {
      sVar7 = *(short *)((uint)uVar2 * 0x10 + *(int *)(this + 4) + 6);
    }
    if (sVar7 == 1) {
      iVar5 = Links(this,uVar11);
      iVar5 = Links(this,*(ushort *)(iVar5 + 2));
      if (*(short *)(iVar5 + 6) != 1) goto LAB_004baf67;
      if (uVar8 == 0xffff) goto LAB_004bbca2;
      *(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 0;
      uVar2 = *(ushort *)(this + 0x10);
    }
    else {
LAB_004baf67:
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar5 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f19322 = 0xffff;
          DAT_00f19324 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_004baf76;
        }
        if (uVar8 == 0xffff) goto LAB_004bba4b;
LAB_004baf80:
        local_2c = uVar9 * 0x10;
        puVar3 = (undefined2 *)(local_2c + *(int *)(this + 4));
      }
      else {
LAB_004baf76:
        if (uVar8 != 0xffff) goto LAB_004baf80;
LAB_004bba4b:
        local_2c = 0xffff0;
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      uVar2 = puVar3[1];
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19322 = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      sVar7 = DAT_00f19326;
      if (uVar2 != 0xffff) {
        sVar7 = *(short *)((uint)uVar2 * 0x10 + *(int *)(this + 4) + 6);
      }
      if (sVar7 == 1) {
        puVar4 = (ushort *)Links(this,uVar11);
        *(undefined2 *)((uint)*puVar4 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + 6 + local_2c) = 0;
        RotateRight(this,uVar11);
        iVar5 = Links(this,(ushort)local_28);
        param_1 = *(ushort *)(iVar5 + 4);
        iVar5 = Links(this,param_1);
        uVar8 = *(ushort *)(iVar5 + 2);
        local_2c = (uint)uVar8 << 4;
      }
      local_24 = (uint)param_1;
      iVar5 = Links(this,param_1);
      *(undefined2 *)(*(int *)(this + 4) + 6 + local_2c) = *(undefined2 *)(iVar5 + 6);
      bVar10 = Links(unsigned_short)::s_Sentinel == '\0';
      *(undefined2 *)(local_24 * 0x10 + *(int *)(this + 4) + 6) = 1;
      if ((bVar10) && (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0))
      {
        DAT_00f19322 = 0xffff;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f19324 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      puVar3 = &Links(unsigned_short)::s_Sentinel;
      if (uVar8 != 0xffff) {
        puVar3 = (undefined2 *)(local_2c + *(int *)(this + 4));
      }
      *(undefined2 *)(*(int *)(this + 4) + 6 + (uint)(ushort)puVar3[1] * 0x10) = 1;
      RotateLeft(this,param_1);
      param_1 = *(ushort *)(this + 0x10);
      uVar2 = param_1;
    }
  } while( true );
}

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)