// File: /workspace/github_cpp_makefile_star2_O2/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: main
int main(int argc, char *argv[])
{
    if (argc == 1) {
        usage(argv[0]);
        return -1;
    }

    string srcDirPath = "";
    string dstDirPath = "";
    string sizeStr = "";
    int threadNum = 8;
    bool recursively = false;
    ftpInfo * pFtp = new ftpInfo();
    recvParam * pRecv = new recvParam();
    char optchar;

    gFtpDebug = false;
    while ((optchar = getopt(argc, argv, "s:d:t:r:n:u:p:w:l:f:S:vih")) != -1) {
        switch(optchar) {
        case 's':
            srcDirPath = optarg;
            break;
        case 'd':
            dstDirPath =  optarg;
            break;
        case 't':
            threadNum = atoi(optarg);
            break;
        case 'i':
            gFtpDebug = true;
            break;
        case 'r':
            recursively = true;
            break;
        case 'n':
            pFtp->ftpServer = optarg;
            break;
        case 'u':
            pFtp->user = optarg;
            pRecv->testName = optarg;
            break;
        case 'p':
            pFtp->pass = optarg;
            break;
        case 'w':
            pRecv->width = atoi(optarg);
            break;
        case 'l':
            pRecv->layer = atoi(optarg);
            break;
        case 'f':
            pRecv->fileNum = atoi(optarg);
            break;
        case 'S':
            sizeStr = optarg;
            break;
        case 'v':
            pRecv->verify = true;
            break;
        case 'h':
            usage(argv[0]);
            exit(0);
        default:
            fprintf(stderr, "unkown option: %c\n", optchar);
            return -1;
        }
    }

    if (pFtp->ftpServer == NULL || strlen(pFtp->ftpServer) == 0) {
        fprintf(stderr, "ftp server not specified.\n");
        return -1;
    }

    if (pFtp->user == NULL || strlen(pFtp->user) == 0) {
        fprintf(stderr, "ftp user not specified.\n");
        return -1;
    }

    if (pFtp->pass == NULL || strlen(pFtp->pass) == 0) {
        fprintf(stderr, "ftp password not specified.\n");
        return -1;
    }

    if (srcDirPath.empty()) {
        fprintf(stderr, "source directory path not specified.\n");
        return -1;
    }

    if (dstDirPath.empty()) {
        fprintf(stderr, " destination directory path not specified.\n");
        return -1;
    }

    if (srcDirPath.compare("null") == 0) {
        if (pRecv->fileNum < 0) {
            fprintf(stderr, " source path is %s, please specify the number of file by option '-f'.\n", srcDirPath.c_str());
            return -1;
        }
        if (sizeStr == "") {
            fprintf(stderr, " source path is %s, please specify file size by option '-S'.\n", srcDirPath.c_str());
            return -1;
        }
        if (pRecv->width < 0) {
            fprintf(stderr, " source path is %s, please specify directry width by option '-w'.\n", srcDirPath.c_str());
            return -1;
        }
        if (pRecv->layer < 0) {
            fprintf(stderr, " source path is %s, please specify directory layer by option '-l'.\n", srcDirPath.c_str());
            return -1;
        }
        size_t colonLoc = sizeStr.find_first_of(":");
		if (colonLoc == std::string::npos) {
            pRecv->fileSize = string_to_size(sizeStr.c_str());
		} else {
			pRecv->minSize = string_to_size(sizeStr.substr(0, colonLoc).c_str());
		    pRecv->maxSize = string_to_size(sizeStr.substr(colonLoc+1).c_str());
	        if ((pRecv->minSize < 0) || (pRecv->maxSize <= 0) || (pRecv->minSize > pRecv->maxSize)) {
	            printf("the value of sizerange is invalid: minsize is %ld, maxsize is %ld.\n", 
					pRecv->minSize, pRecv->maxSize);
				return 0;
	        }
	        pRecv->fileSize = pRecv->maxSize;
		}
    }

    // parse source path and destination path and get the compound mode
    string srcLocation, dstLocation;
    string realSrcPath, realDstPath;
    int compoundMode = 0;  // 1: local to ftp, 2: ftp to local, 3: ftp to null
    int colonLoc = 0;
    colonLoc = srcDirPath.find(":");
    if (colonLoc != std::string::npos) {
        srcLocation = srcDirPath.substr(0, colonLoc);
        realSrcPath = srcDirPath.substr(colonLoc + 1, srcDirPath.size() - colonLoc - 1);
    } else {
        if (srcDirPath.compare("null") != 0) {
            fprintf(stderr, "the format of source path %s is invalid.\n\n", srcDirPath.c_str());
            usage(argv[0]);
            return -1;
        } else {
            realSrcPath = srcDirPath;
        }
    }

    if (dstDirPath.compare("null") != 0) {
        if (dstDirPath.at(dstDirPath.size() - 1) != '/') {
            dstDirPath.push_back('/');
        }
    }

    colonLoc = dstDirPath.find(":");
    if (colonLoc != std::string::npos) {
        dstLocation = dstDirPath.substr(0, colonLoc);
        realDstPath = dstDirPath.substr(colonLoc + 1, dstDirPath.size() - colonLoc - 1);
    } else {
        if (dstDirPath.compare("null") != 0) {
            fprintf(stderr, "the format of destination path %s is invalid.\n\n ", dstDirPath.c_str());
            usage(argv[0]);
            return -1;
        } else {
            realDstPath = dstDirPath;
        }
    }

    if ((srcLocation.compare("local") == 0) && (dstLocation.compare("ftp") == 0)) {
        compoundMode = 1;
    } else if ((srcLocation.compare("ftp") == 0) && (dstLocation.compare("local") == 0)) {
        compoundMode = 2;
    } else if ((srcLocation.compare("ftp") == 0) && (dstDirPath.compare("null") == 0)) {
        compoundMode = 3;
    } else if ((srcDirPath.compare("null") == 0) && (dstLocation.compare("ftp") == 0)) {
        compoundMode = 4;
    } else {
        fprintf(stderr, "the format of source path %s or destination path %s is invalid.\n\n ",\
                                                       srcDirPath.c_str(), dstDirPath.c_str());
        usage(argv[0]);
        return -1;
    }

    // open log file
    normalFd = fopen(normalLogFile, "a");
    if (normalFd == NULL) {
        fprintf(stdout, "open file '%s' failed.\n", normalLogFile);
        return -1;
    }
    errorFd = fopen(errorLogFile, "a");
    if (errorFd == NULL) {
        fprintf(stdout, "open file '%s' failed.\n", errorLogFile);
        return -1;
    }


    char printBuf[1024];
    char * buf = new char[128];
    int len = snprintf(printBuf, sizeof(printBuf) - 1, "\nStarting a new Data Transfer Task.\n");
    snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "source path: %s, destintion path: %s\n", 
                                                           srcDirPath.c_str(), dstDirPath.c_str());
    std::cout << printBuf << std::endl;
    fwrite(printBuf, 1, strlen(printBuf), normalFd);
    
    len = snprintf(printBuf, sizeof(printBuf) - 1, "\nData Transfer Error Information.\n");
    snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "source path: %s, destintion path: %s\n", 
                                                           srcDirPath.c_str(), dstDirPath.c_str());
    fwrite(printBuf, 1, strlen(printBuf), errorFd);
    snprintf(printBuf, sizeof(printBuf), "=========================================================================================\n");
    fwrite(printBuf, 1, strlen(printBuf), normalFd);
    fwrite(printBuf, 1, strlen(printBuf), errorFd);

    std::thread printThread;
    std::thread taskThread;
    std::vector<std::thread> workThreads;

    int deep = 1;
    struct timeval start_time;
    struct timeval end_time;
    gettimeofday(&start_time, NULL);

    // according to compound mode, running corresponding task producer and task executor
    if (compoundMode == 1) {  // source is local, destination is ftp
        taskThread = std::thread(local2ftp_dispatcher, pFtp, realSrcPath, realDstPath);
        for (int i = 0; i < threadNum; i++) {
            workThreads.push_back(std::thread(local2ftp_worker, pFtp, i, pRecv->verify));
            ++liveWorkThread;
        }
    } else if (compoundMode == 2) {  // source is ftp, destination is local
        taskThread = std::thread(ftp2local_dispatcher, pFtp, realSrcPath, realDstPath);
        for (int i = 0; i < threadNum; i++) {
            workThreads.push_back(std::thread(ftp2local_worker, pFtp, i, pRecv->verify));
            ++liveWorkThread;
        }
    } else if (compoundMode == 3) {  // source is ftp, destination is null
        taskThread = std::thread(ftp2null_dispatcher, pFtp, realSrcPath, realDstPath);
        for (int i = 0; i < threadNum; i++) {
            workThreads.push_back(std::thread(ftp2null_worker, pFtp, i, pRecv->verify));
            ++liveWorkThread;
        }
    } else if (compoundMode == 4) {  // source is null, destination is ftp
        fileNum = pow(pRecv->width, pRecv->layer) * pRecv->fileNum * threadNum;
        for (int i = 0; i < threadNum; i++) {
            workThreads.push_back(std::thread(null2ftp_worker, pFtp, pRecv, realDstPath, i));
            ++liveWorkThread;
        }
    }
    printThread = std::thread(task_print);

    if (compoundMode != 4) {
        taskThread.join();
    }
    for (auto & th : workThreads) {
        th.join();
    }
    gettimeofday(&end_time, NULL);

    endFlag = 1;
    printThread.join();

    len = snprintf(printBuf, sizeof(printBuf) - 1, "\n\n---------- statistic information ----------\n");

    long long interval = ((long long)end_time.tv_sec*1000000 + end_time.tv_usec) - ((long long)start_time.tv_sec*1000000 + start_time.tv_usec);
    len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "total time: %.2f s\n", ((float)interval / 1000000));

    size_to_string(totalFileSize, buf);
    len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "total size: %s (%ld B)\n", buf, totalFileSize);

    int64_t finishSizeTmp = finishSize;
    size_to_string(finishSizeTmp, buf);
    len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "transfer size: %s (%ld B)\n", buf, finishSizeTmp);

    long errorSizeTmp = errorSize;
    size_to_string(errorSizeTmp, buf);
    len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "failed size: %s (%ld B)\n", buf, errorSizeTmp);

    if (pRecv->verify) {
        if (compoundMode == 1 || compoundMode == 4) {  // ftp is destination, upload
            long md5UploadFailed = md5Failed;
            len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "md5 file upload failed: %ld\n", md5UploadFailed);
        } else if (compoundMode == 2 || compoundMode == 3) {  // ftp is source, download
            long verifyFailedNum = verifyFailed;
            len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "verify failed: %ld\n", verifyFailedNum);
        }
    }

    int uploadRate = ((double)finishSizeTmp/interval) * 1000000;
    size_to_string(uploadRate, buf);
    snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "average copy rate: %s/s\n\n", buf);
    write(1, printBuf, strlen(printBuf));
    fwrite(printBuf, 1, strlen(printBuf), normalFd);

    long fileNumTmp = fileNum;
    if (failed == 0) {
        long finishedTmp = finished;
        len = snprintf(printBuf, sizeof(printBuf) - 1, "Data Migration Succeeded!\n");
        len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "source path: %s, destintion path: %s, total number: %ld, Finished number: %ld\n",
                                                                     srcDirPath.c_str(), dstDirPath.c_str(), fileNumTmp, finishedTmp);
        snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "=========================================================================================\n\n");
        fwrite(printBuf, 1, strlen(printBuf), normalFd);
    } else {
        long failedTmp = failed;
        len = snprintf(printBuf, sizeof(printBuf) - 1, "Data Migration failed!\n");
        len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "Please view the file './FtpBenchMarkError.log' for detailed information.\n");
        len += snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "source path: %s, destintion path: %s, total number: %ld, Failed number: %ld\n",
                                                                     srcDirPath.c_str(), dstDirPath.c_str(), fileNumTmp, failedTmp);
        snprintf(printBuf + len, sizeof(printBuf) - 1 - len, "=========================================================================================\n\n");
        fwrite(printBuf, 1, strlen(printBuf), normalFd);
    }
    fwrite(printBuf + len, 1, strlen(printBuf) - len, errorFd);

    if (normalFd) {
        fflush(normalFd);
        fclose(normalFd);
    }
    if (errorFd) {
        fflush(errorFd);
        fclose(errorFd);
    }
    delete [] buf;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x588, %rsp            # imm = 0x588
movq %rsi, %r14
cmpl $0x1, %edi
jne 0x8890
movq (%r14), %rdi
callq 0x9b85
pushq $-0x1
popq %rbx
jmp 0x9978
movl %edi, %ebp
leaq 0x8059(%rip), %rbx      # 0x108f2
leaq 0x50(%rsp), %rdi
leaq 0x180(%rsp), %rdx
movq %rbx, %rsi
callq 0x9dca
leaq 0x70(%rsp), %rdi
leaq 0x180(%rsp), %rdx
movq %rbx, %rsi
callq 0x9dca
leaq 0x8028(%rip), %rsi      # 0x108f2
leaq 0x100(%rsp), %r13
leaq 0x180(%rsp), %rdx
movq %r13, %rdi
callq 0x9dca
pushq $0x18
popq %rdi
callq 0x43e0
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rax, 0x28(%rsp)
pushq $0x50
popq %rdi
callq 0x43e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x9f1c
movq %rbx, 0x18(%rsp)
movb $0x0, 0xeba5(%rip)      # 0x174c0
pushq $0x8
popq %rax
movl %eax, 0x40(%rsp)
leaq 0x7d7a(%rip), %rbx      # 0x106a3
movq 0xe678(%rip), %r15      # 0x16fa8
leaq 0x76d9(%rip), %r12      # 0x10010
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x40a0
shll $0x18, %eax
cmpl $0xff000000, %eax       # imm = 0xFF000000
je 0x8a34
sarl $0x18, %eax
leal -0x64(%rax), %ecx
cmpl $0x13, %ecx
ja 0x8973
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq (%r15), %rsi
leaq 0x70(%rsp), %rdi
jmp 0x8a2a
cmpl $0x53, %eax
jne 0x9a38
movq (%r15), %rsi
movq %r13, %rdi
jmp 0x8a2a
movq 0x18(%rsp), %rax
movb $0x1, 0x4c(%rax)
jmp 0x8937
movq (%r15), %rsi
movq 0x28(%rsp), %rax
movq %rsi, 0x8(%rax)
movq 0x18(%rsp), %rdi
jmp 0x8a2a
movq (%r15), %rax
movq 0x28(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x8937
movq (%r15), %rdi
callq 0x45c0
movq 0x18(%rsp), %rcx
movl %eax, 0x28(%rcx)
jmp 0x8937
movq (%r15), %rdi
callq 0x45c0
movq 0x18(%rsp), %rcx
movl %eax, 0x24(%rcx)
jmp 0x8937
movb $0x1, 0xeada(%rip)      # 0x174c0
jmp 0x8937
movq (%r15), %rdi
callq 0x45c0
movl %eax, 0x40(%rsp)
jmp 0x8937
movq (%r15), %rax
movq 0x28(%rsp), %rcx
movq %rax, 0x10(%rcx)
jmp 0x8937
movq (%r15), %rdi
callq 0x45c0
movq 0x18(%rsp), %rcx
movl %eax, 0x20(%rcx)
jmp 0x8937
movq (%r15), %rsi
leaq 0x50(%rsp), %rdi
callq 0x4700
jmp 0x8937
movq 0x28(%rsp), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x8bc9
cmpb $0x0, (%rcx)
je 0x8bc9
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x8be1
cmpb $0x0, (%rcx)
je 0x8be1
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x8bf9
cmpb $0x0, (%rax)
je 0x8bf9
cmpq $0x0, 0x58(%rsp)
je 0x939d
cmpq $0x0, 0x78(%rsp)
je 0x93b2
leaq 0x7cda(%rip), %rsi      # 0x10773
leaq 0x50(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x8c2a
movq 0x18(%rsp), %rax
cmpl $0x0, 0x28(%rax)
js 0x99ce
leaq 0x7e31(%rip), %rsi      # 0x108f2
leaq 0x100(%rsp), %rdi
callq 0x9f54
testb %al, %al
jne 0x99e6
movq 0x18(%rsp), %rax
cmpl $0x0, 0x20(%rax)
js 0x99fe
cmpl $0x0, 0x24(%rax)
js 0x9a16
leaq 0x8856(%rip), %rsi      # 0x1134c
leaq 0x100(%rsp), %rdi
xorl %edx, %edx
callq 0x41d0
cmpq $-0x1, %rax
je 0x8c11
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
leaq 0x100(%rsp), %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x4400
movq 0x180(%rsp), %rdi
callq 0xbd58
movq 0x18(%rsp), %rcx
movq %rax, 0x40(%rcx)
leaq 0x180(%rsp), %rdi
callq 0x4170
incq %rbx
leaq 0x180(%rsp), %rdi
leaq 0x100(%rsp), %rsi
pushq $-0x1
popq %rcx
movq %rbx, %rdx
callq 0x4400
movq 0x180(%rsp), %rdi
callq 0xbd58
movq 0x18(%rsp), %rcx
movq %rax, 0x38(%rcx)
leaq 0x180(%rsp), %rdi
callq 0x4170
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rdx
movq 0x40(%rax), %rsi
testq %rsi, %rsi
js 0x8bb4
testq %rdx, %rdx
setg %cl
cmpq %rdx, %rsi
setle %dil
testb %dil, %cl
jne 0x8c26
leaq 0x7cc9(%rip), %rdi      # 0x10884
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4050
jmp 0x9957
movq 0xe3f8(%rip), %rax      # 0x16fc8
movq (%rax), %rcx
leaq 0x7af6(%rip), %rdi      # 0x106d0
pushq $0x1a
jmp 0x93c5
movq 0xe3e0(%rip), %rax      # 0x16fc8
movq (%rax), %rcx
leaq 0x7af9(%rip), %rdi      # 0x106eb
pushq $0x18
jmp 0x93c5
movq 0xe3c8(%rip), %rax      # 0x16fc8
movq (%rax), %rcx
leaq 0x7afa(%rip), %rdi      # 0x10704
pushq $0x1c
jmp 0x93c5
movq 0x100(%rsp), %rdi
callq 0xbd58
movq %rax, %rdx
movq 0x18(%rsp), %rax
movq %rdx, 0x30(%rax)
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x130(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
movb %dl, (%rax)
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %dl, (%rax)
leaq 0x86c3(%rip), %rsi      # 0x1134c
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
callq 0x4750
movq %rax, %rbx
shlq $0x20, %rbx
movabsq $0x100000000, %r13      # imm = 0x100000000
cmpq %rbp, %rbx
jne 0x8cdb
leaq 0x7ac1(%rip), %rsi      # 0x10773
leaq 0x50(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x998c
leaq 0xe0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x4200
jmp 0x8d5b
movslq %eax, %r15
leaq 0x180(%rsp), %rdi
leaq 0x50(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x4400
leaq 0x140(%rsp), %rdi
leaq 0x180(%rsp), %r12
movq %r12, %rsi
callq 0x44a0
movq %r12, %rdi
callq 0x4170
addq %r13, %rbx
sarq $0x20, %rbx
notq %r15
leaq 0x50(%rsp), %rsi
addq 0x8(%rsi), %r15
leaq 0x180(%rsp), %rdi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x4400
leaq 0xe0(%rsp), %rdi
leaq 0x180(%rsp), %rbx
movq %rbx, %rsi
callq 0x44a0
movq %rbx, %rdi
callq 0x4170
leaq 0x7a11(%rip), %rsi      # 0x10773
leaq 0x70(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
je 0x8d93
leaq 0x70(%rsp), %rdi
movq 0x8(%rdi), %rsi
decq %rsi
callq 0x4710
cmpb $0x2f, (%rax)
je 0x8d93
leaq 0x70(%rsp), %rdi
pushq $0x2f
popq %rsi
callq 0x4310
leaq 0x85b2(%rip), %rsi      # 0x1134c
leaq 0x70(%rsp), %rdi
xorl %edx, %edx
callq 0x4750
movq %rax, %rbx
shlq $0x20, %rbx
cmpq %rbp, %rbx
jne 0x8de2
leaq 0x79ba(%rip), %rsi      # 0x10773
leaq 0x70(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x99a4
leaq 0xb8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x4200
jmp 0x8e62
movslq %eax, %r15
leaq 0x180(%rsp), %rdi
leaq 0x70(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x4400
leaq 0x120(%rsp), %rdi
leaq 0x180(%rsp), %r12
movq %r12, %rsi
callq 0x44a0
movq %r12, %rdi
callq 0x4170
addq %r13, %rbx
sarq $0x20, %rbx
notq %r15
leaq 0x70(%rsp), %rsi
addq 0x8(%rsi), %r15
leaq 0x180(%rsp), %rdi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x4400
leaq 0xb8(%rsp), %rdi
leaq 0x180(%rsp), %rbx
movq %rbx, %rsi
callq 0x44a0
movq %rbx, %rdi
callq 0x4170
leaq 0x7abb(%rip), %rsi      # 0x10924
leaq 0x140(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x8e96
leaq 0x7aa9(%rip), %rsi      # 0x1092a
leaq 0x120(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
je 0x8f38
leaq 0x7a8d(%rip), %rsi      # 0x1092a
leaq 0x140(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x8ec6
leaq 0x7a6f(%rip), %rsi      # 0x10924
leaq 0x120(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
je 0x8f40
leaq 0x7a5d(%rip), %rsi      # 0x1092a
leaq 0x140(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x8ef3
leaq 0x788e(%rip), %rsi      # 0x10773
leaq 0x70(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
je 0x8f4a
leaq 0x7879(%rip), %rsi      # 0x10773
leaq 0x50(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x93d6
leaq 0x7a17(%rip), %rsi      # 0x1092a
leaq 0x120(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x93d6
movb $0x1, %al
movl %eax, 0x34(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0x8f5a
movb $0x1, %bpl
xorl %r12d, %r12d
jmp 0x8f45
movb $0x1, %r12b
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x8f52
movb $0x1, %r13b
xorl %ebp, %ebp
xorl %r12d, %r12d
movl $0x0, 0x34(%rsp)
movq 0xe45f(%rip), %rdi      # 0x173c0
leaq 0x7a09(%rip), %rsi      # 0x10971
callq 0x4470
movq %rax, 0xe554(%rip)      # 0x174c8
testq %rax, %rax
movl 0x40(%rsp), %r14d
je 0x91f3
movq 0xe43f(%rip), %rdi      # 0x173c8
leaq 0x79e1(%rip), %rsi      # 0x10971
callq 0x4470
movq %rax, 0xe534(%rip)      # 0x174d0
testq %rax, %rax
je 0x9206
movl $0x80, %edi
callq 0x4030
movq %rax, 0xd8(%rsp)
movups 0x79dd(%rip), %xmm0     # 0x1099b
leaq 0x1a4(%rsp), %rdi
movaps %xmm0, -0x14(%rdi)
movupd 0x79b9(%rip), %xmm0     # 0x1098b
movapd %xmm0, -0x24(%rdi)
movabsq $0xa2e6b73615420, %rax  # imm = 0xA2E6B73615420
movq %rax, -0x7(%rdi)
movq 0x50(%rsp), %rcx
movq 0x70(%rsp), %r8
leaq 0x79ba(%rip), %rdx      # 0x109b0
movl $0x3db, %esi            # imm = 0x3DB
xorl %eax, %eax
callq 0x45f0
movq 0xdfb7(%rip), %rdi      # 0x16fc0
leaq 0x180(%rsp), %rsi
callq 0x43c0
movq %rax, %rdi
callq 0x41b0
leaq 0x180(%rsp), %r15
movq %r15, %rdi
callq 0x4160
movq 0xe493(%rip), %rcx      # 0x174c8
pushq $0x1
popq %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4720
movups 0x7989(%rip), %xmm0     # 0x109d6
leaq 0x1a2(%rsp), %rdi
movaps %xmm0, -0x22(%rdi)
movupd 0x7985(%rip), %xmm0     # 0x109e6
movapd %xmm0, -0x12(%rdi)
movl $0xa2e6e, -0x3(%rdi)    # imm = 0xA2E6E
movq 0x50(%rsp), %rcx
movq 0x70(%rsp), %r8
leaq 0x7932(%rip), %rdx      # 0x109b0
movl $0x3dd, %esi            # imm = 0x3DD
xorl %eax, %eax
callq 0x45f0
movq %r15, %rdi
callq 0x4160
movq 0xe437(%rip), %rcx      # 0x174d0
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4720
leaq 0x794b(%rip), %rsi      # 0x109f9
pushq $0x5b
popq %rdx
movq %r15, %rdi
callq 0x42e0
movq %r15, %rdi
callq 0x4160
movq 0xe400(%rip), %rcx      # 0x174c8
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4720
movq %r15, %rdi
callq 0x4160
movq 0xe3eb(%rip), %rcx      # 0x174d0
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4720
andq $0x0, 0x48(%rsp)
andq $0x0, 0x38(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
leaq 0x170(%rsp), %rdi
xorl %esi, %esi
callq 0x4610
testb %bpl, %bpl
movl %ebp, 0x9c(%rsp)
movl %r12d, 0x98(%rsp)
movl %r13d, 0x94(%rsp)
je 0x922d
leaq -0x3ae3(%rip), %rsi     # 0x5668
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
leaq 0xb8(%rsp), %r8
callq 0x9f62
cmpq $0x0, 0x38(%rsp)
jne 0x9a66
leaq 0x20(%rsp), %rbx
movq (%rbx), %rax
movq %rax, 0x38(%rsp)
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x9ff8
xorl %eax, %eax
leaq -0x459a(%rip), %r12     # 0x4bfe
leaq 0x28(%rsp), %r13
leaq 0x14(%rsp), %rbp
leaq 0xa0(%rsp), %r15
movl %eax, 0x14(%rsp)
cmpl %r14d, %eax
jge 0x94a2
movq 0x18(%rsp), %r8
addq $0x4c, %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa006
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb936
movq %rbx, %rdi
callq 0x9ff8
lock
incl 0xe2f5(%rip)            # 0x174e0
movl 0x14(%rsp), %eax
incl %eax
jmp 0x91aa
movq 0xdd9e(%rip), %rax      # 0x16f98
movq (%rax), %rdi
movq 0xe1bc(%rip), %rdx      # 0x173c0
jmp 0x9217
movq 0xdd8b(%rip), %rax      # 0x16f98
movq (%rax), %rdi
movq 0xe1b1(%rip), %rdx      # 0x173c8
leaq 0x7755(%rip), %rsi      # 0x10973
xorl %eax, %eax
callq 0x4530
pushq $-0x1
popq %rbx
jmp 0x9923
testb %r12b, %r12b
je 0x92e5
leaq -0x2bda(%rip), %rsi     # 0x6663
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
leaq 0xb8(%rsp), %r8
callq 0x9f62
cmpq $0x0, 0x38(%rsp)
jne 0x9a66
leaq 0x20(%rsp), %rbx
movq (%rbx), %rax
movq %rax, 0x38(%rsp)
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x9ff8
xorl %eax, %eax
leaq -0x34f6(%rip), %r12     # 0x5d94
leaq 0x28(%rsp), %r13
leaq 0x14(%rsp), %rbp
leaq 0xa0(%rsp), %r15
movl %eax, 0x14(%rsp)
cmpl %r14d, %eax
jge 0x94a2
movq 0x18(%rsp), %r8
addq $0x4c, %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa006
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb936
movq %rbx, %rdi
callq 0x9ff8
lock
incl 0xe203(%rip)            # 0x174e0
movl 0x14(%rsp), %eax
incl %eax
jmp 0x929c
testb %r13b, %r13b
je 0x93fd
leaq -0x1bcf(%rip), %rsi     # 0x7726
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
leaq 0xb8(%rsp), %r8
callq 0x9f62
cmpq $0x0, 0x38(%rsp)
jne 0x9a66
leaq 0x20(%rsp), %rbx
movq (%rbx), %rax
movq %rax, 0x38(%rsp)
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x9ff8
xorl %eax, %eax
leaq -0x23ed(%rip), %r12     # 0x6f55
leaq 0x28(%rsp), %r13
leaq 0x14(%rsp), %rbp
leaq 0xa0(%rsp), %r15
movl %eax, 0x14(%rsp)
cmpl %r14d, %eax
jge 0x94a2
movq 0x18(%rsp), %r8
addq $0x4c, %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa006
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb936
movq %rbx, %rdi
callq 0x9ff8
lock
incl 0xe14b(%rip)            # 0x174e0
movl 0x14(%rsp), %eax
incl %eax
jmp 0x9354
movq 0xdc24(%rip), %rax      # 0x16fc8
movq (%rax), %rcx
leaq 0x7373(%rip), %rdi      # 0x10721
pushq $0x25
jmp 0x93c5
movq 0xdc0f(%rip), %rax      # 0x16fc8
movq (%rax), %rcx
leaq 0x7384(%rip), %rdi      # 0x10747
pushq $0x2b
popq %rsi
pushq $0x1
popq %rdx
callq 0x4720
pushq $-0x1
popq %rbx
jmp 0x9957
movq 0xdbeb(%rip), %rax      # 0x16fc8
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
movq 0x70(%rsp), %rcx
leaq 0x753d(%rip), %rsi      # 0x1092e
xorl %eax, %eax
callq 0x4530
jmp 0x99c1
leaq 0x18(%rsp), %rbx
movq (%rbx), %rax
cvtsi2sdl 0x20(%rax), %xmm0
cvtsi2sdl 0x24(%rax), %xmm1
callq 0x4690
movq (%rbx), %rax
cvtsi2sdl 0x28(%rax), %xmm1
cvtsi2sd %r14d, %xmm2
mulsd %xmm0, %xmm1
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %rax
xchgq %rax, 0xe0b3(%rip)      # 0x174e8
xorl %eax, %eax
leaq -0x15b0(%rip), %r12     # 0x7e8e
leaq 0x20(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0xb8(%rsp), %r15
leaq 0x14(%rsp), %r14
leaq 0xa0(%rsp), %rbx
movl %eax, 0x14(%rsp)
cmpl 0x40(%rsp), %eax
jge 0x94a2
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
leaq 0x18(%rsp), %rcx
movq %r15, %r8
movq %r14, %r9
callq 0xa09a
movq %rbx, %rdi
movq %r13, %rsi
callq 0xb936
movq %r13, %rdi
callq 0x9ff8
lock
incl 0xe046(%rip)            # 0x174e0
movl 0x14(%rsp), %eax
incl %eax
jmp 0x945d
leaq -0x4b8d(%rip), %rsi     # 0x491c
leaq 0x20(%rsp), %rdi
callq 0xa140
cmpq $0x0, 0x48(%rsp)
jne 0x9a66
leaq 0x20(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x48(%rsp)
andq $0x0, (%rdi)
callq 0x9ff8
cmpb $0x0, 0x34(%rsp)
jne 0x94e6
leaq 0x38(%rsp), %rdi
callq 0x4670
movq 0xa0(%rsp), %rbx
movq 0xa8(%rsp), %r14
cmpq %r14, %rbx
je 0x9509
movq %rbx, %rdi
callq 0x4670
addq $0x8, %rbx
jmp 0x94f6
leaq 0x160(%rsp), %rdi
xorl %esi, %esi
callq 0x4610
pushq $0x1
popq %rax
xchgl %eax, 0xdfbb(%rip)      # 0x174dc
leaq 0x48(%rsp), %rdi
callq 0x4670
movups 0x7541(%rip), %xmm0     # 0x10a73
leaq 0x1ae(%rsp), %rdi
movups %xmm0, -0xf(%rdi)
movups 0x751f(%rip), %xmm0     # 0x10a64
movaps %xmm0, -0x1e(%rdi)
movups 0x7504(%rip), %xmm0     # 0x10a54
movq 0x160(%rsp), %rax
subq 0x170(%rsp), %rax
movq 0x168(%rsp), %r14
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
subq 0x178(%rsp), %r14
addq %rax, %r14
cvtsi2ss %r14, %xmm1
movaps %xmm0, -0x2e(%rdi)
divss 0x6a79(%rip), %xmm1     # 0x10004
cvtss2sd %xmm1, %xmm0
leaq 0x74ed(%rip), %rdx      # 0x10a83
movl $0x3d1, %ebx            # imm = 0x3D1
movl $0x3d1, %esi            # imm = 0x3D1
movb $0x1, %al
callq 0x45f0
movl %eax, %r15d
movq 0xdf6f(%rip), %rdi      # 0x17520
movq 0xd8(%rsp), %r13
movq %r13, %rsi
callq 0xbcb2
movq %r14, 0x40(%rsp)
movslq %r15d, %rax
leaq 0x180(%rsp), %rcx
leaq (%rax,%rcx), %rdi
addq $0x2e, %rdi
subq %rax, %rbx
movq 0xdf3d(%rip), %r8       # 0x17520
leaq 0x74ad(%rip), %rdx      # 0x10a97
movq %rbx, %rsi
movq %r13, %rcx
xorl %eax, %eax
callq 0x45f0
movl %eax, %ebp
movq 0xdf10(%rip), %rbx      # 0x17510
movq %rbx, %rdi
movq %r13, %rsi
callq 0xbcb2
addl $0x2e, %r15d
addl %r15d, %ebp
movslq %ebp, %rax
leaq (%rsp,%rax), %rdi
addq $0x180, %rdi            # imm = 0x180
movl $0x3ff, %r14d           # imm = 0x3FF
movl $0x3ff, %esi            # imm = 0x3FF
subq %rax, %rsi
leaq 0x747a(%rip), %rdx      # 0x10aaf
movq %r13, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x45f0
movl %eax, %r12d
movq 0xdecc(%rip), %r15      # 0x17518
movq %r15, %rdi
movq %r13, %rsi
callq 0xbcb2
addl %ebp, %r12d
movslq %r12d, %r12
leaq (%rsp,%r12), %rdi
addq $0x180, %rdi            # imm = 0x180
subq %r12, %r14
leaq 0x7458(%rip), %rdx      # 0x10aca
movq %r14, %rsi
movq %r13, %r14
movq %r13, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x45f0
addl %eax, %r12d
movq 0x18(%rsp), %rax
cmpb $0x1, 0x4c(%rax)
jne 0x96f3
movl 0x9c(%rsp), %eax
orb 0x34(%rsp), %al
je 0x96b0
leaq 0x743c(%rip), %rdx      # 0x10ae3
leaq 0xde52(%rip), %rax      # 0x17500
jmp 0x96d0
movl 0x98(%rsp), %eax
orb 0x94(%rsp), %al
cmpb $0x1, %al
jne 0x96f3
leaq 0x7437(%rip), %rdx      # 0x10b00
leaq 0xde38(%rip), %rax      # 0x17508
movq (%rax), %rcx
movslq %r12d, %r12
leaq (%rsp,%r12), %rdi
addq $0x180, %rdi            # imm = 0x180
movl $0x3ff, %esi            # imm = 0x3FF
subq %r12, %rsi
xorl %eax, %eax
callq 0x45f0
addl %eax, %r12d
cvtsi2sd %rbx, %xmm0
cvtsi2sdq 0x40(%rsp), %xmm1
divsd %xmm1, %xmm0
mulsd 0x68fd(%rip), %xmm0     # 0x10008
cvttsd2si %xmm0, %eax
movslq %eax, %rdi
movq %r14, %r13
movq %r14, %rsi
callq 0xbcb2
movslq %r12d, %rax
leaq (%rsp,%rax), %rdi
addq $0x180, %rdi            # imm = 0x180
movl $0x3ff, %esi            # imm = 0x3FF
subq %rax, %rsi
leaq 0x73da(%rip), %rdx      # 0x10b14
movq %r13, %rcx
xorl %eax, %eax
callq 0x45f0
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
callq 0x4160
pushq $0x1
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4120
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
callq 0x4160
movq 0xdd4f(%rip), %rcx      # 0x174c8
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x4720
movq 0xdd5a(%rip), %rbx      # 0x174e8
movq 0xdd63(%rip), %rax      # 0x174f8
testq %rax, %rax
je 0x9802
movq 0xdd57(%rip), %r14      # 0x174f8
movabsq $0xa2164656c6961, %rax  # imm = 0xA2164656C6961
leaq 0x197(%rsp), %rdi
movq %rax, -0x7(%rdi)
movups 0x7436(%rip), %xmm0     # 0x10bf4
movaps %xmm0, -0x17(%rdi)
leaq 0x7443(%rip), %rsi      # 0x10c0c
pushq $0x4a
popq %rdx
callq 0x42e0
leaq 0x1e0(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x70(%rsp), %r8
movq %r14, (%rsp)
leaq 0x7468(%rip), %rdx      # 0x10c56
movl $0x39f, %esi            # imm = 0x39F
movq %rbx, %r9
xorl %eax, %eax
callq 0x45f0
addl $0x60, %eax
jmp 0x984e
movq 0xdce7(%rip), %rax      # 0x174f0
movups 0x7329(%rip), %xmm0     # 0x10b39
leaq 0x19a(%rsp), %rdi
movups %xmm0, -0xf(%rdi)
movups 0x730b(%rip), %xmm0     # 0x10b2e
movaps %xmm0, -0x1a(%rdi)
movq 0x50(%rsp), %rcx
movq 0x70(%rsp), %r8
movq %rax, (%rsp)
leaq 0x730d(%rip), %rdx      # 0x10b49
movl $0x3e5, %esi            # imm = 0x3E5
movq %rbx, %r9
xorl %eax, %eax
callq 0x45f0
addl $0x1a, %eax
movslq %eax, %r12
leaq (%rsp,%r12), %rbx
addq $0x180, %rbx            # imm = 0x180
movl $0x3ff, %esi            # imm = 0x3FF
subq %r12, %rsi
leaq 0x732d(%rip), %rdx      # 0x10b98
movq %rbx, %rdi
xorl %eax, %eax
callq 0x45f0
leaq 0x180(%rsp), %r14
movq %r14, %rdi
callq 0x4160
movq 0xdc3c(%rip), %rcx      # 0x174c8
pushq $0x1
popq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4720
movq %r14, %rdi
callq 0x4160
subq %r12, %rax
movq 0xdc20(%rip), %rcx      # 0x174d0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4720
movq 0xdc03(%rip), %rdi      # 0x174c8
testq %rdi, %rdi
je 0x98db
callq 0x4460
movq 0xdbf2(%rip), %rdi      # 0x174c8
callq 0x43d0
movq 0xdbee(%rip), %rdi      # 0x174d0
testq %rdi, %rdi
je 0x98f8
callq 0x4460
movq 0xdbdd(%rip), %rdi      # 0x174d0
callq 0x43d0
movq %r13, %rdi
callq 0x44c0
leaq 0xa0(%rsp), %rdi
callq 0xa1a6
leaq 0x38(%rsp), %rdi
callq 0x9ff8
leaq 0x48(%rsp), %rdi
callq 0x9ff8
xorl %ebx, %ebx
leaq 0xb8(%rsp), %rdi
callq 0x4170
leaq 0xe0(%rsp), %rdi
callq 0x4170
leaq 0x120(%rsp), %rdi
callq 0x4170
leaq 0x140(%rsp), %rdi
callq 0x4170
leaq 0x100(%rsp), %rdi
callq 0x4170
leaq 0x70(%rsp), %rdi
callq 0x4170
leaq 0x50(%rsp), %rdi
callq 0x4170
movl %ebx, %eax
addq $0x588, %rsp            # imm = 0x588
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd635(%rip), %rax      # 0x16fc8
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
leaq 0x6f26(%rip), %rsi      # 0x108c8
jmp 0x99ba
movq 0xd61d(%rip), %rax      # 0x16fc8
movq (%rax), %rdi
movq 0x70(%rsp), %rdx
leaq 0x6f39(%rip), %rsi      # 0x108f3
xorl %eax, %eax
callq 0x4530
movq (%r14), %rdi
callq 0x9b85
jmp 0x9225
movq 0xd5f3(%rip), %rax      # 0x16fc8
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
leaq 0x6d94(%rip), %rsi      # 0x10778
jmp 0x9a2c
movq 0xd5db(%rip), %rax      # 0x16fc8
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
leaq 0x6dc3(%rip), %rsi      # 0x107bf
jmp 0x9a2c
movq 0xd5c3(%rip), %rax      # 0x16fc8
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
leaq 0x6de9(%rip), %rsi      # 0x107fd
jmp 0x9a2c
movq 0xd5ab(%rip), %rax      # 0x16fc8
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
leaq 0x6e14(%rip), %rsi      # 0x10840
xorl %eax, %eax
callq 0x4530
jmp 0x93ce
movq 0xd589(%rip), %rcx      # 0x16fc8
movq (%rcx), %rdi
leaq 0x6c74(%rip), %rsi      # 0x106bd
movl %eax, %edx
xorl %eax, %eax
callq 0x4530
jmp 0x93ce
movq (%r14), %rdi
callq 0x9b85
xorl %edi, %edi
callq 0x4490
callq 0x40d0
jmp 0x9aff
jmp 0x9aff
jmp 0x9b59
jmp 0x9aff
jmp 0x9a86
jmp 0x9b59
movq %rax, %r14
leaq 0x180(%rsp), %rdi
jmp 0x9b52
jmp 0x9b59
jmp 0x9aff
jmp 0x9aff
jmp 0x9aff
jmp 0x9aff
jmp 0x9abb
jmp 0x9abb
jmp 0x9abb
jmp 0x9abb
jmp 0x9abb
jmp 0x9aff
jmp 0x9aff
jmp 0x9abb
jmp 0x9aff
jmp 0x9aff
jmp 0x9aee
jmp 0x9aee
movq %rax, %r14
jmp 0x9b23
movq %rax, %r14
pushq $0x50
popq %rsi
movq %rbx, %rdi
callq 0x43f0
jmp 0x9b5c
jmp 0x9b59
jmp 0x9b59
movq %rax, %r14
jmp 0x9b69
movq %rax, %r14
jmp 0x9b73
jmp 0x9aff
jmp 0x9aee
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x9ff8
jmp 0x9b02
jmp 0x9aff
movq %rax, %r14
leaq 0xa0(%rsp), %rdi
callq 0xa1a6
leaq 0x38(%rsp), %rdi
callq 0x9ff8
leaq 0x48(%rsp), %rdi
callq 0x9ff8
leaq 0xb8(%rsp), %rdi
callq 0x4170
leaq 0xe0(%rsp), %rdi
callq 0x4170
leaq 0x120(%rsp), %rdi
callq 0x4170
leaq 0x140(%rsp), %rdi
callq 0x4170
jmp 0x9b5c
movq %rax, %r14
leaq 0x100(%rsp), %rdi
callq 0x4170
leaq 0x70(%rsp), %rdi
callq 0x4170
leaq 0x50(%rsp), %rdi
callq 0x4170
movq %r14, %rdi
callq 0x46a0