//
// cocos2d::CCFlipX3D::update from 0xababe0 to 0xabaeb4 (724 bytes)
//
// 2 xrefs:
// > ??> @ 0xa2468
// > ??> @ 0x11fcec8
//
// 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 cocos2d::CCFlipX3D::update(cocos2d::CCFlipX3D *a1, float a2)
{
float v2; // s9
float v4; // s8
float v5; // s11
float x; // s9
float v7; // s0
float v8; // s1
float v9; // s0
float v10; // s1
float v11; // s0
float v12; // s1
float v13; // s0
float v14; // s1
float v15; // s8
GLfloat v16; // s9
float v17; // s8
float v18; // s0
float v19; // s1
float v20; // s0
float v21; // s1
float v22; // s0
float v23; // s1
float v24; // s0
float v25; // s1
cocos2d::CCPoint v26; // [xsp+78h] [xbp+78h] BYREF
cocos2d::CCPoint v27; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCPoint v28; // [xsp+88h] [xbp+88h] BYREF
cocos2d::CCPoint v29; // [xsp+90h] [xbp+90h] BYREF
cocos2d::ccVertex3F v30; // [xsp+98h] [xbp+98h]
cocos2d::ccVertex3F v31; // [xsp+A8h] [xbp+A8h]
cocos2d::ccVertex3F v32; // [xsp+B8h] [xbp+B8h] BYREF
cocos2d::ccVertex3F v33; // 0:kr00_12.12
cocos2d::ccVertex3F v34; // 0:kr14_12.12
cocos2d::ccVertex3F v35; // 0:kr20_12.12
cocos2d::ccVertex3F v36; // 0:kr34_12.12
cocos2d::ccVertex3F v37; // 0:kr40_12.12
cocos2d::ccVertex3F v38; // 0:kr54_12.12
v2 = a2 * 3.1416;
v4 = sinf(a2 * 3.1416);
v5 = cosf(v2 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 1.0, 1.0);
v33 = cocos2d::CCGrid3DAction::originalVertex(a1, (const cocos2d::CCPoint *)&v32);
v30 = v33;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 0.0, 0.0);
v34 = cocos2d::CCGrid3DAction::originalVertex(a1, (const cocos2d::CCPoint *)&v32);
x = v34.x;
v31 = v34;
cocos2d::CCPoint::CCPoint(&v26);
cocos2d::CCPoint::CCPoint(&v27);
cocos2d::CCPoint::CCPoint(&v28);
cocos2d::CCPoint::CCPoint(&v29);
if ( v33.x > v34.x )
{
x = v33.x;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 0.0, 0.0);
cocos2d::CCPoint::operator=(&v26, v18, v19);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 0.0, 1.0);
cocos2d::CCPoint::operator=(&v27, v20, v21);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 1.0, 0.0);
cocos2d::CCPoint::operator=(&v28, v22, v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 1.0, 1.0);
cocos2d::CCPoint::operator=(&v29, v24, v25);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 0.0, 0.0);
cocos2d::CCPoint::operator=(&v28, v7, v8);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 0.0, 1.0);
cocos2d::CCPoint::operator=(&v29, v9, v10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 1.0, 0.0);
cocos2d::CCPoint::operator=(&v26, v11, v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, 1.0, 1.0);
cocos2d::CCPoint::operator=(&v27, v13, v14);
}
v15 = x * v4;
v16 = x - (float)(x * v5);
v17 = fabsf(floorf(v15 * 0.25));
v35 = cocos2d::CCGrid3DAction::originalVertex(a1, &v26);
v32.y = v35.y;
v32.x = v16;
v32.z = v17 + v35.z;
cocos2d::CCGrid3DAction::setVertex(a1, &v26, &v32);
v36 = cocos2d::CCGrid3DAction::originalVertex(a1, &v27);
v32.y = v36.y;
v32.x = v16;
v32.z = v17 + v36.z;
cocos2d::CCGrid3DAction::setVertex(a1, &v27, &v32);
v37 = cocos2d::CCGrid3DAction::originalVertex(a1, &v28);
v32.y = v37.y;
v32.x = v37.x - v16;
v32.z = v37.z - v17;
cocos2d::CCGrid3DAction::setVertex(a1, &v28, &v32);
v38 = cocos2d::CCGrid3DAction::originalVertex(a1, &v29);
v32.y = v38.y;
v32.x = v38.x - v16;
v32.z = v38.z - v17;
cocos2d::CCGrid3DAction::setVertex(a1, &v29, &v32);
}