// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/newran.cpp
// Function: ChiSq::ChiSq(int, double)
ChiSq::ChiSq(int df, Real noncen)
{
  if (df<=0 || noncen<0.0) Throw(Logic_error("Newran: illegal parameters"));
  else if (df==1) { version=0; c1=new ChiSq1(noncen); }
  else if (noncen==0.0)
  {
     if (df==2) { version=1; c1=new Exponential(); }
     else { version=2; c1=new Gamma2(0.5*df); }
  }
  else if (df==2) { version=3; c1=new ChiSq1(noncen/2.0); }
  else if (df==3) { version=4; c1=new Exponential(); c2=new ChiSq1(noncen); }
  else { version=5; c1=new Gamma2(0.5*(df-1)); c2=new ChiSq1(noncen); }
  if (!c1 || (version>3 && !c2)) ErrorNoSpace();
  mean=df+noncen; var=2*df+4.0*noncen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x3a6e4(%rip), %rax     # 0x46c80
movq %rax, (%rdi)
testl %esi, %esi
jle 0xc89a
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0xc89a
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
movsd %xmm1, 0x8(%rsp)
cmpl $0x1, %esi
movsd %xmm0, (%rsp)
jne 0xc616
movl $0x0, 0x18(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc412
leaq 0x3a62b(%rip), %rax     # 0x46c20
movq %rax, (%r15)
movsd (%rsp), %xmm2
movsd %xmm2, 0x28(%r15)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0xc668
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0xc676
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xc686
jp 0xc686
cmpl $0x2, %r14d
jne 0xc6e7
movl $0x1, 0x18(%rbx)
movl $0x28, %edi
callq 0x7380
movq %rax, %r15
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
movapd %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movb $0x1, 0x20(%rax)
leaq 0x3b458(%rip), %rax     # 0x47ab8
movq %rax, (%r15)
jmp 0xc739
movapd %xmm2, %xmm0
callq 0x7728
movsd (%rsp), %xmm2
movsd %xmm0, 0x30(%r15)
movl $0x8, %eax
jmp 0xc848
cmpl $0x3, %r14d
je 0xc748
cmpl $0x2, %r14d
jne 0xc797
movl $0x3, 0x18(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc412
movsd 0x27d22(%rip), %xmm0    # 0x343e0
movsd (%rsp), %xmm2
mulsd %xmm2, %xmm0
leaq 0x3a552(%rip), %rax     # 0x46c20
movq %rax, (%r15)
movsd %xmm0, 0x28(%r15)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xc66c
sqrtsd %xmm0, %xmm0
jmp 0xc676
movl $0x2, 0x18(%rbx)
movl $0x40, %edi
callq 0x7380
movq %rax, %r15
movsd 0x27cdd(%rip), %xmm0    # 0x343e0
mulsd 0x8(%rsp), %xmm0
movsd 0x27cf7(%rip), %xmm1    # 0x34408
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rax)
movb $0x1, 0x24(%rax)
leaq 0x3a91b(%rip), %rax     # 0x47040
movq %rax, (%r15)
movsd %xmm0, 0x30(%r15)
callq 0xcb6e
movsd %xmm0, 0x38(%r15)
movl $0x8, %eax
movsd (%rsp), %xmm2
jmp 0xc848
movl $0x4, 0x18(%rbx)
movl $0x28, %edi
callq 0x7380
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
movapd %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movb $0x1, 0x20(%rax)
leaq 0x3b33f(%rip), %rcx     # 0x47ab8
movq %rcx, (%rax)
movq %rax, 0x8(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc412
jmp 0xc807
movl $0x5, 0x18(%rbx)
movl $0x40, %edi
callq 0x7380
leal -0x1(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0x27c25(%rip), %xmm0    # 0x343e0
movq %rax, %r15
movsd 0x27c42(%rip), %xmm1    # 0x34408
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rax)
movb $0x1, 0x24(%rax)
leaq 0x3a866(%rip), %rax     # 0x47040
movq %rax, (%r15)
movsd %xmm0, 0x30(%r15)
callq 0xcb6e
movsd %xmm0, 0x38(%r15)
movq %r15, 0x8(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc412
leaq 0x3a412(%rip), %rax     # 0x46c20
movq %rax, (%r15)
movsd (%rsp), %xmm2
movsd %xmm2, 0x28(%r15)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0xc82f
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0xc83d
movapd %xmm2, %xmm0
callq 0x7728
movsd (%rsp), %xmm2
movsd %xmm0, 0x30(%r15)
movl $0x10, %eax
movq %r15, (%rbx,%rax)
cmpq $0x0, 0x8(%rbx)
je 0xc895
cmpl $0x4, 0x18(%rbx)
jl 0xc860
cmpq $0x0, 0x10(%rbx)
je 0xc895
movsd 0x8(%rsp), %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, 0x20(%rbx)
addl %r14d, %r14d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd 0x27b8e(%rip), %xmm2    # 0x34410
addsd %xmm0, %xmm2
movsd %xmm2, 0x28(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0xbf3b
movl $0x1, %edi
callq 0x7180
movq %rax, %r14
leaq 0x27f6d(%rip), %rsi     # 0x3481b
movq %rax, %rdi
callq 0xb8ea
leaq 0x3a0fb(%rip), %rsi     # 0x469b8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
jmp 0xc8cd
jmp 0xc8cd
jmp 0xc8cd
movq %rax, %rbx
movl $0x38, %esi
movq %r15, %rdi
callq 0x7390
jmp 0xc8ea
movq %rax, %rbx
movq %r14, %rdi
callq 0x72a0
movq %rbx, %rdi
callq 0x76a0