// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../tools/evolver_ndf15.c
// Function: initialize_jacobian
int initialize_jacobian(struct jacobian *jac, int neq, ErrorMsg error_message){
  int i;

  if (neq>15){
    jac->use_sparse = 1;
  }
  else{
    jac->use_sparse = 0;
  }
  jac->max_nonzero = (int)(MAX(3*neq,0.20*neq*neq));
  jac->cnzmax = 12*jac->max_nonzero/5;

  /*Maximal number of non-zero entries to be considered sparse */
  jac->repeated_pattern = 0;
  jac->trust_sparse = 4;
  /* Number of times a pattern is repeated before we trust it. */
  jac->has_grouping = 0;
  jac->has_pattern = 0;
  jac->sparse_stuff_initialized=0;

  /*Setup memory for the pointers of the dense method:*/

  class_alloc(jac->dfdy,sizeof(double*)*(neq+1),error_message); /* Allocate vector of pointers to rows of matrix.*/
  class_alloc(jac->dfdy[1],sizeof(double)*(neq*neq+1),error_message);
  jac->dfdy[0] = NULL;
  for(i=2;i<=neq;i++) jac->dfdy[i] = jac->dfdy[i-1]+neq; /* Set row pointers... */

  class_alloc(jac->LU,sizeof(double*)*(neq+1),error_message); /* Allocate vector of pointers to rows of matrix.*/
  class_alloc(jac->LU[1],sizeof(double)*(neq*neq+1),error_message);
  jac->LU[0] = NULL;
  for(i=2;i<=neq;i++) jac->LU[i] = jac->LU[i-1]+neq; /* Set row pointers... */

  class_alloc(jac->LUw,sizeof(double)*(neq+1),error_message);
  class_alloc(jac->jacvec,sizeof(double)*(neq+1),error_message);
  class_alloc(jac->luidx,sizeof(int)*(neq+1),error_message);

  /*Setup memory for the sparse method, if used: */
  if (jac->use_sparse){
    jac->sparse_stuff_initialized = 1;

    jac->xjac=(double*)(jac->luidx+neq+1);
    jac->col_group=(int*)(jac->xjac+jac->max_nonzero);
    jac->col_wi=jac->col_group+neq;
    jac->Cp=jac->col_wi+neq;
    jac->Ci=jac->Cp+neq+1;

    class_alloc(jac->xjac,sizeof(double)*jac->max_nonzero,error_message);
    class_alloc(jac->col_group,sizeof(int)*neq,error_message);
    class_alloc(jac->col_wi,sizeof(int)*neq,error_message);
    class_alloc(jac->Cp,sizeof(int)*(neq+1),error_message);
    class_alloc(jac->Ci,sizeof(int)*jac->cnzmax,error_message);

    class_call(sp_num_alloc(&jac->Numerical, neq,error_message),
           error_message,error_message);

    class_call(sp_mat_alloc(&jac->spJ, neq, neq, jac->max_nonzero,
                error_message),error_message,error_message);

  }

  /* Initialize jacvec to sqrt(eps):*/
  for (i=1;i<=neq;i++) jac->jacvec[i]=1.490116119384765597872e-8;
  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x828, %rsp            # imm = 0x828
movq %rdx, %r13
movl %esi, %r15d
movq %rdi, %r14
xorl %eax, %eax
cmpl $0x10, %esi
setge %al
movl %eax, 0x28(%rdi)
leal (%r15,%r15,2), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sd %esi, %xmm1
movsd 0xde70c(%rip), %xmm2    # 0xee298
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
maxsd %xmm0, %xmm2
cvttsd2si %xmm2, %eax
movl %eax, 0x30(%rdi)
movq %rax, 0x18(%rsp)
leal (,%rax,4), %eax
leal (%rax,%rax,2), %eax
cltq
imulq $0x66666667, %rax, %r12 # imm = 0x66666667
movq %r12, %rax
shrq $0x3f, %rax
sarq $0x21, %r12
addl %eax, %r12d
movl %r12d, 0x48(%rdi)
movq 0xdf09f(%rip), %xmm0    # 0xeec70
movdqu %xmm0, 0x34(%rdi)
movl $0x0, 0x2c(%rdi)
leal 0x1(%r15), %eax
movq %rax, 0x10(%rsp)
cltq
movq %rax, 0x8(%rsp)
leaq (,%rax,8), %rbx
movq %rbx, %rdi
callq 0x8460
movq %rax, (%r14)
testq %rax, %rax
je 0xfe44
movq %rax, %rbp
movq %r13, (%rsp)
movl %r15d, %eax
imull %eax, %eax
leaq 0x8(,%rax,8), %r13
movq %r13, %rdi
callq 0x8460
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0xfe7e
movq $0x0, (%rbp)
cmpl $0x2, %r15d
jl 0xfc68
movl %r15d, %eax
movl 0x10(%rsp), %ecx
movl $0x2, %edx
shlq $0x3, %rax
movq (%r14), %rsi
movq -0x8(%rsi,%rdx,8), %rdi
addq %rax, %rdi
movq %rdi, (%rsi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0xfc51
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xfeb7
movq %rax, %rbp
movq %r13, %rdi
callq 0x8460
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0xfef2
movq $0x0, (%rbp)
cmpl $0x2, %r15d
movq 0x10(%rsp), %rbp
jl 0xfcce
movl %r15d, %eax
movl %ebp, %ecx
movl $0x2, %edx
shlq $0x3, %rax
movq 0x10(%r14), %rsi
movq -0x8(%rsi,%rdx,8), %rdi
addq %rax, %rdi
movq %rdi, (%rsi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0xfcb6
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x18(%r14)
testq %rax, %rax
movq (%rsp), %r13
je 0xff2e
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0xff65
movq 0x8(%rsp), %rbx
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0xffbb
cmpl $0x10, %r15d
jl 0xfff6
movq %rbx, 0x8(%rsp)
movl $0x1, 0x2c(%r14)
movl %r15d, %ebx
leaq (%rax,%rbx,4), %rax
movq 0x18(%rsp), %r13
movslq %r13d, %rdi
leaq (%rax,%rdi,8), %rcx
leaq 0x4(%rax,%rdi,8), %rax
movq %rax, 0x50(%r14)
leaq 0x4(%rcx,%rbx,4), %rax
movq %rax, 0x58(%r14)
leaq (%rax,%rbx,4), %rax
movq %rax, 0x80(%r14)
leaq (%rax,%rbx,4), %rax
addq $0x4, %rax
movq %rax, 0x88(%r14)
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x70(%r14)
testq %rax, %rax
je 0x1009b
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x50(%r14)
testq %rax, %rax
je 0x100e2
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x58(%r14)
testq %rax, %rax
movq (%rsp), %r13
je 0x1011d
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x80(%r14)
testq %rax, %rax
je 0x10157
movslq %r12d, %rdi
shlq $0x2, %rdi
callq 0x8460
movq %rax, 0x88(%r14)
testq %rax, %rax
je 0x10192
leaq 0x78(%r14), %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0xb2a5
cmpl $0x1, %eax
jne 0x101d1
leaq 0xde5e0(%rip), %rsi     # 0xee3f0
leaq 0xdf627(%rip), %rdx     # 0xef43e
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xde204(%rip), %rsi     # 0xee034
leaq 0xdf57e(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x629, %ecx            # imm = 0x629
jmp 0xff29
leaq 0xde1b9(%rip), %rsi     # 0xee004
leaq 0xdf559(%rip), %rdx     # 0xef3ab
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xde1ca(%rip), %rsi     # 0xee034
leaq 0xdf544(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x60a, %ecx            # imm = 0x60A
jmp 0xff9a
leaq 0xde17f(%rip), %rsi     # 0xee004
leaq 0xdf53d(%rip), %rdx     # 0xef3c9
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xde18f(%rip), %rsi     # 0xee034
leaq 0xdf509(%rip), %rdx     # 0xef3b5
movq (%rsp), %rdi
movl $0x60b, %ecx            # imm = 0x60B
jmp 0xff29
leaq 0xde146(%rip), %rsi     # 0xee004
leaq 0xdf511(%rip), %rdx     # 0xef3d6
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xde157(%rip), %rsi     # 0xee034
leaq 0xdf4d1(%rip), %rdx     # 0xef3b5
movq (%rsp), %rdi
movl $0x60f, %ecx            # imm = 0x60F
jmp 0xff9a
leaq 0xde10b(%rip), %rsi     # 0xee004
leaq 0xdf4de(%rip), %rdx     # 0xef3de
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xde11b(%rip), %rsi     # 0xee034
leaq 0xdf495(%rip), %rdx     # 0xef3b5
movq (%rsp), %rdi
movl $0x610, %ecx            # imm = 0x610
movq %rbx, %r8
jmp 0xff9d
leaq 0xde0cf(%rip), %rsi     # 0xee004
leaq 0xdf4ad(%rip), %rdx     # 0xef3e9
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xde0e0(%rip), %rsi     # 0xee034
leaq 0xdf45a(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x614, %ecx            # imm = 0x614
jmp 0xff9a
leaq 0xde098(%rip), %rsi     # 0xee004
leaq 0xdf47f(%rip), %rdx     # 0xef3f2
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xde0a9(%rip), %rsi     # 0xee034
leaq 0xdf423(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x615, %ecx            # imm = 0x615
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x828, %rsp            # imm = 0x828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xde042(%rip), %rsi     # 0xee004
leaq 0xdf435(%rip), %rdx     # 0xef3fe
movq %rbx, %rcx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xde052(%rip), %rsi     # 0xee034
leaq 0xdf3cc(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x616, %ecx            # imm = 0x616
jmp 0xff29
testl %r15d, %r15d
jle 0x100db
movq 0x8(%r14), %rcx
movl %ebp, %eax
andl $-0x2, %ebp
addq $-0x2, %rax
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %edx, %edx
movdqa 0xdec60(%rip), %xmm1    # 0xeec80
movdqa 0xdec68(%rip), %xmm2    # 0xeec90
pxor %xmm2, %xmm0
movabsq $0x3e50000000000000, %rsi # imm = 0x3E50000000000000
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %eax
notl %eax
testb $0x1, %al
je 0x10079
movq %rsi, 0x8(%rcx,%rdx,8)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %eax
testb $0x1, %al
je 0x1008b
movq %rsi, 0x10(%rcx,%rdx,8)
addq $0x2, %rdx
xorl %eax, %eax
cmpq %rdx, %rbp
jne 0x1003a
jmp 0xffa9
shll $0x3, %r13d
leaq 0xddf5e(%rip), %rsi     # 0xee004
leaq 0xdf35c(%rip), %rdx     # 0xef409
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xddf6e(%rip), %rsi     # 0xee034
leaq 0xdf2e8(%rip), %rdx     # 0xef3b5
movq (%rsp), %rdi
movl $0x622, %ecx            # imm = 0x622
jmp 0xff29
xorl %eax, %eax
jmp 0xffa9
leaq 0xddf1b(%rip), %rsi     # 0xee004
leaq 0xdf323(%rip), %rdx     # 0xef413
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xddf2c(%rip), %rsi     # 0xee034
leaq 0xdf2a6(%rip), %rdx     # 0xef3b5
movq (%rsp), %rdi
movl $0x623, %ecx            # imm = 0x623
jmp 0xff9a
leaq 0xddee0(%rip), %rsi     # 0xee004
leaq 0xdf2f7(%rip), %rdx     # 0xef422
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xddef1(%rip), %rsi     # 0xee034
leaq 0xdf26b(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x624, %ecx            # imm = 0x624
jmp 0xff9a
leaq 0xddea6(%rip), %rsi     # 0xee004
leaq 0xdf2c9(%rip), %rdx     # 0xef42e
movq %rbx, %rcx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xddeb6(%rip), %rsi     # 0xee034
leaq 0xdf230(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x625, %ecx            # imm = 0x625
jmp 0xff29
shll $0x2, %r12d
leaq 0xdde67(%rip), %rsi     # 0xee004
leaq 0xdf292(%rip), %rdx     # 0xef436
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xdde77(%rip), %rsi     # 0xee034
leaq 0xdf1f1(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x626, %ecx            # imm = 0x626
jmp 0xff29
leaq 0x68(%r14), %rdi
movl 0x30(%r14), %ecx
movl %r15d, %esi
movl %r15d, %edx
movq %r13, %r8
callq 0xb0c4
cmpl $0x1, %eax
jne 0xffff
leaq 0xde1f9(%rip), %rsi     # 0xee3f0
leaq 0xdf271(%rip), %rdx     # 0xef46f
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xdde1d(%rip), %rsi     # 0xee034
leaq 0xdf197(%rip), %rdx     # 0xef3b5
movq %r13, %rdi
movl $0x62c, %ecx            # imm = 0x62C
jmp 0xff29