// File: /workspace/github_cpp_makefile_star2_O1/BhanuPrakashN[P]sparse_chol/smatrix.cpp
// Function: UpdateF(Fmatrix*, double*, std::vector<int, std::allocator<int>>*)
Fm *UpdateF(Fm *F,double *l_b,vector<int> *Pind){
    Fm *U=(Fm*)malloc(sizeof(Fm));
    U->n=(F->n)-1;
    U->x=(double **)calloc(U->n,sizeof(double *));
    for(int i=0;i<U->n;i++)
        U->x[i]=(double*)calloc(U->n,sizeof(double));
    vector<int> *Gind=F->indices;
    U->indices =new vector<int>;
    int temp=0;
    if(Pind!=NULL)sort(Pind->begin(),Pind->end());
    //printf("Pind:");
    //for(int i=0;i<Pind->size();i++)
      //  printf("%d ",Pind->at(i) );
    //printf("\nGind:");
    //for(int i=0;i<Gind->size();i++)
      //  printf("%d ",Gind->at(i) );  
    

    for(int i=1;i<F->n;i++){
        //temp=0;
        while(Pind->at(temp)!=Gind->at(i))temp++;
        U->indices->push_back(temp);
    }
    //printf("\nLind:");
    //for(int i=0;i<U->indices->size();i++)
    //    printf("%d ",U->indices->at(i) );
    for(int i=0;i<U->n;i++){
        for(int j=0;j<U->n;j++){
            U->x[i][j]=F->x[i+1][j+1]-l_b[i]*l_b[j];
        }
    }

    return U;



}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
movl $0x18, %edi
callq 0x1150
movq %rax, %r14
movq %r15, -0x40(%rbp)
movslq (%r15), %r15
leaq -0x1(%r15), %r13
movl %r13d, (%rax)
movl $0x8, %esi
movq %r13, %rdi
callq 0x10a0
movq %rax, %r12
movq %r14, -0x48(%rbp)
movq %rax, 0x10(%r14)
movq %r15, -0x58(%rbp)
cmpq $0x2, %r15
jl 0x216a
movl %r13d, %r14d
xorl %r15d, %r15d
movl $0x8, %esi
movq %r13, %rdi
callq 0x10a0
movq %rax, (%r12,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x2151
movq %r13, -0x50(%rbp)
movq %r12, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %r15
movl $0x18, %edi
callq 0x1100
movq %rax, %r12
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq -0x48(%rbp), %rax
movq %r12, 0x8(%rax)
movl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %r10
testq %r10, %r10
je 0x21ec
movq (%r10), %r14
movq 0x8(%r10), %r13
cmpq %r13, %r14
je 0x21ec
movq %r13, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x2842
movq %r14, %rdi
movq %r13, %rsi
callq 0x2923
movq -0x38(%rbp), %r10
movq -0x40(%rbp), %r9
cmpl $0x2, (%r9)
jl 0x2290
movl $0x1, %r14d
movq (%r10), %rcx
movq 0x8(%r10), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
movslq -0x2c(%rbp), %rdi
cmpq %rdi, %rdx
jbe 0x2305
movq (%r15), %r8
movq 0x8(%r15), %rax
subq %r8, %rax
sarq $0x2, %rax
cmpq %r14, %rax
jbe 0x22f6
movl (%rcx,%rdi,4), %eax
cmpl (%r8,%r14,4), %eax
je 0x2254
movq %rdi, %rsi
incq %rsi
leal 0x1(%rdi), %eax
movl %eax, -0x2c(%rbp)
movq %rsi, %rdi
cmpq %rsi, %rdx
ja 0x2232
jmp 0x2308
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x226d
movl %edi, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r12)
jmp 0x2281
movq %r12, %rdi
leaq -0x2c(%rbp), %rdx
callq 0x270a
movq -0x38(%rbp), %r10
movq -0x40(%rbp), %r9
incq %r14
movslq (%r9), %rax
cmpq %rax, %r14
jl 0x2200
cmpl $0x2, -0x58(%rbp)
movq -0x60(%rbp), %r10
movq -0x50(%rbp), %r13
jl 0x22e3
movl %r13d, %eax
movq 0x10(%r9), %rcx
xorl %edx, %edx
movq 0x8(%rcx,%rdx,8), %rsi
movq (%r10,%rdx,8), %rdi
xorl %r8d, %r8d
movsd 0x8(%rsi,%r8,8), %xmm0
movsd (%rbx,%rdx,8), %xmm1
mulsd (%rbx,%r8,8), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rdi,%r8,8)
leaq 0x1(%r8), %r9
movq %r9, %r8
cmpq %r9, %rax
jne 0x22b3
incq %rdx
cmpq %rax, %rdx
jne 0x22a7
movq -0x48(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd6c(%rip), %rdi       # 0x3069
movq %r14, %rsi
movq %rax, %rdx
jmp 0x230f
movq %rdi, %rsi
leaq 0xd5a(%rip), %rdi       # 0x3069
xorl %eax, %eax
callq 0x1190