// File: /workspace/github_cpp_makefile_star2_O1/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 $0xc8, %rsp
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
cmpl $0x2, %edi
jl 0x553e
movq %rsi, %r15
movl %edi, %ebx
movq $-0x1, 0x70(%rsp)
movl $0xffffffff, 0x58(%rsp) # imm = 0xFFFFFFFF
movl $0x1, %r13d
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x60(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x98(%rsp) # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq $0x0, 0xa0(%rsp)
movq $0x0, (%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x8(%rsp)
movq (%r15,%r13,8), %r14
testq %r14, %r14
je 0x4d5a
movzbl (%r14), %eax
cmpl $0x2d, %eax
je 0x4d91
testl %eax, %eax
jne 0x4dd7
leaq 0x54b31(%rip), %rdi     # 0x59892
callq 0x44e0
leaq 0x54c08(%rip), %rdi     # 0x59975
callq 0x44e0
movl $0x1, %eax
movl $0x1, %ebp
testb $0x3, %al
jne 0x5bcf
incq %r13
cmpq %rbx, %r13
jne 0x4d44
jmp 0x556b
movzbl 0x1(%r14), %eax
cmpl $0x6c, %eax
jle 0x4dfe
addl $-0x6d, %eax
cmpl $0x9, %eax
ja 0x51c6
leaq 0x54256(%rip), %rcx     # 0x59004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x2d, 0x2(%r14)
jne 0x51f6
cmpq $-0x1, 0x70(%rsp)
je 0x5202
leaq 0x54b65(%rip), %rdi     # 0x5993a
jmp 0x4d61
cmpl $0x3, %r12d
jge 0x4df2
movslq %r12d, %rax
movq %r14, 0xb0(%rsp,%rax,8)
incl %r12d
movl $0x4, %eax
jmp 0x4d7c
leaq 0x54b67(%rip), %rdi     # 0x59960
jmp 0x4d61
cmpl $0x53, %eax
je 0x4f0f
cmpl $0x63, %eax
je 0x4fb0
cmpl $0x64, %eax
jne 0x51c6
cmpl $-0x1, 0x58(%rsp)
jne 0x4e2b
cmpb $0x0, 0x2(%r14)
je 0x5283
leaq 0x54a71(%rip), %rdi     # 0x598a3
jmp 0x4d61
cmpl $-0x1, 0x60(%rsp)
jne 0x4e49
cmpb $0x0, 0x2(%r14)
je 0x526c
leaq 0x54a65(%rip), %rdi     # 0x598b5
jmp 0x4d61
cmpl $-0x1, 0x98(%rsp)
jne 0x4e6a
cmpb $0x0, 0x2(%r14)
je 0x5276
leaq 0x54a56(%rip), %rdi     # 0x598c7
jmp 0x4d61
cmpq $0x0, (%rsp)
jne 0x51de
cmpb $0x2d, 0x2(%r14)
jne 0x51de
addq $0x3, %r14
movq %r14, %rdi
callq 0x4140
movb $0x1, %sil
testq %rax, %rax
je 0x5397
cmpq $0x1, %rax
je 0x4eb4
cmpb $0x30, (%r14)
je 0x5397
xorl %edx, %edx
xorl %ecx, %ecx
movzbl (%r14,%rdx), %esi
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x4eea
addq $-0x30, %rsi
movabsq $0x1999999999999999, %rdi # imm = 0x1999999999999999
cmpq %rdi, %rcx
jb 0x4eee
setne %dil
cmpq $0x6, %rsi
setae %r8b
orb %dil, %r8b
je 0x4eee
xorl %esi, %esi
jmp 0x4ef9
leaq (%rcx,%rcx,4), %rcx
leaq (%rsi,%rcx,2), %rcx
movb $0x1, %sil
testb %sil, %sil
je 0x538b
incq %rdx
cmpq %rdx, %rax
jne 0x4eb8
jmp 0x538f
cmpl $-0x1, 0x14(%rsp)
jne 0x51d2
cmpb $0x44, 0x2(%r14)
jne 0x51d2
movzbl 0x3(%r14), %eax
testl %eax, %eax
je 0x52a0
cmpl $0x2d, %eax
jne 0x51d2
addq $0x4, %r14
movq %r14, %rdi
callq 0x4140
testq %rax, %rax
je 0x53d8
movzbl -0x1(%r14,%rax), %ecx
addl $-0x47, %ecx
cmpl $0x26, %ecx
ja 0x5537
movabsq $0x100000001, %rdx      # imm = 0x100000001
btq %rcx, %rdx
jb 0x53f5
movabsq $0x1000000010, %rdx     # imm = 0x1000000010
btq %rcx, %rdx
jb 0x53eb
movabsq $0x4000000040, %rdx     # imm = 0x4000000040
btq %rcx, %rdx
movl $0x0, %ecx
jae 0x53fd
decq %rax
movl $0x14, %ecx
jmp 0x53fd
cmpq $0x0, 0x8(%rsp)
jne 0x51ea
cmpb $0x2d, 0x2(%r14)
jne 0x51ea
addq $0x3, %r14
movq %r14, %rdi
movl $0x2d, %esi
callq 0x4100
testq %rax, %rax
jne 0x4fe8
movq %r14, %rdi
callq 0x4140
addq %r14, %rax
xorl %ecx, %ecx
movq %rcx, 0x38(%rsp)
movq %rcx, 0x18(%rsp)
movq %rcx, 0x78(%rsp)
subq $0x30, %rsp
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rsp)
movupd %xmm0, 0x8(%rsp)
movq $0x9, (%rsp)
movl $0x1, %r9d
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
movq %rax, 0xd8(%rsp)
movq %rax, %rdx
leaq 0x542bc(%rip), %rcx     # 0x592f1
leaq 0x48(%rsp), %r8
callq 0x6037
addq $0x30, %rsp
testb %al, %al
je 0x528d
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5091
leaq 0x54295(%rip), %rsi     # 0x592f1
callq 0x4420
testl %eax, %eax
jne 0x5091
movl 0x18(%rsp), %eax
movl %eax, 0x77379(%rip)     # 0x7c3e8
movl $0x8, 0x77373(%rip)     # 0x7c3ec
leaq 0x77340(%rip), %rax     # 0x7c3c0
movq %rax, 0x8(%rsp)
leaq 0x77374(%rip), %rax     # 0x7c400
movq %rax, 0x68(%rsp)
subq $0x8, %rsp
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq 0xb0(%rsp), %rdx
leaq 0x5406e(%rip), %rcx     # 0x5911a
leaq 0x20(%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 0x6037
addq $0x30, %rsp
testb %al, %al
je 0x52bc
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5125
leaq 0x5402a(%rip), %rsi     # 0x5911a
callq 0x4420
testl %eax, %eax
jne 0x5125
movl 0x18(%rsp), %eax
movl %eax, 0x77355(%rip)     # 0x7c458
movl 0x78(%rsp), %eax
movl %eax, 0x7734f(%rip)     # 0x7c45c
leaq 0x7731c(%rip), %rax     # 0x7c430
movq %rax, 0x8(%rsp)
leaq 0x77270(%rip), %rax     # 0x7c390
movq %rax, 0x68(%rsp)
subq $0x8, %rsp
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq 0xb0(%rsp), %rdx
leaq 0x53fdf(%rip), %rcx     # 0x5911f
leaq 0x20(%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 0x6037
addq $0x30, %rsp
testb %al, %al
je 0x53df
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x54df
leaq 0x53f97(%rip), %rsi     # 0x5911f
callq 0x4420
testl %eax, %eax
movq 0x8(%rsp), %rax
jne 0x54e4
movl 0x18(%rsp), %eax
movl %eax, 0x772ec(%rip)     # 0x7c490
movl 0x78(%rsp), %eax
movl %eax, 0x772e6(%rip)     # 0x7c494
leaq 0x772b3(%rip), %rax     # 0x7c468
leaq 0x772e4(%rip), %rcx     # 0x7c4a0
movq %rcx, 0x68(%rsp)
jmp 0x54e4
leaq 0x54781(%rip), %rdi     # 0x5994e
jmp 0x4d61
leaq 0x54700(%rip), %rdi     # 0x598d9
jmp 0x4d61
leaq 0x5472e(%rip), %rdi     # 0x59913
jmp 0x4d61
leaq 0x54710(%rip), %rdi     # 0x59901
jmp 0x4d61
leaq 0x5472a(%rip), %rdi     # 0x59927
jmp 0x4d61
addq $0x3, %r14
movq %r14, %rdi
callq 0x4140
testq %rax, %rax
je 0x5299
movzbl -0x1(%r14,%rax), %ecx
addl $-0x47, %ecx
cmpl $0x26, %ecx
ja 0x5530
movabsq $0x100000001, %rdx      # imm = 0x100000001
btq %rcx, %rdx
jb 0x52d2
movabsq $0x1000000010, %rdx     # imm = 0x1000000010
btq %rcx, %rdx
jb 0x52c8
movabsq $0x4000000040, %rdx     # imm = 0x4000000040
btq %rcx, %rdx
movl $0x0, %ecx
jae 0x52da
decq %rax
movl $0x14, %ecx
jmp 0x52da
movl $0x1, 0x60(%rsp)
jmp 0x52b5
movl $0x1, 0x98(%rsp)
jmp 0x52b5
movl $0x1, 0x58(%rsp)
jmp 0x52b5
leaq 0x54c76(%rip), %rdi     # 0x59f0a
jmp 0x5503
movb $0x1, %al
jmp 0x536e
movl $0x1, 0x14(%rsp)
movl $0x200000, %eax         # imm = 0x200000
movq %rax, 0xa0(%rsp)
movl %ebp, %ecx
jmp 0x5527
leaq 0x54c60(%rip), %rdi     # 0x59f23
jmp 0x5503
decq %rax
movl $0xa, %ecx
jmp 0x52da
decq %rax
movl $0x1e, %ecx
movb $0x1, %sil
testq %rax, %rax
je 0x5348
cmpq $0x1, %rax
je 0x52ee
cmpb $0x30, (%r14)
je 0x5348
decq %rax
xorl %edi, %edi
xorl %edx, %edx
movzbl (%r14,%rdi), %r8d
leal -0x30(%r8), %r9d
movb $0x1, %sil
cmpb $0x9, %r9b
ja 0x5335
addq $-0x30, %r8
movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999
cmpq %r9, %rdx
jb 0x532b
setne %r9b
cmpq $0x6, %r8
setae %r10b
orb %r9b, %r10b
jne 0x5335
leaq (%rdx,%rdx,4), %rdx
leaq (%r8,%rdx,2), %rdx
xorl %esi, %esi
testb %sil, %sil
jne 0x5348
leaq 0x1(%rdi), %r8
cmpq %rdi, %rax
movq %r8, %rdi
jne 0x52f5
jmp 0x5348
movq $-0x1, %rax
shrq %cl, %rax
cmpq %rax, %rdx
seta %al
shlq %cl, %rdx
orb %sil, %al
testb %al, %al
movq 0x70(%rsp), %rcx
cmoveq %rdx, %rcx
movq %rcx, 0x70(%rsp)
testb %al, %al
jne 0x5382
movl %ebp, %ecx
cmpq $0x401, 0x70(%rsp)      # imm = 0x401
setb %dl
jb 0x53c6
leaq 0x545b1(%rip), %rdi     # 0x5993a
jmp 0x53ae
movq (%rsp), %rcx
xorb $0x1, %sil
movq %rcx, (%rsp)
testb %sil, %sil
jne 0x53a7
movb $0x1, %dl
movl %ebp, %ecx
cmpq $0x0, (%rsp)
jne 0x53c6
leaq 0x54565(%rip), %rdi     # 0x59913
callq 0x44e0
leaq 0x545bb(%rip), %rdi     # 0x59975
callq 0x44e0
movl $0x1, %ecx
xorl %edx, %edx
movl $0x1, %eax
testb %dl, %dl
jne 0x5527
jmp 0x5529
movb $0x1, %al
jmp 0x5497
leaq 0x54b56(%rip), %rdi     # 0x59f3c
jmp 0x5503
decq %rax
movl $0xa, %ecx
jmp 0x53fd
decq %rax
movl $0x1e, %ecx
movb $0x1, %sil
testq %rax, %rax
je 0x546b
cmpq $0x1, %rax
je 0x5411
cmpb $0x30, (%r14)
je 0x546b
decq %rax
xorl %edi, %edi
xorl %edx, %edx
movzbl (%r14,%rdi), %r8d
leal -0x30(%r8), %r9d
movb $0x1, %sil
cmpb $0x9, %r9b
ja 0x5458
addq $-0x30, %r8
movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999
cmpq %r9, %rdx
jb 0x544e
setne %r9b
cmpq $0x6, %r8
setae %r10b
orb %r9b, %r10b
jne 0x5458
leaq (%rdx,%rdx,4), %rdx
leaq (%r8,%rdx,2), %rdx
xorl %esi, %esi
testb %sil, %sil
jne 0x546b
leaq 0x1(%rdi), %r8
cmpq %rdi, %rax
movq %r8, %rdi
jne 0x5418
jmp 0x546b
movq $-0x1, %rax
shrq %cl, %rax
cmpq %rax, %rdx
seta %al
shlq %cl, %rdx
orb %sil, %al
testb %al, %al
movq 0xa0(%rsp), %rcx
cmoveq %rdx, %rcx
movq %rcx, 0xa0(%rsp)
testb %al, %al
jne 0x54ad
movb $0x1, %al
movl %ebp, %ecx
cmpq $0xfff, 0xa0(%rsp) # imm = 0xFFF
ja 0x54cc
leaq 0x54438(%rip), %rdi     # 0x598ec
callq 0x44e0
leaq 0x544b5(%rip), %rdi     # 0x59975
callq 0x44e0
movl $0x1, %ecx
xorl %eax, %eax
movl $0x1, 0x14(%rsp)
testb %al, %al
jne 0x5527
movl $0x1, %eax
jmp 0x5529
movq 0x8(%rsp), %rax
testq %rax, %rax
movq %rax, 0x8(%rsp)
je 0x54fc
cmpq $0x0, 0x68(%rsp)
je 0x54fc
xorl %ecx, %ecx
movb $0x1, %dl
jmp 0x551b
leaq 0x54a53(%rip), %rdi     # 0x59f56
callq 0x44e0
leaq 0x54466(%rip), %rdi     # 0x59975
callq 0x44e0
movl $0x1, %ecx
xorl %edx, %edx
movl $0x1, %eax
testb %dl, %dl
cmovnel %ebp, %ecx
je 0x5529
xorl %eax, %eax
movl %ecx, %ebp
jmp 0x4d7c
xorl %ecx, %ecx
jmp 0x52da
xorl %ecx, %ecx
jmp 0x53fd
movl $0xffffffff, 0x60(%rsp) # imm = 0xFFFFFFFF
movb $0x1, %bl
xorl %edi, %edi
movq $-0x1, %r14
movq $0x0, 0x68(%rsp)
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %ebp, %ebp
movl $0xffffffff, 0x58(%rsp) # imm = 0xFFFFFFFF
jmp 0x559f
movl 0x98(%rsp), %eax
incl %eax
cmpl $0x2, %eax
setb %bl
movl 0x14(%rsp), %ecx
incl %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
movq 0xa0(%rsp), %rbp
cmovbq %rax, %rbp
movq 0x70(%rsp), %r14
movq 0x8(%rsp), %rdi
movq (%rsp), %rcx
testq %rdi, %rdi
jne 0x55c8
movabsq $0x40000000000007, %rax # imm = 0x40000000000007
movq %rax, 0x76dcb(%rip)     # 0x7c380
leaq 0x76d9c(%rip), %rdi     # 0x7c358
leaq 0x76dcd(%rip), %rax     # 0x7c390
movq %rax, 0x68(%rsp)
movl $0x100, %eax            # imm = 0x100
cmpq %rax, %rcx
cmovbq %rcx, %rax
testq %rcx, %rcx
movl $0x4, %r13d
cmovneq %rax, %r13
movl %r13d, %esi
movq %rdi, 0x8(%rsp)
callq *0x10(%rdi)
testb %bl, %bl
jne 0x5605
leaq 0x540cf(%rip), %rdi     # 0x596c6
callq 0x44e0
testl %r12d, %r12d
je 0x56d4
movl 0x58(%rsp), %edx
movl %edx, %eax
xorl $0x1, %eax
movl 0x60(%rsp), %esi
movl %esi, %ecx
notl %ecx
xorl %ebx, %ebx
orl %eax, %ecx
cmovnel %esi, %ebx
movl %edx, %eax
notl %eax
movl %ebx, %ecx
xorl $0x1, %ecx
orl %eax, %ecx
setne %al
testl %edx, %edx
setne %r15b
orl %ebx, %edx
je 0x5be3
cmpl $0x3, %r12d
jne 0x56bc
movb %al, (%rsp)
movq 0xb0(%rsp), %r12
movq 0xb8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x53a20(%rip), %rsi     # 0x59097
leaq 0x53a24(%rip), %rdx     # 0x590a2
leaq 0x78(%rsp), %rdi
callq 0x7368
leaq 0x78(%rsp), %rdi
movq %r12, %rsi
callq 0x4640
leaq 0x28(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x56db
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x56e3
leaq 0x5429d(%rip), %rdi     # 0x59960
callq 0x44e0
leaq 0x542a6(%rip), %rdi     # 0x59975
jmp 0x5bc5
xorl %ebp, %ebp
jmp 0x5bcf
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %r14, 0x70(%rsp)
movq 0x8(%rax), %rdx
leaq 0x18(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x53998(%rip), %rsi     # 0x590a3
callq 0x4640
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5737
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x5740
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x38(%rsp), %rdi
callq 0x48304
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x5779
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x5795
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x57b7
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
movq %rax, (%rdi)
leaq 0x538d8(%rip), %rsi     # 0x590a6
leaq 0x538dc(%rip), %rdx     # 0x590b1
callq 0x7368
leaq 0x78(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x4640
leaq 0x28(%rsp), %rsi
movq %rsi, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5811
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x5819
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x18(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x53867(%rip), %rsi     # 0x590a3
callq 0x4640
movq %r14, 0x38(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5864
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x586d
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x38(%rsp), %rdi
callq 0x48304
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x58a6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x58c2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4300
andb (%rsp), %r15b
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
movl %r15d, (%rsp)
je 0x58f0
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
movl (%rsp), %r15d
leaq 0x537bb(%rip), %rax     # 0x590b2
leaq 0x537c0(%rip), %rsi     # 0x590be
testb %r15b, %r15b
cmovneq %rax, %rsi
leaq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
movq %rax, (%rdi)
leaq 0x537a1(%rip), %rax     # 0x590bd
leaq 0x537a6(%rip), %rdx     # 0x590c9
cmovneq %rax, %rdx
callq 0x7368
leaq 0x78(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x4640
leaq 0x28(%rsp), %r15
movq %r15, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5963
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x596c
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x18(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x53714(%rip), %rsi     # 0x590a3
callq 0x4640
movq %r14, 0x38(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x59b7
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x59c0
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x38(%rsp), %rdi
callq 0x48304
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x59f9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
movq %r12, %r14
je 0x5a13
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x5a35
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
callq 0x5fdf
movsd %xmm0, 0x98(%rsp)
movb $0x1, 0x38(%rsp)
cmpb $0x0, (%rsp)
je 0x5ab2
movq 0x70(%rsp), %rax
cmpq $-0x1, %rax
movl $0x3, %r9d
cmovnel %eax, %r9d
subq $0x8, %rsp
leaq 0x40(%rsp), %rax
movq %r14, %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x70(%rsp), %r8
pushq %r13
pushq %rax
pushq %rbp
callq 0xac80
addq $0x20, %rsp
testb %al, %al
je 0x5bbe
callq 0x5fdf
subsd 0x98(%rsp), %xmm0
leaq 0x5361f(%rip), %rdi     # 0x590ca
movb $0x1, %al
callq 0x4060
testl %ebx, %ebx
je 0x5b8a
leaq 0x53c32(%rip), %rdi     # 0x596f3
callq 0x44e0
movl $0x1, %ebx
leaq 0x53d6e(%rip), %rbp     # 0x59840
leaq 0x53607(%rip), %r13     # 0x590e0
leaq 0x5354c(%rip), %r15     # 0x5902c
callq 0x5fdf
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
movl %ebx, %ecx
callq 0xbb40
movl %eax, %r14d
cmpl $0x4, %eax
ja 0x5b46
movl %r14d, %eax
movslq (%r15,%rax,4), %rax
addq %r15, %rax
movq %rbp, %rdi
jmpq *%rax
leaq 0x53ce0(%rip), %rdi     # 0x597fd
jmp 0x5b4d
leaq 0x53c14(%rip), %rdi     # 0x5973a
jmp 0x5b4d
leaq 0x53c49(%rip), %rdi     # 0x59778
callq 0x44e0
leaq 0x53c6f(%rip), %rdi     # 0x597aa
jmp 0x5b4d
leaq 0x53c0c(%rip), %rdi     # 0x59750
jmp 0x5b4d
leaq 0x53d22(%rip), %rdi     # 0x5986f
callq 0x44e0
callq 0x5fdf
subsd 0x8(%rsp), %xmm0
movq %r13, %rdi
movl %ebx, %esi
movb $0x1, %al
callq 0x4060
leal (,%rbx,4), %eax
cmpl $0x2, %ebx
movl %eax, %ebx
jb 0x5ae0
xorl %ebp, %ebp
cmpl $0x2, %r14d
setae %bpl
movl (%rsp), %eax
jmp 0x5b8e
xorl %eax, %eax
xorl %ebp, %ebp
testb %al, %al
je 0x5bae
callq 0x5fdf
subsd 0x98(%rsp), %xmm0
leaq 0x5355c(%rip), %rdi     # 0x59103
movb $0x1, %al
callq 0x4060
cmpb $0x0, 0x38(%rsp)
jne 0x5bcf
leaq 0x53b46(%rip), %rdi     # 0x59702
jmp 0x5bc5
leaq 0x53b1f(%rip), %rdi     # 0x596e4
callq 0x44e0
movl $0x1, %ebp
movl %ebp, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5345e(%rip), %rdi     # 0x59048
leaq 0x5346c(%rip), %rsi     # 0x5905d
leaq 0x53476(%rip), %rcx     # 0x5906e
movl $0x160, %edx            # imm = 0x160
callq 0x4200
jmp 0x5c12
jmp 0x5c2e
jmp 0x5c4f
jmp 0x5c76
jmp 0x5c12
jmp 0x5c2e
jmp 0x5c4f
jmp 0x5c76
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x5c31
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x5c31
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x5c52
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x5c52
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x5c79
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x5c79
movq %rax, %rbx
movq %rbx, %rdi
callq 0x45e0