// File: melop[P]admixem/./newran02/newran.cpp
// Function: PosGen::Build(bool)
void PosGen::Build(bool sym)                 // set up arrays
{
   #ifdef MONITOR
      cout << "building PosGen arrays\n";
   #endif
   int i;
   NotReady=false;
   sx=new Real[60]; sfx=new Real[60];
   if (!sx || !sfx) ErrorNoSpace();
   Real sxi=0.0; Real inc = sym ? 0.01 : 0.02;
   for (i=0; i<60; i++)
   {
      sx[i]=sxi; Real f1=Density(sxi); sfx[i]=f1;
      if (f1<=0.0) goto L20;
      sxi+=inc/f1;
   }
   Throw(Runtime_error("Newran: area too large"));
L20:
   if (i<50) Throw(Runtime_error("Newran: area too small"));
   xi = sym ? 2*i : i;
   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movb $0x0, 0x20(%rax)
movl $0x1e0, %edi            # imm = 0x1E0
callq 0x8040
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x1e0, %edi            # imm = 0x1E0
callq 0x8040
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x10(%rax)
je 0x1350c
movq -0x40(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x13511
callq 0x136a0
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movb -0x9(%rbp), %al
movsd 0x6315c(%rip), %xmm0    # 0x76680
movsd 0x6315c(%rip), %xmm1    # 0x76688
movsd %xmm1, -0x50(%rbp)
testb $0x1, %al
movsd %xmm0, -0x48(%rbp)
jne 0x13544
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x3c, -0x10(%rbp)
jge 0x135c2
movq -0x40(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
movq 0x10(%rdi), %rax
movslq -0x10(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x18(%rbp), %xmm0
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x40(%rbp), %rax
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movq 0x18(%rax), %rax
movslq -0x10(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
xorps %xmm0, %xmm0
ucomisd -0x28(%rbp), %xmm0
jb 0x135a3
jmp 0x1360f
movsd -0x20(%rbp), %xmm0
divsd -0x28(%rbp), %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x13555
movl $0x1, %edi
callq 0x8230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
leaq 0x633f2(%rip), %rsi     # 0x769cf
callq 0x12df0
jmp 0x135e4
movq -0x58(%rbp), %rdi
leaq 0x966a9(%rip), %rsi     # 0xa9c98
xorl %eax, %eax
movl %eax, %edx
callq 0x8820
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x8370
jmp 0x1368e
cmpl $0x32, -0x10(%rbp)
jge 0x13662
movl $0x1, %edi
callq 0x8230
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
leaq 0x633b6(%rip), %rsi     # 0x769e6
callq 0x12df0
jmp 0x13637
movq -0x60(%rbp), %rdi
leaq 0x96656(%rip), %rsi     # 0xa9c98
xorl %eax, %eax
movl %eax, %edx
callq 0x8820
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x8370
jmp 0x1368e
testb $0x1, -0x9(%rbp)
je 0x13672
movl -0x10(%rbp), %eax
shll %eax
movl %eax, -0x64(%rbp)
jmp 0x13678
movl -0x10(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x40(%rbp), %rax
movl -0x64(%rbp), %ecx
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x8(%rax)
addq $0x70, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x8860
nopw (%rax,%rax)