//
// sub_140069070 from 0x140069070 to 0x140069122 (178 bytes)
//
// 3 xrefs:
// > sub_140066310 @ 0x1400664b0
// > sub_1400683B0 @ 0x140068524
// > ??> @ 0x14091118c
//
// This function is hookable on this platform (idp: pc, 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:25:46 +0000
//
__int64 __fastcall sub_140069070(__int64 a1)
{
__int64 v1; // rdx
bool v3; // sf
unsigned __int64 v4; // rdx
unsigned __int64 v5; // rbx
float v6; // xmm0_4
float v7; // xmm0_4
unsigned __int64 v8; // rcx
unsigned __int64 v9; // rax
unsigned __int64 v10; // rcx
v1 = *(_QWORD *)(a1 + 16);
v3 = v1 + 1 < 0;
v4 = v1 + 1;
v5 = *(_QWORD *)(a1 + 56);
if ( v3 )
v6 = (float)(int)(v4 & 1 | (v4 >> 1)) + (float)(int)(v4 & 1 | (v4 >> 1));
else
v6 = (float)(int)v4;
v7 = ceilf(v6 / *(float *)a1);
v8 = 0;
if ( v7 >= 9.223372e18 )
{
v7 = v7 - 9.223372e18;
if ( v7 < 9.223372e18 )
v8 = 0x8000000000000000uLL;
}
v9 = v8 + (unsigned int)(int)v7;
v10 = 8;
if ( v9 > 8 )
v10 = v9;
if ( v5 < v10 )
{
if ( v5 >= 0x200 || (v5 *= 8LL, v5 < v10) )
v5 = v10;
}
return sub_14006A400(a1, v5);
}