//
// cocos2d::CCFlipY3D::update from 0x10026a360 to 0x10026a636 (726 bytes)
//
// 1 xrefs:
// > ??> @ 0x100af70d0
//
// 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::CCFlipY3D::update(__int64 a1, float a2)
{
__m128 v2; // xmm0
__m128 v3; // xmm1
__m128 v4; // xmm0
__m128 v5; // xmm0
__m128 inserted; // xmm0
__m128 v7; // xmm1
__m128 v8; // xmm0
__m128 v9; // xmm0
__m128 v11; // [rsp+0h] [rbp-80h]
float v12; // [rsp+0h] [rbp-80h]
__m128 v13; // [rsp+0h] [rbp-80h]
_BYTE v14[8]; // [rsp+10h] [rbp-70h] BYREF
_BYTE v15[8]; // [rsp+18h] [rbp-68h] BYREF
_BYTE v16[8]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v17[8]; // [rsp+28h] [rbp-58h] BYREF
__m128 v18; // [rsp+30h] [rbp-50h]
__m128 v19; // [rsp+40h] [rbp-40h]
__int64 v20; // [rsp+58h] [rbp-28h] BYREF
__int32 v21; // [rsp+60h] [rbp-20h]
v18.f32[0] = a2;
sub_100278250(&v20, 1.0, 1.0);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)&v20);
sub_100278250(&v20, 0.0, 0.0);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)&v20);
v19 = _mm_movehdup_ps((__m128)0x3F800000u);
v11 = _mm_movehdup_ps((__m128)0LL);
sub_1002782A0(v14);
sub_1002782A0(v15);
sub_1002782A0(v16);
sub_1002782A0(v17);
if ( v19.f32[0] <= v11.f32[0] )
{
sub_100278250(&v20, 0.0, 0.0);
sub_100278300(v15, &v20);
sub_100278250(&v20, 0.0, 1.0);
sub_100278300(v14, &v20);
sub_100278250(&v20, 1.0, 0.0);
sub_100278300(v17, &v20);
sub_100278250(&v20, 1.0, 1.0);
sub_100278300(v16, &v20);
v19 = v11;
}
else
{
sub_100278250(&v20, 0.0, 0.0);
sub_100278300(v14, &v20);
sub_100278250(&v20, 0.0, 1.0);
sub_100278300(v15, &v20);
sub_100278250(&v20, 1.0, 0.0);
sub_100278300(v16, &v20);
sub_100278250(&v20, 1.0, 1.0);
sub_100278300(v17, &v20);
}
v18.f32[0] = v18.f32[0] * 3.1415927;
v12 = cosf(0.5 * v18.f32[0]);
v2 = (__m128)v18.u32[0];
v2.f32[0] = sinf(v18.f32[0]);
v3 = v19;
v2.f32[0] = (float)(v2.f32[0] * v19.f32[0]) * 0.25;
v3.f32[0] = v19.f32[0] - (float)(v12 * v19.f32[0]);
v19 = v3;
v4 = _mm_and_ps(_mm_round_ss(v2, v2, 9), (__m128)xmmword_100A038A0);
v18 = v4;
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v14);
_mm_storel_ps((double *)&v20, v4);
v5 = v19;
HIDWORD(v20) = v19.i32[0];
v3.f32[0] = v3.f32[0] + v18.f32[0];
v21 = v3.i32[0];
cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v14, (__int64)&v20);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v15);
_mm_storel_ps((double *)&v20, v5);
inserted = _mm_insert_ps(_mm_movehdup_ps(v5), v3, 16);
v7 = _mm_insert_ps(v19, (__m128)v18.u32[0], 16);
v13 = v7;
v8 = _mm_sub_ps(inserted, v7);
_mm_storel_ps((double *)((char *)&v20 + 4), v8);
cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v15, (__int64)&v20);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v16);
_mm_storel_ps((double *)&v20, v8);
v9 = v19;
HIDWORD(v20) = v19.i32[0];
v7.f32[0] = v7.f32[0] + v18.f32[0];
v21 = v7.i32[0];
cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v16, (__int64)&v20);
cocos2d::CCGrid3DAction::originalVertex(a1, (__int64)v17);
_mm_storel_ps((double *)&v20, v9);
_mm_storel_ps((double *)((char *)&v20 + 4), _mm_sub_ps(_mm_insert_ps(_mm_movehdup_ps(v9), v7, 16), v13));
return cocos2d::CCGrid3DAction::setVertex(a1, (__int64)v17, (__int64)&v20);
}