//
// MapSelectLayer::getConstrainedMapPos from 0x100268e10 to 0x100268e82 (114 bytes)
//
// 0 xrefs:
//
// 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
//
// local variable allocation has failed, the output may be wrong!
cocos2d::CCPoint __fastcall MapSelectLayer::getConstrainedMapPos(MapSelectLayer *a1, cocos2d::CCPoint a2)
{
unsigned __int64 v2; // rax
double *v3; // rdx
__int64 v4; // rsi
double *v5; // r14
__int64 v6; // r15
cocos2d::CCDirector *v7; // rsi
__m128 v8; // xmm0
unsigned __int64 v10; // [rsp+0h] [rbp-20h] BYREF
double v11; // 0:xmm0_8.8
cocos2d::CCPoint result; // 0:xmm0_8.8
v10 = v2;
v5 = v3;
v6 = v4;
v7 = cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v11 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v10);
*(double *)v8.i64 = (*(double (__fastcall **)(_QWORD, cocos2d::CCDirector *, double))(**(_QWORD **)(v6 + 408) + 168LL))(
*(_QWORD *)(v6 + 408),
v7,
v11);
_mm_storel_ps(
v5,
_mm_max_ps(
_mm_min_ps((__m128)0LL, (__m128)*(unsigned __int64 *)v5),
_mm_add_ps(_mm_mul_ps(_mm_moveldup_ps(v8), (__m128)xmmword_100818420), (__m128)v10)));
*(double *)&result = sub_10028CC60(a1);
return result;
}