//
// internal::band_matrix::lu_solve from 0xbb3510 to 0xbb36ac (412 bytes)
//
// 2 xrefs:
// > tk::spline::set_points @ 0xbb46cc
// > ??> @ 0x530b0
//
// 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 13:02:56 +0000
//
_QWORD *__usercall internal::band_matrix::lu_solve@(
internal::band_matrix *a1@,
_QWORD *a2@,
char a3@,
_QWORD *a4@)
{
__int64 v7; // x1
void *v9; // [xsp+30h] [xbp+30h] BYREF
char *v10; // [xsp+38h] [xbp+38h]
__int64 v11; // [xsp+40h] [xbp+40h]
__int64 v12[3]; // [xsp+48h] [xbp+48h] BYREF
void *v13; // [xsp+60h] [xbp+60h] BYREF
char *v14; // [xsp+68h] [xbp+68h]
__int64 v15; // [xsp+78h] [xbp+78h]
v9 = nullptr;
v10 = nullptr;
a4[1] = 0;
v7 = _stack_chk_guard;
a4[2] = 0;
v15 = v7;
*a4 = 0;
v11 = 0;
if ( !a3 )
internal::band_matrix::lu_decompose(a1);
internal::band_matrix::l_solve(a1, a2, v12);
if ( v9 )
{
if ( v9 != v10 )
v10 += 8 * ~((unsigned __int64)(v10 - 8 - (_BYTE *)v9) >> 3);
operator delete(v9);
}
v9 = (void *)v12[0];
v10 = (char *)v12[1];
v11 = v12[2];
internal::band_matrix::r_solve(a1, &v9, (__int64 *)&v13);
sub_BB2B24((__int64)a4, &v13);
if ( v13 )
{
if ( v14 != v13 )
v14 += 8 * ~((unsigned __int64)(v14 - 8 - (_BYTE *)v13) >> 3);
operator delete(v13);
}
if ( v9 )
{
if ( v9 != v10 )
v10 += 8 * ~((unsigned __int64)(v10 - 8 - (_BYTE *)v9) >> 3);
operator delete(v9);
}
return a4;
}