//
// EditorSFXActionConfigLayer::onPreviewSound from 0x1004c6f20 to 0x1004c6fc8 (168 bytes)
//
// 1 xrefs:
// > EditorSFXActionConfigLayer::refreshRows @ 0x1004c6c20
//
// 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:06:23 +0000
//
__int64 __fastcall EditorSFXActionConfigLayer::onPreviewSound(__int64 a1, __int64 a2)
{
int v3; // w20
__n128 v4; // q0
int v5; // w21
__int64 v6; // x0
__int64 result; // x0
__int64 v8; // x19
__int64 v9; // x19
__int64 v10; // x0
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( v3 >= 1000 )
v5 = v3 - 1000;
else
v5 = v3 - 993;
v6 = EditorSFXManager::sharedState(v4);
result = EditorSFXManager::soundsForAction(v6, *(unsigned int *)(a1 + 1024));
if ( result )
{
if ( v3 >= 993 )
{
v8 = result;
result = sub_1002E757C(result);
if ( v5 >> 3 < (int)result )
{
result = sub_1002E75A0(v8, v5 >> 3);
if ( result )
{
v9 = result;
if ( *(int *)(result + 1864) >= 1 )
{
v10 = GameManager::sharedState();
return sub_1003AF1A8(v10, v9);
}
}
}
}
}
return result;
}