// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/ssearch_dump.c
// Function: ssearch_dump
void
ssearch_dump(SSEARCH*sse, FILE *fp)
{
    int         i, j, maxsym;
    char        symchar[256];
    if (!sse)
	return;

    fprintf(fp, "sse {nstrs=%d suflen=%d symwid=%d}\n",
	sse->nstrs, sse->suflen, sse->symwid);
#if 0
    for (i = 0; i < sse->nstrs; ++i)
        fprintf(fp, "[%d] %s\n", i+1, sse->strv[i].ptr);
#endif
    for (i = maxsym = 0; i < 256; ++i) {
        if (sse->symv[i] >= 0)
            symchar[sse->symv[i]] = i;
        if (maxsym < sse->symv[i])
            maxsym = sse->symv[i];
    }

#   define FMASK "%02X"
    fputs(" __", fp);
    for (j = 0; j <= maxsym; ++j)
        fprintf(fp, isgraph(symchar[j]) ? " _%c" : " "FMASK, symchar[j]);
    putc('\n', fp);

    if (sse->mapv) {
        for (i = 0; i <= maxsym; ++i) {
            fprintf(fp, isgraph(symchar[i]) ? " %c_" : FMASK":", symchar[i]);
            for (j = 0; j <= maxsym; ++j)
                fprintf(fp, " "FMASK, sse->mapv[(j << sse->symwid) + i]);
            putc('\n', fp);
        }
    }
#if 0
    if (sse->suffixh) {
        char        *cp;
        int         *pos;
        for (map_start(sse->suffixh);
		map_next(sse->suffixh,
			     (void const**)(uintptr_t)&cp,
			     (void**)(uintptr_t)&pos);) {

            fprintf(fp, "%.*s %d:\t", sse->suflen, cp,
					(int)(pos - sse->prefixv));
            for (; *pos != NONSTR; ++pos)
                fprintf(stderr, " [%d]%.*s", *pos,
					(int)sse->strv[*pos].len,
					sse->strv[*pos].ptr);
            putc('\n', stderr);
        }
    }
#endif
}

// Assembly:
testq %rdi, %rdi
je 0x51e7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x28(%rdi), %r8d
leaq 0x2137(%rip), %rsi      # 0x713c
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3260
pxor %xmm0, %xmm0
pcmpeqd %xmm1, %xmm1
movq 0x2c(%r14,%r15,2), %xmm2
movdqa %xmm2, %xmm3
pcmpgtw %xmm1, %xmm3
movd %xmm3, %eax
testb $0x1, %al
je 0x503b
pextrw $0x0, %xmm2, %eax
movb %r15b, 0x10(%rsp,%rax)
pextrw $0x1, %xmm3, %eax
testb $0x1, %al
je 0x5051
pextrw $0x1, %xmm2, %eax
leal 0x1(%r15), %ecx
movb %cl, 0x10(%rsp,%rax)
pshufd $0x55, %xmm2, %xmm4     # xmm4 = xmm2[1,1,1,1]
pcmpgtw %xmm1, %xmm4
pextrw $0x4, %xmm4, %eax
testb $0x1, %al
je 0x5070
pextrw $0x2, %xmm2, %eax
leal 0x2(%r15), %ecx
movb %cl, 0x10(%rsp,%rax)
pextrw $0x3, %xmm3, %eax
testb $0x1, %al
je 0x5086
pextrw $0x3, %xmm2, %eax
leal 0x3(%r15), %ecx
movb %cl, 0x10(%rsp,%rax)
punpcklwd %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3]
psrad $0x10, %xmm2
movdqa %xmm0, %xmm3
pcmpgtd %xmm2, %xmm0
pand %xmm0, %xmm3
pandn %xmm2, %xmm0
por %xmm3, %xmm0
addq $0x4, %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x501a
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movdqa %xmm0, %xmm2
pcmpgtd %xmm1, %xmm2
pand %xmm2, %xmm0
pandn %xmm1, %xmm2
por %xmm0, %xmm2
pshufd $0x55, %xmm2, %xmm0     # xmm0 = xmm2[1,1,1,1]
movdqa %xmm2, %xmm1
pcmpgtd %xmm0, %xmm1
pand %xmm1, %xmm2
pandn %xmm0, %xmm1
por %xmm2, %xmm1
movd %xmm1, %r13d
leaq 0x206e(%rip), %rdi      # 0x7160
movq %rbx, %rsi
callq 0x31d0
callq 0x31a0
movq %rax, %r15
incl %r13d
leaq 0x205d(%rip), %r12      # 0x7169
xorl %ebp, %ebp
movq (%r15), %rax
movsbq 0x10(%rsp,%rbp), %rdx
cmpw $0x0, (%rax,%rdx,2)
movq %r12, %rsi
jns 0x5128
leaq 0x203c(%rip), %rsi      # 0x7164
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3260
incq %rbp
cmpq %rbp, %r13
jne 0x510e
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3310
cmpq $0x0, 0x10(%r14)
je 0x51d6
callq 0x31a0
movq %rax, 0x8(%rsp)
leaq 0x2006(%rip), %r12      # 0x7169
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movq (%rax), %rax
movsbq 0x10(%rsp,%rbp), %rdx
cmpw $0x0, (%rax,%rdx,2)
leaq 0x1ff0(%rip), %rsi      # 0x716f
leaq 0x1fee(%rip), %rax      # 0x7174
cmovnsq %rax, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3260
xorl %r15d, %r15d
movb 0x28(%r14), %cl
movl %r15d, %eax
shll %cl, %eax
movq 0x10(%r14), %rcx
addl %ebp, %eax
cltq
movzwl (%rcx,%rax,2), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3260
incl %r15d
cmpl %r15d, %r13d
jne 0x5197
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3310
incq %rbp
cmpq %r13, %rbp
jne 0x5165
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq