//
// TeleportPortalObject::setStartPos from 0x879cac to 0x879da4 (248 bytes)
//
// 2 xrefs:
// > ??> @ 0xc74e0
// > ??> @ 0x144c258
//
// 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 12:55:51 +0000
//
__int64 __fastcall TeleportPortalObject::setStartPos(_QWORD *a1, const cocos2d::CCPoint *a2)
{
float v3; // s8
__int64 v4; // x19
float v5; // s0
__int64 v6; // x0
float v8; // [xsp+40h] [xbp+40h]
float v9; // [xsp+58h] [xbp+58h] BYREF
__int64 v10; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v9, a2);
if ( *((_BYTE *)a1 + 1856) )
{
(*(void (__fastcall **)(__int64 *__return_ptr, _QWORD *))(*a1 + 1816LL))(&v10, a1);
v9 = *(float *)&v10;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v10, (const cocos2d::CCPoint *)&v9);
GameObject::setStartPos((__int64)a1, (float *)&v10);
if ( a1[231] )
{
v3 = v9;
TeleportPortalObject::getTeleportXOff((TeleportPortalObject *)a1, nullptr);
v4 = a1[231];
v8 = v3 + v5;
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v10, v8, *(float *)(v6 + 4));
TeleportPortalObject::setStartPosOverride(v4, (const cocos2d::CCPoint *)&v10);
}
return _stack_chk_guard;
}