//
// cocos2d::CCAffineTransformInvert from 0x1002404a0 to 0x100240519 (121 bytes)
//
// 2 xrefs:
// > cocos2d::CCNode::parentToNodeTransform @ 0x100274a86
// > cocos2d::CCNode::worldToNodeTransform @ 0x100274c14
//
// 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
//
cocos2d::CCAffineTransform *__fastcall cocos2d::CCAffineTransformInvert(
cocos2d::CCAffineTransform *__return_ptr retstr,
const cocos2d::CCAffineTransform *a2)
{
__m128 v2; // xmm0
__m128 v4; // xmm1
__m128 v5; // xmm3
__m128 inserted; // xmm1
v2 = *(__m128 *)&a2->a;
v4 = (__m128)0x3F800000u;
v4.f32[0] = 1.0
/ (float)((float)(_mm_shuffle_ps(v2, v2, 255).f32[0] * COERCE_FLOAT(*(_OWORD *)&a2->a))
- (float)(_mm_movehdup_ps(*(__m128 *)&a2->a).f32[0] * a2->c));
v5 = _mm_moveldup_ps(v4);
inserted = _mm_insert_ps(v4, _mm_xor_ps((__m128)xmmword_1008150B0, v4), 16);
*(__m128 *)&retstr->a = _mm_mul_ps(
_mm_shuffle_ps(*(__m128 *)&a2->a, *(__m128 *)&a2->a, 39),
_mm_shuffle_ps(inserted, inserted, 20));
_mm_storel_ps(
(double *)&retstr->tx,
_mm_mul_ps(
v5,
_mm_sub_ps(
_mm_mul_ps(
_mm_shuffle_ps((__m128)*(unsigned __int64 *)&a2->tx, (__m128)*(unsigned __int64 *)&a2->tx, 225),
_mm_shuffle_ps(v2, v2, 230)),
_mm_mul_ps(_mm_shuffle_ps(v2, v2, 227), (__m128)*(unsigned __int64 *)&a2->tx))));
return retstr;
}