// File: /workspace/github_cpp_makefile_star2_O1/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 0x3b7da(%rip), %rax     # 0x47c80
movq %rax, (%rdi)
testl %esi, %esi
jle 0xc7a4
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0xc7a4
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
movsd %xmm1, 0x8(%rsp)
cmpl $0x1, %esi
movsd %xmm0, (%rsp)
jne 0xc520
movl $0x0, 0x18(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc328
leaq 0x3b721(%rip), %rax     # 0x47c20
movq %rax, (%r15)
movsd (%rsp), %xmm2
movsd %xmm2, 0x28(%r15)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0xc572
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0xc580
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xc590
jp 0xc590
cmpl $0x2, %r14d
jne 0xc5f1
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 0x3c54e(%rip), %rax     # 0x48ab8
movq %rax, (%r15)
jmp 0xc643
movapd %xmm2, %xmm0
callq 0x7728
movsd (%rsp), %xmm2
movsd %xmm0, 0x30(%r15)
movl $0x8, %eax
jmp 0xc752
cmpl $0x3, %r14d
je 0xc652
cmpl $0x2, %r14d
jne 0xc6a1
movl $0x3, 0x18(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc328
movsd 0x28e48(%rip), %xmm0    # 0x35410
movsd (%rsp), %xmm2
mulsd %xmm2, %xmm0
leaq 0x3b648(%rip), %rax     # 0x47c20
movq %rax, (%r15)
movsd %xmm0, 0x28(%r15)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xc576
sqrtsd %xmm0, %xmm0
jmp 0xc580
movl $0x2, 0x18(%rbx)
movl $0x40, %edi
callq 0x7380
movq %rax, %r15
movsd 0x28e03(%rip), %xmm0    # 0x35410
mulsd 0x8(%rsp), %xmm0
movsd 0x28e1d(%rip), %xmm1    # 0x35438
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rax)
movb $0x1, 0x24(%rax)
leaq 0x3ba11(%rip), %rax     # 0x48040
movq %rax, (%r15)
movsd %xmm0, 0x30(%r15)
callq 0xca78
movsd %xmm0, 0x38(%r15)
movl $0x8, %eax
movsd (%rsp), %xmm2
jmp 0xc752
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 0x3c435(%rip), %rcx     # 0x48ab8
movq %rcx, (%rax)
movq %rax, 0x8(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc328
jmp 0xc711
movl $0x5, 0x18(%rbx)
movl $0x40, %edi
callq 0x7380
leal -0x1(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0x28d4b(%rip), %xmm0    # 0x35410
movq %rax, %r15
movsd 0x28d68(%rip), %xmm1    # 0x35438
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rax)
movb $0x1, 0x24(%rax)
leaq 0x3b95c(%rip), %rax     # 0x48040
movq %rax, (%r15)
movsd %xmm0, 0x30(%r15)
callq 0xca78
movsd %xmm0, 0x38(%r15)
movq %r15, 0x8(%rbx)
movl $0x38, %edi
callq 0x7380
movq %rax, %r15
movq %rax, %rdi
callq 0xc328
leaq 0x3b508(%rip), %rax     # 0x47c20
movq %rax, (%r15)
movsd (%rsp), %xmm2
movsd %xmm2, 0x28(%r15)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0xc739
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0xc747
movapd %xmm2, %xmm0
callq 0x7728
movsd (%rsp), %xmm2
movsd %xmm0, 0x30(%r15)
movl $0x10, %eax
movq %r15, (%rbx,%rax)
cmpq $0x0, 0x8(%rbx)
je 0xc79f
cmpl $0x4, 0x18(%rbx)
jl 0xc76a
cmpq $0x0, 0x10(%rbx)
je 0xc79f
movsd 0x8(%rsp), %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, 0x20(%rbx)
addl %r14d, %r14d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd 0x28cb4(%rip), %xmm2    # 0x35440
addsd %xmm0, %xmm2
movsd %xmm2, 0x28(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0xbe43
movl $0x1, %edi
callq 0x7180
movq %rax, %r14
leaq 0x29043(%rip), %rsi     # 0x357fb
movq %rax, %rdi
callq 0xb7f2
leaq 0x3b1f1(%rip), %rsi     # 0x479b8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
jmp 0xc7d7
jmp 0xc7d7
jmp 0xc7d7
movq %rax, %rbx
movl $0x38, %esi
movq %r15, %rdi
callq 0x7390
jmp 0xc7f4
movq %rax, %rbx
movq %r14, %rdi
callq 0x72a0
movq %rbx, %rdi
callq 0x76a0