//
// sub_10010D050 from 0x10010d050 to 0x10010d179 (297 bytes)
//
// 7 xrefs:
// > LevelEditorLayer::didRotateGameplay @ 0x1000f1c6e
// > LevelEditorLayer::addTouchPoint @ 0x1000f1cd6
// > LevelEditorLayer::postUpdate @ 0x1000f34ea
// > LevelEditorLayer::postUpdate @ 0x1000f3632
// > LevelEditorLayer::addPlayerPoint @ 0x1000f36e6
// > LevelEditorLayer::addPlayer2Point @ 0x1000f389a
// > DS_Dictionary::getVec2ArrayForKey @ 0x10017e496
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
char *__fastcall sub_10010D050(char **a1, double a2)
{
__int64 v2; // r15
__int64 v3; // rdi
unsigned __int64 v4; // r14
char *v5; // rax
char *v6; // r15
char *v7; // r12
char *v8; // rbx
__int64 v9; // rax
char *v10; // r13
char **v11; // rcx
char *v12; // r15
char *v14; // [rsp+0h] [rbp-40h]
char *v16; // [rsp+10h] [rbp-30h]
v2 = (a1[1] - *a1) >> 3;
if ( (unsigned __int64)(v2 + 1) >> 61 )
sub_100105AE0();
v3 = a1[2] - *a1;
v4 = v3 >> 2;
if ( v3 >> 2 <= (unsigned __int64)(v2 + 1) )
v4 = v2 + 1;
if ( (unsigned __int64)v3 >= 0x7FFFFFFFFFFFFFF8LL )
v4 = 0x1FFFFFFFFFFFFFFFLL;
if ( v4 )
{
if ( v4 > 0x1FFFFFFFFFFFFFFFLL )
sub_100054850();
v5 = (char *)operator new(8 * v4);
}
else
{
v5 = nullptr;
}
v16 = v5;
v6 = &v5[8 * v2];
sub_10028CC60(v6);
v7 = *a1;
v8 = a1[1];
v9 = *a1 - v8;
v10 = &v6[v9];
if ( *a1 == v8 )
{
v11 = a1;
}
else
{
v14 = &v6[v9];
do
{
sub_10028CC60(v10);
v7 += 8;
v10 += 8;
}
while ( v7 != v8 );
v11 = a1;
v7 = *a1;
v10 = v14;
}
v12 = v6 + 8;
*v11 = v10;
v11[1] = v12;
v11[2] = &v16[8 * v4];
if ( v7 )
operator delete(v7);
return v12;
}