//
// ArtistCell::onNewgrounds from 0x140151a40 to 0x140151b91 (337 bytes)
//
// 2 xrefs:
// > ArtistCell::loadFromObject @ 0x1401517e6
// > ??> @ 0x140917864
//
// 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 11:27:17 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall ArtistCell::onNewgrounds(__int64 a1)
{
__int64 v2; // rdi
unsigned __int64 v3; // r9
__int64 v4; // r8
unsigned __int64 v5; // rdx
void **v6; // rdx
void *v7; // rcx
_QWORD v8[3]; // [rsp+38h] [rbp-50h] BYREF
void *Block[2]; // [rsp+50h] [rbp-38h] BYREF
__m128i si128; // [rsp+60h] [rbp-28h]
if ( *(_QWORD *)(a1 + 560) )
{
v2 = cocos2d::CCApplication::sharedApplication(a1);
SongInfoObject::getArtistLinks(*(_QWORD *)(a1 + 560), v8);
v3 = 0;
v4 = v8[0];
v5 = (v8[1] - v8[0]) / 72LL;
if ( v5 )
{
while ( *(_DWORD *)(v4 + 4) != 2 )
{
++v3;
v4 += 72;
if ( v3 >= v5 )
goto LABEL_5;
}
sub_14003F4F0((__int64)Block, v4 + 40);
}
else
{
LABEL_5:
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
}
sub_1401226A0(v8);
v6 = Block;
if ( si128.m128i_i64[1] > 0xFuLL )
v6 = (void **)Block[0];
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v2 + 96LL))(v2, v6);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v7 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v7);
}
}
}