//
// sub_100687128 from 0x100687128 to 0x100687200 (216 bytes)
//
// 7 xrefs:
// > sub_10066E798 @ 0x10066ebc8
// > sub_10066E798 @ 0x10066eda8
// > sub_10066E798 @ 0x10066ee3c
// > sub_10068BFF0 @ 0x10068cbe4
// > sub_100693C98 @ 0x10069448c
// > sub_10069801C @ 0x100698080
// > sub_1006A0704 @ 0x1006a0834
//
// 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:11:25 +0000
//
__int64 __fastcall sub_100687128(_QWORD *a1, __int64 a2, __int64 a3)
{
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x8
__int64 v9; // x1
if ( (a1[252] & 0x8000000000000000LL) == 0 )
{
if ( a1[115] )
{
nullsub_1();
if ( v6 )
{
if ( a1[252] < a1[114] )
{
v7 = sub_10066F09C(a2, a3, a1[293], a1[294]);
v8 = a1[115];
v9 = 1000 * v8 - v7;
if ( v9 <= 0 )
{
sub_10067889C(
(__int64)a1,
"Operation too slow. Less than %ld bytes/sec transferred the last %ld seconds",
a1[114],
v8);
return 28;
}
goto LABEL_9;
}
}
}
}
a1[293] = a2;
a1[294] = a3;
if ( a1[114] )
{
v9 = 1000LL * a1[115];
LABEL_9:
sub_100695568(a1, v9);
}
return 0;
}