// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: Zipper_endCentralDirectory_append
bool Zipper_endCentralDirectory_append(Zipper* self,UnZipper* srcZip){
    check(self->_fileEntryCount==self->_fileHeaderCount);
    check(!self->_isUpdateCrc32);
    check(!self->_isUpdateIsCompress);
    const TByte* endBuf=srcZip->_endCentralDirectory;
    ZipFilePos_t centralDirectory_size=self->_curFilePos-self->_centralDirectory_pos;
    
    check(_write(self,endBuf+0,8-0));//固定魔法值--Central Directory的开始分卷号;
    check(_writeUInt16(self,self->_fileEntryCount));
    check(_writeUInt16(self,self->_fileEntryCount));
    check(_writeUInt32(self,centralDirectory_size));
    check(_writeUInt32(self,self->_centralDirectory_pos));
    uint16_t endCommentLen=readUInt16(srcZip->_endCentralDirectory+20); //Zip文件注释长度;
    check(_writeUInt16(self,endCommentLen));
    check(_write(self,srcZip->_endCentralDirectory+22,endCommentLen));//Zip文件注释;
    check(_writeFlush(self));
#if (_IS_USED_MULTITHREAD)
    if (isUsedMT(self)){
        self->_threadWorks->finishDispatchWork();
        check(_dispose_filishedThreadWork(self,true));
    }
#endif
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl 0x60(%rdi), %eax
cmpl 0x9c(%rdi), %eax
jne 0x42d90
movq %rdi, %rbx
cmpb $0x1, 0x148(%rdi)
je 0x42daf
cmpb $0x1, 0x150(%rbx)
je 0x42dce
movq %rsi, %r14
movq 0x48(%rsi), %rsi
movl 0x58(%rbx), %ebp
subl 0xa0(%rbx), %ebp
movl $0x8, %edx
movq %rbx, %rdi
callq 0x41b5e
movzwl 0x60(%rbx), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movq %rbx, %rdi
callq 0x41b5e
movzwl 0x60(%rbx), %eax
leaq 0xc(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movq %rbx, %rdi
callq 0x41b5e
leaq 0x10(%rsp), %rsi
movl %ebp, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
callq 0x41b5e
movl 0xa0(%rbx), %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
callq 0x41b5e
movq 0x48(%r14), %rax
movzbl 0x14(%rax), %ecx
movzbl 0x15(%rax), %eax
leaq 0xe(%rsp), %rsi
movb %cl, (%rsi)
movb %al, 0x1(%rsi)
movl %eax, %r15d
shll $0x8, %r15d
orq %rcx, %r15
movl $0x2, %edx
movq %rbx, %rdi
callq 0x41b5e
movq 0x48(%r14), %rsi
addq $0x16, %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x41b5e
movq %rbx, %rdi
callq 0x42e0c
cmpl $0x2, 0x154(%rbx)
jl 0x42d83
movq 0x158(%rbx), %rdi
callq 0x49666
movq %rbx, %rdi
movl $0x1, %esi
callq 0x429d7
testb %al, %al
je 0x42ded
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x172b9(%rip), %rdi     # 0x5a050
leaq 0x1d4c3(%rip), %rsi     # 0x60261
leaq 0x1ddbf(%rip), %rcx     # 0x60b64
movl $0x5e2, %edx            # imm = 0x5E2
callq 0x4200
leaq 0x1729a(%rip), %rdi     # 0x5a050
leaq 0x1d4a4(%rip), %rsi     # 0x60261
leaq 0x1dda0(%rip), %rcx     # 0x60b64
movl $0x5e3, %edx            # imm = 0x5E3
callq 0x4200
leaq 0x1727b(%rip), %rdi     # 0x5a050
leaq 0x1d485(%rip), %rsi     # 0x60261
leaq 0x1dd81(%rip), %rcx     # 0x60b64
movl $0x5e4, %edx            # imm = 0x5E4
callq 0x4200
leaq 0x1725c(%rip), %rdi     # 0x5a050
leaq 0x1d466(%rip), %rsi     # 0x60261
leaq 0x1dd62(%rip), %rcx     # 0x60b64
movl $0x5f4, %edx            # imm = 0x5F4
callq 0x4200