//
// PlayerObject::unrotateGameplayObject from 0x1002bfd38 to 0x1002bfe7c (324 bytes)
//
// 3 xrefs:
// > PlayerObject::handleRotatedCollisionInternal @ 0x1002bd120
// > PlayerObject::handleRotatedCollisionInternal @ 0x1002bd134
// > PlayerObject::spiderTestJumpInternal @ 0x1002c1cf0
//
// 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 11:02:30 +0000
//
__int64 *__fastcall PlayerObject::unrotateGameplayObject(__int64 a1, _DWORD *a2)
{
__int64 *result; // x0
double *v5; // x21
float32x2_t *LastPosition; // x22
float v7; // s0
float v8; // s1
float32x2_t v9; // [xsp+Ch] [xbp-34h] BYREF
float32x2_t *v10; // [xsp+18h] [xbp-28h] BYREF
LODWORD(v10) = a2[229];
result = sub_100019268((_QWORD *)(a1 + 1696), (int *)&v10);
if ( result )
{
(*(void (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)a2 + 1776LL))(a2, 1);
v9.i32[0] = a2[229];
v10 = &v9;
v5 = (double *)sub_10001AFAC(a1 + 1696, (int *)&v9, (__int64)&unk_10076367E, (_DWORD **)&v10);
GameObject::addToTempOffset(a2, -v5[3], -v5[4]);
LastPosition = (float32x2_t *)GameObject::getLastPosition(a2);
v7 = v5[3];
v8 = v5[4];
sub_1000262BC((float *)&v9, -v7, -v8);
sub_100026318(LastPosition, &v9, (float32x2_t *)&v10);
GameObject::setLastPosition(a2, &v10);
*(float32x2_t *)(a2 + 243) = vadd_f32(*(float32x2_t *)(a2 + 243), (float32x2_t)vdup_n_s32(0x42B40000u));
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)a2 + 1480LL))(a2, 0.0);
if ( (*(unsigned int (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 1800LL))(a2) == 25 )
GameObject::determineSlopeDirection(a2);
LODWORD(v10) = a2[229];
return sub_10001BB58((_QWORD *)(a1 + 1696), (int *)&v10);
}
return result;
}