//
// cocos2d::CCFlipX3D::update from 0x100269e90 to 0x10026a14f (703 bytes)
//
// 1 xrefs:
// > ??> @ 0x100af7010
//
// This function is hookable on this platform (idp: pc, 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:27:35 +0000
//
__int64 __fastcall cocos2d::CCFlipX3D::update(__int64 a1, float a2)
{
__m128 v2; // xmm0
__m128 v3; // xmm1
__m128 v4; // xmm0
__m128 v5; // xmm0
__m128 v6; // xmm0
float v8; // [rsp+0h] [rbp-80h]
char v9[8]; // [rsp+10h] [rbp-70h] BYREF
char v10[8]; // [rsp+18h] [rbp-68h] BYREF
char v11[8]; // [rsp+20h] [rbp-60h] BYREF
char v12[8]; // [rsp+28h] [rbp-58h] BYREF
__m128 v13; // [rsp+30h] [rbp-50h]
__m128 v14; // [rsp+40h] [rbp-40h]
__int64 v15; // [rsp+58h] [rbp-28h] BYREF
float v16; // [rsp+60h] [rbp-20h]
v14.f32[0] = a2;
sub_100278250(&v15, 1.0, 1.0);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)&v15);
v13 = (__m128)0x3F800000u;
sub_100278250(&v15, 0.0, 0.0);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)&v15);
sub_1002782A0(v9);
sub_1002782A0(v10);
sub_1002782A0(v11);
sub_1002782A0(v12);
if ( v13.f32[0] <= 0.0 )
{
sub_100278250(&v15, 0.0, 0.0);
sub_100278300(v11, &v15);
sub_100278250(&v15, 0.0, 1.0);
sub_100278300(v12, &v15);
sub_100278250(&v15, 1.0, 0.0);
sub_100278300(v9, &v15);
sub_100278250(&v15, 1.0, 1.0);
sub_100278300(v10, &v15);
v13 = 0;
}
else
{
sub_100278250(&v15, 0.0, 0.0);
sub_100278300(v9, &v15);
sub_100278250(&v15, 0.0, 1.0);
sub_100278300(v10, &v15);
sub_100278250(&v15, 1.0, 0.0);
sub_100278300(v11, &v15);
sub_100278250(&v15, 1.0, 1.0);
sub_100278300(v12, &v15);
}
v14.f32[0] = v14.f32[0] * 3.1415927;
v8 = cosf(0.5 * v14.f32[0]);
v2 = (__m128)v14.u32[0];
v2.f32[0] = sinf(v14.f32[0]);
v3 = v13;
v2.f32[0] = (float)(v2.f32[0] * v13.f32[0]) * 0.25;
v3.f32[0] = v13.f32[0] - (float)(v8 * v13.f32[0]);
v13 = v3;
v4 = _mm_and_ps(_mm_round_ss(v2, v2, 9), (__m128)xmmword_100A038A0);
v14 = v4;
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v9);
_mm_storel_ps((double *)&v15, v4);
v5 = v13;
LODWORD(v15) = v13.i32[0];
v3.f32[0] = v3.f32[0] + v14.f32[0];
v16 = v3.f32[0];
cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v9, (__int64)&v15);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v10);
_mm_storel_ps((double *)&v15, v5);
v6 = v13;
LODWORD(v15) = v13.i32[0];
v3.f32[0] = v3.f32[0] + v14.f32[0];
v16 = v3.f32[0];
cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v10, (__int64)&v15);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v11);
_mm_storel_ps((double *)&v15, v6);
v6.f32[0] = v6.f32[0] - v13.f32[0];
LODWORD(v15) = v6.i32[0];
v3.f32[0] = v3.f32[0] - v14.f32[0];
v16 = v3.f32[0];
cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v11, (__int64)&v15);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v12);
_mm_storel_ps((double *)&v15, v6);
*(float *)&v15 = v6.f32[0] - v13.f32[0];
v16 = v3.f32[0] - v14.f32[0];
return cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v12, (__int64)&v15);
}