L L4D2node

set_fast_math

0x00034780 · 130 bytes · unknown

Decompiled

undefined (0 params)

/* WARNING: Removing unreachable block (ram,0x000347b8) */
/* WARNING: Removing unreachable block (ram,0x000347a9) */
/* WARNING: Removing unreachable block (ram,0x000347fd) */

undefined8 set_fast_math(void)

{
  int *piVar1;
  uint *puVar2;
  uint uVar3;
  byte in_CF;
  byte in_PF;
  byte in_AF;
  byte in_ZF;
  byte in_SF;
  byte in_TF;
  byte in_IF;
  byte in_OF;
  byte in_NT;
  byte in_AC;
  byte in_VIF;
  byte in_VIP;
  byte in_ID;
  uint uVar4;
  undefined1 auStack_210 [24];
  uint local_1f8;
  
  uVar4 = (uint)(in_NT & 1) * 0x4000 | (uint)(in_OF & 1) * 0x800 | (uint)(in_IF & 1) * 0x200 |
          (uint)(in_TF & 1) * 0x100 | (uint)(in_SF & 1) * 0x80 | (uint)(in_ZF & 1) * 0x40 |
          (uint)(in_AF & 1) * 0x10 | (uint)(in_PF & 1) * 4 | (uint)(in_CF & 1) |
          (uint)(in_ID & 1) * 0x200000 | (uint)(in_VIP & 1) * 0x100000 |
          (uint)(in_VIF & 1) * 0x80000 | (uint)(in_AC & 1) * 0x40000;
  uVar3 = uVar4 ^ 0x200000;
  uVar3 = ((uint)((uVar3 & 0x4000) != 0) * 0x4000 | (uint)((uVar3 & 0x800) != 0) * 0x800 |
           (uint)((uVar3 & 0x200) != 0) * 0x200 | (uint)((uVar3 & 0x100) != 0) * 0x100 |
           (uint)((uVar3 & 0x80) != 0) * 0x80 | (uint)((uVar3 & 0x40) != 0) * 0x40 |
           (uint)((uVar3 & 0x10) != 0) * 0x10 | (uint)((uVar3 & 4) != 0) * 4 |
           (uint)((uVar3 & 1) != 0) | (uint)((uVar3 & 0x200000) != 0) * 0x200000 |
          (uint)((uVar3 & 0x40000) != 0) * 0x40000) ^ uVar4;
  if ((uVar3 & 0x200000) != 0) {
    piVar1 = (int *)cpuid_basic_info(0);
    uVar4 = piVar1[2];
    uVar3 = 0;
    if (*piVar1 != 0) {
      puVar2 = (uint *)cpuid_Version_info(1);
      uVar3 = *puVar2;
      uVar4 = puVar2[2];
      if ((uVar4 & 0x2000000) != 0) {
        if ((uVar4 & 0x1000000) == 0) {
          uVar4 = 0;
        }
        else {
          _fxsave(auStack_210);
          uVar4 = local_1f8 | 0x40;
          MXCSR = local_1f8;
        }
        uVar3 = MXCSR | 0x8000;
        MXCSR = uVar3;
      }
    }
  }
  return CONCAT44(uVar4,uVar3);
}

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.



        
        

⚠ This function has no mangled symbol — it may be internal/static. The Linux gamedata field uses @-prefix symbol resolution which requires an exported mangled name. You'll need a Linux byte signature for this one (extract via extract_signature.java).


          

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

Return-type handling cheatsheet (DHookReturn)