// File: /workspace/github_c_makefile_star2_O3/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitValueChangeVec32
void fstWriterEmitValueChangeVec32(void *ctx, fstHandle handle,
                                   uint32_t bits, const uint32_t *val) {
        struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
        if (FST_UNLIKELY(bits <= 32))
        {
                fstWriterEmitValueChange32(ctx, handle, bits, val[0]);
        }
        else if(FST_LIKELY(xc))
        {
                int bq = bits / 32;
                int br = bits & 31;
                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 fstWriterEmitValueChangeVec32, 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 = (32 - 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 $0x20, %edx
jbe 0x8b5b
testq %r15, %r15
je 0x8b7a
movl %r14d, %r13d
andl $0x1f, %r13d
cmpl %r14d, 0x58(%r15)
jb 0x8b89
movq 0x50(%r15), %rax
shrl $0x5, %r14d
testl %r13d, %r13d
je 0x8acd
movl %r14d, %ecx
movl (%r12,%rcx,4), %ecx
decl %r13d
btl %r13d, %ecx
setb %dl
orb $0x30, %dl
movb %dl, (%rax)
incq %rax
addl $-0x1, %r13d
jb 0x8ab8
movq %r14, %rcx
decq %r14
movl -0x4(%r12,%rcx,4), %edx
movl $0x1c, %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 0x8add
cmpq $0x2, %rcx
jge 0x8acd
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
movl (%r12), %ecx
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 0x89f1
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 0x29d0
leaq -0x30(%rbp), %rax
movq (%rax), %rax
jmp 0x8aa5