// File: ctSkennerton[P]fxtract/util/scan.c
// Function: scancmp
int
scancmp(char const* s, char const* t)
{
    XMM         xs, zero = {};
    unsigned    m, z, f = 15 & (intptr_t) s;

    if (f) {
        z = xm_same(xs = xm_load(s - f), zero) >> f;
        m = under(z) & (xm_diff(xs, xm_loud(t - f)) >> f) & under(z);
        if (m) return m = ffs(m) - 1, s[m] - t[m];
        if (z) return 0;
        s += 16 - f, t += 16 - f;
    }

    for (;!(z = xm_same(xs = xm_load(s), zero)); s += 16, t +=16)
        if ((m = xm_diff(xs, xm_loud(t))))
            return m = ffs(m) - 1, s[m] - t[m];

    m = xm_diff(xm_load(s), xm_loud(t)) & under(z);
    return m ? m = ffs(m) - 1, s[m] - t[m] : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
andq $0xf, %rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x9c55
movq -0x10(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
callq 0x9af0
movdqa %xmm0, -0x30(%rbp)
movdqa -0x40(%rbp), %xmm1
callq 0x9ab0
movl -0x4c(%rbp), %ecx
shrl %cl, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %edi
callq 0x9b10
movl %eax, -0x54(%rbp)
movdqa -0x30(%rbp), %xmm0
movaps %xmm0, -0x70(%rbp)
movq -0x18(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
callq 0x9dc0
movaps %xmm0, %xmm1
movaps -0x70(%rbp), %xmm0
callq 0x9d90
movl %eax, %edx
movl -0x54(%rbp), %eax
movl -0x4c(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
movl %eax, -0x50(%rbp)
movl -0x48(%rbp), %edi
callq 0x9b10
movl %eax, %ecx
movl -0x50(%rbp), %eax
andl %ecx, %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x9c19
movl -0x44(%rbp), %edi
callq 0x32f0
subl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movl -0x44(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x9d7d
cmpl $0x0, -0x48(%rbp)
je 0x9c2b
movl $0x0, -0x4(%rbp)
jmp 0x9d7d
movl $0x10, %ecx
subl -0x4c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl $0x10, %ecx
subl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x9c57
movq -0x10(%rbp), %rdi
callq 0x9af0
movdqa %xmm0, -0x30(%rbp)
movdqa -0x40(%rbp), %xmm1
callq 0x9ab0
movl %eax, -0x48(%rbp)
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x9c80
jmp 0x9cf3
movdqa -0x30(%rbp), %xmm0
movaps %xmm0, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9dc0
movaps %xmm0, %xmm1
movaps -0x80(%rbp), %xmm0
callq 0x9d90
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
je 0x9cd4
movl -0x44(%rbp), %edi
callq 0x32f0
subl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movl -0x44(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x9d7d
jmp 0x9cd6
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x18(%rbp)
jmp 0x9c57
movq -0x10(%rbp), %rdi
callq 0x9af0
movaps %xmm0, -0xa0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9dc0
movaps %xmm0, %xmm1
movaps -0xa0(%rbp), %xmm0
callq 0x9d90
movl %eax, -0x84(%rbp)
movl -0x48(%rbp), %edi
callq 0x9b10
movl %eax, %ecx
movl -0x84(%rbp), %eax
andl %ecx, %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x9d6a
movl -0x44(%rbp), %edi
callq 0x32f0
subl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movl -0x44(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0xa4(%rbp)
jmp 0x9d74
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0x9d74
movl -0xa4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)