//
// TeleportPortalObject::setStartPos from 0x1406537d0 to 0x14065388e (190 bytes)
//
// 4 xrefs:
// > ??> @ 0x1408233d0
// > ??> @ 0x1408e8f08
// > ??> @ 0x1408e8f18
// > ??> @ 0x14093158c
//
// 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:35:44 +0000
//
__int64 __fastcall TeleportPortalObject::setStartPos(__int64 a1, const struct cocos2d::CCPoint *a2)
{
float *v3; // rax
__int64 result; // rax
__int64 v5; // rcx
float v6; // xmm6_4
float TeleportXOff; // xmm0_4
__int64 v8; // rbx
const struct cocos2d::CCPoint *v9; // rax
float *v10; // rax
float v11; // [rsp+40h] [rbp+8h] BYREF
char v12; // [rsp+50h] [rbp+18h] BYREF
char v13; // [rsp+58h] [rbp+20h] BYREF
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v11, a2);
if ( *(_BYTE *)(a1 + 1872) )
v11 = *(float *)(*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)a1 + 1664LL))(a1, &v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v12, (const struct cocos2d::CCPoint *)&v11);
result = GameObject::setStartPos(a1, v3);
v5 = *(_QWORD *)(a1 + 1864);
if ( v5 )
{
v6 = *(float *)((*(__int64 (**)(void))(*(_QWORD *)v5 + 200LL))() + 4);
TeleportXOff = TeleportPortalObject::getTeleportXOff(a1, 0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v12, TeleportXOff + v11, v6);
v8 = *(_QWORD *)(a1 + 1864);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, v9);
return GameObject::setStartPos(v8, v10);
}
return result;
}