// File: /workspace/github_cpp_makefile_star2_O2/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 0x38116(%rip), %rax     # 0x43ca0
movq %rax, (%rdi)
testl %esi, %esi
jle 0xbd82
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0xbd82
movl %esi, %r14d
movq %rdi, %rbx
cvtsi2sd %esi, %xmm1
movsd %xmm1, 0x8(%rsp)
cmpl $0x1, %esi
movsd %xmm0, (%rsp)
jne 0xbbde
andl $0x0, 0x18(%rbx)
pushq $0x38
popq %rdi
callq 0x73f0
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0xbb1a
jmp 0xbc89
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xbc24
jp 0xbc24
cmpl $0x2, %r14d
jne 0xbc61
movl $0x1, 0x18(%rbx)
pushq $0x28
popq %rdi
callq 0x73f0
movq %rax, %r15
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
movapd %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
movb $0x1, 0x20(%rax)
leaq 0x38eb9(%rip), %rax     # 0x44ad8
movq %rax, (%r15)
jmp 0xbc89
cmpl $0x3, %r14d
je 0xbce3
cmpl $0x2, %r14d
jne 0xbd30
movl $0x3, 0x18(%rbx)
pushq $0x38
popq %rdi
callq 0x73f0
movq %rax, %r15
movsd 0x217a6(%rip), %xmm0    # 0x2d3f8
mulsd (%rsp), %xmm0
movq %rax, %rdi
callq 0xbb1a
jmp 0xbc89
movl $0x2, 0x18(%rbx)
pushq $0x40
popq %rdi
callq 0x73f0
movq %rax, %r15
movsd 0x2177d(%rip), %xmm0    # 0x2d3f8
mulsd 0x8(%rsp), %xmm0
movq %rax, %rdi
callq 0xc87c
pushq $0x8
popq %rax
movsd (%rsp), %xmm1
movq %r15, (%rbx,%rax)
cmpq $0x0, 0x8(%rbx)
je 0xbd7d
cmpl $0x4, 0x18(%rbx)
jl 0xbcb1
cmpq $0x0, 0x10(%rbx)
je 0xbd7d
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rbx)
addl %r14d, %r14d
cvtsi2sd %r14d, %xmm0
mulsd 0x21750(%rip), %xmm1    # 0x2d420
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x4, 0x18(%rbx)
pushq $0x28
popq %rdi
callq 0x73f0
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
movapd %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
movb $0x1, 0x20(%rax)
leaq 0x38dc9(%rip), %rcx     # 0x44ad8
movq %rcx, (%rax)
movq %rax, 0x8(%rbx)
pushq $0x38
popq %rdi
callq 0x73f0
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0xbb1a
jmp 0xbd76
movl $0x5, 0x18(%rbx)
pushq $0x40
popq %rdi
callq 0x73f0
movq %rax, %r15
leal -0x1(%r14), %eax
cvtsi2sd %eax, %xmm0
mulsd 0x216a6(%rip), %xmm0    # 0x2d3f8
movq %r15, %rdi
callq 0xc87c
movq %r15, 0x8(%rbx)
pushq $0x38
popq %rdi
callq 0x73f0
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0xbb1a
pushq $0x10
jmp 0xbc8b
callq 0xb55e
pushq $0x1
popq %rdi
callq 0x71d0
movq %rax, %r14
leaq 0x21a57(%rip), %rsi     # 0x2d7eb
movq %rax, %rdi
callq 0xb03c
leaq 0x37c35(%rip), %rsi     # 0x439d8
movq %r14, %rdi
xorl %edx, %edx
callq 0x76a0
jmp 0xbdb3
jmp 0xbdb3
jmp 0xbdb3
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r15, %rdi
callq 0x7400
jmp 0xbdce
movq %rax, %rbx
movq %r14, %rdi
callq 0x7300
movq %rbx, %rdi
callq 0x76d0