// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_memcopy
NK_LIB void*
nk_memcopy(void *dst0, const void *src0, nk_size length)
{
    nk_ptr t;
    char *dst = (char*)dst0;
    const char *src = (const char*)src0;
    if (length == 0 || dst == src)
        goto done;

    #define nk_word int
    #define nk_wsize sizeof(nk_word)
    #define nk_wmask (nk_wsize-1)
    #define NK_TLOOP(s) if (t) NK_TLOOP1(s)
    #define NK_TLOOP1(s) do { s; } while (--t)

    if (dst < src) {
        t = (nk_ptr)src; /* only need low bits */
        if ((t | (nk_ptr)dst) & nk_wmask) {
            if ((t ^ (nk_ptr)dst) & nk_wmask || length < nk_wsize)
                t = length;
            else
                t = nk_wsize - (t & nk_wmask);
            length -= t;
            NK_TLOOP1(*dst++ = *src++);
        }
        t = length / nk_wsize;
        NK_TLOOP(*(nk_word*)(void*)dst = *(const nk_word*)(const void*)src;
            src += nk_wsize; dst += nk_wsize);
        t = length & nk_wmask;
        NK_TLOOP(*dst++ = *src++);
    } else {
        src += length;
        dst += length;
        t = (nk_ptr)src;
        if ((t | (nk_ptr)dst) & nk_wmask) {
            if ((t ^ (nk_ptr)dst) & nk_wmask || length <= nk_wsize)
                t = length;
            else
                t &= nk_wmask;
            length -= t;
            NK_TLOOP1(*--dst = *--src);
        }
        t = length / nk_wsize;
        NK_TLOOP(src -= nk_wsize; dst -= nk_wsize;
            *(nk_word*)(void*)dst = *(const nk_word*)(const void*)src);
        t = length & nk_wmask;
        NK_TLOOP(*--dst = *--src);
    }
    #undef nk_word
    #undef nk_wsize
    #undef nk_wmask
    #undef NK_TLOOP
    #undef NK_TLOOP1
done:
    return (dst0);
}

// Assembly:
movq %rdi, %rax
testq %rdx, %rdx
sete %cl
cmpq %rsi, %rdi
sete %dil
orb %cl, %dil
jne 0x24484
cmpq %rsi, %rax
jae 0x2439e
movl %esi, %ecx
orl %eax, %ecx
testb $0x3, %cl
je 0x2443d
movl %esi, %edi
xorl %eax, %edi
movl %esi, %r8d
andl $0x3, %r8d
pushq $0x4
popq %rcx
subq %r8, %rcx
testb $0x3, %dil
cmovneq %rdx, %rcx
cmpq $0x4, %rdx
cmovbq %rdx, %rcx
movq %rcx, %r8
negq %r8
xorl %r9d, %r9d
xorl %edi, %edi
movb (%rsi,%r9), %r10b
movb %r10b, (%rax,%r9)
decq %rdi
incq %r9
cmpq %rdi, %r8
jne 0x2437a
subq %rcx, %rdx
movq %rax, %rcx
subq %rdi, %rcx
subq %rdi, %rsi
jmp 0x24440
addq %rdx, %rsi
leaq (%rax,%rdx), %rcx
movl %esi, %edi
orl %ecx, %edi
testb $0x3, %dil
je 0x243ed
movl %esi, %r8d
xorl %ecx, %r8d
movl %esi, %edi
andl $0x3, %edi
testb $0x3, %r8b
cmovneq %rdx, %rdi
cmpq $0x5, %rdx
cmovbq %rdx, %rdi
pushq $-0x1
popq %r9
xorl %r8d, %r8d
movb (%rsi,%r9), %r10b
movb %r10b, (%rcx,%r9)
incq %r8
decq %r9
cmpq %r8, %rdi
jne 0x243d1
subq %rdi, %rdx
subq %r8, %rcx
subq %r8, %rsi
cmpq $0x4, %rdx
jb 0x2441e
movq %rdx, %r8
shrq $0x2, %r8
negq %r8
xorl %edi, %edi
xorl %r9d, %r9d
movl -0x4(%rsi,%r9,4), %r10d
movl %r10d, -0x4(%rcx,%r9,4)
decq %r9
addq $0x4, %rdi
cmpq %r9, %r8
jne 0x24402
subq %rdi, %rcx
subq %rdi, %rsi
andq $0x3, %rdx
je 0x24484
negq %rdx
xorl %edi, %edi
movb -0x1(%rsi,%rdi), %r8b
movb %r8b, -0x1(%rcx,%rdi)
decq %rdi
cmpq %rdi, %rdx
jne 0x24429
jmp 0x24484
movq %rax, %rcx
cmpq $0x4, %rdx
jb 0x2446c
movq %rdx, %r8
shrq $0x2, %r8
xorl %edi, %edi
xorl %r9d, %r9d
movl (%rsi,%r9,4), %r10d
movl %r10d, (%rcx,%r9,4)
incq %r9
addq $-0x4, %rdi
cmpq %r9, %r8
jne 0x24452
subq %rdi, %rcx
subq %rdi, %rsi
andq $0x3, %rdx
je 0x24484
xorl %edi, %edi
movb (%rsi,%rdi), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
cmpq %rdi, %rdx
jne 0x24474
retq