//
// sub_100730AD0 from 0x100730ad0 to 0x100730cbc (492 bytes)
//
// 1 xrefs:
// > sub_10073091C @ 0x100730984
//
// 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 11:13:12 +0000
//
__int64 __fastcall sub_100730AD0(__int64 *a1, __int64 a2, char *__s, int a4)
{
int v4; // w23
__int16 v8; // w2
int v9; // w4
__int64 v11; // x20
__int64 *v12; // x0
int v13; // w24
__int64 v14; // x25
_QWORD *v15; // x24
v4 = a4;
if ( !a1 || !a2 || !__s )
{
v8 = 107;
v9 = 190;
goto LABEL_9;
}
if ( a4 == -1 )
v4 = strlen(__s);
if ( v4 >= 65 )
{
v8 = 132;
v9 = 196;
LABEL_9:
sub_100706FB0(34, 126, v8, (__int64)"v3_sxnet.c", v9);
return 0;
}
v11 = *a1;
if ( !*a1 )
{
v12 = (__int64 *)sub_10071B748((__int64)&unk_1009C4020);
v11 = (__int64)v12;
if ( v12 )
{
if ( (unsigned int)sub_100716020(*v12, 0) )
{
*a1 = v11;
goto LABEL_14;
}
}
else
{
v11 = 0;
}
LABEL_28:
v15 = nullptr;
goto LABEL_29;
}
LABEL_14:
if ( (int)sub_100704BB4(*(unsigned int **)(v11 + 8)) > 0 )
{
v13 = 0;
while ( 1 )
{
v14 = sub_100704BC8(*(_QWORD *)(v11 + 8), v13);
if ( !(unsigned int)sub_100721D20(*(const void ***)v14, a2) )
break;
if ( ++v13 >= (int)sub_100704BB4(*(unsigned int **)(v11 + 8)) )
goto LABEL_21;
}
if ( *(_QWORD *)(v14 + 8) )
{
v8 = 133;
v9 = 208;
goto LABEL_9;
}
}
LABEL_21:
v15 = (_QWORD *)sub_10071B748((__int64)&unk_1009C4110);
if ( !v15 )
goto LABEL_28;
if ( v4 == -1 )
v4 = strlen(__s);
if ( (unsigned int)sub_1007219B8(v15[1], __s, v4) && (unsigned int)sub_100704974(*(void ***)(v11 + 8), (__int64)v15) )
{
*v15 = a2;
return 1;
}
LABEL_29:
sub_100706FB0(34, 126, 65, (__int64)"v3_sxnet.c", 225);
sub_10071BCFC((__int64)v15, (__int64)&unk_1009C4110);
sub_10071BCFC(v11, (__int64)&unk_1009C4020);
*a1 = 0;
return 0;
}