// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_nibbles.c
// Function: validate_nibble2base
int validate_nibble2base(void) {
    char defbuf[500];
    int i, start, len;
    unsigned long long total = 0, failed = 0;

    for (i = 0; i < sizeof nibble; i++)
        nibble[i] = i % 256;

    for (start = 0; start < 80; start++)
        for (len = 0; len < 400; len++) {
            memset(defbuf, '\0', sizeof defbuf);
            nibble2base_single(&nibble[start], defbuf, len);

            memset(buf, '\0', sizeof defbuf);
            nibble2base(&nibble[start], buf, len);

            total++;
            if (strcmp(defbuf, buf) != 0) {
                printf("%s expected\n%s FAIL\n\n", defbuf, buf);
                failed++;
            }
        }

    if (failed > 0) {
        fprintf(stderr, "Failures: %llu (out of %llu tests)\n", failed, total);
        return 1;
    }

    return 0;
}

// Assembly:
movdqa 0x89172(%rip), %xmm0    # 0x8f010
movdqa 0x8917a(%rip), %xmm1    # 0x8f020
movdqa 0x89182(%rip), %xmm2    # 0x8f030
movdqa 0x8918a(%rip), %xmm3    # 0x8f040
movdqa 0x89192(%rip), %xmm4    # 0x8f050
movdqa 0x8919a(%rip), %xmm5    # 0x8f060
movdqa 0x891a2(%rip), %xmm6    # 0x8f070
movdqa 0x891aa(%rip), %xmm7    # 0x8f080
xorl %eax, %eax
movdqa 0x891af(%rip), %xmm10   # 0x8f090
pshufd $0xa0, %xmm10, %xmm8    # xmm8 = xmm10[0,0,2,2]
movdqa 0x891b0(%rip), %xmm9    # 0x8f0a0
pshufd $0xf5, %xmm10, %xmm10   # xmm10 = xmm10[1,1,3,3]
leaq 0xaa663(%rip), %rdx     # 0xb0560
movdqa 0x891aa(%rip), %xmm11   # 0x8f0b0
movdqa %xmm7, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
pshuflw $0xe8, %xmm12, %xmm13   # xmm13 = xmm12[0,2,2,3,4,5,6,7]
packssdw %xmm13, %xmm13
movd %xmm13, %ecx
testb $0x1, %cl
je 0x5f48
movb %al, (%rax,%rdx)
packssdw %xmm12, %xmm12
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
movd %xmm12, %ecx
shrl $0x8, %ecx
testb $0x1, %cl
je 0x5f6b
leal 0x1(%rax), %ecx
movb %cl, 0x1(%rax,%rdx)
movdqa %xmm6, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
packssdw %xmm12, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
movd %xmm13, %ecx
shrl $0x10, %ecx
testb $0x1, %cl
je 0x5fb8
leal 0x2(%rax), %ecx
movb %cl, 0x2(%rax,%rdx)
pshufhw $0x84, %xmm12, %xmm12   # xmm12 = xmm12[0,1,2,3,4,5,4,6]
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
movd %xmm12, %ecx
shrl $0x18, %ecx
testb $0x1, %cl
je 0x5fdc
leal 0x3(%rax), %ecx
movb %cl, 0x3(%rax,%rdx)
movdqa %xmm5, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
pshuflw $0xe8, %xmm12, %xmm13   # xmm13 = xmm12[0,2,2,3,4,5,6,7]
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
pextrw $0x2, %xmm13, %ecx
testb $0x1, %cl
je 0x6028
leal 0x4(%rax), %ecx
movb %cl, 0x4(%rax,%rdx)
packssdw %xmm12, %xmm12
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
pextrw $0x2, %xmm12, %ecx
shrl $0x8, %ecx
testb $0x1, %cl
je 0x604c
leal 0x5(%rax), %ecx
movb %cl, 0x5(%rax,%rdx)
movdqa %xmm4, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
packssdw %xmm12, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
pextrw $0x3, %xmm13, %ecx
testb $0x1, %cl
je 0x6097
leal 0x6(%rax), %ecx
movb %cl, 0x6(%rax,%rdx)
pshufhw $0x84, %xmm12, %xmm12   # xmm12 = xmm12[0,1,2,3,4,5,4,6]
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
pextrw $0x3, %xmm12, %ecx
shrl $0x8, %ecx
testb $0x1, %cl
je 0x60bc
leal 0x7(%rax), %ecx
movb %cl, 0x7(%rax,%rdx)
movdqa %xmm3, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
pshuflw $0xe8, %xmm12, %xmm13   # xmm13 = xmm12[0,2,2,3,4,5,6,7]
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
pextrw $0x4, %xmm13, %ecx
testb $0x1, %cl
je 0x6108
leal 0x8(%rax), %ecx
movb %cl, 0x8(%rax,%rdx)
packssdw %xmm12, %xmm12
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
pextrw $0x4, %xmm12, %ecx
shrl $0x8, %ecx
testb $0x1, %cl
je 0x612c
leal 0x9(%rax), %ecx
movb %cl, 0x9(%rax,%rdx)
movdqa %xmm2, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
packssdw %xmm12, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
pextrw $0x5, %xmm13, %ecx
testb $0x1, %cl
je 0x6177
leal 0xa(%rax), %ecx
movb %cl, 0xa(%rax,%rdx)
pshufhw $0x84, %xmm12, %xmm12   # xmm12 = xmm12[0,1,2,3,4,5,4,6]
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
pextrw $0x5, %xmm12, %ecx
shrl $0x8, %ecx
testb $0x1, %cl
je 0x619c
leal 0xb(%rax), %ecx
movb %cl, 0xb(%rax,%rdx)
movdqa %xmm1, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
pshuflw $0xe8, %xmm12, %xmm13   # xmm13 = xmm12[0,2,2,3,4,5,6,7]
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
pextrw $0x6, %xmm13, %ecx
testb $0x1, %cl
je 0x61e8
leal 0xc(%rax), %ecx
movb %cl, 0xc(%rax,%rdx)
packssdw %xmm12, %xmm12
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
pextrw $0x6, %xmm12, %ecx
shrl $0x8, %ecx
testb $0x1, %cl
je 0x620c
leal 0xd(%rax), %ecx
movb %cl, 0xd(%rax,%rdx)
movdqa %xmm0, %xmm12
pxor %xmm9, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
movdqa %xmm8, %xmm14
pcmpgtd %xmm13, %xmm14
pshufd $0xf5, %xmm12, %xmm12   # xmm12 = xmm12[1,1,3,3]
pcmpeqd %xmm10, %xmm12
pand %xmm14, %xmm12
packssdw %xmm12, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
pextrw $0x7, %xmm13, %ecx
testb $0x1, %cl
je 0x6257
leal 0xe(%rax), %ecx
movb %cl, 0xe(%rax,%rdx)
pshufhw $0x84, %xmm12, %xmm12   # xmm12 = xmm12[0,1,2,3,4,5,4,6]
packssdw %xmm12, %xmm12
packsswb %xmm12, %xmm12
pextrw $0x7, %xmm12, %ecx
shrl $0x8, %ecx
testb $0x1, %cl
je 0x627c
leal 0xf(%rax), %ecx
movb %cl, 0xf(%rax,%rdx)
addq $0x10, %rax
paddq %xmm11, %xmm7
paddq %xmm11, %xmm6
paddq %xmm11, %xmm5
paddq %xmm11, %xmm4
paddq %xmm11, %xmm3
paddq %xmm11, %xmm2
paddq %xmm11, %xmm1
paddq %xmm11, %xmm0
cmpq $0x1390, %rax           # imm = 0x1390
jne 0x5f06
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
leaq 0x10(%rsp), %r14
leaq 0xab61f(%rip), %r15     # 0xb18f0
leaq 0x892d8(%rip), %r12     # 0x8f5b0
xorl %eax, %eax
xorl %ebx, %ebx
movq %rax, 0x8(%rsp)
leaq (%rdx,%rax), %r13
xorl %ebp, %ebp
movl $0x1f4, %edx            # imm = 0x1F4
movq %r14, %rdi
xorl %esi, %esi
callq 0x4280
testq %rbp, %rbp
je 0x6328
xorl %eax, %eax
xorl %edx, %edx
movl %edx, %ecx
shrl %ecx
movzbl (%r13,%rcx), %esi
movl %eax, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %esi
andl $0xf, %esi
movb (%r12,%rsi), %cl
movb %cl, 0x10(%rsp,%rdx)
incq %rdx
addl $0x4, %eax
cmpq %rdx, %rbp
jne 0x62ff
movl $0x1f4, %edx            # imm = 0x1F4
movq %r15, %rdi
xorl %esi, %esi
callq 0x4280
movq %r13, %rdi
movq %r15, %rsi
movl %ebp, %edx
leaq 0xaa1ba(%rip), %rax     # 0xb0500
callq *(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x46e0
testl %eax, %eax
je 0x636e
leaq 0x88d80(%rip), %rdi     # 0x8f0de
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4060
incq %rbx
incq %rbp
cmpq $0x190, %rbp            # imm = 0x190
jne 0x62e7
movq 0x8(%rsp), %rax
incq %rax
cmpq $0x50, %rax
leaq 0xaa1cf(%rip), %rdx     # 0xb0560
jne 0x62dc
xorl %eax, %eax
testq %rbx, %rbx
jne 0x63b0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa9c21(%rip), %rax     # 0xaffd8
movq (%rax), %rdi
leaq 0x88d33(%rip), %rsi     # 0x8f0f4
movl $0x7d00, %ecx           # imm = 0x7D00
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4720
movl $0x1, %eax
jmp 0x639e