//
// CCPartAnimSprite::setBlendFunc from 0x692478 to 0x692558 (224 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'CCPartAnimSprite::setBlendFunc @ 0x69255c
// > ??> @ 0x74b60
// > ??> @ 0x14175f8
//
// 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 12:50:36 +0000
//
__int64 __fastcall CCPartAnimSprite::setBlendFunc(_DWORD *a1, __int64 a2)
{
__int64 v4; // x1
__int64 result; // x0
__int64 *v6; // x19
__int64 v7; // x2
__int64 v8; // x1
_DWORD *v9; // x0
__int64 v10; // x20
unsigned __int64 i; // x20
a1[102] = HIDWORD(a2);
v4 = *(_QWORD *)a1;
a1[101] = a2;
result = (*(__int64 (**)(void))(v4 + 488))();
if ( result )
{
result = **(unsigned int **)((*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 488LL))(a1) + 56);
if ( (_DWORD)result )
{
v6 = *(__int64 **)(*(_QWORD *)((*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 488LL))(a1) + 56) + 16LL);
v7 = *(_QWORD *)((*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 488LL))(a1) + 56);
v8 = *(_QWORD *)a1;
v9 = a1;
v10 = *(_QWORD *)(v7 + 16);
result = *(_QWORD *)((*(__int64 (__fastcall **)(_DWORD *))(v8 + 488))(v9) + 56);
for ( i = v10 + 8LL * *(unsigned int *)result - 8;
i >= (unsigned __int64)v6;
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)result + 1080LL))(result, a2) )
{
result = *v6;
if ( !*v6 )
break;
++v6;
}
}
}
return result;
}