//
// sub_C03448 from 0xc03448 to 0xc034f4 (172 bytes)
//
// 1 xrefs:
// > jinit_downsampler @ 0xc036cc
//
// 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
//
__int64 __fastcall sub_C03448(__int64 a1, __int64 a2, int a3, __int64 a4)
{
int v7; // w19
int v8; // w0
unsigned int v9; // w23
int v10; // w22
__int64 result; // x0
__int64 v12; // x19
size_t v13; // x20
__int64 v14; // x0
jcopy_sample_rows(a3, 0, a4, 0, *(_DWORD *)(a1 + 356), *(unsigned int *)(a1 + 48));
v7 = *(_DWORD *)(a2 + 36);
v8 = *(_DWORD *)(a2 + 28);
v9 = *(_DWORD *)(a1 + 48);
v10 = *(_DWORD *)(a1 + 356);
result = v7 * v8 - v9;
if ( (int)result > 0 && v10 > 0 )
{
v12 = 0;
v13 = (int)result - 1 + 1LL;
do
{
v14 = *(_QWORD *)(a4 + 8 * v12++);
result = (__int64)memset((void *)(v14 + v9), *(unsigned __int8 *)(v14 + v9 - 1), v13);
}
while ( v10 > (int)v12 );
}
return result;
}