// File: /workspace/github_c_makefile_star2_O0/debbiemarkslab[P]plmc/src/main.c
// Function: main
int main(int argc, char **argv) {
    char *alignFile = NULL;
    char *outputFile = NULL;
    char *couplingsFile = NULL;
    char *weightsFile = NULL;
    char *weightsOutputFile = NULL;
    options_t *options = default_options();

    /* Print usage if no arguments */
    if (argc == 1) {
        fprintf(stderr, "%s", usage);
        exit(1);
    }

    /* Parse command line arguments */
    for (int arg = 1; arg < argc; arg++) {
        if ((arg < argc-1) && (strcmp(argv[arg], "--output") == 0
                    || strcmp(argv[arg], "-o") == 0)) {
            outputFile = argv[++arg];
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--alphabet") == 0
                    || strcmp(argv[arg], "-a") == 0)) {
            options->alphabet = argv[++arg];
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--couplings") == 0
                    || strcmp(argv[arg], "-c") == 0)) {
            couplingsFile = argv[++arg];
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--lambdah") == 0
                    || strcmp(argv[arg], "-lh") == 0)) {
            options->lambdaH = atof(argv[++arg]);
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--lambdae") == 0
                    || strcmp(argv[arg], "-le") == 0)) {
            options->lambdaE = atof(argv[++arg]);
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--lambdag") == 0
                    || strcmp(argv[arg], "-lg") == 0)) {
            options->lambdaGroup = atof(argv[++arg]);
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--theta") == 0
                    || strcmp(argv[arg], "-t") == 0)) {
            options->theta = atof(argv[++arg]);
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--scale") == 0
                    || strcmp(argv[arg], "-s") == 0)) {
            options->scale = atof(argv[++arg]);
        } else if ((arg < argc-1)  && (strcmp(argv[arg], "--maxiter") == 0
                    || strcmp(argv[arg], "-m") == 0)) {
            options->maxIter = atoi(argv[++arg]);
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--independent") == 0
                    || strcmp(argv[arg], "-i") == 0)) {
            options->usePairs = 0;
            fprintf(stderr, "Independent model not yet implemented\n");
            exit(0);
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--gapreduce") == 0
                    || strcmp(argv[arg], "-g") == 0)) {
            options->estimatorMAP = INFER_MAP_PLM_GAPREDUCE;
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--estimatele") == 0
                    || strcmp(argv[arg], "-ee") == 0)) {
            options->zeroAPC = 1;
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--focus") == 0
                    || strcmp(argv[arg], "-f") == 0)) {
            options->target = argv[++arg];
        } else if ((arg < argc-1) && strcmp(argv[arg], "--fast") == 0) {
            options->sgd = 1;
            options->fastWeights = 100;
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--weights") == 0
                    || strcmp(argv[arg], "-w") == 0)) {
            weightsFile = argv[++arg];
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--save-weights") == 0)) {
            weightsOutputFile = argv[++arg];
        } else if ((arg < argc-1) && (strcmp(argv[arg], "--ncores") == 0
                    || strcmp(argv[arg], "-n") == 0)) {
            #if defined(_OPENMP)
                if (strcmp(argv[arg + 1], "max") == 0) {
                    int maxThreads = omp_get_max_threads();
                    /* Redundant, but serves as sanity check */
                    omp_set_num_threads(maxThreads);
                    fprintf(stderr, "OpenMP: Using %d of %d threads\n",
                        maxThreads, maxThreads);
                } else {
                    int numThreads = atoi(argv[arg + 1]);
                    int maxThreads = omp_get_max_threads();
                    if (numThreads >= 1 && numThreads <= maxThreads) {
                        omp_set_num_threads(numThreads);
                        fprintf(stderr, "OpenMP: Using %d of %d threads\n",
                            numThreads, maxThreads);
                    } else if (numThreads > maxThreads) {
                        omp_set_num_threads(maxThreads);
                        fprintf(stderr, "OpenMP: More threads requested than "
                            "available. Using %d of %d threads instead.\n",
                            maxThreads, maxThreads);
                    } else {
                        omp_set_num_threads(1);
                        fprintf(stderr, "OpenMP: Using 1 of %d threads\n",
                            maxThreads);
                    }
                }
                arg++;
            #else
                fprintf(stderr, "Error (-n/--ncores) only available when "
                    "compiled with OpenMP\n");
                exit(1);
            #endif
        } else if (strcmp(argv[arg], "--help") == 0
                    || strcmp(argv[arg], "-h") == 0) {
            fprintf(stderr, "%s", usage);
            exit(1);
        }
    }
    alignFile = argv[argc - 1];

    run_plmc(alignFile, outputFile, couplingsFile, weightsFile, weightsOutputFile, options);
}

// Assembly:
subq $0x48, %rsp
movl $0x0, 0x44(%rsp)
movl %edi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, %al
callq 0x58e0
movq %rax, 0x8(%rsp)
cmpl $0x1, 0x40(%rsp)
jne 0x1837e
movq 0x3c9c(%rip), %rax      # 0x1bff8
movq (%rax), %rdi
movq 0x3e02(%rip), %rdx      # 0x1c168
leaq 0x1d48(%rip), %rsi      # 0x1a0b5
movb $0x0, %al
callq 0x1140
movl $0x1, %edi
callq 0x11c0
movl $0x1, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x40(%rsp), %eax
jge 0x18b69
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18402
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1d00(%rip), %rsi      # 0x1a0b8
callq 0x1130
cmpl $0x0, %eax
je 0x183e1
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1cea(%rip), %rsi      # 0x1a0c1
callq 0x1130
cmpl $0x0, %eax
jne 0x18402
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
jmp 0x18b57
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18474
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1c9e(%rip), %rsi      # 0x1a0c4
callq 0x1130
cmpl $0x0, %eax
je 0x1844f
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1c8a(%rip), %rsi      # 0x1a0cf
callq 0x1130
cmpl $0x0, %eax
jne 0x18474
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x18b55
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x184e2
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1c3a(%rip), %rsi      # 0x1a0d2
callq 0x1130
cmpl $0x0, %eax
je 0x184c1
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1c27(%rip), %rsi      # 0x1a0de
callq 0x1130
cmpl $0x0, %eax
jne 0x184e2
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
jmp 0x18b53
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1855a
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1bdb(%rip), %rsi      # 0x1a0e1
callq 0x1130
cmpl $0x0, %eax
je 0x1852f
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1bc6(%rip), %rsi      # 0x1a0eb
callq 0x1130
cmpl $0x0, %eax
jne 0x1855a
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1080
movq 0x8(%rsp), %rax
movsd %xmm0, 0x40(%rax)
jmp 0x18b51
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x185d2
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1b71(%rip), %rsi      # 0x1a0ef
callq 0x1130
cmpl $0x0, %eax
je 0x185a7
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1b5c(%rip), %rsi      # 0x1a0f9
callq 0x1130
cmpl $0x0, %eax
jne 0x185d2
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1080
movq 0x8(%rsp), %rax
movsd %xmm0, 0x48(%rax)
jmp 0x18b4f
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1864a
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1b07(%rip), %rsi      # 0x1a0fd
callq 0x1130
cmpl $0x0, %eax
je 0x1861f
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1af2(%rip), %rsi      # 0x1a107
callq 0x1130
cmpl $0x0, %eax
jne 0x1864a
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1080
movq 0x8(%rsp), %rax
movsd %xmm0, 0x50(%rax)
jmp 0x18b4d
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x186c2
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1a9d(%rip), %rsi      # 0x1a10b
callq 0x1130
cmpl $0x0, %eax
je 0x18697
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1a86(%rip), %rsi      # 0x1a113
callq 0x1130
cmpl $0x0, %eax
jne 0x186c2
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1080
movq 0x8(%rsp), %rax
movsd %xmm0, 0x30(%rax)
jmp 0x18b4b
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1873a
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1a30(%rip), %rsi      # 0x1a116
callq 0x1130
cmpl $0x0, %eax
je 0x1870f
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1a19(%rip), %rsi      # 0x1a11e
callq 0x1130
cmpl $0x0, %eax
jne 0x1873a
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1080
movq 0x8(%rsp), %rax
movsd %xmm0, 0x38(%rax)
jmp 0x18b49
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x187b2
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x19c3(%rip), %rsi      # 0x1a121
callq 0x1130
cmpl $0x0, %eax
je 0x18787
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x19ae(%rip), %rsi      # 0x1a12b
callq 0x1130
cmpl $0x0, %eax
jne 0x187b2
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x11a0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x18b47
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1882a
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1958(%rip), %rsi      # 0x1a12e
callq 0x1130
cmpl $0x0, %eax
je 0x187ff
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1947(%rip), %rsi      # 0x1a13c
callq 0x1130
cmpl $0x0, %eax
jne 0x1882a
movq 0x8(%rsp), %rax
movl $0x0, 0x10(%rax)
movq 0x37e6(%rip), %rax      # 0x1bff8
movq (%rax), %rdi
leaq 0x1923(%rip), %rsi      # 0x1a13f
movb $0x0, %al
callq 0x1140
xorl %edi, %edi
callq 0x11c0
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18888
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1918(%rip), %rsi      # 0x1a166
callq 0x1130
cmpl $0x0, %eax
je 0x18877
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1905(%rip), %rsi      # 0x1a172
callq 0x1130
cmpl $0x0, %eax
jne 0x18888
movq 0x8(%rsp), %rax
movl $0x1, 0x18(%rax)
jmp 0x18b43
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x188e6
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x18c9(%rip), %rsi      # 0x1a175
callq 0x1130
cmpl $0x0, %eax
je 0x188d5
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x18b7(%rip), %rsi      # 0x1a182
callq 0x1130
cmpl $0x0, %eax
jne 0x188e6
movq 0x8(%rsp), %rax
movl $0x1, 0x58(%rax)
jmp 0x18b41
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18957
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x187c(%rip), %rsi      # 0x1a186
callq 0x1130
cmpl $0x0, %eax
je 0x18933
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1865(%rip), %rsi      # 0x1a18e
callq 0x1130
cmpl $0x0, %eax
jne 0x18957
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
jmp 0x18b3f
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x189a2
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1816(%rip), %rsi      # 0x1a191
callq 0x1130
cmpl $0x0, %eax
jne 0x189a2
movq 0x8(%rsp), %rax
movl $0x1, 0x20(%rax)
movq 0x8(%rsp), %rax
movl $0x64, 0x28(%rax)
jmp 0x18b3d
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18a10
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17d2(%rip), %rsi      # 0x1a198
callq 0x1130
cmpl $0x0, %eax
je 0x189ef
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x17bd(%rip), %rsi      # 0x1a1a2
callq 0x1130
cmpl $0x0, %eax
jne 0x18a10
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
jmp 0x18b3b
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18a5f
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1771(%rip), %rsi      # 0x1a1a5
callq 0x1130
cmpl $0x0, %eax
jne 0x18a5f
movq 0x38(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
jmp 0x18b39
movl 0x4(%rsp), %eax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18ace
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1731(%rip), %rsi      # 0x1a1b4
callq 0x1130
cmpl $0x0, %eax
je 0x18aac
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x171b(%rip), %rsi      # 0x1a1bd
callq 0x1130
cmpl $0x0, %eax
jne 0x18ace
movq 0x3545(%rip), %rax      # 0x1bff8
movq (%rax), %rdi
leaq 0x1703(%rip), %rsi      # 0x1a1c0
movb $0x0, %al
callq 0x1140
movl $0x1, %edi
callq 0x11c0
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x171b(%rip), %rsi      # 0x1a1fe
callq 0x1130
cmpl $0x0, %eax
je 0x18b0c
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1703(%rip), %rsi      # 0x1a205
callq 0x1130
cmpl $0x0, %eax
jne 0x18b35
movq 0x34e5(%rip), %rax      # 0x1bff8
movq (%rax), %rdi
movq 0x364b(%rip), %rdx      # 0x1c168
leaq 0x1591(%rip), %rsi      # 0x1a0b5
movb $0x0, %al
callq 0x1140
movl $0x1, %edi
callq 0x11c0
jmp 0x18b37
jmp 0x18b39
jmp 0x18b3b
jmp 0x18b3d
jmp 0x18b3f
jmp 0x18b41
jmp 0x18b43
jmp 0x18b45
jmp 0x18b47
jmp 0x18b49
jmp 0x18b4b
jmp 0x18b4d
jmp 0x18b4f
jmp 0x18b51
jmp 0x18b53
jmp 0x18b55
jmp 0x18b57
jmp 0x18b59
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x18386
movq 0x38(%rsp), %rax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
callq 0x59c0
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq