//
// sub_946778 from 0x946778 to 0x9467d0 (88 bytes)
//
// 2 xrefs:
// > sub_9079D4 @ 0x907ae8
// > sub_9396DC @ 0x939898
//
// 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 12:05:11 +0000
//
void *__fastcall sub_946778(_DWORD *a1, float a2)
{
void *result; // r0
unsigned int v5; // r3
float v6; // s15
result = memcpy(a1 + 2, &unk_C48F78, 0xDCu);
v5 = 0;
a1[1] = 31;
*a1 = 0;
if ( a2 >= 0.0 )
{
v6 = 1.0;
if ( a2 > 1.0 )
v5 = 256;
else
v6 = 256.0;
if ( a2 <= 1.0 )
v5 = (unsigned int)(float)(a2 * v6);
}
a1[57] = v5;
return result;
}