//
// sub_EBFC70 from 0xebfc70 to 0xebfd70 (256 bytes)
//
// 2 xrefs:
// > TIFFRGBAImageBegin @ 0xec8a8c
// > TIFFRGBAImageBegin @ 0xec8a94
//
// 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:11:32 +0000
//
_DWORD *__fastcall sub_EBFC70(
_DWORD *result,
_DWORD *a2,
__int64 a3,
__int64 a4,
unsigned int a5,
int a6,
int a7,
int a8,
unsigned __int8 *a9)
{
int v10; // w10
__int64 v11; // x8
int v12; // w9
__int64 v13; // x7
__int64 v14; // x11
unsigned __int8 *v15; // x6
_DWORD *v16; // x0
unsigned int v17; // t1
_DWORD *v18; // x2
_DWORD *v19; // x2
v10 = a7 / 4;
v11 = *((_QWORD *)result + 11);
v12 = a6 - 1;
if ( a6 )
{
v13 = 4LL * a8;
v14 = ((a5 - 4) >> 2) + 1LL;
do
{
if ( a5 <= 3 )
{
result = (_DWORD *)a5;
v15 = a9;
}
else
{
v15 = &a9[v14];
v16 = a2;
do
{
v17 = *a9++;
v16 += 4;
v18 = *(_DWORD **)(v11 + 8LL * v17);
*(v16 - 4) = *v18;
*(v16 - 3) = v18[1];
*(v16 - 2) = v18[2];
*(v16 - 1) = v18[3];
}
while ( a9 != v15 );
a2 += 4 * v14;
result = (_DWORD *)(a5 & 3);
}
if ( !(_DWORD)result )
goto LABEL_13;
v19 = *(_DWORD **)(v11 + 8LL * *v15);
if ( (_DWORD)result != 2 )
{
if ( (_DWORD)result != 3 )
{
result = a2;
goto LABEL_12;
}
*a2++ = *v19++;
}
result = a2 + 1;
*a2 = *v19++;
LABEL_12:
++v15;
a2 = result + 1;
*result = *v19;
LABEL_13:
--v12;
a2 = (_DWORD *)((char *)a2 + v13);
a9 = &v15[v10];
}
while ( v12 != -1 );
}
return result;
}