//
// CCPartAnimSprite::transformSprite from 0x100374670 to 0x1003747d4 (356 bytes)
//
// 1 xrefs:
// > CCPartAnimSprite::setDisplayFrame @ 0x100374efb
//
// 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
//
void __fastcall CCPartAnimSprite::transformSprite(CCPartAnimSprite *a1, SpriteDescription *a2)
{
__int64 v3; // rbx
__m128 v4; // xmm0
__m128 v5; // rt1
__m128 v6; // xmm1
double v7; // xmm0_8
cocos2d::CCSpriteFrame *m_texture; // rax
std::string *p_m_strFrameName; // rax
__int128 v10; // [rsp+0h] [rbp-30h] BYREF
void *__p; // [rsp+10h] [rbp-20h]
v3 = sub_1007200C0(a1->m_spriteParts, (unsigned int)a2->m_tag);
cocos2d::CCNode::stopAllActions((cocos2d::CCNode *)v3);
(*(void (__fastcall **)(__int64, cocos2d::CCPoint *))(*(_QWORD *)v3 + 184LL))(v3, &a2->m_position);
v4 = _mm_cmpneq_ss((__m128)LODWORD(a2->m_flipped.x), (__m128)0LL);
(*(void (__fastcall **)(__int64, double))(*(_QWORD *)v3 + 128LL))(
v3,
COERCE_DOUBLE(
_mm_andnot_ps(v4, (__m128)LODWORD(a2->m_scale.x)).u64[0]
| (LODWORD(a2->m_scale.x) ^ 0x8000000080000000LL) & v4.i64[0]));
v5.i32[0] = LODWORD(a2->m_flipped.y);
v6 = _mm_cmpneq_ss((__m128)0LL, v5);
(*(void (__fastcall **)(__int64, double))(*(_QWORD *)v3 + 144LL))(
v3,
COERCE_DOUBLE(
_mm_andnot_ps(v6, (__m128)LODWORD(a2->m_scale.y)).u64[0]
| (LODWORD(a2->m_scale.y) ^ 0x8000000080000000LL) & v6.i64[0]));
*(_QWORD *)&v7 = LODWORD(a2->m_rotation);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v3 + 344LL))(v3, *(float *)&v7);
if ( a2->m_usesCustomTag )
{
(*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v3 + 1144LL))(v3, a2->m_texture);
m_texture = a2->m_texture;
if ( (m_texture->m_strFrameName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&v10,
m_texture->m_strFrameName.m_data.m_long.longStorage,
m_texture->m_strFrameName.m_data.m_long.size,
v7);
}
else
{
p_m_strFrameName = &m_texture->m_strFrameName;
__p = p_m_strFrameName->m_data.m_long.longStorage;
v10 = *(_OWORD *)&p_m_strFrameName->m_data.m_short.sizex2;
}
CCSpritePart::frameChanged(v3, &v10);
if ( (v10 & 1) != 0 )
operator delete(__p);
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v3 + 104LL))(v3) != a2->m_zValue )
((void (__fastcall *)(CCPartAnimSprite *, __int64))a1->reorderChild)(a1, v3);
*(_BYTE *)(v3 + 619) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 328LL))(v3, 1);
}