// File: /workspace/github_c_makefile_star2_O1/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 0x75e8(%rip), %rax      # 0xbe88
orq 0x75d9(%rip), %rax      # 0xbe80
jne 0x4970
movq %r8, %r14
movl %edx, %ebx
testl %edx, %edx
je 0x4a17
movq %rsi, %r12
movq %rdi, %r13
cmpq %rsi, %rdi
je 0x4970
movl %r9d, 0xc(%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rcx, 0x10(%rsp)
callq 0x4a33
testl %eax, %eax
jne 0x49fb
movl 0x50(%rsp), %eax
movl 0xc(%rsp), %r8d
movl %r8d, %ecx
andl $0xf, %ecx
movl %ebx, %edx
xorl %r15d, %r15d
cmpl $0x8, %ecx
je 0x492e
cmpl $0x2, %ecx
je 0x491d
cmpl $0x1, %ecx
jne 0x493f
movsbq (%r13), %rbp
movsbq (%r12), %rbx
movl $0x1, %ecx
jmp 0x494c
movswq (%r13), %rbp
movswq (%r12), %rbx
movl $0x2, %ecx
jmp 0x494c
movq (%r13), %rbp
movq (%r12), %rbx
movl $0x8, %ecx
xorl %esi, %esi
jmp 0x494f
movslq (%r13), %rbp
movslq (%r12), %rbx
movl $0x4, %ecx
movb $0x1, %sil
cmpq %rbx, %rbp
jne 0x497f
cmpl $0x1, %eax
movl %ecx, %esi
movl $0x0, %edi
cmoveq %rsi, %rdi
addq %rdi, %r13
addq %rsi, %r12
incq %r15
cmpl %r15d, %edx
jne 0x48fd
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 0x49a5
shll $0x3, %ecx
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
andq %rax, %rbp
andq %rax, %rbx
movq %r14, %rdi
callq 0x466d
leaq 0x3a13(%rip), %rdi      # 0x83c7
callq 0x3efa
movq %r15, %rdi
callq 0x40ea
leaq 0x396b(%rip), %rdi      # 0x8333
callq 0x3efa
movq %rbp, %rdi
movl 0xc(%rsp), %ebp
movl %ebp, %esi
callq 0x406e
leaq 0x395c(%rip), %rdi      # 0x833e
callq 0x3efa
movq %rbx, %rdi
movl %ebp, %esi
callq 0x406e
movq 0x10(%rsp), %rdi
callq 0x4694
movq $0x1, 0x747a(%rip) # 0xbe80
leaq 0x7483(%rip), %rdi      # 0xbe90
movl $0x1, %esi
callq 0x21d0
movq %r14, %rdi
movq %rcx, %rbx
callq 0x466d
leaq 0x3967(%rip), %rdi      # 0x8390
callq 0x3efa
movq %rbx, %rdi
jmp 0x49f6