//
// sub_1003007E4 from 0x1003007e4 to 0x100300854 (112 bytes)
//
// 7 xrefs:
// > EnhancedGameObject::customObjectSetup @ 0x1003005f8
// > EnhancedGameObject::customSetup @ 0x1003009ac
// > EnhancedGameObject::customSetup @ 0x1003012e8
// > EnhancedGameObject::customSetup @ 0x1003013b8
// > EnhancedGameObject::customSetup @ 0x100301438
// > EnhancedGameObject::customSetup @ 0x1003015ac
// > sub_100302094 @ 0x10030209c
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:03:05 +0000
//
float __fastcall sub_1003007E4(float *a1, int a2, float a3)
{
float v5; // s9
float v7; // s0
float result; // s0
if ( a3 != 0.0 )
a1[349] = a3;
v5 = a1[348];
if ( v5 != 0.0 )
a2 = 1;
if ( !a2 )
{
if ( vcvts_n_f32_s32(rand(), 0x1Fu) > 0.5 )
a2 = 1;
else
a2 = -1;
}
if ( v5 == 0.0 )
v7 = a3;
else
v7 = v5;
result = v7 * (float)a2;
a1[350] = result;
return result;
}