//
// EndPortalObject::setPosition from 0x1402093f0 to 0x14020954d (349 bytes)
//
// 2 xrefs:
// > ??> @ 0x140754ea0
// > ??> @ 0x14091b338
//
// 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 11:28:16 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall EndPortalObject::setPosition(__int64 a1, __int64 a2)
{
__int64 result; // rax
float v5; // xmm8_4
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rax
char v9; // [rsp+60h] [rbp+8h] BYREF
void *v10; // [rsp+70h] [rbp+18h] BYREF
char v11; // [rsp+78h] [rbp+20h] BYREF
result = GameObject::setPosition();
if ( *(_QWORD *)(a1 + 1360) )
{
if ( *(_BYTE *)(a1 + 1368) )
v5 = -1.0;
else
v5 = 1.0;
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v11,
(float)(-14.0 - (float)(15.0 / *(float *)(*(_QWORD *)(v6 + 560) + 424LL))) * v5,
0.0);
cocos2d::CCPoint::operator+(a2, &v9, v7);
result = (*(__int64 (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1360) + 184LL))(*(_QWORD *)(a1 + 1360), &v9);
}
if ( *(_QWORD *)(a1 + 776) )
{
cocos2d::CCPoint::operator*(a1 + 820, &v9);
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1);
cocos2d::CCPoint::operator+(v8, &v10, &v9);
return (*(__int64 (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 776) + 184LL))(*(_QWORD *)(a1 + 776), &v10);
}
return result;
}