// File: /workspace/github_cpp_makefile_star2_O2/mapequation[P]partition-validation/partition-validation.cc
// Function: main
int main(int argc, char *argv[]) {

    cout << "Version: Feb 23, 2022." << endl;
    cout << "Command: ";
    cout << argv[0];
    for (int i = 1; i < argc; i++)
        cout << " " << argv[i];
    cout << endl;

    // Parse command input
    const string CALL_SYNTAX = "Call: ./partition-validation [-h] [-s <seed>] [-t <distance threshold>] "
                               "[--validate <validation size>] [--k-fold-crossvalidate k] "
                               "[--validation-sampling <training size> <validation size> <validation samples>] "
                               "input_partitions.txt output_clustering_txt\n";
    if (argc == 1) {
        cout << CALL_SYNTAX;
        exit(-1);
    }

    int seed = 1234;

    string inFileName = "noname";
    string outFileName = "noname";

    int argNr = 1;
    double distThreshold = 0.2;
    int nValidationPartitions = 0;
    int nTrainingPartitions = 0;
    int crossValidateK = 0;
    int validationSamples = 0;

    while (argNr < argc) {
        if (to_string(argv[argNr]) == "-h") {
            cout << CALL_SYNTAX;
            cout << "-h: This help" << endl;
            cout << "seed: Any positive integer." << endl;
            cout << "distance threshold: "
                    "The max distance from center partition to other partitions in the cluster. Default: 0.2."
                 << endl;
            cout << "--validate <validation size>: "
                    "The number of partitions at the end of the input that will be used for validation. "
                    "The first partitions will be used to find clusters. Default is 0 validation partitions." << endl;
            cout << "--k-fold-crossvalidate k: "
                    "Perform k-fold cross-validation of all partitions. The training partitions will be used to "
                    "find clusters and the other ones for validation. Default is 0 folds for no cross-validation."
                 << endl;
            cout << "--validation-sampling <training size> <validation size> <validation samples>: "
                    "A random set of validation size partitions will be held out from training size partitions "
                    "in each of validation samples resamplings. Reports the average fraction of validation partitions "
                    "that belong to clusters. Default is no validation sampling." << endl;
            cout << "input_partitions.txt: "
                    "Each column corresponds to a partition and each row corresponds to a node id." << endl;
            cout << "output_clustering.txt: clusterID partitionID" << endl;
            exit(-1);
        } else if (to_string(argv[argNr]) == "-s") {
            argNr++;
            seed = atoi(argv[argNr]);
            argNr++;
        } else if (to_string(argv[argNr]) == "-t") {
            argNr++;
            distThreshold = atof(argv[argNr]);
            argNr++;
        } else if (to_string(argv[argNr]) == "--validate") {
            argNr++;
            nValidationPartitions = atoi(argv[argNr]);
            argNr++;
        } else if (to_string(argv[argNr]) == "--k-fold-crossvalidate") {
            argNr++;
            crossValidateK = atoi(argv[argNr]);
            argNr++;
        } else if (to_string(argv[argNr]) == "--validation-sampling") {
            argNr++;
            nTrainingPartitions = atoi(argv[argNr]);
            argNr++;
            nValidationPartitions = atoi(argv[argNr]);
            argNr++;
            validationSamples = atoi(argv[argNr]);
            argNr++;
        } else {
            if (argv[argNr][0] == '-') {
                cout << "Unknown command: " << to_string(argv[argNr]) << endl;
                cout << CALL_SYNTAX;
                exit(-1);
            }

            if (inFileName == "noname") {
                inFileName = string(argv[argNr]);
                argNr++;
            } else if (outFileName == "noname") {
                outFileName = string(argv[argNr]);
                argNr++;
            }
        }
    }

    if (inFileName == "noname") {
        cout << "Missing infile" << endl;
        cout << CALL_SYNTAX;
        exit(-1);
    }
    if (outFileName == "noname") {
        cout << "Missing outfile" << endl;
        cout << CALL_SYNTAX;
        exit(-1);
    }

    cout << "Setup:" << endl;
    cout << "--> Using seed: " << seed << endl;
    cout << "--> Will cluster partitions such that no partition is farther away from its center than: " << distThreshold
         << endl;
    cout << "--> Will read partitions from file: " << inFileName << endl;

    if (crossValidateK > 0) {
        cout << "--> Will perform " << crossValidateK << "-fold cross-valiation." << endl;
        nValidationPartitions = 0;
        validationSamples = 0;
    } else if (validationSamples > 0) {
        cout << "--> Will perform validation sampling of " << nValidationPartitions << " partitions given "
             << nTrainingPartitions << " training partitions " << validationSamples << " times." << endl;
        crossValidateK = 0;
    } else if (nValidationPartitions > 0) {
        cout << "--> Will use the last " << nValidationPartitions << " partitions for validation." << endl;
        crossValidateK = 0;
        validationSamples = 0;
    }

    cout << "--> Will write clusters to file: " << outFileName << endl;
    cout << "--> Will use number of threads: " << omp_get_max_threads() << endl;

    Partitions partitions(inFileName, outFileName, distThreshold, nTrainingPartitions, nValidationPartitions,
                          crossValidateK, validationSamples, seed);

    if (crossValidateK == 0) {
        if (validationSamples == 0) {
            partitions.clusterPartitions(0);
            if (nValidationPartitions > 0) {
                partitions.validatePartitions(0);
                cout << "--> Fraction of validation partitions that fits in a cluster: "
                     << 1.0 * partitions.nTotValidated / partitions.nTotTested << endl;
            }
            partitions.printClusters();
        } else {
            for (int sample = 0; sample < validationSamples; sample++) {
                partitions.clusterPartitions(0);
                partitions.validatePartitions(0);
                cout << "--> Fraction of validation partitions that fits in a cluster after " << sample + 1
                     << " samples: " << 1.0 * partitions.nTotValidated / partitions.nTotTested << endl;
            }
        }
    } else {
        for (int fold = 0; fold < crossValidateK; fold++) {
            cout << endl << "Fold " << fold + 1 << "/" << crossValidateK << endl;
            partitions.clusterPartitions(fold);
            partitions.validatePartitions(fold);
            cout << "--> Fraction of validation partitions that fits in a cluster after " << fold + 1 << " folds: "
                 << 1.0 * partitions.nTotValidated / partitions.nTotTested << endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x598, %rsp            # imm = 0x598
movq %rsi, %r14
movl %edi, %ebp
movq 0x96cf(%rip), %rbx      # 0xdfd8
leaq 0x4906(%rip), %rsi      # 0x9216
movq %rbx, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3130
leaq 0x4906(%rip), %rsi      # 0x922d
movq %rbx, %rdi
callq 0x3240
movq %r14, 0x10(%rsp)
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x3240
movl %ebp, 0x24(%rsp)
movslq %ebp, %r15
pushq $0x1
popq %r12
leaq 0x474b(%rip), %r14      # 0x909c
cmpq %r15, %r12
jge 0x4977
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3240
movq 0x10(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x3240
incq %r12
jmp 0x4951
movq 0x965a(%rip), %rdi      # 0xdfd8
callq 0x3130
leaq 0x48ad(%rip), %rsi      # 0x9237
leaq 0x80(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x5b62
cmpl $0x1, 0x24(%rsp)
je 0x51d5
leaq 0x4983(%rip), %rsi      # 0x9334
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x5b62
leaq 0x496a(%rip), %rsi      # 0x9334
leaq 0x40(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x5b62
movl $0x0, 0x18(%rsp)
movsd 0x462c(%rip), %xmm0     # 0x9018
movsd %xmm0, 0x28(%rsp)
pushq $0x1
popq %r14
movl $0x4d2, %eax            # imm = 0x4D2
movq %rax, 0x38(%rsp)
leaq 0xa0(%rsp), %r12
leaq 0x4925(%rip), %r13      # 0x9334
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpl 0x24(%rsp), %r14d
jge 0x4c61
movslq %r14d, %rbp
movq 0x10(%rsp), %rax
leaq (%rax,%rbp,8), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5baa
movq %r12, %rdi
leaq 0x48e7(%rip), %rsi      # 0x933b
callq 0x5b9d
movl %eax, %r15d
movq %r12, %rdi
callq 0x3110
testb %r15b, %r15b
jne 0x50e7
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5baa
movq %r12, %rdi
leaq 0x4cc4(%rip), %rsi      # 0x9746
callq 0x5b9d
movl %eax, %r15d
movq %r12, %rdi
callq 0x3110
testb %r15b, %r15b
je 0x4ab4
movq 0x10(%rsp), %rax
movq 0x8(%rax,%rbp,8), %rdi
callq 0x3360
movq %rax, 0x38(%rsp)
addl $0x2, %r14d
jmp 0x4a28
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5baa
movq %r12, %rdi
leaq 0x4c80(%rip), %rsi      # 0x9749
callq 0x5b9d
movl %eax, %r15d
movq %r12, %rdi
callq 0x3110
testb %r15b, %r15b
je 0x4afc
movq 0x10(%rsp), %rax
movq 0x8(%rax,%rbp,8), %rdi
callq 0x32c0
movsd %xmm0, 0x28(%rsp)
addl $0x2, %r14d
jmp 0x4a28
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5baa
movq %r12, %rdi
leaq 0x4c3b(%rip), %rsi      # 0x974c
callq 0x5b9d
movl %eax, %r15d
movq %r12, %rdi
callq 0x3110
testb %r15b, %r15b
je 0x4b42
movq 0x10(%rsp), %rax
movq 0x8(%rax,%rbp,8), %rdi
callq 0x3360
movl %eax, 0x18(%rsp)
addl $0x2, %r14d
jmp 0x4a28
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5baa
movq %r12, %rdi
leaq 0x4c00(%rip), %rsi      # 0x9757
callq 0x5b9d
movl %eax, %r15d
movq %r12, %rdi
callq 0x3110
testb %r15b, %r15b
je 0x4b88
movq 0x10(%rsp), %rax
movq 0x8(%rax,%rbp,8), %rdi
callq 0x3360
movl %eax, 0x20(%rsp)
addl $0x2, %r14d
jmp 0x4a28
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5baa
movq %r12, %rdi
leaq 0x4bd1(%rip), %rsi      # 0x976e
callq 0x5b9d
movl %eax, %r15d
movq %r12, %rdi
callq 0x3110
testb %r15b, %r15b
je 0x4beb
movq 0x10(%rsp), %rbx
movq 0x8(%rbx,%rbp,8), %rdi
callq 0x3360
movl %eax, 0x1c(%rsp)
movq 0x10(%rbx,%rbp,8), %rdi
callq 0x3360
movl %eax, 0x18(%rsp)
movq 0x18(%rbx,%rbp,8), %rdi
callq 0x3360
movq %rax, 0x30(%rsp)
addl $0x4, %r14d
jmp 0x4a28
movq (%rbx), %rax
cmpb $0x2d, (%rax)
je 0x5253
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x5b9d
testb %al, %al
je 0x4c1f
movq (%rbx), %rsi
movq %r12, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b62
leaq 0x60(%rsp), %rdi
jmp 0x4c49
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x5b9d
testb %al, %al
je 0x4a28
movq (%rbx), %rsi
movq %r12, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b62
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x32b0
movq %r12, %rdi
callq 0x3110
incl %r14d
jmp 0x4a28
leaq 0x46cc(%rip), %rsi      # 0x9334
leaq 0x60(%rsp), %rdi
callq 0x5b9d
testb %al, %al
jne 0x51f1
leaq 0x46b3(%rip), %rsi      # 0x9334
leaq 0x40(%rsp), %rdi
callq 0x5b9d
testb %al, %al
movl 0x20(%rsp), %r14d
movq 0x38(%rsp), %r15
movq 0x30(%rsp), %r12
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r13d
jne 0x5222
movq 0x9326(%rip), %rdi      # 0xdfd8
leaq 0x4afc(%rip), %rsi      # 0x97b5
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x930b(%rip), %rdi      # 0xdfd8
leaq 0x4ae8(%rip), %rsi      # 0x97bc
callq 0x3240
movq %rax, %rdi
movl %r15d, %esi
callq 0x33d0
movq %rax, %rdi
callq 0x3130
movq 0x92e5(%rip), %rdi      # 0xdfd8
leaq 0x4ad3(%rip), %rsi      # 0x97cd
callq 0x3240
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x3380
movq %rax, %rdi
callq 0x3130
movq 0x92bc(%rip), %rdi      # 0xdfd8
leaq 0x4b04(%rip), %rsi      # 0x9827
callq 0x3240
leaq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x3220
movq %rax, %rdi
callq 0x3130
testl %r14d, %r14d
jle 0x4d7f
movq 0x928f(%rip), %rdi      # 0xdfd8
leaq 0x4afc(%rip), %rsi      # 0x984c
callq 0x3240
movq %rax, %rdi
movl %r14d, %esi
callq 0x33d0
leaq 0x4af7(%rip), %rsi      # 0x985e
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3130
xorl %r13d, %r13d
xorl %r12d, %r12d
jmp 0x4df3
testl %r12d, %r12d
jle 0x4ff6
movq 0x9249(%rip), %rdi      # 0xdfd8
leaq 0x4adf(%rip), %rsi      # 0x9875
callq 0x3240
movq %rax, %rdi
movl %r13d, %esi
callq 0x33d0
leaq 0x4af1(%rip), %rsi      # 0x989e
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
movl %ebp, %esi
callq 0x33d0
leaq 0x4aeb(%rip), %rsi      # 0x98b1
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
movl %r12d, %esi
callq 0x33d0
leaq 0x4ae7(%rip), %rsi      # 0x98c7
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3130
xorl %r14d, %r14d
movq 0x91de(%rip), %rdi      # 0xdfd8
leaq 0x4b01(%rip), %rsi      # 0x9902
callq 0x3240
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x3220
movq %rax, %rdi
callq 0x3130
movq 0x91b6(%rip), %rdi      # 0xdfd8
leaq 0x4afb(%rip), %rsi      # 0x9924
callq 0x3240
pushq $0x1
popq %rbx
movq %rax, %rdi
movl %ebx, %esi
callq 0x33d0
movq %rax, %rdi
callq 0x3130
leaq 0xa0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
movsd 0x28(%rsp), %xmm0
movl %ebp, %ecx
movl %r13d, %r8d
movl %r14d, %r9d
pushq %r15
pushq %r12
callq 0x5c06
popq %rax
popq %rcx
testl %r14d, %r14d
je 0x4f57
xorl %r15d, %r15d
testl %r14d, %r14d
movl $0x0, %r13d
movl %r14d, %ebp
cmovgl %r14d, %r13d
movq 0x9147(%rip), %rbx      # 0xdfd8
leaq 0xa0(%rsp), %r12
subl $0x1, %r13d
jb 0x50a5
movq %rbx, %rdi
callq 0x3130
movq %rax, %rdi
leaq 0x4b1e(%rip), %rsi      # 0x99d3
callq 0x3240
leal 0x1(%r15), %r14d
movq %rax, %rdi
movl %r14d, %esi
callq 0x33d0
movq %rax, %rdi
leaq 0x4b06(%rip), %rsi      # 0x99d9
callq 0x3240
movq %rax, %rdi
movl %ebp, %esi
callq 0x33d0
movq %rax, %rdi
callq 0x3130
movq %r12, %rdi
movl %r15d, %esi
callq 0x39e6
movq %r12, %rdi
movl %r15d, %esi
callq 0x3c7a
movq %rbx, %rdi
leaq 0x4a7a(%rip), %rsi      # 0x9984
callq 0x3240
movq %rax, %rdi
movl %r14d, %esi
callq 0x33d0
movq %rax, %rdi
leaq 0x4ab7(%rip), %rsi      # 0x99db
callq 0x3240
cvtsi2sdl 0x590(%rsp), %xmm0
cvtsi2sdl 0x594(%rsp), %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x3380
movq %rax, %rdi
callq 0x3130
movl %r14d, %r15d
jmp 0x4e99
testl %r12d, %r12d
je 0x503c
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
negl %r12d
movq %r12, %rbp
leaq 0xa0(%rsp), %r14
movq 0x905a(%rip), %r15      # 0xdfd8
leaq 0x49ff(%rip), %r12      # 0x9984
leaq 0x4a3c(%rip), %r13      # 0x99c8
leal (%rbx,%rbp), %eax
cmpl $0x1, %eax
je 0x50a5
movq %r14, %rdi
xorl %esi, %esi
callq 0x39e6
movq %r14, %rdi
xorl %esi, %esi
callq 0x3c7a
movq %r15, %rdi
movq %r12, %rsi
callq 0x3240
movq %rax, %rdi
movl %ebx, %esi
callq 0x33d0
movq %rax, %rdi
movq %r13, %rsi
callq 0x3240
cvtsi2sdl 0x590(%rsp), %xmm0
cvtsi2sdl 0x594(%rsp), %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x3380
incl %ebx
movq %rax, %rdi
callq 0x3130
jmp 0x4f8c
testl %r13d, %r13d
jle 0x4df3
movq 0x8fd2(%rip), %rdi      # 0xdfd8
leaq 0x48c2(%rip), %rsi      # 0x98cf
callq 0x3240
movq %rax, %rdi
movl %r13d, %esi
callq 0x33d0
leaq 0x48c2(%rip), %rsi      # 0x98e6
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3130
xorl %r14d, %r14d
jmp 0x4d7a
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
callq 0x39e6
testl %r13d, %r13d
jle 0x5098
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
callq 0x3c7a
movq 0x8f72(%rip), %rdi      # 0xdfd8
leaq 0x48d8(%rip), %rsi      # 0x9945
callq 0x3240
cvtsi2sdl 0x590(%rsp), %xmm0
cvtsi2sdl 0x594(%rsp), %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x3380
movq %rax, %rdi
callq 0x3130
leaq 0xa0(%rsp), %rdi
callq 0x4560
leaq 0xa0(%rsp), %rdi
callq 0x5f0e
leaq 0x40(%rsp), %rdi
callq 0x3110
leaq 0x60(%rsp), %rdi
callq 0x3110
leaq 0x80(%rsp), %rdi
callq 0x3110
xorl %eax, %eax
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8eea(%rip), %rdi      # 0xdfd8
leaq 0x80(%rsp), %rsi
callq 0x3220
movq 0x8ed6(%rip), %rdi      # 0xdfd8
leaq 0x4235(%rip), %rsi      # 0x933e
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8ebb(%rip), %rdi      # 0xdfd8
leaq 0x4228(%rip), %rsi      # 0x934c
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8ea0(%rip), %rdi      # 0xdfd8
leaq 0x4229(%rip), %rsi      # 0x9368
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8e85(%rip), %rdi      # 0xdfd8
leaq 0x427b(%rip), %rsi      # 0x93d5
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8e6a(%rip), %rdi      # 0xdfd8
leaq 0x4329(%rip), %rsi      # 0x949e
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8e4f(%rip), %rdi      # 0xdfd8
leaq 0x43e0(%rip), %rsi      # 0x9570
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8e34(%rip), %rdi      # 0xdfd8
leaq 0x450a(%rip), %rsi      # 0x96b5
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8e19(%rip), %rdi      # 0xdfd8
leaq 0x4553(%rip), %rsi      # 0x9719
callq 0x3240
movq %rax, %rdi
callq 0x3130
jmp 0x51e9
movq 0x8dfc(%rip), %rdi      # 0xdfd8
leaq 0x80(%rsp), %rsi
callq 0x3220
pushq $-0x1
popq %rdi
callq 0x32a0
movq 0x8de0(%rip), %rdi      # 0xdfd8
leaq 0x4597(%rip), %rsi      # 0x9796
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8dc5(%rip), %rdi      # 0xdfd8
leaq 0x80(%rsp), %rsi
callq 0x3220
jmp 0x51e9
movq 0x8daf(%rip), %rdi      # 0xdfd8
leaq 0x4575(%rip), %rsi      # 0x97a5
callq 0x3240
movq %rax, %rdi
callq 0x3130
movq 0x8d94(%rip), %rdi      # 0xdfd8
leaq 0x80(%rsp), %rsi
callq 0x3220
jmp 0x51e9
movq 0x8d7e(%rip), %rdi      # 0xdfd8
leaq 0x4523(%rip), %rsi      # 0x9784
callq 0x3240
movq %rax, %r14
leaq 0xa0(%rsp), %rdi
movq %rbx, %rsi
callq 0x5baa
leaq 0xa0(%rsp), %rsi
movq %r14, %rdi
callq 0x3220
movq %rax, %rdi
callq 0x3130
leaq 0xa0(%rsp), %rdi
callq 0x3110
movq 0x8d33(%rip), %rdi      # 0xdfd8
leaq 0x80(%rsp), %rsi
callq 0x3220
jmp 0x51e9
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x3110
jmp 0x5302
jmp 0x52ed
jmp 0x52ed
jmp 0x52ed
jmp 0x52da
jmp 0x52f2
jmp 0x52ed
movq %rax, %rbx
jmp 0x530c
movq %rax, %rbx
jmp 0x5316
jmp 0x52ed
jmp 0x52ed
jmp 0x52ed
jmp 0x52ed
jmp 0x52ed
jmp 0x52ed
jmp 0x52f2
movq %rax, %rbx
jmp 0x5302
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x5f0e
leaq 0x40(%rsp), %rdi
callq 0x3110
leaq 0x60(%rsp), %rdi
callq 0x3110
leaq 0x80(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x33e0