//
// cocos2d::CCPageTurn3D::update from 0xd37f80 to 0xd381b4 (564 bytes)
//
// 2 xrefs:
// > ??> @ 0xcc898
// > ??> @ 0x15148f8
//
// This function is hookable on this platform (idp: arm, 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 13:07:24 +0000
//
__int64 __fastcall cocos2d::CCPageTurn3D::update(cocos2d::CCPageTurn3D *this, float a2)
{
float v3; // s12
float v4; // s8
float v5; // s10
float v6; // s0
float v7; // s1
float v8; // w25
float v9; // s11
int v10; // w22
float v11; // s0
int v12; // w21
float v13; // s9
float v14; // s0
float v15; // s8
float v16; // s0
float v17; // s1
float v18; // s2
float v19; // s15
float v20; // s14
float v21; // s13
float v22; // s8
_BYTE v24[8]; // [xsp+90h] [xbp+90h] BYREF
float v25; // [xsp+98h] [xbp+98h] BYREF
float v26; // [xsp+9Ch] [xbp+9Ch]
float v27; // [xsp+A0h] [xbp+A0h]
if ( (float)(a2 - 0.25) <= 0.0 )
v3 = -100.0;
else
v3 = -100.0 - (float)((float)((float)(a2 - 0.25) * (float)(a2 - 0.25)) * 500.0);
v4 = (float)(sqrtf(a2) * -1.5708) + 1.5708;
v5 = sinf(v4);
v6 = cosf(v4);
v7 = *((float *)this + 23);
v8 = v6;
if ( v7 >= 0.0 )
{
v9 = 0.0;
v10 = 0;
v11 = *((float *)this + 24);
do
{
v12 = 0;
v13 = 0.0;
if ( v11 >= 0.0 )
{
do
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, v9, v13);
cocos2d::CCGrid3DAction::originalVertex(this, (const cocos2d::CCPoint *)v24);
v25 = v16;
v26 = v17;
v27 = v18;
v19 = sqrtf((float)((float)(v17 - v3) * (float)(v17 - v3)) + (float)(v16 * v16));
v20 = v19 * v5;
v21 = asinf(v16 / v19) / v5;
v22 = cosf(v21);
if ( v21 <= 3.14159265 )
v14 = sinf(v21) * v20;
else
v14 = 0.0;
v25 = v14;
v15 = 1.0 - v22;
v26 = (float)(v3 + v19) - (float)((float)(v15 * v20) * v5);
if ( (float)((float)(v8 * (float)(v15 * v20)) / 7.0) < 0.5 )
v27 = 0.5;
else
v27 = (float)(v8 * (float)(v15 * v20)) / 7.0;
++v12;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, v9, v13);
cocos2d::CCGrid3DAction::setVertex((__int64)this, (__int64)v24, (__int64)&v25);
v13 = (float)v12;
v11 = *((float *)this + 24);
}
while ( (float)v12 <= v11 );
v7 = *((float *)this + 23);
}
v9 = (float)++v10;
}
while ( (float)v10 <= v7 );
}
return _stack_chk_guard;
}