//
// sub_100145318 from 0x100145318 to 0x100145348 (48 bytes)
//
// 13 xrefs:
// > PlayLayer::createObjectsFromSetupFinished @ 0x1001452b0
// > sub_1001D5FE4 @ 0x1001d60d8
// > GJBaseGameLayer::init @ 0x1002752ec
// > GJBaseGameLayer::init @ 0x1002752f8
// > GJBaseGameLayer::addToSection @ 0x10028f8f8
// > GJBaseGameLayer::addToSection @ 0x10028fabc
// > GJBaseGameLayer::addToSection @ 0x10028fc20
// > sub_1002A744C @ 0x1002a749c
// > sub_1003AEB28 @ 0x1003aeb48
// > LevelEditorLayer::init @ 0x1003f69b4
// > sub_10040E168 @ 0x10040e248
// > sub_1005066FC @ 0x100506bf4
// > sub_100526440 @ 0x100526488
//
// 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 10:59:33 +0000
//
_QWORD *__fastcall sub_100145318(_QWORD *result, unsigned __int64 a2)
{
unsigned __int64 v2; // x9
v2 = (__int64)(result[1] - *result) >> 2;
if ( a2 > v2 )
return (_QWORD *)sub_100151964();
if ( a2 < v2 )
result[1] = *result + 4 * a2;
return result;
}