//
// tk::spline::deriv from 0x6dae00 to 0x6daf0e (270 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 11:57:10 +0000
//
__int64 __fastcall tk::spline::deriv(tk::spline *this, int a2, double a3)
{
int v6; // r5
int v7; // r7
unsigned int v8; // r0
double v9; // d6
double v10; // d7
double *v11; // r3
double v12; // d5
unsigned int v13; // r3
double v14; // d5
double v15; // d7
double v16; // d7
v6 = *((_DWORD *)this + 1);
v7 = *(_DWORD *)this;
v8 = 8 * tk::spline::find_closest((double **)this, a3);
v9 = a3 - *(double *)(*(_DWORD *)this + v8);
if ( a3 < *(double *)*(_DWORD *)this )
{
if ( a2 != 1 )
{
if ( a2 == 2 )
{
v10 = *((double *)this + 8);
LABEL_13:
v16 = v10 + v10;
return *(_QWORD *)&v16;
}
goto LABEL_20;
}
v11 = *((double **)this + 6);
v12 = *((double *)this + 8) + *((double *)this + 8);
LABEL_11:
v15 = *v11;
goto LABEL_12;
}
v13 = ((v6 - v7) & 0xFFFFFFF8) - 8;
if ( a3 > *(double *)(*(_DWORD *)this + v13) )
{
if ( a2 != 1 )
{
if ( a2 == 2 )
{
v10 = *(double *)(v13 + *((_DWORD *)this + 9));
goto LABEL_13;
}
LABEL_20:
v16 = 0.0;
return *(_QWORD *)&v16;
}
v14 = *(double *)(*((_DWORD *)this + 9) + v13);
v11 = (double *)(v13 + *((_DWORD *)this + 6));
v12 = v14 + v14;
goto LABEL_11;
}
switch ( a2 )
{
case 2:
v12 = *(double *)(*((_DWORD *)this + 12) + v8) * 6.0;
v15 = *(double *)(v8 + *((_DWORD *)this + 9)) + *(double *)(v8 + *((_DWORD *)this + 9));
break;
case 3:
v16 = *(double *)(v8 + *((_DWORD *)this + 12)) * 6.0;
return *(_QWORD *)&v16;
case 1:
v12 = *(double *)(*((_DWORD *)this + 9) + v8)
+ *(double *)(*((_DWORD *)this + 9) + v8)
+ *(double *)(*((_DWORD *)this + 12) + v8) * 3.0 * v9;
v15 = *(double *)(v8 + *((_DWORD *)this + 6));
break;
default:
goto LABEL_20;
}
LABEL_12:
v16 = v15 + v12 * v9;
return *(_QWORD *)&v16;
}