// File: sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: zipper_file_update_compressedSize(Zipper*, int, unsigned int)
static
bool _zipper_file_update_compressedSize(Zipper* self,int curFileIndex,ZipFilePos_t compressedSize){
    check(curFileIndex<self->_fileEntryCount);
    if (self->_fileCompressedSizes[curFileIndex]==compressedSize) return true;
    self->_fileCompressedSizes[curFileIndex]=compressedSize;
    
    ZipFilePos_t fileEntryOffset=self->_fileEntryOffsets[curFileIndex];
    ZipFilePos_t compressedSizeOffset=fileEntryOffset+18;
    
    if (compressedSizeOffset>=self->_curFilePos-self->_curBufLen){//all in cache
        TByte* buf=self->_buf+compressedSizeOffset-(self->_curFilePos-self->_curBufLen);
        writeUInt32_to(buf,compressedSize);
    }else{
        TByte buf[4];
        writeUInt32_to(buf,compressedSize);
        if (compressedSizeOffset+4>self->_curFilePos-self->_curBufLen){
            check(_writeFlush(self));
        }
        check(_writeBack(self,compressedSizeOffset,buf,4));
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jl 0x835ed
leaq 0x29c9b(%rip), %rdi     # 0xad270
leaq 0x303ae(%rip), %rsi     # 0xb398a
movl $0x56e, %edx            # imm = 0x56E
leaq 0x31367(%rip), %rcx     # 0xb494f
callq 0x4270
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x18(%rbp), %eax
jne 0x8360d
movb $0x1, -0x1(%rbp)
jmp 0x83735
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x12, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x58(%rcx), %ecx
movq -0x10(%rbp), %rdx
subq 0x140(%rdx), %rcx
cmpq %rcx, %rax
jb 0x8369c
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movl -0x20(%rbp), %ecx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movl 0x58(%rcx), %ecx
movl %ecx, %edx
movq -0x10(%rbp), %rcx
subq 0x140(%rcx), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x84130
jmp 0x83731
leaq -0x2c(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x84130
movl -0x20(%rbp), %eax
addl $0x4, %eax
movl %eax, %eax
movq -0x10(%rbp), %rcx
movl 0x58(%rcx), %ecx
movq -0x10(%rbp), %rdx
subq 0x140(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x836f5
movq -0x10(%rbp), %rdi
callq 0x83df0
testb $0x1, %al
jne 0x836f3
leaq 0x29b95(%rip), %rdi     # 0xad270
leaq 0x302a8(%rip), %rsi     # 0xb398a
movl $0x57c, %edx            # imm = 0x57C
leaq 0x31261(%rip), %rcx     # 0xb494f
callq 0x4270
jmp 0x836f5
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
leaq -0x2c(%rbp), %rdx
movl $0x4, %ecx
callq 0x85500
testb $0x1, %al
jne 0x8372f
leaq 0x29b59(%rip), %rdi     # 0xad270
leaq 0x3026c(%rip), %rsi     # 0xb398a
movl $0x57e, %edx            # imm = 0x57E
leaq 0x31225(%rip), %rcx     # 0xb494f
callq 0x4270
jmp 0x83731
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq