// File: /workspace/github_cpp_makefile_star2_O3/Chrom3D[P]Chrom3D/src/Model.cpp
// Function: Model::accept(Move&)
Move Model::accept(Move &mov) { // Accepts the coordinates of mov, returns the coordinates of the altered beads (as a new Move).
  Move oldStructure(mov.chr);
  oldStructure.start = mov.start;
  oldStructure.stop = mov.stop;
  
  uint movSize = (mov.stop-mov.start)+1;
  CoordinateMatrix oldMat(movSize,3);
  for(uint i=0; i!=movSize; i++) {
    // Store old coordinates:
    oldMat(i,0) = mov.chr[mov.start+i].getX();
    oldMat(i,1) = mov.chr[mov.start+i].getY();
    oldMat(i,2) = mov.chr[mov.start+i].getZ();
    // Set new coordinates:
    mov.chr[mov.start+i].setCoordinates(mov.mat(i,0), mov.mat(i,1), mov.mat(i,2));
  }
  oldStructure.mat = oldMat;
  
  return oldStructure;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, %r15
movq (%rdx), %rsi
callq 0xcd38
movl 0x8(%r14), %eax
movl %eax, 0x8(%r15)
movl 0xc(%r14), %ebx
movq %r15, 0x8(%rsp)
movl %ebx, 0xc(%r15)
subl %eax, %ebx
leal 0x1(%rbx), %r15d
leaq 0x10(%rsp), %rdi
movl $0x3, %edx
movq %r15, %rsi
callq 0x82e6
testl %r15d, %r15d
je 0x105fa
leaq 0x20(%rsp), %r15
leaq 0x20(%r14), %r12
movl %ebx, %ebx
incq %rbx
xorl %r13d, %r13d
movq (%r14), %rdi
movl 0x8(%r14), %esi
addl %r13d, %esi
callq 0xc00a
movq %rax, %rdi
callq 0xad6c
movsd %xmm0, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x9124
movq %r15, %rdi
movq %rax, %rsi
callq 0x8fe2
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r14), %rdi
movl 0x8(%r14), %esi
addl %r13d, %esi
callq 0xc00a
movq %rax, %rdi
callq 0xad72
movsd %xmm0, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movl $0x1, %edx
movq %r13, %rdi
callq 0x9124
movq %r15, %rdi
movq %rax, %rsi
callq 0x8fe2
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r14), %rdi
movl 0x8(%r14), %esi
addl %r13d, %esi
callq 0xc00a
movq %rax, %rdi
callq 0xad78
movsd %xmm0, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movl $0x2, %edx
movq %r13, %rdi
callq 0x9124
movq %r15, %rdi
movq %rax, %rsi
callq 0x8fe2
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r14), %rdi
movl 0x8(%r14), %esi
addl %r13d, %esi
callq 0xc00a
movq %rax, %rbp
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x9124
movq %r12, %rdi
movq %rax, %rsi
callq 0x8fe2
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movl $0x1, %edx
movq %r13, %rdi
callq 0x9124
movq %r12, %rdi
movq %rax, %rsi
callq 0x8fe2
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movl $0x2, %edx
movq %r13, %rdi
callq 0x9124
movq %r12, %rdi
movq %rax, %rsi
callq 0x8fe2
movsd (%rax), %xmm2
movq %rbp, %rdi
movsd (%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0xad52
incq %r13
cmpq %r13, %rbx
jne 0x10483
leaq 0x20(%rsp), %rax
movaps -0x10(%rax), %xmm0
movq 0x8(%rsp), %rbx
movups %xmm0, 0x10(%rbx)
leaq 0x20(%rbx), %rdi
cmpq %rax, %rdi
je 0x10640
movq 0x28(%rsp), %rsi
xorps %xmm0, %xmm0
xorl %edx, %edx
callq 0xcbba
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x10640
movq 0x30(%rsp), %rsi
shlq $0x3, %rdx
movq 0x30(%rbx), %rdi
callq 0x64e0
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x10658
movq 0x30(%rsp), %rdi
shlq $0x3, %rsi
callq 0x6310
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10676
movq %rax, %r14
movq 0x8(%rsp), %rbx
jmp 0x10696
movq %rax, %r14
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
movq 0x8(%rsp), %rbx
je 0x10696
movq 0x30(%rsp), %rdi
shlq $0x3, %rsi
callq 0x6310
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x106ac
movq 0x30(%rbx), %rdi
shlq $0x3, %rsi
callq 0x6310
movq %r14, %rdi
callq 0x65b0