// File: /workspace/github_c_makefile_star2_O1/jeff-1amstudios[P]carmageddon-1-cheat-code-disassembly/src/test/framework/unity.c
// Function: UnityAssertEqualMemory
void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
                            UNITY_INTERNAL_PTR actual,
                            const UNITY_UINT32 length,
                            const UNITY_UINT32 num_elements,
                            const char* msg,
                            const UNITY_LINE_TYPE lineNumber,
                            const UNITY_FLAGS_T flags)
{
    UNITY_PTR_ATTRIBUTE const unsigned char* ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
    UNITY_PTR_ATTRIBUTE const unsigned char* ptr_act = (UNITY_PTR_ATTRIBUTE const unsigned char*)actual;
    UNITY_UINT32 elements = num_elements;
    UNITY_UINT32 bytes;

    RETURN_IF_FAIL_OR_IGNORE;

    if ((elements == 0) || (length == 0))
    {
        UnityPrintPointlessAndBail();
    }

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

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

    while (elements--)
    {
        bytes = length;
        while (bytes--)
        {
            if (*ptr_exp != *ptr_act)
            {
                UnityTestResultsFailBegin(lineNumber);
                UnityPrint(UnityStrMemory);
                if (num_elements > 1)
                {
                    UnityPrint(UnityStrElement);
                    UnityPrintNumberUnsigned(num_elements - elements - 1);
                }
                UnityPrint(UnityStrByte);
                UnityPrintNumberUnsigned(length - bytes - 1);
                UnityPrint(UnityStrExpected);
                UnityPrintNumberByStyle(*ptr_exp, UNITY_DISPLAY_STYLE_HEX8);
                UnityPrint(UnityStrWas);
                UnityPrintNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8);
                UnityAddMsgIfSpecified(msg);
                UNITY_FAIL_AND_BAIL;
            }
            ptr_exp++;
            ptr_act++;
        }
        if (flags == UNITY_ARRAY_TO_VAL)
        {
            ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x6bde(%rip), %rax      # 0xbe88
orq 0x6bcf(%rip), %rax      # 0xbe80
jne 0x534c
movl %edx, %r13d
testl %edx, %edx
je 0x53fb
testl %ecx, %ecx
je 0x53fb
movq %rsi, %r14
movq %rdi, %r12
cmpq %rsi, %rdi
je 0x534c
movq %rcx, %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %r9, %r15
movq %r9, %rdx
movq %r8, (%rsp)
movq %r8, %rcx
callq 0x4a33
testl %eax, %eax
jne 0x53df
movq %rbx, %r9
testl %r9d, %r9d
je 0x534c
movq %r15, %rdi
movl 0x40(%rsp), %eax
leal -0x1(%r13), %ecx
incq %rcx
movl %r13d, %edx
movl %r9d, %r15d
movq %r12, %rbp
testl %r13d, %r13d
je 0x533e
leaq (%rcx,%rbp), %rsi
leaq (%r14,%rcx), %r10
xorl %ebx, %ebx
movb (%rbp,%rbx), %r8b
cmpb (%r14,%rbx), %r8b
jne 0x535b
incq %rbx
cmpl %ebx, %edx
jne 0x5326
movq %rsi, %rbp
movq %r10, %r14
decl %r15d
testl %eax, %eax
cmoveq %r12, %rbp
testl %r15d, %r15d
jne 0x5317
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r9, %r12
callq 0x466d
leaq 0x30e6(%rip), %rdi      # 0x8450
callq 0x3efa
cmpl $0x1, %r12d
je 0x538c
leaq 0x304b(%rip), %rdi      # 0x83c7
callq 0x3efa
subl %r15d, %r12d
movq %r12, %rdi
callq 0x40ea
leaq 0x30cf(%rip), %rdi      # 0x8462
callq 0x3efa
movq %rbx, %rdi
callq 0x40ea
leaq 0x2f8c(%rip), %rdi      # 0x8333
callq 0x3efa
movzbl (%rbp,%rbx), %edi
movl $0x41, %esi
callq 0x406e
leaq 0x2f7c(%rip), %rdi      # 0x833e
callq 0x3efa
movzbl (%r14,%rbx), %edi
movl $0x41, %esi
callq 0x406e
movq (%rsp), %rdi
callq 0x4694
movq $0x1, 0x6a96(%rip) # 0xbe80
leaq 0x6a9f(%rip), %rdi      # 0xbe90
movl $0x1, %esi
callq 0x21d0
movq %r9, %rdi
movq %r8, %rbx
callq 0x466d
leaq 0x2f83(%rip), %rdi      # 0x8390
callq 0x3efa
movq %rbx, %rdi
jmp 0x53da