// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/tqli.c
// Function: tqli
int tqli(double d[], double e[], int n, double **z)
{
  double pythag(double a, double b);
  int m,l,iter,i,k;
  double s,r,p,g,f,dd,c,b;

  for (i=2;i<=n;i++) e[i-1]=e[i];
  e[n]=0.0;
  for (l=1;l<=n;l++) {
    iter=0;
    do {
      for (m=l;m<=n-1;m++) {
	dd=fabs(d[m])+fabs(d[m+1]);
	if ((double)(fabs(e[m])+dd) == dd) break;
      }
      if (m != l) {
	if (iter++ == 300) return( 0);
	g=(d[l+1]-d[l])/(2.0*e[l]);
	r=pythag(g,1.0);
	g=d[m]-d[l]+e[l]/(g+SIGN(r,g));
	s=c=1.0;
	p=0.0;
	for (i=m-1;i>=l;i--) {
	  f=s*e[i];
	  b=c*e[i];
	  e[i+1]=(r=pythag(f,g));
	  if (r == 0.0) {
	    d[i+1] -= p;
	    e[m]=0.0;
	    break;
	  }
	  s=f/r;
	  c=g/r;
	  g=d[i+1]-p;
	  r=(d[i]-g)*s+2.0*c*b;
	  d[i+1]=g+(p=s*r);
	  g=c*r-b;
	  for (k=1;k<=n;k++) {
	    f=z[k][i+1];
	    z[k][i+1]=s*z[k][i]+c*f;
	    z[k][i]=c*z[k][i]-s*f;
	  }
	}
	if (r == 0.0 && i >= l) continue;
	d[l] -= p;
	e[l]=g;
	e[m]=0.0;
      }
    } while (m != l);
  }
  return( 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %rbx
movq %rdi, %r15
movl %edx, 0xc(%rsp)
movslq %edx, %rdx
pushq $0x2
popq %rax
cmpq %rdx, %rax
jg 0x45eb6
movsd (%rsi,%rax,8), %xmm0
movsd %xmm0, -0x8(%rsi,%rax,8)
incq %rax
jmp 0x45ea1
andq $0x0, (%rsi,%rdx,8)
leal 0x1(%rdx), %r12d
xorl %eax, %eax
testl %edx, %edx
cmovgl %edx, %eax
incl %eax
pushq $0x1
popq %r13
movq %rdx, 0x40(%rsp)
movq %rax, 0x38(%rsp)
movq %rsi, 0x18(%rsp)
cmpq %rax, %r13
je 0x46189
movl $0x0, 0x8(%rsp)
movq %r13, %rcx
movq 0x40(%rsp), %rdx
movdqa 0xb344(%rip), %xmm2     # 0x51240
cmpq %rdx, %rcx
jge 0x45f34
leaq 0x1(%rcx), %rax
movdqu (%r15,%rcx,8), %xmm0
pand %xmm2, %xmm0
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
addsd %xmm0, %xmm1
movq (%rsi,%rcx,8), %xmm0
pand %xmm2, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm1, %xmm0
movq %rax, %rcx
jne 0x45efc
jp 0x45efc
decl %eax
jmp 0x45f38
movl 0xc(%rsp), %eax
movl %eax, %r14d
cmpq %r14, %r13
je 0x46168
movl 0x8(%rsp), %eax
cmpl $0x12c, %eax            # imm = 0x12C
je 0x46175
movsd 0x8(%r15,%r13,8), %xmm0
subsd (%r15,%r13,8), %xmm0
incl %eax
movl %eax, 0x8(%rsp)
movsd (%rsi,%r13,8), %xmm1
addsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x50c6(%rip), %xmm1     # 0x4b048
callq 0x454d8
movq 0x18(%rsp), %rsi
movsd (%r15,%r14,8), %xmm4
subsd (%r15,%r13,8), %xmm4
movsd (%rsi,%r13,8), %xmm1
movapd %xmm0, %xmm2
andpd 0xb296(%rip), %xmm2     # 0x51240
orpd 0x510e(%rip), %xmm0     # 0x4b0c0
xorpd %xmm5, %xmm5
xorpd %xmm3, %xmm3
movsd 0x20(%rsp), %xmm6
cmpnlesd %xmm6, %xmm3
andpd %xmm3, %xmm0
andnpd %xmm2, %xmm3
orpd %xmm0, %xmm3
addsd %xmm6, %xmm3
divsd %xmm3, %xmm1
addsd %xmm4, %xmm1
movq %r14, 0x10(%rsp)
movslq %r14d, %rbp
movsd 0x505b(%rip), %xmm6     # 0x4b048
movapd %xmm6, %xmm7
cmpq %r13, %rbp
jle 0x46143
movapd %xmm6, 0x70(%rsp)
movapd %xmm5, 0x20(%rsp)
movq %r13, %r14
leaq -0x1(%rbp), %r13
movsd (%rsi,%r13,8), %xmm0
movsd %xmm0, 0x48(%rsp)
mulsd %xmm0, %xmm7
movapd %xmm7, 0x60(%rsp)
movapd %xmm7, %xmm0
movapd %xmm1, 0x50(%rsp)
callq 0x454d8
movq 0x18(%rsp), %rsi
movsd %xmm0, (%rsi,%rbp,8)
ucomisd 0x500c(%rip), %xmm0     # 0x4b050
jne 0x4604c
jnp 0x46111
movapd 0x70(%rsp), %xmm4
mulsd 0x48(%rsp), %xmm4
movapd 0x50(%rsp), %xmm6
unpcklpd 0x60(%rsp), %xmm6       # xmm6 = xmm6[0],mem[0]
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm6
movsd (%r15,%rbp,8), %xmm0
subsd 0x20(%rsp), %xmm0
movsd (%r15,%r13,8), %xmm1
subsd %xmm0, %xmm1
movapd %xmm6, %xmm2
addsd %xmm6, %xmm2
mulsd %xmm4, %xmm2
movapd %xmm6, %xmm7
unpckhpd %xmm6, %xmm7            # xmm7 = xmm7[1],xmm6[1]
mulsd %xmm7, %xmm1
addsd %xmm2, %xmm1
movapd %xmm7, %xmm5
mulsd %xmm1, %xmm5
addsd %xmm5, %xmm0
movsd %xmm0, (%r15,%rbp,8)
movapd 0x5008(%rip), %xmm2     # 0x4b0c0
xorpd %xmm2, %xmm4
movapd %xmm7, %xmm0
xorpd %xmm2, %xmm0
unpcklpd %xmm6, %xmm0            # xmm0 = xmm0[0],xmm6[0]
pushq $0x1
popq %rax
cmpq %rax, %r12
je 0x460fe
movq (%rbx,%rax,8), %rcx
movsd (%rcx,%rbp,8), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm0, %xmm2
movsd (%rcx,%r13,8), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm6, %xmm3
addpd %xmm2, %xmm3
movupd %xmm3, (%rcx,%r13,8)
incq %rax
jmp 0x460cb
mulsd %xmm6, %xmm1
addsd %xmm4, %xmm1
movq %r13, %rbp
movq %r14, %r13
jmp 0x45ff1
movsd (%r15,%rbp,8), %xmm0
movapd 0x20(%rsp), %xmm5
subsd %xmm5, %xmm0
movsd %xmm0, (%r15,%rbp,8)
movq 0x10(%rsp), %rax
andq $0x0, (%rsi,%rax,8)
movq %r14, %r13
cmpq %r14, %rbp
movapd 0x50(%rsp), %xmm1
jg 0x45eec
movsd (%r15,%r13,8), %xmm0
subsd %xmm5, %xmm0
movsd %xmm0, (%r15,%r13,8)
movsd %xmm1, (%rsi,%r13,8)
movq 0x10(%rsp), %rax
andq $0x0, (%rsi,%rax,8)
jmp 0x45eec
incq %r13
movq 0x38(%rsp), %rax
jmp 0x45edb
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rax
jmp 0x46177
nop