// File: /workspace/github_c_makefile_star2_O3/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitValueChangeVec64
void fstWriterEmitValueChangeVec64(void *ctx, fstHandle handle,
                                   uint32_t bits, const uint64_t *val) {
        struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
        if (FST_UNLIKELY(bits <= 64))
        {
                fstWriterEmitValueChange64(ctx, handle, bits, val[0]);
        }
        else if(FST_LIKELY(xc))
        {
                int bq = bits / 64;
                int br = bits & 63;
                int i;
                int w;
                uint32_t v;
                unsigned char* s;
                if (FST_UNLIKELY(bits > xc->outval_alloc_siz))
                {
                        xc->outval_alloc_siz = bits*2 + 1;
                        xc->outval_mem = (unsigned char*)realloc(xc->outval_mem, xc->outval_alloc_siz);
                        if (FST_UNLIKELY(!xc->outval_mem))
                        {
                                fprintf(stderr,
                                        FST_APIMESS "Could not realloc() in fstWriterEmitValueChangeVec64, exiting.\n");
                                exit(255);
                        }
                }
                s = xc->outval_mem;
                {
                        w = bq;
                        v = val[w];
                        for (i = 0; i < br; ++i)
                        {
                                *s++ = '0' + ((v >> (br - i - 1)) & 1);
                        }
                }
                for (w = bq - 1; w >= 0; --w) {
                        v = val[w];
                        for (i = (64 - 4); i >= 0; i -= 4)
                        {
                                s[0] = '0' + ((v >> (i + 3)) & 1);
                                s[1] = '0' + ((v >> (i + 2)) & 1);
                                s[2] = '0' + ((v >> (i + 1)) & 1);
                                s[3] = '0' + ((v >> (i + 0)) & 1);
                                s += 4;
                        }
                }
                fstWriterEmitValueChange(ctx, handle, xc->outval_mem);
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movl %edx, %r14d
movl %esi, %ebx
movq %rdi, %r15
cmpl $0x40, %edx
jbe 0x8c9e
testq %r15, %r15
je 0x8cbd
movl %r14d, %r13d
andl $0x3f, %r13d
cmpl %r14d, 0x58(%r15)
jb 0x8ccc
movq 0x50(%r15), %rax
shrl $0x6, %r14d
testl %r13d, %r13d
je 0x8c10
movl %r14d, %ecx
movl (%r12,%rcx,8), %ecx
decl %r13d
btl %r13d, %ecx
setb %dl
orb $0x30, %dl
movb %dl, (%rax)
incq %rax
addl $-0x1, %r13d
jb 0x8bfb
movq %r14, %rcx
decq %r14
movl -0x8(%r12,%rcx,8), %edx
movl $0x3c, %esi
leal 0x3(%rsi), %edi
movzbl %dil, %edi
btl %edi, %edx
setb %dil
orb $0x30, %dil
movb %dil, (%rax)
leal 0x2(%rsi), %edi
movzbl %dil, %edi
btl %edi, %edx
setb %dil
orb $0x30, %dil
movb %dil, 0x1(%rax)
leal 0x1(%rsi), %edi
movzbl %dil, %edi
btl %edi, %edx
setb %dil
orb $0x30, %dil
movb %dil, 0x2(%rax)
btl %esi, %edx
setb %dil
orb $0x30, %dil
movb %dil, 0x3(%rax)
addq $0x4, %rax
addl $-0x4, %esi
cmpl $-0x4, %esi
jne 0x8c20
cmpq $0x2, %rcx
jge 0x8c10
movq 0x50(%r15), %rdx
movq %r15, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x665a
movq (%r12), %rcx
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a28
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58(%r15), %rsi
leaq -0x30(%rbp), %rcx
movl %r14d, %edi
movq %r15, %rdx
callq 0x2a26
leaq -0x30(%rbp), %rax
movq (%rax), %rax
jmp 0x8be8