// File: /workspace/github_c_makefile_star2_O2/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
movl %r9d, 0xc(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x7c77(%rip), %rax      # 0xbe88
orq 0x7c68(%rip), %rax      # 0xbe80
jne 0x42e7
movq %r8, %r14
movl %edx, %ebx
testl %edx, %edx
je 0x4389
movq %rsi, %r12
movq %rdi, %r13
cmpq %rsi, %rdi
je 0x42e7
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq 0x10(%rsp), %rcx
callq 0x439f
testl %eax, %eax
jne 0x436f
movl 0x50(%rsp), %eax
movl 0xc(%rsp), %ecx
andl $0xf, %ecx
movl %ebx, %edx
xorl %r15d, %r15d
pushq $0x8
popq %rsi
pushq $0x2
popq %rdi
pushq $0x1
popq %r8
pushq $0x4
popq %r9
cmpl %r15d, %edx
je 0x42e7
cmpl $0x8, %ecx
je 0x42aa
cmpl $0x2, %ecx
je 0x4299
cmpl $0x1, %ecx
jne 0x42b9
movsbq (%r13), %rbp
movsbq (%r12), %rbx
movb $0x1, %r10b
movl %r8d, %ecx
jmp 0x42c7
movswq (%r13), %rbp
movswq (%r12), %rbx
movb $0x1, %r10b
movl %edi, %ecx
jmp 0x42c7
movq (%r13), %rbp
movq (%r12), %rbx
xorl %r10d, %r10d
movl %esi, %ecx
jmp 0x42c7
movslq (%r13), %rbp
movslq (%r12), %rbx
movb $0x1, %r10b
movl %r9d, %ecx
cmpq %rbx, %rbp
jne 0x42f6
cmpl $0x1, %eax
movl %ecx, %r10d
movl $0x0, %r11d
cmoveq %r10, %r11
addq %r11, %r13
addq %r10, %r12
incq %r15
jmp 0x4273
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x20, 0xc(%rsp)
sete %al
xorb $0x1, %r10b
orb %al, %r10b
jne 0x4319
shll $0x3, %ecx
pushq $-0x1
popq %rax
shlq %cl, %rax
notq %rax
andq %rax, %rbp
andq %rax, %rbx
movq %r14, %rdi
callq 0x3fad
leaq 0x309f(%rip), %rdi      # 0x73c7
callq 0x3942
movq %r15, %rdi
callq 0x3b17
leaq 0x2ff7(%rip), %rdi      # 0x7333
callq 0x3942
movq %rbp, %rdi
movl 0xc(%rsp), %ebp
movl %ebp, %esi
callq 0x3aa1
leaq 0x2fe8(%rip), %rdi      # 0x733e
callq 0x3942
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3aa1
movq 0x10(%rsp), %rdi
callq 0x3fd2
movq $0x1, 0x7b06(%rip) # 0xbe80
leaq 0x7b0f(%rip), %rdi      # 0xbe90
pushq $0x1
popq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x3fad
leaq 0x2ff8(%rip), %rdi      # 0x7390
callq 0x3942
jmp 0x4365