// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_maxCodeSize(hdiff_private::TLastType&, unsigned long long&, unsigned long long&, unsigned long long&, unsigned char const*, unsigned char const*)
static void _maxCodeSize(TLastType& lastType,hpatch_StreamPos_t& curLen0,hpatch_StreamPos_t& curLenv,
                             hpatch_StreamPos_t& fixedLen,const unsigned char* appendData,const unsigned char* appendData_end){
        while (appendData!=appendData_end) {
            unsigned char v;
            size_t sLen0=0;
            do {
                v=*appendData++;
                if (0==v)
                    ++sLen0;
                else
                    break;
            }while (appendData!=appendData_end);
            if (sLen0>0){
                if (lastType==lastType_v){
                    fixedLen += _out_uncompressData_codeSize(curLenv);
                    curLenv = 0;
                }
                curLen0+=sLen0;
                lastType=lastType_same;
                if (v==0)
                    break;//appendData==appendData_end
            }
            if (lastType==lastType_same){
                fixedLen += _out_0Data_codeSize(curLen0);
                curLen0 = 0;
            }
            ++curLenv;
            lastType=lastType_v;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x18(%rsp)
cmpq %r9, %r8
je 0x1b3b2
movq %r9, %r13
movq %r8, %r15
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
movq %r9, 0x20(%rsp)
movq %r13, %rax
subq %r15, %rax
xorl %ebp, %ebp
movb (%r15), %r12b
incq %r15
testb %r12b, %r12b
jne 0x1b299
incq %rbp
cmpq %r13, %r15
jne 0x1b280
movq %r13, %r15
movq %rax, %rbp
testq %rbp, %rbp
je 0x1b330
cmpl $0x1, (%rdi)
jne 0x1b31e
movq (%rdx), %r14
xorl %r13d, %r13d
testq $-0x80000000, %r14      # imm = 0x80000000
je 0x1b2ea
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x43897
movl %eax, %ebx
addq %r13, %rbx
xorl %edi, %edi
xorl %esi, %esi
callq 0x43897
movl %eax, %r13d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r13
addq %rbx, %r13
addq $-0x7fffffff, %r14      # imm = 0x80000001
cmpq %rax, %r14
ja 0x1b2b6
movq %r14, %rdi
xorl %esi, %esi
callq 0x43897
movl %eax, %eax
addq %r14, %rax
addq %r13, %rax
movq 0x18(%rsp), %rcx
addq %rax, (%rcx)
movq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
movq 0x20(%rsp), %r13
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
addq %rbp, (%rsi)
movl $0x0, (%rdi)
testb %r12b, %r12b
je 0x1b3b2
cmpl $0x0, (%rdi)
jne 0x1b3a0
movq (%rsi), %r14
xorl %r12d, %r12d
testq $-0x80000000, %r14      # imm = 0x80000000
je 0x1b374
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x43897
movl %eax, %ebx
addq %r12, %rbx
xorl %edi, %edi
xorl %esi, %esi
callq 0x43897
movl %eax, %r12d
addq %rbx, %r12
addq $-0x7fffffff, %r14      # imm = 0x80000001
cmpq $0x7fffffff, %r14       # imm = 0x7FFFFFFF
ja 0x1b344
movq %r14, %rdi
xorl %esi, %esi
callq 0x43897
movl %eax, %eax
addq %r12, %rax
movq 0x18(%rsp), %rcx
addq %rax, (%rcx)
movq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movq 0x10(%rsp), %rdx
movq (%rsp), %rdi
incq (%rdx)
movl $0x1, (%rdi)
cmpq %r13, %r15
jne 0x1b278
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq