// File: melop[P]admixem/./newran02/newran.cpp
// Function: MixedRandom::Build(double*)
void MixedRandom::Build(Real* probs)
{
   int i;
   dg=new DiscreteGen(n,probs);
   if (!dg) ErrorNoSpace();
   mean=0.0; var=0.0;
   for (i=0; i<n; i++) mean = mean + (rv[i])->Mean()*probs[i];
   for (i=0; i<n; i++)
   {
      ExtReal sigsq=(rv[i])->Variance();
      ExtReal mudif=(rv[i])->Mean()-mean;
      var = var + (sigsq+square(mudif))*probs[i];
   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movl $0x38, %edi
callq 0x84c0
movq %rax, %rdi
movq -0x1b8(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x1b0(%rbp)
movl 0x8(%rax), %esi
movq -0x10(%rbp), %rdx
callq 0x15e90
jmp 0x17d5a
movq -0x1b8(%rbp), %rax
movq -0x1b0(%rbp), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, 0x10(%rax)
jne 0x17d9c
callq 0x136a0
jmp 0x17d9c
movq -0x1b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x38, %esi
callq 0x84d0
jmp 0x18117
leaq -0x38(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x12180
movq -0x1b8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl -0x30(%rbp), %ecx
movl %ecx, 0x28(%rax)
leaq -0x48(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x12180
movq -0x1b8(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x30(%rax)
movl -0x40(%rbp), %ecx
movl %ecx, 0x38(%rax)
movl $0x0, -0x14(%rbp)
movq -0x1b8(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x17ee7
movq -0x1b8(%rbp), %rax
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, -0x1c0(%rbp)
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
movl %eax, -0x80(%rbp)
movsd %xmm0, -0x88(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x70(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x98(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x12180
movq -0x1c8(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x11e10
movq -0x1c0(%rbp), %rdi
movl %eax, -0xa0(%rbp)
movsd %xmm0, -0xa8(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rsi
callq 0x11b90
movl %eax, %ecx
movq -0x1b8(%rbp), %rax
movl %ecx, -0xb0(%rbp)
movsd %xmm0, -0xb8(%rbp)
movq -0xb8(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movl -0xb0(%rbp), %ecx
movl %ecx, -0x50(%rbp)
movq -0x58(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl -0x50(%rbp), %ecx
movl %ecx, 0x28(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x17de5
movl $0x0, -0x14(%rbp)
movq -0x1b8(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x1810e
movq -0x1b8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movl %eax, %ecx
movq -0x1b8(%rbp), %rax
movl %ecx, -0xd0(%rbp)
movsd %xmm0, -0xd8(%rbp)
movl -0xd0(%rbp), %ecx
movl %ecx, -0xc0(%rbp)
movq -0xd8(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
movq -0x1b8(%rbp), %rsi
movl %eax, -0x100(%rbp)
movsd %xmm0, -0x108(%rbp)
movl -0x100(%rbp), %eax
movl %eax, -0xf0(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0xf8(%rbp)
addq $0x20, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x11cd0
movl %eax, %ecx
movq -0x1b8(%rbp), %rax
movl %ecx, -0x110(%rbp)
movsd %xmm0, -0x118(%rbp)
movl -0x110(%rbp), %ecx
movl %ecx, -0xe0(%rbp)
movq -0x118(%rbp), %rcx
movq %rcx, -0xe8(%rbp)
addq $0x30, %rax
movq %rax, -0x1d0(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x19c70
movl %eax, -0x160(%rbp)
movsd %xmm0, -0x168(%rbp)
movl -0x160(%rbp), %eax
movl %eax, -0x150(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x11b90
movl %eax, -0x170(%rbp)
movsd %xmm0, -0x178(%rbp)
movl -0x170(%rbp), %eax
movl %eax, -0x140(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x188(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x12180
movq -0x1d8(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x11e10
movq -0x1d0(%rbp), %rdi
movl %eax, -0x190(%rbp)
movsd %xmm0, -0x198(%rbp)
movl -0x190(%rbp), %eax
movl %eax, -0x130(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x138(%rbp), %rsi
callq 0x11b90
movl %eax, %ecx
movq -0x1b8(%rbp), %rax
movl %ecx, -0x1a0(%rbp)
movsd %xmm0, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rcx
movq %rcx, -0x128(%rbp)
movl -0x1a0(%rbp), %ecx
movl %ecx, -0x120(%rbp)
movq -0x128(%rbp), %rcx
movq %rcx, 0x30(%rax)
movl -0x120(%rbp), %ecx
movl %ecx, 0x38(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x17eee
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x8860