//
// __powisf2 from 0x106adc to 0x106b24 (72 bytes)
//
// 4 xrefs:
// > .__powisf2 @ 0x109a8c
// > ??> @ 0x7e88
// > .__powisf2 @ 0x109a84
// > ??> @ 0x111608
//
// 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(int a1, float a2)
{
float v2; // s1
unsigned int v3; // w1
float result; // s0
v2 = 1.0;
v3 = abs32(a1);
if ( (v3 & 1) != 0 )
v2 = a2;
while ( 1 )
{
v3 >>= 1;
if ( !v3 )
break;
a2 = a2 * a2;
if ( (v3 & 1) != 0 )
v2 = v2 * a2;
}
result = v2;
if ( a1 < 0 )
return 1.0 / v2;
return result;
}