Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save madordie/d37d90cb443afcf51e660b0293931843 to your computer and use it in GitHub Desktop.
Save madordie/d37d90cb443afcf51e660b0293931843 to your computer and use it in GitHub Desktop.
[iOS17.0][ARM64] -[NSISEngine _optimizeWithoutRebuilding]
__int64 __fastcall -[NSISEngine _optimizeWithoutRebuilding](__int64 a1, __int64 a2)
{
__int64 v2; // x20
__int64 v3; // x19
__int64 v4; // x0
const char *v5; // x1
unsigned __int64 v6; // x26
__int64 v7; // x21
int v8; // w8
int v9; // w10
const char *v10; // x1
__int64 v11; // x24
int v12; // w9
bool v13; // cf
void *v14; // x0
const char *v15; // x1
void *v17; // x0
const char *v18; // x1
void *v19; // x0
const char *v20; // x1
__int64 v21; // [xsp+0h] [xbp-60h]
__int64 v22; // [xsp+8h] [xbp-58h]
v2 = a2;
v3 = a1;
v4 = *(_QWORD *)(a1 + 120);
if ( v4 )
{
v21 = 0LL;
v22 = 0LL;
_NSISRecordOperation(v4, a2);
}
_AssertAutoLayoutOnAllowedThreadsOnly(v3, (const char *)a2);
if ( *(_BYTE *)(v3 + 160) )
{
v17 = objc_msgSend_currentHandler(off_50000, v5, v21, v22);
objc_msgSend_handleFailureInMethod_object_file_lineNumber_description_(
v17,
v18,
v2,
v3,
&stru_46110,
1717LL,
&stru_462B0);
}
v6 = 0LL;
v7 = 0LL;
v8 = *(_DWORD *)(v3 + 148);
v9 = *(_DWORD *)(v3 + 152);
while ( v9 != v8 )
{
*(_BYTE *)(v3 + 158) = 0;
*(_BYTE *)(v3 + 160) = 1;
-[NSISEngine fixUpValueRestrictionViolationsWithInfeasibilityHandlingBehavior:](v3, 0LL);
v11 = _minimizeConstantInObjectiveRow(v3, *(_QWORD *)(v3 + 400), *(_QWORD *)(v3 + 408));
if ( *(_BYTE *)(v3 + 158) )
{
v14 = objc_msgSend_currentHandler(off_50000, v10, v21, v22);
objc_msgSend_handleFailureInMethod_object_file_lineNumber_description_(
v14,
v15,
v2,
v3,
&stru_46110,
1740LL,
&stru_462D0);
v12 = *(unsigned __int8 *)(v3 + 158);
}
else
{
v12 = 0;
}
v7 += v11;
v8 = *(_DWORD *)(v3 + 148);
*(_DWORD *)(v3 + 152) = v8;
*(_BYTE *)(v3 + 160) = 0;
if ( v12 )
{
v9 = v8;
v13 = v6++ >= 0x1D;
if ( !v13 )
continue;
}
if ( v12 )
{
v19 = objc_msgSend_currentHandler(off_50000, v10, v21, v22);
objc_msgSend_handleFailureInMethod_object_file_lineNumber_description_(
v19,
v20,
v2,
v3,
&stru_46110,
1753LL,
&stru_462F0);
}
return v7;
}
return v7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment