// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityAssertNumbersArrayWithin
void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
                                   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;
    unsigned int increment = 0;

    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;
                increment  = sizeof(UNITY_INT8);
                break;

            case 2:
                expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
                actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
                increment  = sizeof(UNITY_INT16);
                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;
                increment  = sizeof(UNITY_INT64);
                break;
#endif

            default: /* default is length 4 bytes */
            case 4:
                expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
                actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
                increment  = sizeof(UNITY_INT32);
                length = 4;
                break;
        }

        if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
        {
            if (actual_val > expect_val)
            {
                Unity.CurrentTestFailed = (((UNITY_UINT)actual_val - (UNITY_UINT)expect_val) > delta);
            }
            else
            {
                Unity.CurrentTestFailed = (((UNITY_UINT)expect_val - (UNITY_UINT)actual_val) > delta);
            }
        }
        else
        {
            if ((UNITY_UINT)actual_val > (UNITY_UINT)expect_val)
            {
                Unity.CurrentTestFailed = (((UNITY_UINT)actual_val - (UNITY_UINT)expect_val) > delta);
            }
            else
            {
                Unity.CurrentTestFailed = (((UNITY_UINT)expect_val - (UNITY_UINT)actual_val) > delta);
            }
        }

        if (Unity.CurrentTestFailed)
        {
            if ((style & UNITY_DISPLAY_RANGE_UINT) && (length < (UNITY_INT_WIDTH / 8)))
            {   /* 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(UnityStrDelta);
            UnityPrintNumberByStyle((UNITY_INT)delta, style);
            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;
        }
        /* Walk through array by incrementing the pointers */
        if (flags == UNITY_ARRAY_TO_ARRAY)
        {
            expected = (UNITY_INTERNAL_PTR)((const char*)expected + increment);
        }
        actual = (UNITY_INTERNAL_PTR)((const char*)actual + increment);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movq 0x81b7(%rip), %rax      # 0xda38
orq 0x81a8(%rip), %rax      # 0xda30
jne 0x5a31
movl %ecx, %ebp
testl %ecx, %ecx
je 0x5a40
movq %rdx, %r13
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x5985
movq %rdi, %r14
movq %rbx, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0x53ed
testl %eax, %eax
jne 0x5a26
movl 0x58(%rsp), %eax
movl 0x50(%rsp), %ecx
andl $0xf, %ecx
movl %ebp, %edx
xorl %r12d, %r12d
pushq $0x2
popq %rdi
pushq $0x1
popq %r8
pushq $0x4
popq %r9
cmpl %r12d, %edx
je 0x5985
cmpl $0x8, %ecx
je 0x591b
cmpl $0x2, %ecx
je 0x590b
cmpl $0x1, %ecx
jne 0x592a
movsbq (%rbx), %rbp
movsbq (%r13), %r15
movb $0x1, %r10b
movl %r8d, %ecx
jmp 0x5937
movswq (%rbx), %rbp
movswq (%r13), %r15
movb $0x1, %r10b
movl %edi, %ecx
jmp 0x5937
movq (%rbx), %rbp
movq (%r13), %r15
xorl %r10d, %r10d
pushq $0x8
popq %rcx
jmp 0x5937
movslq (%rbx), %rbp
movslq (%r13), %r15
xorl %r10d, %r10d
movl %r9d, %ecx
movl 0x50(%rsp), %esi
movq %r15, %r11
testb $0x10, %sil
jne 0x597e
subq %rbp, %r11
ja 0x594f
movq %rbp, %r11
subq %r15, %r11
xorl %esi, %esi
cmpq %r14, %r11
seta %sil
movq %rsi, 0x80d1(%rip)      # 0xda30
ja 0x5994
cmpl $0x1, %eax
movl %ecx, %esi
movl $0x0, %r10d
cmoveq %rsi, %r10
addq %r10, %rbx
addq %rsi, %r13
incq %r12
jmp 0x58e2
subq %rbp, %r11
jle 0x5949
jmp 0x594f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x50(%rsp), %eax
testb $0x20, %al
sete %al
xorb $0x1, %r10b
orb %al, %r10b
jne 0x59b8
shll $0x3, %ecx
pushq $-0x1
popq %rax
shlq %cl, %rax
notq %rax
andq %rax, %rbp
andq %rax, %r15
movq 0x8(%rsp), %rdi
callq 0x4fe7
leaq 0x31d7(%rip), %rdi      # 0x8ba0
callq 0x4934
movq %r14, %rdi
movl 0x50(%rsp), %ebx
movl %ebx, %esi
callq 0x4a92
leaq 0x3154(%rip), %rdi      # 0x8b37
callq 0x4934
movq %r12, %rdi
callq 0x4b69
leaq 0x3097(%rip), %rdi      # 0x8a8e
callq 0x4934
movq %rbp, %rdi
movl %ebx, %esi
callq 0x4a92
leaq 0x308c(%rip), %rdi      # 0x8a99
callq 0x4934
movq %r15, %rdi
movl %ebx, %esi
callq 0x4a92
movq 0x10(%rsp), %rdi
callq 0x500c
movq $0x1, 0x7fff(%rip) # 0xda30
leaq 0x8008(%rip), %rdi      # 0xda40
pushq $0x1
popq %rsi
callq 0x10d0
movq 0x8(%rsp), %rdi
callq 0x4fe7
leaq 0x30af(%rip), %rdi      # 0x8b00
callq 0x4934
jmp 0x5a1c