// File: /workspace/github_cpp_makefile_star2_O1/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 0xcdbc
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 0x8326
testl %r15d, %r15d
je 0x106f2
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 0xc0ae
movq %rax, %rdi
callq 0xae00
movsd %xmm0, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x915c
movq %r15, %rdi
movq %rax, %rsi
callq 0x901a
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r14), %rdi
movl 0x8(%r14), %esi
addl %r13d, %esi
callq 0xc0ae
movq %rax, %rdi
callq 0xae06
movsd %xmm0, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movl $0x1, %edx
movq %r13, %rdi
callq 0x915c
movq %r15, %rdi
movq %rax, %rsi
callq 0x901a
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r14), %rdi
movl 0x8(%r14), %esi
addl %r13d, %esi
callq 0xc0ae
movq %rax, %rdi
callq 0xae0c
movsd %xmm0, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movl $0x2, %edx
movq %r13, %rdi
callq 0x915c
movq %r15, %rdi
movq %rax, %rsi
callq 0x901a
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%r14), %rdi
movl 0x8(%r14), %esi
addl %r13d, %esi
callq 0xc0ae
movq %rax, %rbp
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x915c
movq %r12, %rdi
movq %rax, %rsi
callq 0x901a
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movl $0x1, %edx
movq %r13, %rdi
callq 0x915c
movq %r12, %rdi
movq %rax, %rsi
callq 0x901a
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movl $0x2, %edx
movq %r13, %rdi
callq 0x915c
movq %r12, %rdi
movq %rax, %rsi
callq 0x901a
movsd (%rax), %xmm2
movq %rbp, %rdi
movsd (%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0xade6
incq %r13
cmpq %r13, %rbx
jne 0x1057b
leaq 0x20(%rsp), %rax
movaps -0x10(%rax), %xmm0
movq 0x8(%rsp), %rbx
movups %xmm0, 0x10(%rbx)
leaq 0x20(%rbx), %rdi
cmpq %rax, %rdi
je 0x10738
movq 0x28(%rsp), %rsi
xorps %xmm0, %xmm0
xorl %edx, %edx
callq 0xcc46
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x10738
movq 0x30(%rsp), %rsi
shlq $0x3, %rdx
movq 0x30(%rbx), %rdi
callq 0x64e0
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x10750
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 0x1076e
movq %rax, %r14
movq 0x8(%rsp), %rbx
jmp 0x1078e
movq %rax, %r14
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
movq 0x8(%rsp), %rbx
je 0x1078e
movq 0x30(%rsp), %rdi
shlq $0x3, %rsi
callq 0x6310
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x107a4
movq 0x30(%rbx), %rdi
shlq $0x3, %rsi
callq 0x6310
movq %r14, %rdi
callq 0x65b0