//
// MoreOptionsLayer::nextPosition from 0x10087ef40 to 0x10087f035 (245 bytes)
//
// 1 xrefs:
// > MoreOptionsLayer::addToggle @ 0x10087dfb0
//
// 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:36:56 +0000
//
__int64 __fastcall MoreOptionsLayer::nextPosition(__int64 a1, __int64 a2, unsigned int a3)
{
__int64 v4; // rax
float *v5; // r13
int v6; // r14d
__m128 v7; // xmm0
float v9; // [rsp+0h] [rbp-40h] BYREF
float v10[2]; // [rsp+8h] [rbp-38h] BYREF
__int64 v11; // [rsp+10h] [rbp-30h] BYREF
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v11, v4);
sub_100278250(v10, (float)(*(float *)&v11 * 0.5) + -160.0, (float)(*((float *)&v11 + 1) * 0.5) + 80.0);
v5 = &v9;
sub_100278250(&v9, (float)(0.5 * *(float *)&v11) + 32.0, v10[1]);
v6 = sub_10087FB40(a2, a3);
if ( (v6 & 1) == 0 )
v5 = v10;
sub_1002782D0((_QWORD *)a1, v5);
if ( v6 >= 2 )
{
v7 = 0;
v7.f32[0] = (float)v6 * 0.5;
*(float *)(a1 + 4) = *(float *)(a1 + 4) - (float)(48 * (int)_mm_round_ss(v7, v7, 9).f32[0]);
}
return a1;
}