//
// __powisf2 from 0xdbf9c to 0xdc010 (116 bytes)
//
// 4 xrefs:
// > j___powisf2 @ 0xe2f68
// > ??> @ 0x11bc
// > j___powisf2 @ 0xe2f68
// > ??> @ 0xe7144
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:42:06 +0000
//
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;
}