//
// __powisf2 from 0xdbf9c to 0xdc010 (116 bytes)
//
// 4 xrefs:
// > j___powisf2 @ 0xe2f68
// > ??> @ 0x11bc
// > j___powisf2 @ 0xe2f68
// > ??> @ 0xe7144
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
float __fastcall _powisf2(float a1, int a2)
{
unsigned int v2; // r5
float v3; // r6
float v4; // r4
float v5; // r0
v2 = abs32(a2);
v3 = a1;
if ( (v2 & 1) != 0 )
v4 = a1;
else
v4 = 1.0;
while ( 1 )
{
v2 >>= 1;
if ( !v2 )
break;
v5 = v3 * v3;
v3 = v3 * v3;
if ( (v2 & 1) != 0 )
v4 = v4 * v5;
}
if ( a2 >= 0 )
return v4;
else
return 1.0 / v4;
}