// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/zip_diff.cpp
// Function: zipdiff_cmd_line(int, char const**)
int zipdiff_cmd_line(int argc, const char * argv[]) {
    const char* oldZipPath     =0;
    const char* newZipPath     =0;
    const char* outDiffFileName=0;
    hpatch_BOOL isDiff=_kNULL_VALUE;
    hpatch_BOOL isSingleCompressedDiff=_kNULL_VALUE;
    size_t      patchStepMemSize=0;
    hpatch_BOOL isPatchCheck   = _kNULL_VALUE;
    hpatch_BOOL isOutputVersion= _kNULL_VALUE;
    size_t      diffMatchScore = _kNULL_SIZE;
    size_t      threadNum = _THREAD_NUMBER_NULL;
    hdiff_TCompress*        compressPlugin=0;
    hpatch_TDecompress*     decompressPlugin=0;
#define kMax_arg_values_size 3
    const char * arg_values[kMax_arg_values_size]={0};
    int          arg_values_size=0;
    int         i;
    for (i=1; i<argc; ++i) {
        const char* op=argv[i];
        _options_check((op!=0)&&(strlen(op)>0),"?");
        if (op[0]!='-'){
            _options_check(arg_values_size<kMax_arg_values_size,"count");
            arg_values[arg_values_size]=op;
            ++arg_values_size;
            continue;
        }
        _options_check((op!=0)&&(op[0]=='-'),"?");
        switch (op[1]) {
            case 'm':{
                if (op[2]=='-'){
                    _options_check(diffMatchScore==_kNULL_SIZE,"-m-?")
                    const char* pnum=op+3;
                    _options_check(kmg_to_size(pnum,strlen(pnum),&diffMatchScore),"-m-?");
                    const size_t kMaxDiffMatchScore=1024;
                    _options_check((0<=diffMatchScore)&&(diffMatchScore<=kMaxDiffMatchScore),"-m-?");
                }else{
                    _options_check(hpatch_FALSE,"-m?");
                }
            } break;
#if (_IS_USED_MULTITHREAD)
            case 'p':{
                _options_check((threadNum==_THREAD_NUMBER_NULL)&&(op[2]=='-'),"-p-?");
                const char* pnum=op+3;
                _options_check(a_to_size(pnum,strlen(pnum),&threadNum),"-p-?");
                _options_check(threadNum>=_THREAD_NUMBER_MIN,"-p-?");
            } break;
#endif
            case 'c':{
                _options_check((compressPlugin==0)&&(op[2]=='-'),"-c");
                const char* ptype=op+3;
                const char* ptypeEnd=findUntilEnd(ptype,'-');
                int result=_checkSetCompress(&compressPlugin,&decompressPlugin,ptype,ptypeEnd);
                if (0!=result)
                    return result;
            } break;
            case 'S':{
                _options_check((isSingleCompressedDiff==_kNULL_VALUE)
                               &&(op[2]=='D')&&((op[3]=='\0')||(op[3]=='-')),"-SD");
                isSingleCompressedDiff=hpatch_TRUE;
                if (op[3]=='-'){
                    const char* pnum=op+4;
                    _options_check(kmg_to_size(pnum,strlen(pnum),&patchStepMemSize),"-SD-?");
                    _options_check((patchStepMemSize>=hpatch_kStreamCacheSize),"-SD-?");
                }else{
                    patchStepMemSize=kDefaultApkPatchStepMemSize;
                }
            } break;
            case 'v':{
                _options_check((isOutputVersion==_kNULL_VALUE)&&(op[2]=='\0'),"-v");
                isOutputVersion=hpatch_TRUE;
            } break;
            case 't':{
                _options_check((isPatchCheck==_kNULL_VALUE)&&(op[2]=='\0'),"-t");
                isPatchCheck=hpatch_TRUE; //test diffFile
            } break;
            case 'd':{
                _options_check((isDiff==_kNULL_VALUE)&&(op[2]=='\0'),"-d");
                isDiff=hpatch_TRUE; //diff only
            } break;
            default: {
                _options_check(hpatch_FALSE,"-?");
            } break;
        }//swich
    }
    if (compressPlugin==0){
#ifdef _CompressPlugin_lzma
        static TCompressPlugin_lzma myLzmaCompressPlugin=lzmaCompressPlugin;
        myLzmaCompressPlugin.compress_level=7;
        myLzmaCompressPlugin.dict_size=kDefaultLzmaDictSize;
        compressPlugin=&myLzmaCompressPlugin.base;
        decompressPlugin=&lzmaDecompressPlugin;
#else
        static TCompressPlugin_zlib myZlibCompressPlugin=zlibCompressPlugin;
        myZlibCompressPlugin.compress_level=9;
        myZlibCompressPlugin.mem_level=kDefaultZlibCompressMemLevel;
        compressPlugin=&myZlibCompressPlugin.base;
        decompressPlugin=&zlibDecompressPlugin;
#endif
    }
    if (threadNum==_THREAD_NUMBER_NULL)
        threadNum=_THREAD_NUMBER_DEFUALT;
    else if (threadNum>_THREAD_NUMBER_MAX)
        threadNum=_THREAD_NUMBER_MAX;
    if (compressPlugin!=0){
        compressPlugin->setParallelThreadNumber(compressPlugin,(int)threadNum);
    }
    
    if (isSingleCompressedDiff==_kNULL_VALUE)
        isSingleCompressedDiff=hpatch_FALSE;
    if (diffMatchScore==_kNULL_SIZE)
        diffMatchScore=kDefaultDiffMatchScore;
    if (isOutputVersion==_kNULL_VALUE)
        isOutputVersion=hpatch_FALSE;
    if (isOutputVersion){
        printf("ApkDiffPatch::ZipDiff v" APKDIFFPATCH_VERSION_STRING "\n\n");
        if (arg_values_size==0)
            return 0; //ok
    }
    
    if ((isDiff==hpatch_TRUE)&&(isPatchCheck==_kNULL_VALUE))
        isPatchCheck=hpatch_FALSE;
    if ((isDiff==_kNULL_VALUE)&&(isPatchCheck==hpatch_TRUE))
        isDiff=hpatch_FALSE;
    if (isDiff==_kNULL_VALUE)
        isDiff=hpatch_TRUE;
    if (isPatchCheck==_kNULL_VALUE)
        isPatchCheck=hpatch_TRUE;
    assert(isPatchCheck||isDiff);

    _options_check(arg_values_size==3,"count");
    
    oldZipPath      =arg_values[0];
    newZipPath      =arg_values[1];
    outDiffFileName =arg_values[2];
    hpatch_printPath_utf8((std::string("oldZip  : \"")+oldZipPath+"\"\n").c_str());
    hpatch_printPath_utf8((std::string("newZip  : \"")+newZipPath+"\"\n").c_str());
    hpatch_printPath_utf8((std::string(isDiff?
                                       "outDiff : \"":
                                       "testDiff: \"")+outDiffFileName+"\"\n").c_str());
    double time0=clock_s();
    bool   isNewZipApkV2SignNoError=true;
    if (isDiff){
        if (!ZipDiff(oldZipPath,newZipPath,outDiffFileName,compressPlugin,decompressPlugin,
                     (int)diffMatchScore,isSingleCompressedDiff?patchStepMemSize:0,
                     &isNewZipApkV2SignNoError,(int)threadNum)){
            printf("ZipDiff error!\n");
            return 1;
        }//else
        printf("ZipDiff time: %.3f s\n",(clock_s()-time0));
    }
    
    int exitCode=0;
    if (isPatchCheck){
        printf("\nrun ZipPatch:\n");
        for (int threadNum=1;threadNum<=4;threadNum*=4){
#if (_IS_USED_MULTITHREAD)
#else
            if (threadNum>1) break;
#endif
            double time2=clock_s();
            TCheckZipDiffResult rt=checkZipDiff(oldZipPath,newZipPath,outDiffFileName,threadNum);
            exitCode=((rt==CHECK_BYTE_BY_BYTE_EQUAL_TRUE)||(rt==CHECK_SAME_LIKE_TRUE__BYTE_BY_BYTE_EQUAL_FALSE))?0:1;
            switch (rt) {
                case CHECK_BYTE_BY_BYTE_EQUAL_TRUE:{
                    printf("  check ZipPatch result Byte By Byte Equal ok!\n");
                } break;
                case CHECK_SAME_LIKE_TRUE__BYTE_BY_BYTE_EQUAL_FALSE:{
                    printf("  check ZipPatch result Same Like ok! (but not Byte By Byte Equal)\n");
                } break;
                case CHECK_SAME_LIKE_TRUE__BYTE_BY_BYTE_EQUAL_ERROR:{
                    printf("  check ZipPatch result Byte By Byte Equal ERROR!\n");
                    printf("  (did newZip=AndroidSDK#apksigner(ApkNormalized(newZip)) before running ZipDiff?)\n");
                } break;
                case CHECK_SAME_LIKE_ERROR:{
                    printf("  check ZipPatch result zip data ERROR!\n");
                } break;
                case CHECK_ZIPPATCH_ERROR:{
                    printf("  run ZipPatch ERROR!\n");
                } break;
                default: { //CHECK_OTHER_ERROR
                    printf("  run check ZipPatch result ERROR!\n");
                }
            }
            printf("  patch time: %.3f s (thread==%d)\n",(clock_s()-time2),threadNum);
        }
    }
    if (isPatchCheck && isDiff)
        printf("\nall     time: %.3f s\n",(clock_s()-time0));
    if (!isNewZipApkV2SignNoError){ //safe check
        exitCode=1;
        printf("\nnewZip used ApkV2Sign, but not complete, as an ERROR!\n\n");
    }
    return exitCode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
cmpl $0x2, %edi
jl 0x543b
movl %edi, %edx
movq $-0x1, %rbx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0x1, %r14d
movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999
leaq 0x542fa(%rip), %r10     # 0x59004
movl $0xffffffff, 0x68(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0xffffffff, 0x70(%rsp) # imm = 0xFFFFFFFF
xorl %r15d, %r15d
xorl %r8d, %r8d
xorl %r12d, %r12d
movq $0x0, 0x60(%rsp)
xorl %edi, %edi
movq %rsi, 0x10(%rsp)
movq %rdx, 0x98(%rsp)
movq (%rsi,%r14,8), %rbp
testq %rbp, %rbp
je 0x558b
movzbl (%rbp), %eax
cmpl $0x2d, %eax
je 0x4d83
testl %eax, %eax
je 0x558b
cmpl $0x3, %r15d
jge 0x5ac7
movslq %r15d, %rax
movq %rbp, 0xa0(%rsp,%rax,8)
incl %r15d
incq %r14
cmpq %rdx, %r14
jne 0x4d40
jmp 0x5a8d
movzbl 0x1(%rbp), %eax
cmpl $0x6c, %eax
jle 0x4e58
addl $-0x6d, %eax
cmpl $0x9, %eax
ja 0x5b15
movslq (%r10,%rax,4), %rax
addq %r10, %rax
jmpq *%rax
cmpb $0x2d, 0x2(%rbp)
jne 0x5afe
cmpq $-0x1, %rbx
jne 0x5b07
movl %ecx, 0x4(%rsp)
movl %r13d, (%rsp)
movq %rdi, 0x8(%rsp)
addq $0x3, %rbp
movq %rbp, %rdi
movq %r8, %rbx
movl %r15d, 0x18(%rsp)
movq %r9, %r15
movq %r10, %r13
callq 0x4140
movq %r15, %r9
movl 0x18(%rsp), %r15d
testq %rax, %rax
je 0x5597
movq %r13, %r10
movq %rbx, %r8
movzbl -0x1(%rbp,%rax), %edx
addl $-0x47, %edx
cmpl $0x26, %edx
ja 0x542d
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rdx, %rcx
jb 0x515a
movl $0xa, %ecx
movabsq $0x1000000010, %rsi     # imm = 0x1000000010
btq %rdx, %rsi
jb 0x515f
movabsq $0x4000000040, %rcx     # imm = 0x4000000040
btq %rdx, %rcx
movl $0x0, %ecx
jae 0x5168
movl $0x14, %ecx
jmp 0x515f
cmpl $0x53, %eax
je 0x506b
cmpl $0x63, %eax
je 0x4f9d
cmpl $0x64, %eax
jne 0x5b15
cmpl $-0x1, %r13d
jne 0x5ade
movl $0x1, %r13d
cmpb $0x0, 0x2(%rbp)
je 0x4d76
jmp 0x5ade
testq %r12, %r12
jne 0x5af0
cmpb $0x2d, 0x2(%rbp)
jne 0x5af0
movl %ecx, 0x4(%rsp)
movl %r13d, (%rsp)
movq %rdi, 0x8(%rsp)
addq $0x3, %rbp
movq %rbp, %rdi
movq %r8, %r12
movq %rbx, %r13
movl %r15d, %ebx
movq %r9, %r15
callq 0x4140
testq %rax, %rax
je 0x55a3
movq %r15, %r9
movl %ebx, %r15d
movq %r13, %rbx
movq %r12, %r8
cmpq $0x1, %rax
je 0x4eef
cmpb $0x30, (%rbp)
je 0x55a3
xorl %ecx, %ecx
xorl %r12d, %r12d
movzbl (%rbp,%rcx), %edx
leal -0x30(%rdx), %esi
cmpb $0x9, %sil
ja 0x55a3
addq $-0x30, %rdx
cmpq %r9, %r12
jb 0x4f1f
jne 0x55a3
cmpq $0x5, %rdx
ja 0x55a3
leaq (%r12,%r12,4), %rsi
leaq (%rdx,%rsi,2), %r12
incq %rcx
cmpq %rcx, %rax
jne 0x4ef4
testq %r12, %r12
movq 0x8(%rsp), %rdi
movl (%rsp), %r13d
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x540b1(%rip), %r10     # 0x59004
jne 0x4d76
jmp 0x5b5f
cmpl $-0x1, 0x70(%rsp)
jne 0x5acc
movl $0x1, 0x70(%rsp)
cmpb $0x0, 0x2(%rbp)
je 0x4d76
jmp 0x5acc
cmpl $-0x1, %ecx
jne 0x5ad5
movl $0x1, %ecx
cmpb $0x0, 0x2(%rbp)
je 0x4d76
jmp 0x5ad5
testq %rdi, %rdi
jne 0x5af5
cmpb $0x2d, 0x2(%rbp)
jne 0x5af5
movl %ecx, 0x4(%rsp)
movl %r13d, (%rsp)
movq %r8, 0x18(%rsp)
addq $0x3, %rbp
movq %rbp, %rdi
movl $0x2d, %esi
callq 0x4100
movq %rax, %r13
testq %rax, %rax
jne 0x4fe4
movq %rbp, %rdi
callq 0x4140
movq %rax, %r13
addq %rbp, %r13
xorl %eax, %eax
movq %rax, 0x40(%rsp)
movq %rax, 0x20(%rsp)
movq %rax, 0x78(%rsp)
subq $0x30, %rsp
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rsp)
movupd %xmm0, 0x8(%rsp)
movq $0x9, (%rsp)
movl $0x1, %r9d
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
leaq 0x542c8(%rip), %rcx     # 0x592f1
leaq 0x50(%rsp), %r8
callq 0x5f97
addq $0x30, %rsp
testb %al, %al
je 0x5b0c
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x505d
leaq 0x542a1(%rip), %rsi     # 0x592f1
callq 0x4420
testl %eax, %eax
je 0x51f9
movq $0x0, 0x8(%rsp)
jmp 0x5225
movq %rbx, 0x18(%rsp)
cmpl $-0x1, 0x68(%rsp)
jne 0x5ae7
cmpb $0x44, 0x2(%rbp)
jne 0x5ae7
movl %r15d, %ebx
movq %r9, %r15
movzbl 0x3(%rbp), %eax
movl $0x200000, %r8d         # imm = 0x200000
testl %eax, %eax
je 0x5142
cmpl $0x2d, %eax
jne 0x5ae7
movl $0x1, 0x68(%rsp)
movl %ecx, 0x4(%rsp)
movl %r13d, (%rsp)
movq %rdi, 0x8(%rsp)
addq $0x4, %rbp
movq %rbp, %rdi
movq %r10, %r13
callq 0x4140
testq %rax, %rax
movq %r15, %r9
movl %ebx, %r15d
movq 0x18(%rsp), %rbx
je 0x5abe
movq %r13, %r10
movzbl -0x1(%rbp,%rax), %edx
addl $-0x47, %edx
cmpl $0x26, %edx
ja 0x5434
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rdx, %rcx
jb 0x538d
movl $0xa, %ecx
movabsq $0x1000000010, %rsi     # imm = 0x1000000010
btq %rdx, %rsi
jb 0x5392
movabsq $0x4000000040, %rcx     # imm = 0x4000000040
btq %rdx, %rcx
movl $0x0, %ecx
jae 0x539b
movl $0x14, %ecx
jmp 0x5392
movl $0x1, 0x68(%rsp)
movq %r15, %r9
movl %ebx, %r15d
movq 0x18(%rsp), %rbx
jmp 0x4d76
movl $0x1e, %ecx
decq %rax
je 0x5597
cmpq $0x1, %rax
je 0x5178
cmpb $0x30, (%rbp)
je 0x5597
xorl %edx, %edx
xorl %ebx, %ebx
movzbl (%rbp,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x5597
addq $-0x30, %rsi
cmpq %r9, %rbx
jb 0x51a7
jne 0x5597
cmpq $0x5, %rsi
ja 0x5597
leaq (%rbx,%rbx,4), %rdi
leaq (%rsi,%rdi,2), %rbx
incq %rdx
cmpq %rdx, %rax
jne 0x517c
movq $-0x1, %rax
shrq %cl, %rax
cmpq %rax, %rbx
ja 0x5597
shlq %cl, %rbx
cmpq $0x401, %rbx            # imm = 0x401
movq 0x8(%rsp), %rdi
movl (%rsp), %r13d
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rsi
movq 0x98(%rsp), %rdx
jb 0x4d76
jmp 0x5b64
movl 0x20(%rsp), %eax
movl %eax, 0x771e5(%rip)     # 0x7c3e8
movl $0x8, 0x771df(%rip)     # 0x7c3ec
leaq 0x771ac(%rip), %rax     # 0x7c3c0
movq %rax, 0x8(%rsp)
leaq 0x771e0(%rip), %rax     # 0x7c400
movq %rax, 0x60(%rsp)
subq $0x8, %rsp
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
leaq 0x53edf(%rip), %rcx     # 0x5911a
leaq 0x28(%rsp), %r8
xorl %r9d, %r9d
pushq $0x400000               # imm = 0x400000
pushq $0x60000000             # imm = 0x60000000
pushq $0x1000                 # imm = 0x1000
leaq 0x98(%rsp), %rax
pushq %rax
pushq $0x7
callq 0x5f97
addq $0x30, %rsp
testb %al, %al
je 0x5b1e
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x52b4
leaq 0x53e9b(%rip), %rsi     # 0x5911a
callq 0x4420
testl %eax, %eax
jne 0x52b4
movl 0x20(%rsp), %eax
movl %eax, 0x771c6(%rip)     # 0x7c458
movl 0x78(%rsp), %eax
movl %eax, 0x771c0(%rip)     # 0x7c45c
leaq 0x7718d(%rip), %rax     # 0x7c430
movq %rax, 0x8(%rsp)
leaq 0x770e1(%rip), %rax     # 0x7c390
movq %rax, 0x60(%rsp)
subq $0x8, %rsp
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
leaq 0x53e55(%rip), %rcx     # 0x5911f
leaq 0x28(%rsp), %r8
xorl %r9d, %r9d
pushq $0x400000               # imm = 0x400000
pushq $0x60000000             # imm = 0x60000000
pushq $0x1000                 # imm = 0x1000
leaq 0x98(%rsp), %rax
pushq %rax
pushq $0x7
callq 0x5f97
addq $0x30, %rsp
testb %al, %al
je 0x5b27
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5317
leaq 0x53e11(%rip), %rsi     # 0x5911f
callq 0x4420
testl %eax, %eax
je 0x5336
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
movl (%rsp), %r13d
je 0x5b30
cmpq $0x0, 0x60(%rsp)
jne 0x5361
jmp 0x5b30
movl 0x20(%rsp), %eax
movl %eax, 0x77150(%rip)     # 0x7c490
movl 0x78(%rsp), %eax
movl %eax, 0x7714a(%rip)     # 0x7c494
leaq 0x77117(%rip), %rdi     # 0x7c468
leaq 0x77148(%rip), %rax     # 0x7c4a0
movq %rax, 0x60(%rsp)
movl (%rsp), %r13d
movq 0x18(%rsp), %r8
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rsi
movq 0x98(%rsp), %rdx
movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999
leaq 0x53c7c(%rip), %r10     # 0x59004
jmp 0x4d76
movl $0x1e, %ecx
decq %rax
je 0x5abe
cmpq $0x1, %rax
je 0x53ab
cmpb $0x30, (%rbp)
je 0x5abe
xorl %edx, %edx
xorl %r8d, %r8d
movzbl (%rbp,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x5abe
addq $-0x30, %rsi
cmpq %r9, %r8
jb 0x53db
jne 0x5abe
cmpq $0x5, %rsi
ja 0x5abe
leaq (%r8,%r8,4), %rdi
leaq (%rsi,%rdi,2), %r8
incq %rdx
cmpq %rdx, %rax
jne 0x53b0
movq $-0x1, %rax
shrq %cl, %rax
cmpq %rax, %r8
ja 0x5abe
shlq %cl, %r8
cmpq $0xfff, %r8             # imm = 0xFFF
movq 0x8(%rsp), %rdi
movl (%rsp), %r13d
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rsi
movq 0x98(%rsp), %rdx
ja 0x4d76
jmp 0x5b69
xorl %ecx, %ecx
jmp 0x5168
xorl %ecx, %ecx
jmp 0x539b
movq $-0x1, %rbx
movq $0x0, 0x18(%rsp)
movb $0x1, %r14b
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
xorl %r12d, %r12d
movabsq $0x40000000000007, %rax # imm = 0x40000000000007
movq %rax, 0x76f10(%rip)     # 0x7c380
leaq 0x76ee1(%rip), %rdi     # 0x7c358
leaq 0x76f12(%rip), %rax     # 0x7c390
movq %rax, 0x60(%rsp)
movl $0x100, %eax            # imm = 0x100
cmpq %rax, %r12
cmovbq %r12, %rax
testq %r12, %r12
movl $0x4, %r12d
cmovnel %eax, %r12d
movl %r12d, %esi
movq %rdi, 0x8(%rsp)
callq *0x10(%rdi)
testb %r14b, %r14b
jne 0x54c1
leaq 0x54213(%rip), %rdi     # 0x596c6
callq 0x44e0
testl %r15d, %r15d
je 0x5584
movl %r13d, %eax
xorl $0x1, %eax
movl %ebp, %ecx
notl %ecx
xorl %r14d, %r14d
orl %eax, %ecx
cmovnel %ebp, %r14d
movl %r13d, %eax
notl %eax
movl %r14d, %ecx
xorl $0x1, %ecx
orl %eax, %ecx
setne %al
testl %r13d, %r13d
setne %bpl
orl %r14d, %r13d
je 0x5b6e
cmpl $0x3, %r15d
jne 0x5578
movb %al, 0x10(%rsp)
movq 0xa0(%rsp), %r15
movq 0xa8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xb0(%rsp), %r13
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x53b69(%rip), %rsi     # 0x59097
leaq 0x53b6d(%rip), %rdx     # 0x590a2
leaq 0x78(%rsp), %rdi
callq 0x7208
leaq 0x78(%rsp), %rdi
movq %r15, 0x68(%rsp)
movq %r15, %rsi
callq 0x4640
leaq 0x30(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x55af
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x55b7
leaq 0x543e1(%rip), %rdi     # 0x59960
jmp 0x5b37
xorl %eax, %eax
jmp 0x5b4d
leaq 0x54300(%rip), %rdi     # 0x59892
jmp 0x5b37
leaq 0x5439c(%rip), %rdi     # 0x5993a
jmp 0x5b37
leaq 0x54369(%rip), %rdi     # 0x59913
jmp 0x5b37
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x53ac9(%rip), %rsi     # 0x590a3
callq 0x4640
leaq 0x50(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rsi, %r15
je 0x5609
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x5611
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rdi
callq 0x47654
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x564a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x5666
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x5688
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
movq %rax, (%rdi)
leaq 0x53a07(%rip), %rsi     # 0x590a6
leaq 0x53a0b(%rip), %rdx     # 0x590b1
callq 0x7208
leaq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x4640
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x56e2
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x56ea
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x53996(%rip), %rsi     # 0x590a3
callq 0x4640
movq %r15, 0x40(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5735
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x573e
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rdi
callq 0x47654
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x5777
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x5793
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
andb 0x10(%rsp), %bpl
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x57ba
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x538f1(%rip), %rax     # 0x590b2
leaq 0x538f6(%rip), %rsi     # 0x590be
testb %bpl, %bpl
cmovneq %rax, %rsi
leaq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
movq %rax, (%rdi)
leaq 0x538d7(%rip), %rax     # 0x590bd
leaq 0x538dc(%rip), %rdx     # 0x590c9
cmovneq %rax, %rdx
callq 0x7208
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x4640
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x582b
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x5833
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x5384d(%rip), %rsi     # 0x590a3
callq 0x4640
movq %r15, 0x40(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x587e
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x5887
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rdi
callq 0x47654
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x58c0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x58dc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x58fe
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
callq 0x5f3f
movsd %xmm0, 0x10(%rsp)
movb $0x1, 0x40(%rsp)
testb %bpl, %bpl
je 0x5972
cmpq $-0x1, %rbx
movl $0x3, %r9d
cmovnel %ebx, %r9d
subq $0x8, %rsp
leaq 0x48(%rsp), %rax
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq %r13, %rdx
movq 0x10(%rsp), %rcx
movq 0x68(%rsp), %r8
pushq %r12
pushq %rax
pushq 0x30(%rsp)
callq 0xaa2c
addq $0x20, %rsp
testb %al, %al
je 0x5a81
callq 0x5f3f
subsd 0x10(%rsp), %xmm0
leaq 0x5375f(%rip), %rdi     # 0x590ca
movb $0x1, %al
callq 0x4060
testl %r14d, %r14d
je 0x5a67
movb %bpl, 0x60(%rsp)
leaq 0x53d6c(%rip), %rdi     # 0x596f3
callq 0x44e0
movl $0x1, %ebx
leaq 0x53ea8(%rip), %r15     # 0x59840
leaq 0x53741(%rip), %r14     # 0x590e0
leaq 0x53686(%rip), %r12     # 0x5902c
callq 0x5f3f
movsd %xmm0, 0x8(%rsp)
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq %r13, %rdx
movl %ebx, %ecx
callq 0xb925
movl %eax, %ebp
cmpl $0x4, %eax
ja 0x5a0a
movl %ebp, %eax
movslq (%r12,%rax,4), %rax
addq %r12, %rax
movq %r15, %rdi
jmpq *%rax
leaq 0x53e1c(%rip), %rdi     # 0x597fd
jmp 0x5a11
leaq 0x53d50(%rip), %rdi     # 0x5973a
jmp 0x5a11
leaq 0x53d85(%rip), %rdi     # 0x59778
callq 0x44e0
leaq 0x53dab(%rip), %rdi     # 0x597aa
jmp 0x5a11
leaq 0x53d48(%rip), %rdi     # 0x59750
jmp 0x5a11
leaq 0x53e5e(%rip), %rdi     # 0x5986f
callq 0x44e0
callq 0x5f3f
subsd 0x8(%rsp), %xmm0
movq %r14, %rdi
movl %ebx, %esi
movb $0x1, %al
callq 0x4060
leal (,%rbx,4), %eax
cmpl $0x2, %ebx
movl %eax, %ebx
jb 0x59a6
cmpl $0x2, %ebp
setae %bl
cmpb $0x0, 0x60(%rsp)
je 0x5a69
callq 0x5f3f
subsd 0x10(%rsp), %xmm0
leaq 0x536a5(%rip), %rdi     # 0x59103
movb $0x1, %al
callq 0x4060
jmp 0x5a69
xorl %ebx, %ebx
cmpb $0x0, 0x40(%rsp)
je 0x5a78
movzbl %bl, %eax
jmp 0x5b4d
leaq 0x53c83(%rip), %rdi     # 0x59702
jmp 0x5a88
leaq 0x53c5c(%rip), %rdi     # 0x596e4
jmp 0x5b43
movl %ecx, %ebp
movl 0x70(%rsp), %eax
incl %eax
cmpl $0x2, %eax
setb %r14b
movl 0x68(%rsp), %ecx
incl %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
cmovbq %rax, %r8
movq %r8, 0x18(%rsp)
testq %rdi, %rdi
jne 0x5483
jmp 0x545f
leaq 0x53e27(%rip), %rdi     # 0x598ec
jmp 0x5b37
jmp 0x5578
leaq 0x53df4(%rip), %rdi     # 0x598c7
jmp 0x5b37
leaq 0x53dd9(%rip), %rdi     # 0x598b5
jmp 0x5b37
leaq 0x53dbe(%rip), %rdi     # 0x598a3
jmp 0x5b37
leaq 0x53deb(%rip), %rdi     # 0x598d9
jmp 0x5b37
jmp 0x55a3
leaq 0x53e05(%rip), %rdi     # 0x59901
jmp 0x5b37
leaq 0x53e22(%rip), %rdi     # 0x59927
jmp 0x5b37
jmp 0x5597
leaq 0x543f7(%rip), %rdi     # 0x59f0a
jmp 0x5b37
leaq 0x53e32(%rip), %rdi     # 0x5994e
jmp 0x5b37
leaq 0x543fe(%rip), %rdi     # 0x59f23
jmp 0x5b37
leaq 0x5440e(%rip), %rdi     # 0x59f3c
jmp 0x5b37
leaq 0x5441f(%rip), %rdi     # 0x59f56
callq 0x44e0
leaq 0x53e32(%rip), %rdi     # 0x59975
callq 0x44e0
movl $0x1, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55a3
jmp 0x5597
jmp 0x5abe
leaq 0x534d3(%rip), %rdi     # 0x59048
leaq 0x534e1(%rip), %rsi     # 0x5905d
leaq 0x534eb(%rip), %rcx     # 0x5906e
movl $0x160, %edx            # imm = 0x160
callq 0x4200
jmp 0x5b9d
jmp 0x5bb9
jmp 0x5bda
jmp 0x5c01
jmp 0x5b9d
jmp 0x5bb9
jmp 0x5bda
jmp 0x5c01
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x5bbc
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x5bbc
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x5bdd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x5bdd
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x5c04
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x5c04
movq %rax, %rbx
movq %rbx, %rdi
callq 0x45e0