//
// png_formatted_warning from 0x860fa8 to 0x861082 (218 bytes)
//
// 1 xrefs:
// > sub_873E7C @ 0x873f56
//
// 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 12:02:43 +0000
//
int __fastcall png_formatted_warning(int a1, int a2, unsigned __int8 *a3)
{
unsigned int v3; // r4
char *v4; // r5
int v5; // r3
_BOOL4 v6; // r5
int v7; // lr
int v8; // r3
unsigned int v10; // r3
unsigned int v11; // lr
char *v12; // r7
char v13; // r5
int v14; // t1
bool v15; // cc
char v16[196]; // [sp+0h] [bp-C4h] BYREF
v3 = 0;
do
{
v5 = *a3;
if ( !*a3 )
break;
v6 = v5 == 64;
if ( !a2 )
v6 = 0;
if ( v6 )
{
v5 = a3[1];
if ( a3[1] )
{
switch ( v5 )
{
case '1':
v7 = 32;
v8 = 0;
goto LABEL_22;
case '2':
v7 = 64;
v8 = 32;
goto LABEL_22;
case '3':
v7 = 96;
v8 = 64;
goto LABEL_22;
case '4':
v7 = 128;
v8 = 96;
goto LABEL_22;
case '5':
v7 = 160;
v8 = 128;
goto LABEL_22;
case '6':
v7 = 192;
v8 = 160;
goto LABEL_22;
case '7':
v7 = 224;
v8 = 192;
LABEL_22:
v10 = v8 - 1 + a2;
v11 = v7 + a2;
v12 = &v16[v3 - 1];
do
{
v14 = *(unsigned __int8 *)++v10;
v13 = v14;
v15 = v14 != 0;
if ( v14 )
v15 = v11 > v10;
if ( !v15 )
break;
++v3;
*++v12 = v13;
}
while ( v3 != 191 );
a3 += 2;
continue;
case '8':
v7 = 256;
v8 = 224;
goto LABEL_22;
}
++a3;
}
else
{
LOBYTE(v5) = 64;
}
}
++a3;
v4 = &v16[v3++ + 192];
*(v4 - 192) = v5;
}
while ( v3 <= 0xBE );
v16[v3] = 0;
return png_warning(a1, v16);
}