//
// std::__ndk1::get_temporary_buffer from 0x76b124 to 0x76b15a (54 bytes)
//
// 2 xrefs:
// > DeathMarkerLayer::init @ 0x76d164
// > DeathMarkerLayer::init @ 0x76d1bc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:11 +0000
//
_DWORD *__fastcall std::get_temporary_buffer(_DWORD *a1, int a2)
{
int v2; // r4
int v4; // r0
v2 = 0x1FFFFFFF;
*a1 = 0;
if ( a2 <= 0x1FFFFFFF )
v2 = a2;
a1[1] = 0;
while ( v2 > 0 )
{
v4 = operator new(4 * v2, (const std::nothrow_t *)&std::nothrow);
*a1 = v4;
if ( v4 )
{
a1[1] = v2;
return a1;
}
v2 >>= 1;
}
return a1;
}