//
// CCSpritePart::frameChanged from 0x1003747f0 to 0x1003748ed (253 bytes)
//
// 3 xrefs:
// > CCPartAnimSprite::transformSprite @ 0x10037477d
// > CCPartAnimSprite::tweenSpriteTo @ 0x100374a58
// > CCSpritePart::updateDisplayFrame @ 0x100374ce0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
std::string *__fastcall CCSpritePart::frameChanged(std::string *a1, const std::string *a2, double a3)
{
unsigned int v5; // r13d
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v6; // r12
size_t v7; // r15
std::string::pointer data; // rdi
size_t v9; // r13
std::string::pointer v10; // rsi
size_t v11; // rdx
void (__fastcall ***v13)(_QWORD, std::string *, __int128 *); // [rsp+8h] [rbp-58h]
unsigned __int64 size; // [rsp+10h] [rbp-50h]
std::string::pointer v15; // [rsp+18h] [rbp-48h]
__int128 v16; // [rsp+20h] [rbp-40h] BYREF
void *__p; // [rsp+30h] [rbp-30h]
v13 = (void (__fastcall ***)(_QWORD, std::string *, __int128 *))a1[27].__r_.__value_.__r.__words[0];
if ( v13 )
{
v5 = (unsigned int)a1[26].__r_.__value_.__l.0;
v6 = a2->__r_.__value_.__s.0;
v7 = *(_BYTE *)&a2->__r_.__value_.__l.0 >> 1;
data = a2->__r_.__value_.__s.__data_;
size = a2->__r_.__value_.__l.__size_;
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )
v7 = a2->__r_.__value_.__l.__size_;
v15 = a2->__r_.__value_.__l.__data_;
if ( (*(_BYTE *)&v6 & 1) != 0 )
data = a2->__r_.__value_.__l.__data_;
if ( (v5 & 1) != 0 )
{
v9 = a1[26].__r_.__value_.__l.__size_;
v10 = a1[26].__r_.__value_.__l.__data_;
}
else
{
v9 = v5 >> 1;
v10 = a1[26].__r_.__value_.__s.__data_;
}
v11 = v7;
if ( v9 < v7 )
v11 = v9;
if ( memcmp(data, v10, v11) || v9 != v7 )
{
if ( (*(_BYTE *)&v6 & 1) != 0 )
{
sub_100006B70(&v16, v15, size, a3);
}
else
{
__p = a2->__r_.__value_.__l.__data_;
v16 = *(_OWORD *)&a2->__r_.__value_.__l.0;
}
(**v13)(v13, a1, &v16);
if ( (v16 & 1) != 0 )
operator delete(__p);
}
}
return std::string::operator=(a1 + 26, a2);
}