// File: /workspace/github_c_makefile_star2_O3/jeff-1amstudios[P]carmageddon-1-cheat-code-disassembly/src/test/framework/unity.c
// Function: UnityAssertEqualIntArray
void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
                              UNITY_INTERNAL_PTR actual,
                              const UNITY_UINT32 num_elements,
                              const char* msg,
                              const UNITY_LINE_TYPE lineNumber,
                              const UNITY_DISPLAY_STYLE_T style,
                              const UNITY_FLAGS_T flags)
{
    UNITY_UINT32 elements = num_elements;
    unsigned int length   = style & 0xF;

    RETURN_IF_FAIL_OR_IGNORE;

    if (num_elements == 0)
    {
        UnityPrintPointlessAndBail();
    }

    if (expected == actual)
    {
        return; /* Both are NULL or same pointer */
    }

    if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
    {
        UNITY_FAIL_AND_BAIL;
    }

    while ((elements > 0) && elements--)
    {
        UNITY_INT expect_val;
        UNITY_INT actual_val;
        switch (length)
        {
            case 1:
                expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
                actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
                break;
            case 2:
                expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
                actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
                break;
#ifdef UNITY_SUPPORT_64
            case 8:
                expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
                actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
                break;
#endif
            default: /* length 4 bytes */
                expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
                actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
                length = 4;
                break;
        }

        if (expect_val != actual_val)
        {
            if (style & UNITY_DISPLAY_RANGE_UINT && length < sizeof(expect_val))
            {   /* For UINT, remove sign extension (padding 1's) from signed type casts above */
                UNITY_INT mask = 1;
                mask = (mask << 8 * length) - 1;
                expect_val &= mask;
                actual_val &= mask;
            }
            UnityTestResultsFailBegin(lineNumber);
            UnityPrint(UnityStrElement);
            UnityPrintNumberUnsigned(num_elements - elements - 1);
            UnityPrint(UnityStrExpected);
            UnityPrintNumberByStyle(expect_val, style);
            UnityPrint(UnityStrWas);
            UnityPrintNumberByStyle(actual_val, style);
            UnityAddMsgIfSpecified(msg);
            UNITY_FAIL_AND_BAIL;
        }
        if (flags == UNITY_ARRAY_TO_ARRAY)
        {
            expected = (UNITY_INTERNAL_PTR)(length + (const char*)expected);
        }
        actual   = (UNITY_INTERNAL_PTR)(length + (const char*)actual);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x7570(%rip), %rax      # 0xbe88
orq 0x7561(%rip), %rax      # 0xbe80
jne 0x49e8
movq %r8, %r14
movl %edx, %ebx
testl %edx, %edx
je 0x4a8f
movq %rsi, %r12
movq %rdi, %r13
cmpq %rsi, %rdi
je 0x49e8
movl %r9d, 0xc(%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rcx, 0x10(%rsp)
callq 0x4aab
testl %eax, %eax
jne 0x4a73
movl 0x50(%rsp), %eax
movl 0xc(%rsp), %r8d
movl %r8d, %ecx
andl $0xf, %ecx
movl %ebx, %edx
xorl %r15d, %r15d
cmpl $0x8, %ecx
je 0x49a6
cmpl $0x2, %ecx
je 0x4995
cmpl $0x1, %ecx
jne 0x49b7
movsbq (%r13), %rbp
movsbq (%r12), %rbx
movl $0x1, %ecx
jmp 0x49c4
movswq (%r13), %rbp
movswq (%r12), %rbx
movl $0x2, %ecx
jmp 0x49c4
movq (%r13), %rbp
movq (%r12), %rbx
movl $0x8, %ecx
xorl %esi, %esi
jmp 0x49c7
movslq (%r13), %rbp
movslq (%r12), %rbx
movl $0x4, %ecx
movb $0x1, %sil
cmpq %rbx, %rbp
jne 0x49f7
cmpl $0x1, %eax
movl %ecx, %esi
movl $0x0, %edi
cmoveq %rsi, %rdi
addq %rdi, %r13
addq %rsi, %r12
incq %r15
cmpl %r15d, %edx
jne 0x4975
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x20, %r8b
sete %al
xorb $0x1, %sil
orb %al, %sil
jne 0x4a1d
shll $0x3, %ecx
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
andq %rax, %rbp
andq %rax, %rbx
movq %r14, %rdi
callq 0x46b4
leaq 0x399b(%rip), %rdi      # 0x83c7
callq 0x3f36
movq %r15, %rdi
callq 0x4123
leaq 0x38f3(%rip), %rdi      # 0x8333
callq 0x3f36
movq %rbp, %rdi
movl 0xc(%rsp), %ebp
movl %ebp, %esi
callq 0x40a7
leaq 0x38e4(%rip), %rdi      # 0x833e
callq 0x3f36
movq %rbx, %rdi
movl %ebp, %esi
callq 0x40a7
movq 0x10(%rsp), %rdi
callq 0x46db
movq $0x1, 0x7402(%rip) # 0xbe80
leaq 0x740b(%rip), %rdi      # 0xbe90
movl $0x1, %esi
callq 0x21d0
movq %r14, %rdi
movq %rcx, %rbx
callq 0x46b4
leaq 0x38ef(%rip), %rdi      # 0x8390
callq 0x3f36
movq %rbx, %rdi
jmp 0x4a6e