//
// sub_9192F8 from 0x9192f8 to 0x91985e (1382 bytes)
//
// 0 xrefs:
//
// 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:04:36 +0000
//
void *__fastcall sub_9192F8(char *a1, int a2, int a3)
{
int v6; // r3
int v7; // r7
int v8; // r0
int v9; // r1
int v10; // r2
int v11; // r5
int v12; // r6
int v13; // r0
uint8x8_t *v14; // r3
uint16x8_t v15; // q9
uint32x4_t v16; // q8
uint32x4_t v17; // q9
int32x2_t v18; // d16
uint16x8_t v19; // q9
uint32x4_t v20; // q10
uint32x4_t v21; // q9
int v22; // r2
int v23; // r1
int v24; // r7
int v25; // r3
int v26; // r2
int v27; // r3
int v28; // r1
int v29; // r2
int v30; // r5
int v31; // r6
int v32; // r0
uint8x8_t *v33; // r3
uint16x8_t v34; // q9
uint32x4_t v35; // q8
uint32x4_t v36; // q9
int32x2_t v37; // d16
uint16x8_t v38; // q9
uint32x4_t v39; // q10
uint32x4_t v40; // q9
int v41; // r2
int v42; // r1
int v43; // r7
int v44; // r3
int v45; // r2
int v46; // r7
char *v47; // r5
char *v48; // r6
char *v49; // r0
char *v50; // r6
int v51; // r1
int v52; // r2
int v53; // r3
char *v54; // r10
unsigned __int8 *v55; // r7
char *v56; // r5
unsigned __int8 *v57; // r6
char *v58; // r0
int v59; // t1
char *v60; // r5
char *v61; // r5
char *v62; // r8
int v63; // r1
void *result; // r0
int v65; // t1
char *v66; // r3
void *v67; // r0
void *v68; // r0
int v69; // t1
char *v70; // r5
char *v71; // r0
char *v72; // r3
char *v73; // r5
int v74; // r1
int v75; // r2
void *v76; // r0
int v77; // r3
int v78; // r5
int v79; // r0
int v80; // r2
int v81; // r1
int v82; // r7
int v83; // r6
int v84; // r0
uint8x8_t *v85; // r3
uint16x8_t v86; // q9
uint32x4_t v87; // q8
uint32x4_t v88; // q9
int32x2_t v89; // d16
uint16x8_t v90; // q9
uint32x4_t v91; // q10
uint32x4_t v92; // q9
int v93; // r2
int v94; // r1
int v95; // r3
int v96; // r0
int v97; // r2
if ( a3 )
{
v6 = -a3 & 7;
if ( v6 )
{
v7 = *(unsigned __int8 *)a3;
if ( v6 == 1 )
{
v9 = 15;
v10 = 1;
}
else
{
v7 += *(unsigned __int8 *)(a3 + 1);
if ( v6 == 2 )
{
v9 = 14;
v10 = 2;
}
else
{
v7 += *(unsigned __int8 *)(a3 + 2);
if ( v6 == 3 )
{
v9 = 13;
v10 = 3;
}
else
{
v7 += *(unsigned __int8 *)(a3 + 3);
if ( v6 == 4 )
{
v9 = 12;
v10 = 4;
}
else
{
v7 += *(unsigned __int8 *)(a3 + 4);
if ( v6 == 5 )
{
v9 = 11;
v10 = 5;
}
else
{
v7 += *(unsigned __int8 *)(a3 + 5);
if ( v6 == 7 )
{
v8 = *(unsigned __int8 *)(a3 + 6);
v9 = 9;
v10 = 7;
v7 += v8;
}
else
{
v9 = 10;
v10 = 6;
}
}
}
}
}
}
v11 = 16 - v6;
v12 = 1;
v13 = 8;
}
else
{
v9 = 16;
v10 = 0;
v11 = 16;
v13 = 16;
v7 = 0;
v12 = 2;
}
v14 = (uint8x8_t *)(v6 + a3);
v15 = vmovl_u8((uint8x8_t)v14->n64_u64[0]);
v16 = vmovl_u16((uint16x4_t)v15.n128_u64[0]);
v17 = vmovl_u16(*(uint16x4_t *)&v15.n128_i8[8]);
v18.n64_u64[0] = vadd_s32(
vadd_s32(
vadd_s32(*(int32x2_t *)&v16.n128_i8[8], (int32x2_t)v16.n128_u64[0]),
(int32x2_t)v17.n128_u64[0]),
*(int32x2_t *)&v17.n128_i8[8]).n64_u64[0];
if ( v12 == 2 )
{
v19 = vmovl_u8(v14[1]);
v20 = vmovl_u16((uint16x4_t)v19.n128_u64[0]);
v21 = vmovl_u16(*(uint16x4_t *)&v19.n128_i8[8]);
v18.n64_u64[0] = vadd_s32(
vadd_s32(
vadd_s32(vadd_s32(v18, (int32x2_t)v20.n128_u64[0]), *(int32x2_t *)&v20.n128_i8[8]),
(int32x2_t)v21.n128_u64[0]),
*(int32x2_t *)&v21.n128_i8[8]).n64_u64[0];
}
v22 = v10 + v13;
v23 = v9 - v13;
v24 = v7 + vpadd_s32(v18, v18).n64_u32[0];
if ( v13 != v11 )
{
v24 += *(unsigned __int8 *)(a3 + v22);
if ( v23 != 1 )
{
v24 += *(unsigned __int8 *)(a3 + v22 + 1);
if ( v23 != 2 )
{
v24 += *(unsigned __int8 *)(a3 + v22 + 2);
if ( v23 != 3 )
{
v24 += *(unsigned __int8 *)(a3 + v22 + 3);
if ( v23 != 4 )
{
v25 = v22 + 5;
v24 += *(unsigned __int8 *)(a3 + v22 + 4);
if ( v23 != 5 )
{
v26 = v22 + 6;
v24 += *(unsigned __int8 *)(a3 + v25);
if ( v23 != 6 )
v24 += *(unsigned __int8 *)(a3 + v26);
}
}
}
}
}
}
if ( a2 )
{
v27 = -a2 & 7;
if ( v27 )
{
v24 += *(unsigned __int8 *)a2;
if ( v27 == 1 )
{
v28 = 15;
v29 = 1;
}
else
{
v24 += *(unsigned __int8 *)(a2 + 1);
if ( v27 == 2 )
{
v28 = 14;
v29 = 2;
}
else
{
v24 += *(unsigned __int8 *)(a2 + 2);
if ( v27 == 3 )
{
v28 = 13;
v29 = 3;
}
else
{
v24 += *(unsigned __int8 *)(a2 + 3);
if ( v27 == 4 )
{
v28 = 12;
v29 = 4;
}
else
{
v24 += *(unsigned __int8 *)(a2 + 4);
if ( v27 == 5 )
{
v28 = 11;
v29 = 5;
}
else
{
v24 += *(unsigned __int8 *)(a2 + 5);
if ( v27 == 7 )
{
v28 = 9;
v29 = 7;
v24 += *(unsigned __int8 *)(a2 + 6);
}
else
{
v28 = 10;
v29 = 6;
}
}
}
}
}
}
v30 = 16 - v27;
v31 = 1;
v32 = 8;
}
else
{
v28 = 16;
v29 = 0;
v30 = 16;
v32 = 16;
v31 = 2;
}
v33 = (uint8x8_t *)(v27 + a2);
v34 = vmovl_u8((uint8x8_t)v33->n64_u64[0]);
v35 = vmovl_u16((uint16x4_t)v34.n128_u64[0]);
v36 = vmovl_u16(*(uint16x4_t *)&v34.n128_i8[8]);
v37.n64_u64[0] = vadd_s32(
vadd_s32(
vadd_s32(*(int32x2_t *)&v35.n128_i8[8], (int32x2_t)v35.n128_u64[0]),
(int32x2_t)v36.n128_u64[0]),
*(int32x2_t *)&v36.n128_i8[8]).n64_u64[0];
if ( v31 == 2 )
{
v38 = vmovl_u8(v33[1]);
v39 = vmovl_u16((uint16x4_t)v38.n128_u64[0]);
v40 = vmovl_u16(*(uint16x4_t *)&v38.n128_i8[8]);
v37.n64_u64[0] = vadd_s32(
vadd_s32(
vadd_s32(vadd_s32(v37, (int32x2_t)v39.n128_u64[0]), *(int32x2_t *)&v39.n128_i8[8]),
(int32x2_t)v40.n128_u64[0]),
*(int32x2_t *)&v40.n128_i8[8]).n64_u64[0];
}
v41 = v29 + v32;
v42 = v28 - v32;
v43 = v24 + vpadd_s32(v37, v37).n64_u32[0];
if ( v32 != v30 )
{
v43 += *(unsigned __int8 *)(a2 + v41);
if ( v42 != 1 )
{
v43 += *(unsigned __int8 *)(a2 + v41 + 1);
if ( v42 != 2 )
{
v43 += *(unsigned __int8 *)(a2 + v41 + 2);
if ( v42 != 3 )
{
v43 += *(unsigned __int8 *)(a2 + v41 + 3);
if ( v42 != 4 )
{
v44 = v41 + 5;
v43 += *(unsigned __int8 *)(a2 + v41 + 4);
if ( v42 != 5 )
{
v45 = v41 + 6;
v43 += *(unsigned __int8 *)(a2 + v44);
if ( v42 != 6 )
v43 += *(unsigned __int8 *)(a2 + v45);
}
}
}
}
}
}
}
else
{
v43 = 2 * v24;
}
v46 = (v43 + 16) >> 5;
}
else
{
v46 = 128;
if ( a2 )
{
v77 = -a2 & 7;
if ( v77 )
{
v78 = *(unsigned __int8 *)a2;
if ( v77 == 1 )
{
v81 = 15;
v80 = 1;
}
else
{
v78 += *(unsigned __int8 *)(a2 + 1);
if ( v77 == 2 )
{
v81 = 14;
v80 = 2;
}
else
{
v78 += *(unsigned __int8 *)(a2 + 2);
if ( v77 == 3 )
{
v81 = 13;
v80 = 3;
}
else
{
v78 += *(unsigned __int8 *)(a2 + 3);
if ( v77 == 4 )
{
v81 = 12;
v80 = 4;
}
else
{
v78 += *(unsigned __int8 *)(a2 + 4);
if ( v77 == 5 )
{
v81 = 11;
v80 = 5;
}
else
{
v78 += *(unsigned __int8 *)(a2 + 5);
if ( v77 == 7 )
{
v79 = *(unsigned __int8 *)(a2 + 6);
v80 = 7;
v81 = 9;
v78 += v79;
}
else
{
v81 = 10;
v80 = 6;
}
}
}
}
}
}
v82 = 16 - v77;
v83 = 8;
v84 = 1;
}
else
{
v83 = 16;
v84 = 2;
v82 = 16;
v81 = 16;
v78 = 0;
v80 = 0;
}
v85 = (uint8x8_t *)(v77 + a2);
v86 = vmovl_u8((uint8x8_t)v85->n64_u64[0]);
v87 = vmovl_u16((uint16x4_t)v86.n128_u64[0]);
v88 = vmovl_u16(*(uint16x4_t *)&v86.n128_i8[8]);
v89.n64_u64[0] = vadd_s32(
vadd_s32(
vadd_s32(*(int32x2_t *)&v87.n128_i8[8], (int32x2_t)v87.n128_u64[0]),
(int32x2_t)v88.n128_u64[0]),
*(int32x2_t *)&v88.n128_i8[8]).n64_u64[0];
if ( v84 == 2 )
{
v90 = vmovl_u8(v85[1]);
v91 = vmovl_u16((uint16x4_t)v90.n128_u64[0]);
v92 = vmovl_u16(*(uint16x4_t *)&v90.n128_i8[8]);
v89.n64_u64[0] = vadd_s32(
vadd_s32(
vadd_s32(vadd_s32(v89, (int32x2_t)v91.n128_u64[0]), *(int32x2_t *)&v91.n128_i8[8]),
(int32x2_t)v92.n128_u64[0]),
*(int32x2_t *)&v92.n128_i8[8]).n64_u64[0];
}
v93 = v80 + v83;
v94 = v81 - v83;
v95 = vpadd_s32(v89, v89).n64_u32[0] + v78;
if ( v82 != v83 )
{
v95 += *(unsigned __int8 *)(a2 + v93);
if ( v94 != 1 )
{
v95 += *(unsigned __int8 *)(a2 + v93 + 1);
if ( v94 != 2 )
{
v95 += *(unsigned __int8 *)(a2 + v93 + 2);
if ( v94 != 3 )
{
v95 += *(unsigned __int8 *)(a2 + v93 + 3);
if ( v94 != 4 )
{
v96 = v93 + 5;
v95 += *(unsigned __int8 *)(a2 + v93 + 4);
if ( v94 != 5 )
{
v97 = v93 + 6;
v95 += *(unsigned __int8 *)(a2 + v96);
if ( v94 != 6 )
v95 += *(unsigned __int8 *)(a2 + v97);
}
}
}
}
}
}
v46 = (2 * v95 + 16) >> 5;
}
}
v47 = a1 + 512;
v48 = a1;
do
{
v49 = v48;
v48 += 32;
memset(v49, v46, 0x10u);
}
while ( v48 != v47 );
v50 = a1 + 1024;
if ( a3 )
{
do
{
v47 += 32;
v51 = *(_DWORD *)(a3 + 4);
v52 = *(_DWORD *)(a3 + 8);
v53 = *(_DWORD *)(a3 + 12);
*((_DWORD *)v47 - 8) = *(_DWORD *)a3;
*((_DWORD *)v47 - 7) = v51;
*((_DWORD *)v47 - 6) = v52;
*((_DWORD *)v47 - 5) = v53;
}
while ( v47 != v50 );
}
else
{
do
{
v67 = v47;
v47 += 32;
memset(v67, 127, 0x10u);
}
while ( v47 != v50 );
}
v54 = a1 + 528;
if ( a2 )
{
v55 = (unsigned __int8 *)(a2 - 1);
v56 = a1 + 528;
v57 = (unsigned __int8 *)(a2 - 1);
do
{
v58 = v56;
v59 = *++v57;
v56 += 32;
memset(v58, v59, 0x10u);
}
while ( v56 != a1 + 1040 );
v60 = a1 + 16;
if ( a3 )
{
v61 = a1 + 48;
v62 = a1 + 560;
v63 = 255 - *(unsigned __int8 *)(a2 - 1);
result = &unk_D31828;
do
{
v65 = *++v55;
v61 += 32;
v66 = (char *)&unk_D31828 + v65 + v63;
*(v61 - 64) = v66[*(unsigned __int8 *)a3];
*(v61 - 63) = v66[*(unsigned __int8 *)(a3 + 1)];
*(v61 - 62) = v66[*(unsigned __int8 *)(a3 + 2)];
*(v61 - 61) = v66[*(unsigned __int8 *)(a3 + 3)];
*(v61 - 60) = v66[*(unsigned __int8 *)(a3 + 4)];
*(v61 - 59) = v66[*(unsigned __int8 *)(a3 + 5)];
*(v61 - 58) = v66[*(unsigned __int8 *)(a3 + 6)];
*(v61 - 57) = v66[*(unsigned __int8 *)(a3 + 7)];
*(v61 - 56) = v66[*(unsigned __int8 *)(a3 + 8)];
*(v61 - 55) = v66[*(unsigned __int8 *)(a3 + 9)];
*(v61 - 54) = v66[*(unsigned __int8 *)(a3 + 10)];
*(v61 - 53) = v66[*(unsigned __int8 *)(a3 + 11)];
*(v61 - 52) = v66[*(unsigned __int8 *)(a3 + 12)];
*(v61 - 51) = v66[*(unsigned __int8 *)(a3 + 13)];
*(v61 - 50) = v66[*(unsigned __int8 *)(a3 + 14)];
*(v61 - 49) = v66[*(unsigned __int8 *)(a3 + 15)];
}
while ( v61 != v62 );
}
else
{
do
{
v68 = v60;
v69 = *++v55;
v60 += 32;
result = memset(v68, v69, 0x10u);
}
while ( v60 != v54 );
}
}
else
{
v70 = a1 + 528;
do
{
v71 = v70;
v70 += 32;
memset(v71, 129, 0x10u);
}
while ( v70 != a1 + 1040 );
v72 = a1 + 16;
v73 = a1 + 16;
if ( a3 )
{
do
{
v72 += 32;
result = *(void **)(a3 + 4);
v74 = *(_DWORD *)(a3 + 8);
v75 = *(_DWORD *)(a3 + 12);
*((_DWORD *)v72 - 8) = *(_DWORD *)a3;
*((_DWORD *)v72 - 7) = result;
*((_DWORD *)v72 - 6) = v74;
*((_DWORD *)v72 - 5) = v75;
}
while ( v72 != v54 );
}
else
{
do
{
v76 = v73;
v73 += 32;
result = memset(v76, 129, 0x10u);
}
while ( v73 != v54 );
}
}
return result;
}