// File: /workspace/github_c_makefile_star2_O0/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitTimeChange
void fstWriterEmitTimeChange(void *ctx, uint64_t tim)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
unsigned int i;
int skip = 0;
if(xc)
        {
        if(FST_UNLIKELY(xc->is_initial_time))
                {
                if(xc->size_limit_locked)       /* this resets xc->is_initial_time to one */
                        {
                        return;
                        }

                if(!xc->valpos_mem)
                        {
                        fstWriterCreateMmaps(xc);
                        }

                skip = 1;

                xc->firsttime = (xc->vc_emitted) ? 0: tim;
                xc->curtime = 0;
                xc->vchg_mem[0] = '!';
                xc->vchg_siz = 1;
                fstWriterEmitSectionHeader(xc);
                for(i=0;i<xc->maxhandle;i++)
                        {
                        xc->valpos_mem[4*i+2] = 0; /* zero out offset val */
                        xc->valpos_mem[4*i+3] = 0; /* zero out last time change val */
                        }
                xc->is_initial_time = 0;
                }
                else
                {
                if((xc->vchg_siz >= xc->fst_break_size) || (xc->flush_context_pending))
                        {
                        xc->flush_context_pending = 0;
                        fstWriterFlushContextPrivate(xc);
                        xc->tchn_cnt++;
                        fstWriterVarint(xc->tchn_handle, xc->curtime);
                        }
                }

        if(!skip)
                {
                xc->tchn_idx++;
                }
        fstWriterVarint(xc->tchn_handle, tim - xc->curtime);
        xc->tchn_cnt++;
        xc->curtime = tim;
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x60f0
movq -0x18(%rbp), %rax
movb 0x74(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x601f
movq -0x18(%rbp), %rax
movb 0xe9(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5f3f
jmp 0x60f0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x5f53
movq -0x18(%rbp), %rdi
callq 0x9510
movl $0x1, -0x20(%rbp)
movq -0x18(%rbp), %rax
movb 0x74(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5f73
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x5f7b
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movb $0x21, (%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0xa0(%rax)
movq -0x18(%rbp), %rdi
callq 0xa0f0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jae 0x600d
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1c(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movl $0x0, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1c(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movl $0x0, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5fc2
movq -0x18(%rbp), %rax
movb 0x74(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x74(%rax)
jmp 0x6099
movq -0x18(%rbp), %rax
movl 0xa0(%rax), %eax
movq -0x18(%rbp), %rcx
cmpq 0x100(%rcx), %rax
jae 0x604d
movq -0x18(%rbp), %rax
movb 0xe9(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x6097
movq -0x18(%rbp), %rax
movb 0xe9(%rax), %cl
andb $-0x21, %cl
orb $0x0, %cl
movb %cl, 0xe9(%rax)
movq -0x18(%rbp), %rdi
callq 0x6350
movq -0x18(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rsi
callq 0x78f0
jmp 0x6099
cmpl $0x0, -0x20(%rbp)
jne 0x60b2
movq -0x18(%rbp), %rax
movl 0x8c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8c(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
subq 0x90(%rax), %rsi
callq 0x78f0
movq -0x18(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x90(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)