// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStepStream::_flush_step_code()
void TStepStream::_flush_step_code() {
    step_bufRle.finishAppend();
    const size_t curStepMemSize=step_bufCover_size+step_bufRle.fixed_code.size();
    if (curMaxStepMemSize<curStepMemSize)
        curMaxStepMemSize=curStepMemSize;
    if (isInInit){
        assert(step_buf.empty());
        sumBufSize_forInit+=hpatch_packUInt_size(step_bufCover_size) +
                            hpatch_packUInt_size(step_bufRle.curCodeSize())+
                            curStepMemSize + step_dataDiff.streamSize;
    }else{
        //step head
        assert(step_bufCover_size==step_bufCover.size());
        packUInt(step_buf,step_bufCover.size());
        packUInt(step_buf,step_bufRle.curCodeSize());
        //step cache data
        pushBack(step_buf,step_bufCover);            
        pushBack(step_buf,step_bufRle.fixed_code);
    }
    step_bufCover_size=0;
    step_bufCover.clear();
    step_bufRle.clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x170(%rdi), %r14
movq %r14, %rdi
callq 0x1b636
movq 0x178(%rbx), %r15
subq 0x170(%rbx), %r15
movq 0x240(%rbx), %rdx
addq %rdx, %r15
cmpq %r15, 0x138(%rbx)
jae 0x251b4
movq %r15, 0x138(%rbx)
cmpb $0x1, 0x230(%rbx)
jne 0x2520b
movq 0x248(%rbx), %rax
cmpq 0x250(%rbx), %rax
jne 0x25357
movq %rdx, %rdi
xorl %esi, %esi
callq 0x43313
movl %eax, %ebp
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1aea2
movq %rax, %rdi
xorl %esi, %esi
callq 0x43313
addl %ebp, %eax
addq 0x268(%rbx), %r15
addq %rax, %r15
addq %r15, 0x238(%rbx)
jmp 0x252ed
movq 0x160(%rbx), %rax
subq 0x158(%rbx), %rax
cmpq %rax, %rdx
jne 0x25376
leaq 0x5(%rsp), %rax
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x43254
testl %eax, %eax
je 0x25395
leaq 0x248(%rbx), %r15
movq 0x250(%rbx), %rsi
leaq 0x10(%rsp), %r12
movq (%r12), %rcx
leaq 0x5(%rsp), %r13
movq %r15, %rdi
movq %r13, %rdx
callq 0x9c50
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1aea2
movq %r13, (%r12)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x43254
testl %eax, %eax
je 0x253b3
movq 0x250(%rbx), %rsi
movq 0x10(%rsp), %rcx
leaq 0x5(%rsp), %rdx
movq %r15, %rdi
callq 0x9c50
movq 0x158(%rbx), %rdx
movq 0x160(%rbx), %rcx
movq 0x250(%rbx), %rsi
movq %r15, %rdi
callq 0xa020
movq 0x170(%rbx), %rdx
movq 0x178(%rbx), %rcx
movq 0x250(%rbx), %rsi
movq %r15, %rdi
callq 0xa020
movq $0x0, 0x240(%rbx)
movq 0x158(%rbx), %rax
cmpq %rax, 0x160(%rbx)
je 0x2530f
movq %rax, 0x160(%rbx)
movq 0x170(%rbx), %rax
cmpq %rax, 0x178(%rbx)
je 0x25326
movq %rax, 0x178(%rbx)
movq 0x188(%rbx), %rax
cmpq %rax, 0x190(%rbx)
je 0x2533d
movq %rax, 0x190(%rbx)
movq $0x0, 0x1a0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x385f9(%rip), %rdi     # 0x5d957
leaq 0x37f0c(%rip), %rsi     # 0x5d271
leaq 0x385fc(%rip), %rcx     # 0x5d968
movl $0x2ad, %edx            # imm = 0x2AD
callq 0x4200
leaq 0x3861f(%rip), %rdi     # 0x5d99c
leaq 0x37eed(%rip), %rsi     # 0x5d271
leaq 0x385dd(%rip), %rcx     # 0x5d968
movl $0x2b3, %edx            # imm = 0x2B3
callq 0x4200
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x35057(%rip), %rsi     # 0x5a400
movq %rax, %rdi
callq 0x4110
jmp 0x253cf
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x35039(%rip), %rsi     # 0x5a400
movq %rax, %rdi
callq 0x4110
movq 0x56c12(%rip), %rsi     # 0x7bfe8
movq 0x56bdb(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x253e7
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0