// File: ctSkennerton[P]fxtract/util/str_x.c
// Function: do_str
static double
do_str(char const *name, STRF fn, MEMREF const*rv, int nr, int count, char *pat, char **exp)
{
    int     i, r;
    double  start = tick();
    char    *cp, *sp;

    for (r = 0; r < nr; ++r) {
        cp = fn((char*)(intptr_t)rv[r].ptr, pat);
        if (exp[r] == (char*)-1) 
            exp[r] = cp;
        else if (exp[r] != cp) {
            fprintf(stderr, "%s(pat='%s' [%d] exp=%"FSIZE"d act=%"FSIZE"d) failed\n\t[%"FSIZE"d] %s\n",
                    name, pat, r, exp[r] ? exp[r] - rv[r].ptr : -1, cp ? cp - rv[r].ptr : -1, 
                    rv[r].len, sp = acstr(rv[r].ptr, rv[r].len));
            free(sp);
            return 0;
        }
    }

    for (i = 0; i < count; ++i)
        for (r = 0; r < nr; ++r)
            if (exp[r] != fn((char*)(intptr_t)rv[r].ptr, pat))
                return 0;

    return tick() - start;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq %r9, -0x30(%rbp)
callq 0x7770
movsd %xmm0, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x39d9
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x38(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, -0x48(%rbp)
movq 0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq $-0x1, %rdx
cmpq %rdx, (%rax,%rcx,8)
jne 0x385d
movq -0x48(%rbp), %rdx
movq 0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x39c9
movq 0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x48(%rbp), %rax
je 0x39c7
movq 0x8766(%rip), %rax      # 0xbfe0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x54(%rbp)
movq 0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x38cd
movq 0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x20(%rbp), %rcx
movslq -0x38(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x78(%rbp)
jmp 0x38da
movq $-0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x38da
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x390b
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x38(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x88(%rbp)
jmp 0x391b
movq $-0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x391b
movq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, %esi
callq 0x5530
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl -0x54(%rbp), %r8d
movq -0x80(%rbp), %r9
movq -0x98(%rbp), %r11
movq -0x90(%rbp), %r10
movq %rax, -0x50(%rbp)
leaq 0x57d1(%rip), %rsi      # 0x916d
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x3290
movq -0x50(%rbp), %rdi
callq 0x3220
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3a68
jmp 0x39c9
jmp 0x39cb
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3807
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x3a59
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x3a4c
movq 0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x38(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
je 0x3a3f
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3a68
jmp 0x3a41
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x39ef
jmp 0x3a4e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x39e0
callq 0x7770
subsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)