// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_nibbles.c
// Function: time_nibble2base
int time_nibble2base(int length, unsigned long count) {
    unsigned long i, total = 0;

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

    printf("Timing %lu nibble2base iterations with read length %d...\n", count, length);
    long long start = gettime();

    for (i = 0; i < count; i++) {
        nibble2base(nibble, buf, length);
        total += buf[i % length];
    }

    long long stop = gettime();
    printf("%s (summing to %lu)\n", fmttime(stop - start), total);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r12
movl %edi, %ebp
movslq %edi, %rbx
testl %ebx, %ebx
je 0x697b
leaq 0xf(%rbx), %rax
andq $-0x10, %rax
leaq -0x1(%rbx), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, (%rsp)
movdqa 0x88bf8(%rip), %xmm1    # 0x8f010
movdqa 0x88c00(%rip), %xmm2    # 0x8f020
movdqa 0x88c08(%rip), %xmm3    # 0x8f030
movdqa 0x88c10(%rip), %xmm4    # 0x8f040
movdqa 0x88c18(%rip), %xmm5    # 0x8f050
movdqa 0x88c20(%rip), %xmm6    # 0x8f060
movdqa 0x88c28(%rip), %xmm7    # 0x8f070
movdqa 0x88c2f(%rip), %xmm8    # 0x8f080
xorl %ecx, %ecx
movdqa 0x88c44(%rip), %xmm9    # 0x8f0a0
pcmpeqd %xmm10, %xmm10
leaq 0xaa0f8(%rip), %rdx     # 0xb0560
movdqa (%rsp), %xmm12
pxor %xmm9, %xmm12
movdqa %xmm8, %xmm13
pxor %xmm9, %xmm13
movdqa %xmm13, %xmm15
pcmpgtd %xmm12, %xmm15
pshufd $0xa0, %xmm15, %xmm14   # xmm14 = xmm15[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm0    # xmm0 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm11   # xmm11 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm0, %xmm11
pshufd $0xf5, %xmm15, %xmm15   # xmm15 = xmm15[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm0    # xmm0 = xmm15[0,2,2,3,4,5,6,7]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
movd %xmm0, %esi
testb $0x1, %sil
je 0x64d0
movb %cl, (%rcx,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
movd %xmm13, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x6504
leal 0x1(%rcx), %esi
movb %sil, 0x1(%rcx,%rdx)
movdqa %xmm7, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %esi
shrl $0x10, %esi
testb $0x1, %sil
je 0x6563
leal 0x2(%rcx), %esi
movb %sil, 0x2(%rcx,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %esi
shrl $0x18, %esi
testb $0x1, %sil
je 0x65a1
leal 0x3(%rcx), %esi
movb %sil, 0x3(%rcx,%rdx)
movdqa %xmm6, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %esi
testb $0x1, %sil
je 0x6608
leal 0x4(%rcx), %esi
movb %sil, 0x4(%rcx,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x663b
leal 0x5(%rcx), %esi
movb %sil, 0x5(%rcx,%rdx)
movdqa %xmm5, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %esi
testb $0x1, %sil
je 0x6698
leal 0x6(%rcx), %esi
movb %sil, 0x6(%rcx,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x66d7
leal 0x7(%rcx), %esi
movb %sil, 0x7(%rcx,%rdx)
movdqa %xmm4, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm11
packsswb %xmm11, %xmm0
pextrw $0x4, %xmm0, %esi
testb $0x1, %sil
je 0x673f
leal 0x8(%rcx), %esi
movb %sil, 0x8(%rcx,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm0
pextrw $0x4, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x6773
leal 0x9(%rcx), %esi
movb %sil, 0x9(%rcx,%rdx)
movdqa %xmm3, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %esi
testb $0x1, %sil
je 0x67d0
leal 0xa(%rcx), %esi
movb %sil, 0xa(%rcx,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x680f
leal 0xb(%rcx), %esi
movb %sil, 0xb(%rcx,%rdx)
movdqa %xmm2, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %esi
testb $0x1, %sil
je 0x6876
leal 0xc(%rcx), %esi
movb %sil, 0xc(%rcx,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x68a9
leal 0xd(%rcx), %esi
movb %sil, 0xd(%rcx,%rdx)
movdqa %xmm1, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm12    # xmm12 = xmm0[1,1,3,3]
movdqa %xmm12, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm14   # xmm14 = xmm11[1,1,3,3]
por %xmm14, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %esi
testb $0x1, %sil
je 0x6906
leal 0xe(%rcx), %esi
movb %sil, 0xe(%rcx,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm12, %xmm11   # xmm11 = xmm12[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm14, %xmm0    # xmm0 = xmm14[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x6945
leal 0xf(%rcx), %esi
movb %sil, 0xf(%rcx,%rdx)
addq $0x10, %rcx
movdqa 0x8875f(%rip), %xmm0    # 0x8f0b0
paddq %xmm0, %xmm8
paddq %xmm0, %xmm7
paddq %xmm0, %xmm6
paddq %xmm0, %xmm5
paddq %xmm0, %xmm4
paddq %xmm0, %xmm3
paddq %xmm0, %xmm2
paddq %xmm0, %xmm1
cmpq %rcx, %rax
jne 0x6468
leaq 0x88796(%rip), %rdi     # 0x8f118
xorl %r14d, %r14d
movq %r12, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x4060
leaq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x4830
movq (%r15), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r15), %rax
movq %rax, (%rsp)
testq %r12, %r12
je 0x69ef
xorl %r15d, %r15d
leaq 0xaaf31(%rip), %r13     # 0xb18f0
xorl %r14d, %r14d
leaq 0xa9b97(%rip), %rdi     # 0xb0560
movq %r13, %rsi
movl %ebp, %edx
leaq 0xa9b2b(%rip), %rax     # 0xb0500
callq *(%rax)
movq %r15, %rax
xorl %edx, %edx
divq %rbx
movsbq (%rdx,%r13), %rax
addq %rax, %r14
incq %r15
cmpq %r15, %r12
jne 0x69c2
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4830
movq (%rbx), %rax
subq 0x10(%rsp), %rax
movq 0x8(%rbx), %rdx
subq (%rsp), %rdx
imulq $0xf4240, %rax, %rcx    # imm = 0xF4240
addq %rdx, %rcx
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
imulq $0xf4240, %rdx, %rax    # imm = 0xF4240
subq %rax, %rcx
leaq 0xa9ad9(%rip), %rbx     # 0xb0520
leaq 0x88672(%rip), %rsi     # 0x8f0c0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x40d0
leaq 0x886f3(%rip), %rdi     # 0x8f152
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4060
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq