// File: /workspace/github_cpp_makefile_star2_O1/canzarlab[P]Trajan/src/AntichainConstraint.cpp
// Function: AntichainConstraint::Reset(std::vector<newick_node*, std::allocator<newick_node*>>&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&)
double AntichainConstraint::Reset(vn& P, vvd& R)
{
    double sum = 0;
    for (int i = 0; i < Z; ++i)
    {
        R[S][i] = R[i][S] = R[T][i + Z] = 0;
        for (int j : G[i + Z])
            R[i + Z][j] = 0;

        for (newick_node* nodel : P)
        {
            R[S][i] += GetWeight(nodel->taxoni, i);
            R[i + Z][T] += GetWeight(nodel->taxoni, i);
        }
        sum += R[S][i];
    }
    return sum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movslq 0x50(%rdi), %r8
testq %r8, %r8
jle 0x3ab48
movslq 0x4c(%rdi), %rcx
movq (%rdx), %rdx
leaq (%rcx,%rcx,2), %rax
movq (%rdx,%rax,8), %rax
movq %rax, 0x20(%rsp)
movslq 0x48(%rdi), %rax
movq %rax, 0x18(%rsp)
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %r10
movq 0x38(%rdi), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq (%rsi), %rax
movq %rax, (%rsp)
movq 0x8(%rsi), %rsi
movq %rdi, 0x8(%rsp)
movb 0x30(%rdi), %bpl
xorpd %xmm0, %xmm0
xorl %eax, %eax
movq %r8, %r11
leaq (%rax,%r8), %rdi
movq 0x20(%rsp), %r8
xorl %ebx, %ebx
movq %rbx, (%r8,%rdi,8)
leaq (%rax,%rax,2), %r12
movq (%rdx,%r12,8), %r8
movq 0x18(%rsp), %r9
movq %rbx, (%r8,%r9,8)
movq %rbx, (%r10,%rax,8)
leaq (%rdi,%rdi,2), %r9
movq 0x10(%rsp), %rdi
movq (%rdi,%r9,8), %r8
movq 0x8(%rdi,%r9,8), %rbx
cmpq %rbx, %r8
je 0x3aa4c
movq (%rdx,%r9,8), %r14
movslq (%r8), %rdi
movq $0x0, (%r14,%rdi,8)
addq $0x4, %r8
cmpq %rbx, %r8
jne 0x3aa38
cmpq %rsi, (%rsp)
je 0x3ab31
movq 0x8(%rsp), %rdi
movq 0x20(%rdi), %r13
movq 0x28(%rdi), %r8
leaq (%rdx,%r9,8), %r9
shlq $0x3, %r12
movq (%rsp), %rbx
movq (%rbx), %rdi
movslq 0x28(%rdi), %r15
testb $0x1, %bpl
je 0x3aa88
movq (%r13), %r14
addq %r12, %r14
movq %r15, %rdi
jmp 0x3aa97
leaq (%r15,%r15,2), %r14
shlq $0x3, %r14
addq (%r13), %r14
movq %rax, %rdi
movq (%r14), %r14
movslq (%r14,%rdi,4), %r14
cmpq $-0x1, %r14
je 0x3aac2
testl %r14d, %r14d
js 0x3ab5b
cmpq %r14, 0x8(%r8)
jle 0x3ab5b
movq (%r8), %rdi
movsd (%rdi,%r14,8), %xmm1
jmp 0x3aac6
xorpd %xmm1, %xmm1
addsd (%r10,%rax,8), %xmm1
movsd %xmm1, (%r10,%rax,8)
testb $0x1, %bpl
je 0x3aae1
movq (%r13), %r14
addq %r12, %r14
jmp 0x3aaf0
leaq (%r15,%r15,2), %r14
shlq $0x3, %r14
addq (%r13), %r14
movq %rax, %r15
movq (%r14), %rdi
movslq (%rdi,%r15,4), %r14
cmpq $-0x1, %r14
je 0x3ab13
testl %r14d, %r14d
js 0x3ab5b
cmpq %r14, 0x8(%r8)
jle 0x3ab5b
movq (%r8), %rdi
movsd (%rdi,%r14,8), %xmm1
jmp 0x3ab17
xorpd %xmm1, %xmm1
movq (%r9), %rdi
addsd (%rdi,%rcx,8), %xmm1
movsd %xmm1, (%rdi,%rcx,8)
addq $0x8, %rbx
cmpq %rsi, %rbx
jne 0x3aa6f
addsd (%r10,%rax,8), %xmm0
incq %rax
movq %r11, %r8
cmpq %r11, %rax
jne 0x3a9f6
jmp 0x3ab4c
xorpd %xmm0, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x226c3(%rip), %rdi     # 0x5d225
leaq 0x226d9(%rip), %rsi     # 0x5d242
leaq 0x226f5(%rip), %rcx     # 0x5d265
movl $0x1a9, %edx            # imm = 0x1A9
callq 0x9200