//
// sub_1001B6278 from 0x1001b6278 to 0x1001b6304 (140 bytes)
//
// 1 xrefs:
// > FMODAudioEngine::update @ 0x1001b5b7c
//
// 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:00:10 +0000
//
__int64 __fastcall sub_1001B6278(__int64 result)
{
float v1; // s0
__int64 v2; // x19
float v3; // s1
float v4; // s8
float v5; // s0
float v7; // s3
float v9; // s0
v1 = *(float *)(result + 452);
if ( v1 != 0.0 )
{
v2 = result;
v3 = *(float *)(result + 588);
if ( v1 < 0.0 )
{
*(float *)(result + 452) = v3;
v1 = v3;
}
v4 = v3 - v1;
v5 = *(float *)(result + 448);
if ( (float)(v4 / v5) > 0.0 || v5 <= 0.0 )
v7 = v4 / v5;
else
v7 = 0.0;
if ( (float)(v4 / v5) >= 1.0 || v5 <= 0.0 )
v9 = 1.0;
else
v9 = v7;
result = FMOD::ChannelControl::setVolume(*(_QWORD *)(result + 480), *(float *)(result + 440) * v9);
if ( v4 >= *(float *)(v2 + 448) )
*(_DWORD *)(v2 + 452) = 0;
}
return result;
}