//
// NewsPopup::pageReferencesImage from 0xb8a7a0 to 0xb8a90c (364 bytes)
//
// 3 xrefs:
// > NewsPopup::newsImageFailed @ 0xb8c388
// > NewsPopup::newsImageDownloaded @ 0xb8cb40
// > ??> @ 0x53e78
//
// 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 13:02:33 +0000
//
__int64 __fastcall NewsPopup::pageReferencesImage(__int64 a1, signed int a2, __int64 a3)
{
__int64 v3; // x4
__int64 v4; // x3
__int64 result; // x0
__int64 v6; // x1
__int64 v7; // x20
int v8; // w3
unsigned __int8 *v9; // x19
int v11; // w21
__int64 v12; // x22
unsigned __int8 *v13; // x20
unsigned __int8 v14; // w1
unsigned __int8 *v15; // x0
int v16; // w3
size_t v17; // x2
__int64 v18; // x1
unsigned __int8 *v19; // x1
unsigned __int8 *v20; // x3
unsigned __int8 *v21; // x0
int v22; // t1
if ( a2 < 0 )
return 0;
v3 = *(_QWORD *)(a1 + 680);
v4 = *(_QWORD *)(a1 + 688);
result = 0;
if ( a2 < (int)(-858993459 * ((v4 - v3) >> 4)) )
{
v6 = v3 + 80LL * a2;
v7 = *(_QWORD *)(v6 + 56);
v8 = -1431655765 * ((*(_QWORD *)(v6 + 64) - v7) >> 5);
if ( v8 > 0 )
{
v9 = (unsigned __int8 *)(v7 + 33);
v11 = *(_BYTE *)a3 & 1;
v12 = *(_BYTE *)a3 >> 1;
v13 = (unsigned __int8 *)(v7 + 96LL * (unsigned int)(v8 - 1) + 129);
while ( 1 )
{
v14 = *(v9 - 1);
v15 = v9;
v16 = v14 & 1;
v17 = v14 >> 1;
if ( (v14 & 1) != 0 )
v17 = *(_QWORD *)(v9 + 7);
v18 = v12;
if ( v11 )
v18 = *(_QWORD *)(a3 + 8);
if ( v17 != v18 )
goto LABEL_5;
if ( v16 )
v15 = *(unsigned __int8 **)(v9 + 15);
v19 = (unsigned __int8 *)(a3 + 1);
if ( v11 )
v19 = *(unsigned __int8 **)(a3 + 16);
if ( v16 )
{
if ( !v17 || !memcmp(v15, v19, v17) )
return 1;
v9 += 96;
if ( v9 == v13 )
return 0;
}
else
{
if ( !v17 )
return 1;
if ( *v15 == *v19 )
{
v20 = v15 + 1;
v21 = &v15[v17];
do
{
++v19;
if ( v20 == v21 )
return 1;
v22 = *v20++;
}
while ( *v19 == v22 );
}
LABEL_5:
v9 += 96;
if ( v9 == v13 )
return 0;
}
}
}
}
return result;
}