//
// GJBaseGameLayer::registerSpawnRemap from 0x1001135f0 to 0x10011370f (287 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::generateSpawnRemap @ 0x1000f383b
//
// 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 12:24:32 +0000
//
__int64 __fastcall GJBaseGameLayer::registerSpawnRemap(_QWORD *a1, __int64 a2)
{
unsigned __int64 v3; // rax
__int64 v4; // rax
_QWORD *v5; // rdi
_QWORD *v6; // r15
void *v7; // rdi
_DWORD *v8; // r15
_DWORD *v9; // r14
int v10; // r12d
float *v11; // rdi
void *v13[2]; // [rsp+0h] [rbp-60h] BYREF
void *__p[2]; // [rsp+10h] [rbp-50h]
int v15; // [rsp+20h] [rbp-40h]
*(_OWORD *)__p = 0;
*(_OWORD *)v13 = 0;
v15 = 1065353216;
v3 = a1[262];
if ( v3 >= a1[263] )
{
v4 = sub_100148440(a1 + 261, v13);
v5 = __p[0];
a1[262] = v4;
if ( v5 )
{
do
{
v6 = (_QWORD *)*v5;
operator delete(v5);
v5 = v6;
}
while ( v6 );
}
}
else
{
*(_OWORD *)v3 = 0;
v13[1] = nullptr;
*(_OWORD *)(v3 + 16) = 0;
*(_DWORD *)(v3 + 32) = 1065353216;
a1[262] = v3 + 40;
}
v7 = v13[0];
v13[0] = nullptr;
if ( v7 )
operator delete(v7);
v8 = *(_DWORD **)a2;
v9 = *(_DWORD **)(a2 + 8);
if ( *(_DWORD **)a2 != v9 )
{
do
{
v10 = v8[2];
v11 = (float *)(a1[262] - 40LL);
v13[0] = v8;
*((_DWORD *)sub_10001C2C0(v11, v8, (__m128)0LL, (__int64)&unk_100A04ED8, (_DWORD **)v13) + 5) = v10;
v8 += 4;
}
while ( v8 != v9 );
}
return -858993459 * (unsigned int)((a1[262] - a1[261]) >> 3) - 1;
}