// File: Chrom3D[P]Chrom3D/src/Randomizer.cpp
// Function: TranslateRandomizer::randomize(Chromosome&, boost::random::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u>&)
Move TranslateRandomizer::randomize(Chromosome &chr, ENG &eng) {
   
  CoordinateVector tvec(3);
  tvec(0) = util::unif_int(-this->maxmove, this->maxmove, eng);
  tvec(1) = util::unif_int(-this->maxmove, this->maxmove, eng);
  tvec(2) = util::unif_int(-this->maxmove, this->maxmove, eng);

  CoordinateMatrix mat = chr.translate(tvec);
  Move mov(chr);
  mov.start = 0;
  mov.stop = chr.size()-1;
  mov.mat = mat;
  return mov;
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0x50(%rsp)
movq %rdi, %rax
movq %rax, 0x58(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0xc0(%rsp), %rdi
movl $0x3, %esi
callq 0xbe30
movq 0x60(%rsp), %rax
movsd 0x8(%rax), %xmm0
movaps %xmm0, %xmm1
movaps 0x35889(%rip), %xmm2    # 0x4f030
pxor %xmm2, %xmm1
cvttsd2si %xmm1, %rax
movl %eax, %edi
cvttsd2si %xmm0, %rax
movl %eax, %esi
movq 0xd8(%rsp), %rdx
callq 0x9980
movl %eax, 0x68(%rsp)
jmp 0x197cc
movl 0x68(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x40(%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0xc0(%rsp), %rdi
callq 0xb270
movq %rax, 0x48(%rsp)
jmp 0x197f2
movq 0x60(%rsp), %rax
movq 0x48(%rsp), %rcx
movsd 0x40(%rsp), %xmm0
movsd %xmm0, (%rcx)
movsd 0x8(%rax), %xmm0
movaps %xmm0, %xmm1
movaps 0x3581b(%rip), %xmm2    # 0x4f030
pxor %xmm2, %xmm1
cvttsd2si %xmm1, %rax
movl %eax, %edi
cvttsd2si %xmm0, %rax
movl %eax, %esi
movq 0xd8(%rsp), %rdx
callq 0x9980
movl %eax, 0x3c(%rsp)
jmp 0x1983a
movl 0x3c(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0xc0(%rsp), %rdi
movl $0x1, %esi
callq 0xb270
movq %rax, 0x30(%rsp)
jmp 0x19861
movq 0x60(%rsp), %rax
movq 0x30(%rsp), %rcx
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rcx)
movsd 0x8(%rax), %xmm0
movaps %xmm0, %xmm1
movaps 0x357ac(%rip), %xmm2    # 0x4f030
pxor %xmm2, %xmm1
cvttsd2si %xmm1, %rax
movl %eax, %edi
cvttsd2si %xmm0, %rax
movl %eax, %esi
movq 0xd8(%rsp), %rdx
callq 0x9980
movl %eax, 0x24(%rsp)
jmp 0x198a9
movl 0x24(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0xc0(%rsp), %rdi
movl $0x2, %esi
callq 0xb270
movq %rax, 0x18(%rsp)
jmp 0x198d0
movq 0x18(%rsp), %rax
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xb710
jmp 0x19900
movq 0x8(%rsp), %rsi
leaq 0x88(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x16670
jmp 0x19919
leaq 0x70(%rsp), %rdi
callq 0xb5b0
movq 0x50(%rsp), %rdi
movb $0x0, 0x6f(%rsp)
movq 0xe0(%rsp), %rsi
callq 0x192f0
jmp 0x1993c
movq 0x50(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0xe0(%rsp), %rdi
callq 0x154f0
movl %eax, 0x4(%rsp)
jmp 0x1995b
movq 0x50(%rsp), %rdi
movl 0x4(%rsp), %eax
decl %eax
movl %eax, 0xc(%rdi)
addq $0x10, %rdi
leaq 0x88(%rsp), %rsi
callq 0x17400
jmp 0x1997c
movb $0x1, 0x6f(%rsp)
testb $0x1, 0x6f(%rsp)
jne 0x19a03
jmp 0x199f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x19a37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xb5b0
jmp 0x19a37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x19a2a
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
callq 0x1a560
jmp 0x19a2a
movq 0x50(%rsp), %rdi
callq 0x1a560
leaq 0x88(%rsp), %rdi
callq 0xb2d0
leaq 0xc0(%rsp), %rdi
callq 0xb5b0
movq 0x58(%rsp), %rax
addq $0xf8, %rsp
retq
leaq 0x88(%rsp), %rdi
callq 0xb2d0
leaq 0xc0(%rsp), %rdi
callq 0xb5b0
movq 0xb8(%rsp), %rdi
callq 0x8870
nopw %cs:(%rax,%rax)