//
// cocos2d::CCRectApplyAffineTransform from 0x1004132b0 to 0x10041344c (412 bytes)
//
// 19 xrefs:
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214c5c
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214c78
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214c94
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214cb0
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214ccc
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214ce8
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214d04
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214d20
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100214d3c
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100215108
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100215124
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100215140
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x10021515c
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100215178
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x100215194
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x1002151b0
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x1002151cc
// > cocos2d::extension::CCScale9Sprite::updateWithBatchNode @ 0x1002151e8
// > cocos2d::CCNode::boundingBox @ 0x10023b688
//
// 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::CCRect __fastcall cocos2d::CCRectApplyAffineTransform(
const cocos2d::CCRect *a1,
const cocos2d::CCAffineTransform *a2)
{
float *v2; // x8
float *v5; // x19
unsigned __int32 v6; // s8
unsigned __int32 v7; // s9
unsigned __int32 v8; // s10
unsigned __int32 v9; // s11
__n128 v10; // q0
__n128 v11; // q1
__n128 v12; // q0
__n128 v13; // q1
__n128 v14; // q0
__n128 v15; // q1
__n128 v16; // q0
__n128 v17; // q1
float32x4_t v18; // q1
int8x16_t v19; // q2
int8x16_t v20; // q3
float32x4_t v21; // q4
float32x4_t v22; // q6
int8x16_t v23; // q7
int8x16_t v24; // q5
float32x4_t v25; // q5
float32x4_t v26; // q2
int16x4_t v27; // d3
__int32 v28; // s0
__int32 v29; // s4
__int32 v30; // s1
__int8 v31; // w8
__int32 v32; // s3
cocos2d::CCPoint v37; // [xsp+8h] [xbp-68h] BYREF
cocos2d::CCPoint v38; // [xsp+10h] [xbp-60h] BYREF
float32x4_t v39; // [xsp+18h] [xbp-58h] BYREF
__int64 v40; // [xsp+28h] [xbp-48h]
cocos2d::CCRect result; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
v5 = v2;
v6 = sub_100022C58((__int64)a1);
v7 = sub_100022C40((__int64)a1);
v8 = sub_100022C30((float *)&a1->origin);
v9 = sub_100022C48((__int64)a1);
v10.n128_u32[0] = v7;
v11.n128_u32[0] = v6;
sub_100022980(v10, v11, &v39.i32[2]);
cocos2d::__CCPointApplyAffineTransform((const cocos2d::CCPoint *)&v39.u32[2], a2);
v12.n128_u32[0] = v8;
v13.n128_u32[0] = v6;
sub_100022980(v12, v13, &v39);
cocos2d::__CCPointApplyAffineTransform((const cocos2d::CCPoint *)&v39, a2);
v14.n128_u32[0] = v7;
v15.n128_u32[0] = v9;
sub_100022980(v14, v15, &v38);
cocos2d::__CCPointApplyAffineTransform(&v38, a2);
v16.n128_u32[0] = v8;
v17.n128_u32[0] = v9;
sub_100022980(v16, v17, &v37);
cocos2d::__CCPointApplyAffineTransform(&v37, a2);
v18.i64[0] = v40;
*(cocos2d::CCPoint *)v19.i8 = v38;
v21.i64[0] = v39.i64[1];
v20.i64[0] = v39.i64[0];
v21.i64[1] = v39.i64[0];
*(cocos2d::CCPoint *)v22.f32 = v38;
v22.i64[1] = v40;
v23.i64[0] = v40;
v23.i64[1] = v39.i64[0];
v20.i64[1] = v40;
*(cocos2d::CCPoint *)&v18.u32[2] = v38;
v24.i64[0] = v39.i64[1];
v24.u64[1] = (unsigned __int64)v38;
v25 = (float32x4_t)vbslq_s8((int8x16_t)vcgtq_f32(v21, v18), v24, v23);
v19.i64[1] = v39.i64[1];
v26 = (float32x4_t)vbslq_s8((int8x16_t)vcgtq_f32(v22, v39), v19, v20);
v27 = vmovn_s32(vcgtq_f32(v26, v25));
v28 = v25.i32[2];
if ( (v27.i8[4] & 1) == 0 )
v28 = v26.i32[2];
if ( (v27.i8[0] & 1) != 0 )
v29 = v26.i32[0];
else
v29 = v25.i32[0];
v30 = v25.i32[3];
if ( (v27.i8[6] & 1) == 0 )
v30 = v26.i32[3];
v31 = v27.i8[2];
v32 = v25.i32[1];
if ( (v31 & 1) != 0 )
v32 = v26.i32[1];
sub_100022990(v5, *(float *)&v28, *(float *)&v30, *(float *)&v29 - *(float *)&v28, *(float *)&v32 - *(float *)&v30);
return result;
}