//
// png_read_rows from 0x656ffc to 0x65707c (128 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall png_read_rows(int result, void **a2, void **a3, int a4)
{
int v4; // r7
int v6; // r3
void **v7; // r6
void **v8; // r4
_BOOL4 v9; // r2
int v10; // r5
int v11; // r5
void *v12; // r1
void *v13; // t1
void *v14; // t1
int v15; // r4
void *v16; // t1
void *v17; // t1
v4 = result;
if ( result )
{
v6 = (int)a2;
v7 = a3;
v8 = a2;
if ( a2 )
v6 = 1;
v9 = a3 != nullptr;
v10 = v6 & v9;
if ( (v6 & v9) != 0 )
{
if ( a4 )
{
v11 = 0;
do
{
++v11;
v13 = *v8++;
v12 = v13;
v14 = *v7++;
result = png_read_row(v4, v12, v14);
}
while ( v11 != a4 );
}
}
else if ( v6 )
{
if ( a4 )
{
do
{
++v10;
v17 = *v8++;
result = png_read_row(v4, v17, nullptr);
}
while ( v10 != a4 );
}
}
else if ( v9 && a4 )
{
v15 = 0;
do
{
++v15;
v16 = *v7++;
result = png_read_row(v4, nullptr, v16);
}
while ( v15 != a4 );
}
}
return result;
}