// File: /workspace/github_c_makefile_star2_O1/debbiemarkslab[P]plmc/src/inference.c
// Function: PLMNegLogPosteriorDO
static lbfgsfloatval_t PLMNegLogPosteriorDO(void *instance,
    const lbfgsfloatval_t *x, lbfgsfloatval_t *g, const int n,
    const lbfgsfloatval_t step) {
    /* Compute the the negative log posterior, which is the negative 
       penalized log-(pseudo)likelihood and the objective for MAP inference
    */
    void **d = (void **)instance;
    alignment_t *ali = (alignment_t *) d[0];
    options_t *options = (options_t *) d[1];
    numeric_t *lambdas = (numeric_t *) d[2];

    /* Initialize log-likelihood and gradient */
    lbfgsfloatval_t fx = 0.0;
    for (int i = 0; i < ali->nParams; i++) g[i] = 0;

    numeric_t *H = (numeric_t *) malloc(ali->nCodes * sizeof(numeric_t));
    numeric_t *P = (numeric_t *) malloc(ali->nCodes * sizeof(numeric_t));
    int *drop_mask = (int *) malloc(ali->nParams * sizeof(int));
    for (int s = 0; s < ali->nSeqs; s++) {
        /* Generate random bit mask over parameters */
        for (int p = 0; p < ali->nParams; p ++)
            drop_mask[p] = (int) rand() % 2;

        /* Pseudolikelihood objective */
        for (int i = 0; i < ali->nSites; i++) {
            for (int a = 0; a < ali->nCodes; a++) H[a] = bitHi(i, a)
                                               * xHi(i, a);
            for (int a = 0; a < ali->nCodes; a++)
                for (int j = 0; j < i; j++)
                    H[a] += bitEij(i, j, a, seq(s, j))
                            * xEij(i, j, a, seq(s, j));
            for (int a = 0; a < ali->nCodes; a++)
                for (int j = i + 1; j < ali->nSites; j++)
                    H[a] += bitEij(i, j, a, seq(s, j))
                            * xEij(i, j, a, seq(s, j));

            /* Compute distribution from potential */
            for (int a = 0; a < ali->nCodes; a++) P[a] = exp(H[a]);
            numeric_t Z = 0;
            for (int a = 0; a < ali->nCodes; a++) Z += P[a];
            numeric_t Zinv = 1.0 / Z;
            for (int a = 0; a < ali->nCodes; a++) P[a] *= Zinv;

            /* Log-likelihood contributions */
            fx -= ali->weights[s] * log(P[seq(s, i)]);

            /* Field gradient */
            dHi(i, seq(s, i)) -= bitHi(i, seq(s, i)) * ali->weights[s];
            for (int a = 0; a < ali->nCodes; a++)
                dHi(i, a) -= -bitHi(i, a) * ali->weights[s] * P[a];

            /* Couplings gradient */
            for (int j = 0; j < i; j++)
                dEij(i, j, seq(s, i), seq(s, j)) -=
                    bitEij(i, j, seq(s, i), seq(s, j)) * ali->weights[s];
            for (int j = i + 1; j < ali->nSites; j++)
                dEij(i, j, seq(s, i), seq(s, j)) -=
                    bitEij(i, j, seq(s, i), seq(s, j)) * ali->weights[s];

            for (int j = 0; j < i; j++)
                for (int a = 0; a < ali->nCodes; a++)
                    dEij(i, j, a, seq(s, j)) -=
                        -bitEij(i, j, a, seq(s, j)) * ali->weights[s] * P[a];
            for (int j = i + 1; j < ali->nSites; j++)
                for (int a = 0; a < ali->nCodes; a++)
                    dEij(i, j, a, seq(s, j)) -=
                        -bitEij(i, j, a, seq(s, j)) * ali->weights[s] * P[a];
        }
    }
    free(H);
    free(P);
    free(drop_mask);

    ali->negLogLk = fx;

    /* Gaussian priors */
    for (int i = 0; i < ali->nSites; i++)
        for (int ai = 0; ai < ali->nCodes; ai++) {
            dHi(i, ai) += lambdaHi(i) * 2.0 * xHi(i, ai);
            fx += lambdaHi(i) * xHi(i, ai) * xHi(i, ai);
        }

    for (int i = 0; i < ali->nSites-1; i++)
        for (int j = i + 1; j < ali->nSites; j++)
            for (int ai = 0; ai < ali->nCodes; ai++)
                for (int aj = 0; aj < ali->nCodes; aj++) {
                    dEij(i, j, ai, aj) += lambdaEij(i, j)
                        * 2.0 * xEij(i, j, ai, aj);
                    fx += lambdaEij(i, j)
                        * xEij(i, j, ai, aj) * xEij(i, j, ai, aj);
                }

    fx = PostCondition(x, g, fx, ali, options);
    return fx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0xa0(%rsp)
movq 0x10(%rdi), %rcx
movq %rcx, 0x98(%rsp)
movslq 0x68(%rax), %r15
testq %r15, %r15
movq %rax, 0x18(%rsp)
jle 0xaf27
leaq (,%r15,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1110
movq 0x18(%rsp), %rax
movq %r14, 0x68(%rsp)
movslq 0x8(%rax), %rbp
shlq $0x3, %rbp
movq %rbp, %rdi
callq 0x11a0
movq %rax, 0x40(%rsp)
movq %rbp, %rdi
callq 0x11a0
movq %rax, 0x30(%rsp)
shlq $0x2, %r15
movq %r15, %rdi
callq 0x11a0
movq 0x18(%rsp), %r9
movq %rax, 0x20(%rsp)
cmpl $0x0, (%r9)
movq %rbx, 0x88(%rsp)
xorpd %xmm0, %xmm0
jle 0xb83f
movsd %xmm0, 0x28(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %esi, %esi
incq %rax
movq %rax, 0xa8(%rsp)
movq 0x40(%rsp), %r13
movq %rsi, 0x8(%rsp)
cmpl $0x0, 0x68(%r9)
movq 0x20(%rsp), %r15
jle 0xafd1
xorl %r14d, %r14d
callq 0x1240
movq 0x18(%rsp), %r9
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
subl %ecx, %eax
movl %eax, (%r15,%r14,4)
incq %r14
movslq 0x68(%r9), %rax
cmpq %rax, %r14
jl 0xafab
movl 0x4(%r9), %ecx
testl %ecx, %ecx
jle 0xb81d
movl $0x1, %eax
movq %rax, 0x50(%rsp)
movq 0x8(%rsp), %rsi
movslq %esi, %rax
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x90(%rsp)
movq %rbx, 0x78(%rsp)
movq 0x68(%rsp), %r8
movq 0x20(%rsp), %rbp
xorl %r14d, %r14d
movsd 0x28(%rsp), %xmm3
movslq 0x8(%r9), %rax
movq %rcx, (%rsp)
movslq %ecx, %rcx
movq %rcx, 0x38(%rsp)
testq %rax, %rax
jle 0xb066
movq 0x38(%rsp), %rcx
leaq (,%rcx,4), %rcx
xorl %edx, %edx
xorl %edi, %edi
xorps %xmm0, %xmm0
cvtsi2sdl (%rbp,%rdx), %xmm0
mulsd (%r8,%rdx,2), %xmm0
movsd %xmm0, (%r13,%rdi,8)
incq %rdi
addq %rcx, %rdx
cmpq %rdi, %rax
jne 0xb045
movq %r8, 0xc0(%rsp)
testl %eax, %eax
movq %rbp, 0x48(%rsp)
jle 0xb11d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leal (%r14,%rcx), %edx
imull %r14d, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
movl %esi, %edx
movq (%rsp), %rsi
imull %esi, %edx
movslq %edx, %rdx
shlq $0x2, %rdx
imull %eax, %ecx
addl %esi, %ecx
imull %eax, %ecx
movl %eax, %edi
imull %eax, %edi
xorl %r8d, %r8d
testq %r14, %r14
je 0xb113
movsd (%r13,%r8,8), %xmm0
movq 0x20(%r9), %r9
addq %rdx, %r9
movl %ecx, %r10d
xorl %r11d, %r11d
movq 0x20(%rsp), %r13
movq 0x68(%rsp), %rsi
movl (%r9,%r11,4), %ebp
addl %r10d, %ebp
movslq %ebp, %r15
xorps %xmm1, %xmm1
cvtsi2sdl (%r13,%r15,4), %xmm1
mulsd (%rsi,%r15,8), %xmm1
addsd %xmm1, %xmm0
incq %r11
addl %edi, %r10d
cmpq %r11, %r14
jne 0xb0d4
movq 0x40(%rsp), %r13
movsd %xmm0, (%r13,%r8,8)
movq 0x18(%rsp), %r9
movq 0x48(%rsp), %rbp
incq %r8
addl %eax, %ecx
cmpq %rax, %r8
jne 0xb0b1
testl %eax, %eax
jle 0xb27a
leaq 0x1(%r14), %r12
movl %eax, %edi
movq (%rsp), %rdx
imull %edx, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addl %r14d, %ecx
imull %r14d, %ecx
movl %ecx, %r8d
shrl $0x1f, %r8d
addl %ecx, %r8d
sarl %r8d
movl %edx, %ebx
imull 0x8(%rsp), %edx
movslq %edx, %rsi
shlq $0x2, %rsi
movl %eax, %r10d
imull %eax, %r10d
addl 0x50(%rsp), %r8d
imull %r10d, %r8d
decq %rbx
movl %r8d, %r11d
xorl %ecx, %ecx
cmpq 0x38(%rsp), %r12
jge 0xb268
movsd (%r13,%rcx,8), %xmm0
movl %r8d, (%rsp)
movl %r11d, 0x10(%rsp)
movq %r14, %r13
leaq 0x1(%r13), %rbp
movl %r13d, %r15d
cmpq %r15, %r14
jbe 0xb1ac
movq 0x20(%r9), %rdx
addq %rsi, %rdx
movl 0x4(%rdx,%r13,4), %edx
addl %r8d, %edx
jmp 0xb1d5
movl %ebp, %edx
imull %r13d, %edx
shrl %edx
addl %r14d, %edx
imull %eax, %edx
movq 0x18(%rsp), %r9
movq 0x20(%r9), %r9
addq %rsi, %r9
addl 0x4(%r9,%r13,4), %edx
movq 0x18(%rsp), %r9
imull %eax, %edx
addl %ecx, %edx
cmpq %r15, %r14
jbe 0xb1eb
movq 0x20(%r9), %r9
addq %rsi, %r9
movl 0x4(%r9,%r13,4), %r15d
addl %r11d, %r15d
jmp 0xb20f
movl %ebp, %r15d
imull %r13d, %r15d
shrl %r15d
addl %r14d, %r15d
imull %eax, %r15d
movq 0x20(%r9), %r9
addq %rsi, %r9
addl 0x4(%r9,%r13,4), %r15d
imull %eax, %r15d
addl %ecx, %r15d
addl %edi, %edx
movslq %edx, %rdx
movq 0x20(%rsp), %r9
xorps %xmm1, %xmm1
cvtsi2sdl (%r9,%rdx,4), %xmm1
addl %edi, %r15d
movslq %r15d, %rdx
movq 0x68(%rsp), %r9
mulsd (%r9,%rdx,8), %xmm1
addsd %xmm1, %xmm0
addl %r10d, %r11d
addl %r10d, %r8d
movq %rbp, %r13
cmpq %rbp, %rbx
movq 0x18(%rsp), %r9
jne 0xb18f
movq 0x40(%rsp), %r13
movsd %xmm0, (%r13,%rcx,8)
movq 0x48(%rsp), %rbp
movl (%rsp), %r8d
movl 0x10(%rsp), %r11d
incq %rcx
addl %eax, %r11d
addl %eax, %r8d
cmpq %rax, %rcx
jne 0xb171
movl 0x8(%r9), %ecx
testl %ecx, %ecx
movsd %xmm3, 0x28(%rsp)
movq 0x88(%rsp), %rbx
jle 0xb2c1
xorl %r15d, %r15d
movq 0x30(%rsp), %rbp
movsd (%r13,%r15,8), %xmm0
callq 0x1230
movq 0x18(%rsp), %r9
movsd %xmm0, (%rbp,%r15,8)
incq %r15
movslq 0x8(%r9), %rcx
cmpq %rcx, %r15
jl 0xb298
movq 0x48(%rsp), %rbp
movl %ecx, %eax
xorpd %xmm0, %xmm0
testl %ecx, %ecx
jle 0xb2e8
xorl %edx, %edx
movq 0x30(%rsp), %r13
movq 0x8(%rsp), %rsi
addsd (%r13,%rdx,8), %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0xb2d7
jmp 0xb2f2
movq 0x30(%rsp), %r13
movq 0x8(%rsp), %rsi
testl %ecx, %ecx
jle 0xb31e
movsd 0x2d6a(%rip), %xmm1     # 0xe068
divsd %xmm0, %xmm1
xorl %ecx, %ecx
movsd (%r13,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%r13,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xb304
movq 0x50(%r9), %rax
movsd (%rax,%rsi,8), %xmm0
movsd %xmm0, 0xb8(%rsp)
movslq 0x4(%r9), %rax
imulq 0xb0(%rsp), %rax
leaq (,%r14,4), %rcx
addq 0x20(%r9), %rcx
movslq (%rcx,%rax,4), %rax
movsd (%r13,%rax,8), %xmm0
movq %r9, %r15
callq 0x1130
movq 0x8(%rsp), %r10
movslq 0x4(%r15), %r11
movq 0x20(%r15), %rcx
movl %r11d, %eax
imull %r10d, %eax
movslq %eax, %rdx
movq %rcx, 0x60(%rsp)
leaq (%rcx,%r14,4), %rax
movq %rdx, 0x80(%rsp)
movl (%rax,%rdx,4), %eax
movq %rax, 0x10(%rsp)
imull %r11d, %eax
movslq %eax, %rcx
addq %r14, %rcx
movq 0x20(%rsp), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%rcx,4), %xmm1
movq 0x50(%r15), %r12
movsd (%rbx,%rcx,8), %xmm2
mulsd (%r12,%r10,8), %xmm1
subsd %xmm1, %xmm2
movsd %xmm2, (%rbx,%rcx,8)
movl 0x8(%r15), %ecx
testl %ecx, %ecx
movq 0x78(%rsp), %r9
jle 0xb40c
leaq (,%r11,4), %rdx
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
subl (%rbp,%rsi), %r8d
xorps %xmm1, %xmm1
cvtsi2sd %r8d, %xmm1
mulsd (%r12,%r10,8), %xmm1
movsd (%r9,%rsi,2), %xmm2
mulsd (%r13,%rdi,8), %xmm1
subsd %xmm1, %xmm2
movsd %xmm2, (%r9,%rsi,2)
incq %rdi
addq %rdx, %rsi
cmpq %rdi, %rcx
jne 0xb3d4
testq %r14, %r14
movsd 0x28(%rsp), %xmm3
je 0xb48b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leal (%r14,%rdx), %esi
imull %r14d, %esi
movl %esi, %edx
shrl $0x1f, %edx
addl %esi, %edx
sarl %edx
movl %r10d, %esi
imull %r11d, %esi
movslq %esi, %rsi
movq 0x60(%rsp), %rdi
leaq (%rdi,%rsi,4), %rsi
movq 0x10(%rsp), %rdi
addl %r11d, %edi
imull %ecx, %edx
addl %edi, %edx
imull %ecx, %edx
movl %ecx, %edi
imull %ecx, %edi
xorl %r8d, %r8d
movl (%rsi,%r8,4), %r9d
addl %edx, %r9d
movslq %r9d, %r9
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r9,4), %xmm1
movsd (%rbx,%r9,8), %xmm2
mulsd (%r12,%r10,8), %xmm1
subsd %xmm1, %xmm2
movsd %xmm2, (%rbx,%r9,8)
incq %r8
addl %edi, %edx
cmpq %r8, %r14
jne 0xb458
movq %r12, 0x38(%rsp)
movl %r11d, %edx
movq %rdx, (%rsp)
leaq 0x1(%r14), %rdx
movq %rdx, 0x58(%rsp)
movq %r11, 0x70(%rsp)
cmpq %r11, %rdx
jge 0xb5d0
movq 0x70(%rsp), %rdx
movl %edx, %r11d
imull %ecx, %r11d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addl %r14d, %edx
imull %r14d, %edx
movl %edx, %r8d
shrl $0x1f, %r8d
addl %edx, %r8d
sarl %r8d
movq 0x8(%rsp), %rdx
imull (%rsp), %edx
movslq %edx, %rdx
movq 0x60(%rsp), %rsi
leaq (%rsi,%rdx,4), %rdi
movq 0x50(%rsp), %rsi
addl %esi, %r8d
movl %ecx, %edx
imull %ecx, %edx
movl %ecx, %r9d
imull %r8d, %r9d
movq 0x10(%rsp), %r10
addl %r10d, %r9d
imull %ecx, %r9d
imull %ecx, %r8d
addl %r10d, %r8d
imull %ecx, %r8d
movq 0x90(%rsp), %r10
cmpq %rsi, %r14
jae 0xb544
movl %r10d, %r15d
imull %esi, %r15d
movl %r15d, %ebp
shrl $0x1f, %ebp
addl %r15d, %ebp
sarl %ebp
addl %r14d, %ebp
imull %ecx, %ebp
addl (%rdi,%rsi,4), %ebp
imull %ecx, %ebp
addl 0x10(%rsp), %ebp
jmp 0xb54a
movl (%rdi,%rsi,4), %ebp
addl %r8d, %ebp
cmpq %rsi, %r14
jae 0xb579
movl %r10d, %r13d
imull %esi, %r13d
movl %r13d, %r15d
shrl $0x1f, %r15d
addl %r13d, %r15d
sarl %r15d
addl %r14d, %r15d
imull %ecx, %r15d
addl (%rdi,%rsi,4), %r15d
imull %ecx, %r15d
addl 0x10(%rsp), %r15d
jmp 0xb580
movl (%rdi,%rsi,4), %r15d
addl %r9d, %r15d
addl %r11d, %ebp
movslq %ebp, %r13
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r13,4), %xmm1
addl %r11d, %r15d
movslq %r15d, %r15
movq 0x8(%rsp), %r13
movq 0x38(%rsp), %r12
mulsd (%r12,%r13,8), %xmm1
movsd (%rbx,%r15,8), %xmm2
subsd %xmm1, %xmm2
movsd %xmm2, (%rbx,%r15,8)
incq %rsi
incq %r10
addl %edx, %r9d
addl %edx, %r8d
cmpq %rsi, (%rsp)
movq 0x30(%rsp), %r13
jne 0xb51b
testq %r14, %r14
je 0xb694
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leal (%r14,%rdx), %esi
imull %r14d, %esi
movl %esi, %edx
shrl $0x1f, %edx
addl %esi, %edx
sarl %edx
movq 0x60(%rsp), %rsi
movq 0x80(%rsp), %rdi
leaq (%rsi,%rdi,4), %rsi
movq %rsi, 0x10(%rsp)
movl %ecx, %edi
imull %edx, %edi
addl (%rsp), %edi
imull %ecx, %edi
movl %ecx, %r8d
imull %ecx, %r8d
imull %ecx, %edx
addl 0x70(%rsp), %edx
imull %ecx, %edx
xorl %r9d, %r9d
testl %ecx, %ecx
movq 0x8(%rsp), %rsi
movq 0x38(%rsp), %r12
jle 0xb686
movq 0x10(%rsp), %r11
movl (%r11,%r9,4), %r10d
addl %edi, %r10d
movl (%r11,%r9,4), %r11d
addl %edx, %r11d
xorl %r15d, %r15d
movslq %r10d, %r10
xorl %ebp, %ebp
subl (%rax,%r10,4), %ebp
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movslq %r11d, %r11
movsd (%rbx,%r11,8), %xmm2
mulsd (%r12,%rsi,8), %xmm1
mulsd (%r13,%r15,8), %xmm1
subsd %xmm1, %xmm2
movsd %xmm2, (%rbx,%r11,8)
incq %r15
addl %ecx, %r10d
addl %ecx, %r11d
cmpq %r15, %rcx
jne 0xb648
incq %r9
addl %r8d, %edi
addl %r8d, %edx
cmpq %r14, %r9
jne 0xb624
movq 0x70(%rsp), %rax
cmpq %rax, 0x58(%rsp)
jge 0xb7c1
movq (%rsp), %rax
movl %eax, %r9d
imull %ecx, %r9d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal (%rax,%r14), %edx
imull %r14d, %edx
movl %edx, %eax
shrl $0x1f, %eax
addl %edx, %eax
sarl %eax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq 0x80(%rsp), %rdx
leaq (%rax,%rdx,4), %rdi
movq 0x50(%rsp), %r8
testl %ecx, %ecx
jle 0xb7b4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal (%r8,%rax), %esi
imull %r8d, %esi
movl %esi, %edx
shrl $0x1f, %edx
addl %esi, %edx
sarl %edx
movq 0x10(%rsp), %rax
leal (%rax,%r8), %esi
movl %esi, %r11d
imull %ecx, %r11d
imull %ecx, %esi
addl %r14d, %edx
movl %ecx, %ebp
imull %edx, %ebp
imull %ecx, %edx
xorl %r10d, %r10d
cmpq %r8, %r14
jae 0xb734
movl (%rdi,%r8,4), %r13d
addl %edx, %r13d
imull %ecx, %r13d
addl %r10d, %r13d
jmp 0xb740
leal (%r11,%r10), %r13d
imull %ecx, %r13d
addl (%rdi,%r8,4), %r13d
cmpq %r8, %r14
jae 0xb755
movl (%rdi,%r8,4), %r15d
addl %ebp, %r15d
imull %ecx, %r15d
addl %r10d, %r15d
jmp 0xb761
leal (%rsi,%r10), %r15d
imull %ecx, %r15d
addl (%rdi,%r8,4), %r15d
addl %r9d, %r13d
movslq %r13d, %r13
xorl %eax, %eax
movq 0x20(%rsp), %r12
subl (%r12,%r13,4), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addl %r9d, %r15d
movslq %r15d, %rax
movsd (%rbx,%rax,8), %xmm2
movq 0x8(%rsp), %r15
movq 0x38(%rsp), %r12
mulsd (%r12,%r15,8), %xmm1
movq 0x30(%rsp), %r15
mulsd (%r15,%r10,8), %xmm1
subsd %xmm1, %xmm2
movsd %xmm2, (%rbx,%rax,8)
incq %r10
cmpq %r10, %rcx
jne 0xb71f
incq %r8
cmpq (%rsp), %r8
jne 0xb6e0
movsd 0xb8(%rsp), %xmm1
mulsd %xmm0, %xmm1
subsd %xmm1, %xmm3
movq 0x18(%rsp), %r9
movslq 0x4(%r9), %rcx
incq 0x50(%rsp)
movq 0x48(%rsp), %rbp
addq $0x4, %rbp
movq 0xc0(%rsp), %r8
addq $0x8, %r8
addq $0x8, 0x78(%rsp)
incq 0x90(%rsp)
movq 0x58(%rsp), %r14
cmpq %rcx, %r14
movq 0x40(%rsp), %r13
movq 0x8(%rsp), %rsi
jl 0xb01f
jmp 0xb828
movsd 0x28(%rsp), %xmm3
movq 0x8(%rsp), %rsi
movsd %xmm3, 0x28(%rsp)
incq %rsi
movslq (%r9), %rax
cmpq %rax, %rsi
jl 0xaf97
jmp 0xb84a
movsd %xmm0, 0x28(%rsp)
movq 0x40(%rsp), %r13
movq %r13, %rdi
callq 0x1050
movq 0x30(%rsp), %rdi
callq 0x1050
movq 0x20(%rsp), %rdi
callq 0x1050
movq 0x18(%rsp), %rax
movsd 0x28(%rsp), %xmm13
movsd %xmm13, 0x70(%rax)
movslq 0x4(%rax), %r15
testq %r15, %r15
jle 0xb8f5
movl 0x8(%rax), %eax
leaq (,%r15,8), %rcx
xorl %edx, %edx
movq 0x68(%rsp), %rsi
movq %rbx, %rdi
movq 0x98(%rsp), %r10
testl %eax, %eax
jle 0xb8e5
movq %rax, %r8
xorl %r9d, %r9d
movsd (%r10,%rdx,8), %xmm0
addsd %xmm0, %xmm0
mulsd (%rsi,%r9), %xmm0
addsd (%rdi,%r9), %xmm0
movsd %xmm0, (%rdi,%r9)
movsd (%rsi,%r9), %xmm0
movsd (%r10,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm13
addq %rcx, %r9
decq %r8
jne 0xb8a8
incq %rdx
addq $0x8, %rdi
addq $0x8, %rsi
cmpq %r15, %rdx
jne 0xb89e
cmpl $0x2, %r15d
jl 0xbbfb
movq 0x18(%rsp), %rax
movl 0x8(%rax), %ecx
movl %ecx, %ebp
imull %r15d, %ebp
leal -0x2(%r15), %eax
movl %eax, 0x78(%rsp)
movd %ecx, %xmm0
pshufd $0x50, %xmm0, %xmm1     # xmm1 = xmm0[0,0,1,1]
movd %r15d, %xmm0
pshufd $0x50, %xmm0, %xmm2     # xmm2 = xmm0[0,0,1,1]
movd %ebp, %xmm0
pshufd $0x50, %xmm0, %xmm3     # xmm3 = xmm0[0,0,1,1]
movl %ecx, %eax
imull %ecx, %eax
movl %eax, 0x58(%rsp)
xorl %eax, %eax
movl $0x1, %esi
pcmpeqd %xmm4, %xmm4
movq %r15, 0x50(%rsp)
movq 0x98(%rsp), %rbx
movq 0x88(%rsp), %r12
movl %eax, %r8d
leal 0x1(%r8), %edi
movd %eax, %xmm0
pshufd $0x50, %xmm0, %xmm5     # xmm5 = xmm0[0,0,1,1]
movdqa %xmm5, %xmm0
paddd %xmm4, %xmm0
leal -0x1(%r8), %eax
imull %r8d, %eax
movl %eax, %r10d
shrl $0x1f, %r10d
addl %eax, %r10d
sarl %r10d
pmulld %xmm5, %xmm0
movdqa %xmm0, %xmm6
psrld $0x1f, %xmm6
paddd %xmm0, %xmm6
psrad $0x1, %xmm6
movl %esi, 0x80(%rsp)
addl %esi, %r10d
movl 0x58(%rsp), %eax
movl %eax, %r11d
imull %r10d, %r11d
imull %eax, %r10d
movl %edi, 0x28(%rsp)
movq %r8, 0x48(%rsp)
testl %ecx, %ecx
movq %rdi, (%rsp)
movl %r10d, 0x60(%rsp)
movl %r11d, 0x70(%rsp)
jle 0xbbb6
xorl %eax, %eax
cmpl %edi, %r8d
setb %al
movd %edi, %xmm0
pshufd $0x50, %xmm0, %xmm9     # xmm9 = xmm0[0,0,1,1]
movdqa %xmm9, %xmm0
paddd %xmm4, %xmm0
leal -0x1(%rdi), %esi
imull %edi, %esi
movl %esi, %r15d
shrl $0x1f, %r15d
addl %esi, %r15d
sarl %r15d
pmulld %xmm9, %xmm0
paddd %xmm6, %xmm9
movdqa %xmm0, %xmm10
psrld $0x1f, %xmm10
paddd %xmm0, %xmm10
psrad $0x1, %xmm10
paddd %xmm5, %xmm10
movdqa %xmm1, %xmm7
pmulld %xmm9, %xmm7
movdqa %xmm1, %xmm8
pmulld %xmm10, %xmm8
movd %eax, %xmm11
pshufd $0x50, %xmm11, %xmm0    # xmm0 = xmm11[0,0,1,1]
pslld $0x1f, %xmm0
blendvps %xmm0, %xmm10, %xmm9
pshufd $0x44, %xmm11, %xmm0    # xmm0 = xmm11[0,1,0,1]
paddd %xmm2, %xmm9
movd %xmm9, %eax
cltq
movq %rax, 0x40(%rsp)
pextrd $0x1, %xmm9, %eax
cltq
movq %rax, 0x10(%rsp)
addl %r8d, %r15d
movl 0x58(%rsp), %eax
movl %eax, %edi
imull %r15d, %edi
imull %eax, %r15d
xorl %eax, %eax
pshufd $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3]
pslld $0x1f, %xmm0
movl %r10d, %edx
movq %rdx, 0x20(%rsp)
movl %eax, 0x30(%rsp)
movd %eax, %xmm9
pshufd $0x50, %xmm9, %xmm9     # xmm9 = xmm9[0,0,1,1]
movdqa %xmm7, %xmm10
paddd %xmm9, %xmm10
pmulld %xmm1, %xmm10
movl %r15d, 0x8(%rsp)
movl %edi, 0x38(%rsp)
xorl %r13d, %r13d
movq 0x68(%rsp), %r10
movq 0x48(%rsp), %r14
movq (%rsp), %rsi
movq 0x40(%rsp), %r9
movq 0x10(%rsp), %rdx
movl %ebp, %r8d
leal (%r11,%r13), %ebp
movd %r13d, %xmm11
pshufd $0x50, %xmm11, %xmm11   # xmm11 = xmm11[0,0,1,1]
cmpl %esi, %r14d
movdqa %xmm11, %xmm12
paddd %xmm8, %xmm12
pmulld %xmm1, %xmm12
paddd %xmm10, %xmm11
paddd %xmm9, %xmm12
blendvps %xmm0, %xmm12, %xmm11
movsd (%rbx,%r9,8), %xmm12
paddd %xmm3, %xmm11
movd %xmm11, %eax
addsd %xmm12, %xmm12
cltq
mulsd (%r10,%rax,8), %xmm12
movq 0x20(%rsp), %rax
leal (%rax,%r13), %eax
cmovbl %edi, %ebp
cmovbl %r15d, %eax
addl %r8d, %ebp
movslq %ebp, %rbp
addsd (%r12,%rbp,8), %xmm12
movsd %xmm12, (%r12,%rbp,8)
pextrd $0x1, %xmm11, %ebp
movsd (%rbx,%rdx,8), %xmm11
movslq %ebp, %rbp
mulsd (%r10,%rbp,8), %xmm11
movl %r8d, %ebp
addl %r8d, %eax
cltq
mulsd (%r10,%rax,8), %xmm11
addsd %xmm11, %xmm13
incl %r13d
addl %ecx, %edi
addl %ecx, %r15d
cmpl %r13d, %ecx
jne 0xbae2
movl 0x30(%rsp), %eax
incl %eax
addl %ecx, %r11d
movq 0x20(%rsp), %rdx
addl %ecx, %edx
movl 0x38(%rsp), %edi
incl %edi
movl 0x8(%rsp), %r15d
incl %r15d
cmpl %ecx, %eax
jne 0xba9a
movq (%rsp), %rdi
incl %edi
movl 0x58(%rsp), %eax
movl 0x70(%rsp), %r11d
addl %eax, %r11d
movl 0x60(%rsp), %r10d
addl %eax, %r10d
movq 0x50(%rsp), %r15
cmpl %r15d, %edi
movq 0x48(%rsp), %r8
jne 0xb9c0
movl 0x80(%rsp), %esi
incl %esi
cmpl 0x78(%rsp), %r8d
movl 0x28(%rsp), %eax
jne 0xb95a
movq 0x68(%rsp), %rdi
movq 0x88(%rsp), %rsi
movapd %xmm13, %xmm0
movq 0x18(%rsp), %rdx
movq 0xa0(%rsp), %rcx
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc1b6